From b9284c5e7c0a5997ffb1136bd7a7585270e6d468 Mon Sep 17 00:00:00 2001 From: Adam Warski Date: Tue, 4 Nov 2008 17:07:01 +0000 Subject: [PATCH] HHH-3556: Envers documentation partially migrated git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@15498 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../main/docbook/en-US/Envers_Reference.xml | 56 - .../docbook/en-US/Hibernate_Reference.xml | 95 + .../docbook/en-US/content/architecture.xml | 382 ++ .../en-US/content/association_mapping.xml | 650 ++ .../docbook/en-US/content/basic_mapping.xml | 3587 ++++++++++ .../src/main/docbook/en-US/content/batch.xml | 374 ++ .../docbook/en-US/content/best_practices.xml | 250 + .../en-US/content/collection_mapping.xml | 1260 ++++ .../en-US/content/component_mapping.xml | 429 ++ .../docbook/en-US/content/configuration.xml | 1877 +++++- .../src/main/docbook/en-US/content/events.xml | 292 + .../main/docbook/en-US/content/example.xml | 87 - .../en-US/content/example_mappings.xml | 685 ++ .../en-US/content/example_parentchild.xml | 388 ++ .../docbook/en-US/content/example_weblog.xml | 457 ++ .../main/docbook/en-US/content/exceptions.xml | 106 - .../main/docbook/en-US/content/filters.xml | 173 + .../en-US/content/inheritance_mapping.xml | 518 ++ .../docbook/en-US/content/performance.xml | 1439 ++++ .../en-US/content/persistent_classes.xml | 561 ++ .../main/docbook/en-US/content/preface.xml | 96 +- .../docbook/en-US/content/query_criteria.xml | 463 ++ .../main/docbook/en-US/content/query_hql.xml | 1261 ++++ .../main/docbook/en-US/content/query_sql.xml | 784 +++ .../main/docbook/en-US/content/quickstart.xml | 148 - .../docbook/en-US/content/revisionlog.xml | 155 - .../docbook/en-US/content/session_api.xml | 1287 ++++ .../docbook/en-US/content/toolset_guide.xml | 631 ++ .../docbook/en-US/content/transactions.xml | 1136 ++++ .../main/docbook/en-US/content/tutorial.xml | 1617 +++++ .../src/main/docbook/en-US/content/xml.xml | 313 + .../main/docbook/en-US/images/AuthorWork.png | Bin 0 -> 6000 bytes .../docbook/en-US/images/AuthorWork.zargo | Bin 0 -> 8387 bytes .../en-US/images/CustomerOrderProduct.png | Bin 0 -> 5035 bytes .../en-US/images/CustomerOrderProduct.zargo | Bin 0 -> 7864 bytes .../docbook/en-US/images/EmployerEmployee.png | Bin 0 -> 8512 bytes .../en-US/images/EmployerEmployee.zargo | Bin 0 -> 9814 bytes .../main/docbook/en-US/images/full_cream.png | Bin 0 -> 9359 bytes .../main/docbook/en-US/images/full_cream.svg | 429 ++ .../docbook/en-US/images/hibernate_logo_a.png | Bin 0 -> 31862 bytes .../src/main/docbook/en-US/images/lite.png | Bin 0 -> 6821 bytes .../src/main/docbook/en-US/images/lite.svg | 334 + .../main/docbook/en-US/images/overview.png | Bin 0 -> 8433 bytes .../main/docbook/en-US/images/overview.svg | 250 + .../src/main/docbook/en-US/translators.xml | 154 + .../main/docbook/es-ES/Hibernate_Reference.po | 24 + .../docbook/es-ES/content/architecture.po | 549 ++ .../es-ES/content/association_mapping.po | 1127 ++++ .../docbook/es-ES/content/basic_mapping.po | 5524 ++++++++++++++++ .../src/main/docbook/es-ES/content/batch.po | 617 ++ .../docbook/es-ES/content/best_practices.po | 394 ++ .../es-ES/content/collection_mapping.po | 1997 ++++++ .../es-ES/content/component_mapping.po | 753 +++ .../docbook/es-ES/content/configuration.po | 2593 ++++++++ .../src/main/docbook/es-ES/content/events.po | 538 ++ .../docbook/es-ES/content/example_mappings.po | 1251 ++++ .../es-ES/content/example_parentchild.po | 586 ++ .../docbook/es-ES/content/example_weblog.po | 852 +++ .../src/main/docbook/es-ES/content/filters.po | 303 + .../es-ES/content/inheritance_mapping.po | 844 +++ .../main/docbook/es-ES/content/performance.po | 2387 +++++++ .../es-ES/content/persistent_classes.po | 993 +++ .../src/main/docbook/es-ES/content/preface.po | 177 + .../docbook/es-ES/content/query_criteria.po | 840 +++ .../main/docbook/es-ES/content/query_hql.po | 2230 +++++++ .../main/docbook/es-ES/content/query_sql.po | 1474 +++++ .../main/docbook/es-ES/content/quickstart.po | 474 ++ .../main/docbook/es-ES/content/session_api.po | 2148 ++++++ .../docbook/es-ES/content/toolset_guide.po | 969 +++ .../docbook/es-ES/content/transactions.po | 2079 ++++++ .../main/docbook/es-ES/content/tutorial.po | 3137 +++++++++ .../src/main/docbook/es-ES/content/xml.po | 520 ++ .../src/main/docbook/es-ES/legal_notice.po | 40 + .../main/docbook/fr-FR/Hibernate_Reference.po | 24 + .../docbook/fr-FR/content/architecture.po | 652 ++ .../fr-FR/content/association_mapping.po | 912 +++ .../docbook/fr-FR/content/basic_mapping.po | 5795 +++++++++++++++++ .../src/main/docbook/fr-FR/content/batch.po | 642 ++ .../docbook/fr-FR/content/best_practices.po | 466 ++ .../fr-FR/content/collection_mapping.po | 1956 ++++++ .../fr-FR/content/component_mapping.po | 687 ++ .../docbook/fr-FR/content/configuration.po | 3976 +++++++++++ .../src/main/docbook/fr-FR/content/events.po | 480 ++ .../docbook/fr-FR/content/example_mappings.po | 795 +++ .../fr-FR/content/example_parentchild.po | 617 ++ .../docbook/fr-FR/content/example_weblog.po | 484 ++ .../src/main/docbook/fr-FR/content/filters.po | 294 + .../fr-FR/content/inheritance_mapping.po | 864 +++ .../main/docbook/fr-FR/content/performance.po | 2686 ++++++++ .../fr-FR/content/persistent_classes.po | 889 +++ .../src/main/docbook/fr-FR/content/preface.po | 206 + .../docbook/fr-FR/content/query_criteria.po | 785 +++ .../main/docbook/fr-FR/content/query_hql.po | 2451 +++++++ .../main/docbook/fr-FR/content/query_sql.po | 1498 +++++ .../main/docbook/fr-FR/content/quickstart.po | 12 + .../main/docbook/fr-FR/content/session_api.po | 2267 +++++++ .../docbook/fr-FR/content/toolset_guide.po | 1234 ++++ .../docbook/fr-FR/content/transactions.po | 2173 ++++++ .../main/docbook/fr-FR/content/tutorial.po | 2919 +++++++++ .../src/main/docbook/fr-FR/content/xml.po | 451 ++ .../src/main/docbook/fr-FR/legal_notice.po | 40 + .../main/docbook/ja-JP/Hibernate_Reference.po | 24 + .../docbook/ja-JP/content/architecture.po | 634 ++ .../ja-JP/content/association_mapping.po | 874 +++ .../docbook/ja-JP/content/basic_mapping.po | 5651 ++++++++++++++++ .../src/main/docbook/ja-JP/content/batch.po | 630 ++ .../docbook/ja-JP/content/best_practices.po | 447 ++ .../ja-JP/content/collection_mapping.po | 1899 ++++++ .../ja-JP/content/component_mapping.po | 676 ++ .../docbook/ja-JP/content/configuration.po | 3233 +++++++++ .../src/main/docbook/ja-JP/content/events.po | 471 ++ .../docbook/ja-JP/content/example_mappings.po | 790 +++ .../ja-JP/content/example_parentchild.po | 603 ++ .../docbook/ja-JP/content/example_weblog.po | 484 ++ .../src/main/docbook/ja-JP/content/filters.po | 286 + .../ja-JP/content/inheritance_mapping.po | 842 +++ .../main/docbook/ja-JP/content/performance.po | 2553 ++++++++ .../ja-JP/content/persistent_classes.po | 856 +++ .../src/main/docbook/ja-JP/content/preface.po | 196 + .../docbook/ja-JP/content/query_criteria.po | 773 +++ .../main/docbook/ja-JP/content/query_hql.po | 2399 +++++++ .../main/docbook/ja-JP/content/query_sql.po | 1470 +++++ .../main/docbook/ja-JP/content/quickstart.po | 12 + .../main/docbook/ja-JP/content/session_api.po | 2218 +++++++ .../docbook/ja-JP/content/toolset_guide.po | 1198 ++++ .../docbook/ja-JP/content/transactions.po | 2070 ++++++ .../main/docbook/ja-JP/content/tutorial.po | 2777 ++++++++ .../src/main/docbook/ja-JP/content/xml.po | 442 ++ .../src/main/docbook/ja-JP/legal_notice.po | 40 + .../main/docbook/ko-KR/Hibernate_Reference.po | 24 + .../docbook/ko-KR/content/architecture.po | 622 ++ .../ko-KR/content/association_mapping.po | 883 +++ .../docbook/ko-KR/content/basic_mapping.po | 5624 ++++++++++++++++ .../src/main/docbook/ko-KR/content/batch.po | 636 ++ .../docbook/ko-KR/content/best_practices.po | 452 ++ .../ko-KR/content/collection_mapping.po | 1892 ++++++ .../ko-KR/content/component_mapping.po | 676 ++ .../docbook/ko-KR/content/configuration.po | 3255 +++++++++ .../src/main/docbook/ko-KR/content/events.po | 473 ++ .../docbook/ko-KR/content/example_mappings.po | 795 +++ .../ko-KR/content/example_parentchild.po | 603 ++ .../docbook/ko-KR/content/example_weblog.po | 484 ++ .../src/main/docbook/ko-KR/content/filters.po | 294 + .../ko-KR/content/inheritance_mapping.po | 829 +++ .../main/docbook/ko-KR/content/performance.po | 2604 ++++++++ .../ko-KR/content/persistent_classes.po | 857 +++ .../src/main/docbook/ko-KR/content/preface.po | 195 + .../docbook/ko-KR/content/query_criteria.po | 776 +++ .../main/docbook/ko-KR/content/query_hql.po | 2431 +++++++ .../main/docbook/ko-KR/content/query_sql.po | 1476 +++++ .../main/docbook/ko-KR/content/quickstart.po | 474 ++ .../main/docbook/ko-KR/content/session_api.po | 2215 +++++++ .../docbook/ko-KR/content/toolset_guide.po | 1195 ++++ .../docbook/ko-KR/content/transactions.po | 2068 ++++++ .../main/docbook/ko-KR/content/tutorial.po | 2792 ++++++++ .../src/main/docbook/ko-KR/content/xml.po | 446 ++ .../src/main/docbook/ko-KR/legal_notice.po | 40 + .../main/docbook/pot/Hibernate_Reference.pot | 0 .../main/docbook/pot/content/architecture.pot | 322 + .../pot/content/association_mapping.pot | 738 +++ .../docbook/pot/content/basic_mapping.pot | 3347 ++++++++++ .../src/main/docbook/pot/content/batch.pot | 373 ++ .../docbook/pot/content/best_practices.pot | 250 + .../pot/content/collection_mapping.pot | 1193 ++++ .../docbook/pot/content/component_mapping.pot | 476 ++ .../docbook/pot/content/configuration.pot | 2177 +++++++ .../src/main/docbook/pot/content/events.pot | 311 + .../docbook/pot/content/example_mappings.pot | 723 ++ .../pot/content/example_parentchild.pot | 397 ++ .../docbook/pot/content/example_weblog.pot | 478 ++ .../src/main/docbook/pot/content/filters.pot | 199 + .../pot/content/inheritance_mapping.pot | 631 ++ .../main/docbook/pot/content/performance.pot | 1556 +++++ .../pot/content/persistent_classes.pot | 566 ++ .../src/main/docbook/pot/content/preface.pot | 100 + .../docbook/pot/content/query_criteria.pot | 630 ++ .../main/docbook/pot/content/query_hql.pot | 1793 +++++ .../main/docbook/pot/content/query_sql.pot | 1112 ++++ .../main/docbook/pot/content/session_api.pot | 1354 ++++ .../docbook/pot/content/toolset_guide.pot | 950 +++ .../main/docbook/pot/content/transactions.pot | 949 +++ .../src/main/docbook/pot/content/tutorial.pot | 1690 +++++ .../src/main/docbook/pot/content/xml.pot | 356 + .../src/main/docbook/pot/legal_notice.pot | 58 + .../main/docbook/pt-BR/Hibernate_Reference.po | 24 + .../docbook/pt-BR/content/architecture.po | 644 ++ .../pt-BR/content/association_mapping.po | 914 +++ .../docbook/pt-BR/content/basic_mapping.po | 5778 ++++++++++++++++ .../src/main/docbook/pt-BR/content/batch.po | 650 ++ .../docbook/pt-BR/content/best_practices.po | 454 ++ .../pt-BR/content/collection_mapping.po | 1915 ++++++ .../pt-BR/content/component_mapping.po | 685 ++ .../docbook/pt-BR/content/configuration.po | 3888 +++++++++++ .../src/main/docbook/pt-BR/content/events.po | 481 ++ .../docbook/pt-BR/content/example_mappings.po | 802 +++ .../pt-BR/content/example_parentchild.po | 605 ++ .../docbook/pt-BR/content/example_weblog.po | 484 ++ .../src/main/docbook/pt-BR/content/filters.po | 290 + .../pt-BR/content/inheritance_mapping.po | 851 +++ .../main/docbook/pt-BR/content/performance.po | 2584 ++++++++ .../pt-BR/content/persistent_classes.po | 858 +++ .../src/main/docbook/pt-BR/content/preface.po | 204 + .../docbook/pt-BR/content/query_criteria.po | 772 +++ .../main/docbook/pt-BR/content/query_hql.po | 2437 +++++++ .../main/docbook/pt-BR/content/query_sql.po | 1485 +++++ .../main/docbook/pt-BR/content/quickstart.po | 12 + .../main/docbook/pt-BR/content/session_api.po | 2231 +++++++ .../docbook/pt-BR/content/toolset_guide.po | 1179 ++++ .../docbook/pt-BR/content/transactions.po | 2126 ++++++ .../main/docbook/pt-BR/content/tutorial.po | 2829 ++++++++ .../src/main/docbook/pt-BR/content/xml.po | 456 ++ .../src/main/docbook/pt-BR/legal_notice.po | 40 + .../main/docbook/zh-CN/Hibernate_Reference.po | 24 + .../docbook/zh-CN/content/architecture.po | 594 ++ .../zh-CN/content/association_mapping.po | 871 +++ .../docbook/zh-CN/content/basic_mapping.po | 5429 +++++++++++++++ .../src/main/docbook/zh-CN/content/batch.po | 608 ++ .../docbook/zh-CN/content/best_practices.po | 428 ++ .../zh-CN/content/collection_mapping.po | 1832 ++++++ .../zh-CN/content/component_mapping.po | 653 ++ .../docbook/zh-CN/content/configuration.po | 3731 +++++++++++ .../src/main/docbook/zh-CN/content/events.po | 457 ++ .../docbook/zh-CN/content/example_mappings.po | 785 +++ .../zh-CN/content/example_parentchild.po | 572 ++ .../docbook/zh-CN/content/example_weblog.po | 481 ++ .../src/main/docbook/zh-CN/content/filters.po | 286 + .../zh-CN/content/inheritance_mapping.po | 820 +++ .../main/docbook/zh-CN/content/performance.po | 2463 +++++++ .../zh-CN/content/persistent_classes.po | 815 +++ .../src/main/docbook/zh-CN/content/preface.po | 180 + .../docbook/zh-CN/content/query_criteria.po | 750 +++ .../main/docbook/zh-CN/content/query_hql.po | 2347 +++++++ .../main/docbook/zh-CN/content/query_sql.po | 1426 ++++ .../main/docbook/zh-CN/content/quickstart.po | 12 + .../main/docbook/zh-CN/content/session_api.po | 2127 ++++++ .../docbook/zh-CN/content/toolset_guide.po | 1183 ++++ .../docbook/zh-CN/content/transactions.po | 1934 ++++++ .../main/docbook/zh-CN/content/tutorial.po | 2662 ++++++++ .../src/main/docbook/zh-CN/content/xml.po | 433 ++ .../src/main/docbook/zh-CN/legal_notice.po | 40 + 240 files changed, 255669 insertions(+), 739 deletions(-) delete mode 100644 documentation/envers/src/main/docbook/en-US/Envers_Reference.xml create mode 100644 documentation/envers/src/main/docbook/en-US/Hibernate_Reference.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/architecture.xml create mode 100755 documentation/envers/src/main/docbook/en-US/content/association_mapping.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/basic_mapping.xml create mode 100755 documentation/envers/src/main/docbook/en-US/content/batch.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/best_practices.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/collection_mapping.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/component_mapping.xml create mode 100755 documentation/envers/src/main/docbook/en-US/content/events.xml delete mode 100644 documentation/envers/src/main/docbook/en-US/content/example.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/example_mappings.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/example_parentchild.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/example_weblog.xml delete mode 100644 documentation/envers/src/main/docbook/en-US/content/exceptions.xml create mode 100755 documentation/envers/src/main/docbook/en-US/content/filters.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/inheritance_mapping.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/performance.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/persistent_classes.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/query_criteria.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/query_hql.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/query_sql.xml delete mode 100644 documentation/envers/src/main/docbook/en-US/content/quickstart.xml delete mode 100644 documentation/envers/src/main/docbook/en-US/content/revisionlog.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/session_api.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/toolset_guide.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/transactions.xml create mode 100644 documentation/envers/src/main/docbook/en-US/content/tutorial.xml create mode 100755 documentation/envers/src/main/docbook/en-US/content/xml.xml create mode 100644 documentation/envers/src/main/docbook/en-US/images/AuthorWork.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/AuthorWork.zargo create mode 100644 documentation/envers/src/main/docbook/en-US/images/CustomerOrderProduct.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/CustomerOrderProduct.zargo create mode 100644 documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.zargo create mode 100644 documentation/envers/src/main/docbook/en-US/images/full_cream.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/full_cream.svg create mode 100644 documentation/envers/src/main/docbook/en-US/images/hibernate_logo_a.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/lite.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/lite.svg create mode 100644 documentation/envers/src/main/docbook/en-US/images/overview.png create mode 100644 documentation/envers/src/main/docbook/en-US/images/overview.svg create mode 100644 documentation/envers/src/main/docbook/en-US/translators.xml create mode 100644 documentation/envers/src/main/docbook/es-ES/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/batch.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/events.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/filters.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/performance.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/preface.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/es-ES/content/xml.po create mode 100644 documentation/envers/src/main/docbook/es-ES/legal_notice.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/batch.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/events.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/filters.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/performance.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/preface.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/content/xml.po create mode 100644 documentation/envers/src/main/docbook/fr-FR/legal_notice.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/batch.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/events.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/filters.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/performance.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/preface.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/content/xml.po create mode 100644 documentation/envers/src/main/docbook/ja-JP/legal_notice.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/batch.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/events.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/filters.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/performance.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/preface.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/content/xml.po create mode 100644 documentation/envers/src/main/docbook/ko-KR/legal_notice.po create mode 100644 documentation/envers/src/main/docbook/pot/Hibernate_Reference.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/architecture.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/association_mapping.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/basic_mapping.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/batch.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/best_practices.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/collection_mapping.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/component_mapping.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/configuration.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/events.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/example_mappings.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/example_parentchild.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/example_weblog.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/filters.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/inheritance_mapping.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/performance.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/persistent_classes.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/preface.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/query_criteria.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/query_hql.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/query_sql.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/session_api.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/toolset_guide.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/transactions.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/tutorial.pot create mode 100644 documentation/envers/src/main/docbook/pot/content/xml.pot create mode 100644 documentation/envers/src/main/docbook/pot/legal_notice.pot create mode 100644 documentation/envers/src/main/docbook/pt-BR/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/batch.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/events.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/filters.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/performance.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/preface.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/content/xml.po create mode 100644 documentation/envers/src/main/docbook/pt-BR/legal_notice.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/Hibernate_Reference.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/architecture.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/association_mapping.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/basic_mapping.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/batch.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/best_practices.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/collection_mapping.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/component_mapping.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/configuration.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/events.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/example_mappings.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/example_parentchild.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/example_weblog.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/filters.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/inheritance_mapping.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/performance.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/persistent_classes.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/preface.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/query_criteria.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/query_hql.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/query_sql.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/quickstart.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/session_api.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/toolset_guide.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/transactions.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/tutorial.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/content/xml.po create mode 100644 documentation/envers/src/main/docbook/zh-CN/legal_notice.po diff --git a/documentation/envers/src/main/docbook/en-US/Envers_Reference.xml b/documentation/envers/src/main/docbook/en-US/Envers_Reference.xml deleted file mode 100644 index fba7cb830b..0000000000 --- a/documentation/envers/src/main/docbook/en-US/Envers_Reference.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -]> - - - - - Hibernate Envers - Easy Entity Auditing - Hibernate Envers Reference Documentation - &versionNumber; - &versionNumber; - 1 - - ©rightYear; - ©rightHolder; - - - - - - - - - - - - - - - diff --git a/documentation/envers/src/main/docbook/en-US/Hibernate_Reference.xml b/documentation/envers/src/main/docbook/en-US/Hibernate_Reference.xml new file mode 100644 index 0000000000..c71d9cf64f --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/Hibernate_Reference.xml @@ -0,0 +1,95 @@ + + + + + +]> + + + + + HIBERNATE - Relational Persistence for Idiomatic Java + Hibernate Reference Documentation + &versionNumber; + &versionNumber; + 1 + + + + + + + + + + ©rightYear; + ©rightHolder; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/architecture.xml b/documentation/envers/src/main/docbook/en-US/content/architecture.xml new file mode 100644 index 0000000000..414f84b4ca --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/architecture.xml @@ -0,0 +1,382 @@ + + + + + + + + Architecture + + + Overview + + + A (very) high-level view of the Hibernate architecture: + + + + + + + + + + + + + This diagram shows Hibernate using the database and configuration data to + provide persistence services (and persistent objects) to the application. + + + + We would like to show a more detailed view of the runtime architecture. + Unfortunately, Hibernate is flexible and supports several approaches. We will + show the two extremes. The "lite" architecture has the application + provide its own JDBC connections and manage its own transactions. This approach + uses a minimal subset of Hibernate's APIs: + + + + + + + + + + + + + The "full cream" architecture abstracts the application away from the + underlying JDBC/JTA APIs and lets Hibernate take care of the details. + + + + + + + + + + + + + Heres some definitions of the objects in the diagrams: + + + + SessionFactory (org.hibernate.SessionFactory) + + + A threadsafe (immutable) cache of compiled mappings for a single database. + A factory for Session and a client of + ConnectionProvider. Might hold an optional (second-level) + cache of data that is reusable between transactions, at a + process- or cluster-level. + + + + + Session (org.hibernate.Session) + + + A single-threaded, short-lived object representing a conversation between + the application and the persistent store. Wraps a JDBC connection. Factory + for Transaction. Holds a mandatory (first-level) cache + of persistent objects, used when navigating the object graph or looking up + objects by identifier. + + + + + Persistent objects and collections + + + Short-lived, single threaded objects containing persistent state and business + function. These might be ordinary JavaBeans/POJOs, the only special thing about + them is that they are currently associated with (exactly one) + Session. As soon as the Session is closed, + they will be detached and free to use in any application layer (e.g. directly + as data transfer objects to and from presentation). + + + + + Transient and detached objects and collections + + + Instances of persistent classes that are not currently associated with a + Session. They may have been instantiated by + the application and not (yet) persisted or they may have been instantiated by a + closed Session. + + + + + Transaction (org.hibernate.Transaction) + + + (Optional) A single-threaded, short-lived object used by the application to + specify atomic units of work. Abstracts application from underlying JDBC, + JTA or CORBA transaction. A Session might span several + Transactions in some cases. However, transaction demarcation, + either using the underlying API or Transaction, is never + optional! + + + + + ConnectionProvider (org.hibernate.connection.ConnectionProvider) + + + (Optional) A factory for (and pool of) JDBC connections. Abstracts application from + underlying Datasource or DriverManager. + Not exposed to application, but can be extended/implemented by the developer. + + + + + TransactionFactory (org.hibernate.TransactionFactory) + + + (Optional) A factory for Transaction instances. Not exposed to the + application, but can be extended/implemented by the developer. + + + + + Extension Interfaces + + + Hibernate offers many optional extension interfaces you can implement to customize + the behavior of your persistence layer. See the API documentation for details. + + + + + + + + Given a "lite" architecture, the application bypasses the + Transaction/TransactionFactory and/or + ConnectionProvider APIs to talk to JTA or JDBC directly. + + + + + Instance states + + An instance of a persistent classes may be in one of three different states, + which are defined with respect to a persistence context. + The Hibernate Session object is the persistence context: + + + + + transient + + + The instance is not, and has never been associated with + any persistence context. It has no persistent identity + (primary key value). + + + + + persistent + + + The instance is currently associated with a persistence + context. It has a persistent identity (primary key value) + and, perhaps, a corresponding row in the database. For a + particular persistence context, Hibernate + guarantees that persistent identity + is equivalent to Java identity (in-memory location of the + object). + + + + + detached + + + The instance was once associated with a persistence + context, but that context was closed, or the instance + was serialized to another process. It has a persistent + identity and, perhaps, a corresponding row in the database. + For detached instances, Hibernate makes no guarantees + about the relationship between persistent identity and + Java identity. + + + + + + + + JMX Integration + + + JMX is the J2EE standard for management of Java components. Hibernate may be managed via + a JMX standard service. We provide an MBean implementation in the distribution, + org.hibernate.jmx.HibernateService. + + + + For an example how to deploy Hibernate as a JMX service on the JBoss Application Server, + please see the JBoss User Guide. On JBoss AS, you also get these benefits if you deploy + using JMX: + + + + + + Session Management: The Hibernate Session's life cycle + can be automatically bound to the scope of a JTA transaction. This means you no + longer have to manually open and close the Session, this + becomes the job of a JBoss EJB interceptor. You also don't have to worry about + transaction demarcation in your code anymore (unless you'd like to write a portable + persistence layer of course, use the optional Hibernate Transaction + API for this). You call the HibernateContext to access a + Session. + + + + + HAR deployment: Usually you deploy the Hibernate JMX service using a JBoss + service deployment descriptor (in an EAR and/or SAR file), it supports all the usual + configuration options of a Hibernate SessionFactory. However, you still + have to name all your mapping files in the deployment descriptor. If you decide to use + the optional HAR deployment, JBoss will automatically detect all mapping files in your + HAR file. + + + + + + Consult the JBoss AS user guide for more information about these options. + + + + Another feature available as a JMX service are runtime Hibernate statistics. See + . + + + + + JCA Support + + Hibernate may also be configured as a JCA connector. Please see the website for more + details. Please note that Hibernate JCA support is still considered experimental. + + + + + Contextual Sessions + + Most applications using Hibernate need some form of "contextual" sessions, where a given + session is in effect throughout the scope of a given context. However, across applications + the definition of what constitutes a context is typically different; and different contexts + define different scopes to the notion of current. Applications using Hibernate prior + to version 3.0 tended to utilize either home-grown ThreadLocal-based + contextual sessions, helper classes such as HibernateUtil, or utilized + third-party frameworks (such as Spring or Pico) which provided proxy/interception-based contextual sessions. + + + Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() + method. Initially, this assumed usage of JTA transactions, where the + JTA transaction defined both the scope and context of a current session. + The Hibernate team maintains that, given the maturity of the numerous stand-alone + JTA TransactionManager implementations out there, most (if not all) + applications should be using JTA transaction management whether or not + they are deployed into a J2EE container. Based on that, the + JTA-based contextual sessions is all you should ever need to use. + + + However, as of version 3.1, the processing behind + SessionFactory.getCurrentSession() is now pluggable. To that + end, a new extension interface (org.hibernate.context.CurrentSessionContext) + and a new configuration parameter (hibernate.current_session_context_class) + have been added to allow pluggability of the scope and context of defining current sessions. + + + See the Javadocs for the org.hibernate.context.CurrentSessionContext + interface for a detailed discussion of its contract. It defines a single method, + currentSession(), by which the implementation is responsible for + tracking the current contextual session. Out-of-the-box, Hibernate comes with three + implementations of this interface. + + + + + + org.hibernate.context.JTASessionContext - current sessions + are tracked and scoped by a JTA transaction. The processing + here is exactly the same as in the older JTA-only approach. See the Javadocs + for details. + + + + + org.hibernate.context.ThreadLocalSessionContext - current + sessions are tracked by thread of execution. Again, see the Javadocs for details. + + + + + org.hibernate.context.ManagedSessionContext - current + sessions are tracked by thread of execution. However, you are responsible to + bind and unbind a Session instance with static methods + on this class, it does never open, flush, or close a Session. + + + + + + The first two implementations provide a "one session - one database transaction" programming + model, also known and used as session-per-request. The beginning + and end of a Hibernate session is defined by the duration of a database transaction. + If you use programmatic transaction demarcation in plain JSE without JTA, you are advised to + use the Hibernate Transaction API to hide the underlying transaction system + from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you + execute in an EJB container that supports CMT, transaction boundaries are defined declaratively + and you don't need any transaction or session demarcation operations in your code. + Refer to for more information and code examples. + + + + The hibernate.current_session_context_class configuration parameter + defines which org.hibernate.context.CurrentSessionContext implementation + should be used. Note that for backwards compatibility, if this config param is not set + but a org.hibernate.transaction.TransactionManagerLookup is configured, + Hibernate will use the org.hibernate.context.JTASessionContext. + Typically, the value of this parameter would just name the implementation class to + use; for the three out-of-the-box implementations, however, there are three corresponding + short names, "jta", "thread", and "managed". + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/association_mapping.xml b/documentation/envers/src/main/docbook/en-US/content/association_mapping.xml new file mode 100755 index 0000000000..e57d361d38 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/association_mapping.xml @@ -0,0 +1,650 @@ + + + + + + + + Association Mappings + + + Introduction + + + Association mappings are the often most difficult thing to get right. In + this section we'll go through the canonical cases one by one, starting + with unidirectional mappings, and then considering the bidirectional cases. + We'll use Person and Address in all + the examples. + + + + We'll classify associations by whether or not they map to an intervening + join table, and by multiplicity. + + + + Nullable foreign keys are not considered good practice in traditional data + modelling, so all our examples use not null foreign keys. This is not a + requirement of Hibernate, and the mappings will all work if you drop the + nullability constraints. + + + + + + Unidirectional associations + + + many to one + + + A unidirectional many-to-one association is the most + common kind of unidirectional association. + + + + + + + + + + + + + +]]> + + + + + + one to one + + + A unidirectional one-to-one association on a foreign key + is almost identical. The only difference is the column unique constraint. + + + + + + + + + + + + + +]]> + + + + A unidirectional one-to-one association on a primary key + usually uses a special id generator. (Notice that we've reversed the direction + of the association in this example.) + + + + + + + + + + + + person + + + +]]> + + + + + + one to many + + + A unidirectional one-to-many association on a foreign key + is a very unusual case, and is not really recommended. + + + + + + + + + + + + + + + + +]]> + + + + We think it's better to use a join table for this kind of association. + + + + + + + + Unidirectional associations with join tables + + + one to many + + + A unidirectional one-to-many association on a join table + is much preferred. Notice that by specifying unique="true", + we have changed the multiplicity from many-to-many to one-to-many. + + + + + + + + + + + + + + + + +]]> + + + + + + many to one + + + A unidirectional many-to-one association on a join table + is quite common when the association is optional. + + + + + + + + + + + + + + + + +]]> + + + + + + one to one + + + A unidirectional one-to-one association on a join table + is extremely unusual, but possible. + + + + + + + + + + + + + + + + +]]> + + + + + + many to many + + + Finally, we have a unidirectional many-to-many association. + + + + + + + + + + + + + + + + +]]> + + + + + + + + Bidirectional associations + + + one to many / many to one + + + A bidirectional many-to-one association is the + most common kind of association. (This is the standard parent/child + relationship.) + + + + + + + + + + + + + + + + + +]]> + + + + + If you use a List (or other indexed collection) you need + to set the key column of the foreign key to not null, + and let Hibernate manage the association from the collections side to maintain the index + of each element (making the other side virtually inverse by setting + update="false" and insert="false"): + + + + + ... + + + + + + ... + + + + + +]]> + + + It is important that you define not-null="true" on the + <key> element of the collection mapping if the + underlying foreign key column is NOT NULL. Don't only + declare not-null="true" on a possible nested + <column> element, but on the <key> + element. + + + + + + one to one + + + A bidirectional one-to-one association on a foreign key + is quite common. + + + + + + + + + + + + + + +]]> + + + + A bidirectional one-to-one association on a primary key + uses the special id generator. + + + + + + + + + + + + + person + + + +]]> + + + + + + + + Bidirectional associations with join tables + + + one to many / many to one + + + A bidirectional one-to-many association on a join table. + Note that the inverse="true" can go on either end of the + association, on the collection, or on the join. + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + one to one + + + A bidirectional one-to-one association on a join table + is extremely unusual, but possible. + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + many to many + + + Finally, we have a bidirectional many-to-many association. + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + More complex association mappings + + + More complex association joins are extremely rare. + Hibernate makes it possible to handle more complex situations using + SQL fragments embedded in the mapping document. For example, if a table + with historical account information data defines + accountNumber, effectiveEndDate + and effectiveStartDatecolumns, mapped as follows: + + + + + + case when effectiveEndDate is null then 1 else 0 end + + + +]]> + + + Then we can map an association to the current instance + (the one with null effectiveEndDate) using: + + + + + '1' +]]> + + + In a more complex example, imagine that the association between + Employee and Organization is maintained + in an Employment table full of historical employment data. + Then an association to the employee's most recent employer + (the one with the most recent startDate) might be mapped this way: + + + + + + select employeeId, orgId + from Employments + group by orgId + having startDate = max(startDate) + + +]]> + + + You can get quite creative with this functionality, but it is usually more practical + to handle these kinds of cases using HQL or a criteria query. + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/basic_mapping.xml b/documentation/envers/src/main/docbook/en-US/content/basic_mapping.xml new file mode 100644 index 0000000000..56fdc875f5 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/basic_mapping.xml @@ -0,0 +1,3587 @@ + + + + + + + Basic O/R Mapping + + + Mapping declaration + + + Object/relational mappings are usually defined in an XML document. The mapping + document is designed to be readable and hand-editable. The mapping language is + Java-centric, meaning that mappings are constructed around persistent class + declarations, not table declarations. + + + + Note that, even though many Hibernate users choose to write the XML by hand, + a number of tools exist to generate the mapping document, including XDoclet, + Middlegen and AndroMDA. + + + + Lets kick off with an example mapping: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + We will now discuss the content of the mapping document. We will only describe the + document elements and attributes that are used by Hibernate at runtime. The mapping + document also contains some extra optional attributes and elements that affect the + database schemas exported by the schema export tool. (For example the + not-null attribute.) + + + + + + Doctype + + + All XML mappings should declare the doctype shown. The actual DTD may be found + at the URL above, in the directory hibernate-x.x.x/src/org/hibernate + or in hibernate3.jar. Hibernate will always look for + the DTD in its classpath first. If you experience lookups of the DTD using an + Internet connection, check your DTD declaration against the contents of your + claspath. + + + + EntityResolver + + As mentioned previously, Hibernate will first attempt to resolve DTDs in its classpath. The + manner in which it does this is by registering a custom org.xml.sax.EntityResolver + implementation with the SAXReader it uses to read in the xml files. This custom + EntityResolver recognizes two different systemId namespaces. + + + + + a hibernate namespace is recognized whenever the + resolver encounteres a systemId starting with + http://hibernate.sourceforge.net/; the resolver + attempts to resolve these entities via the classlaoder which loaded + the Hibernate classes. + + + + + a user namespace is recognized whenever the + resolver encounteres a systemId using a classpath:// + URL protocol; the resolver will attempt to resolve these entities + via (1) the current thread context classloader and (2) the + classloader which loaded the Hibernate classes. + + + + + An example of utilizing user namespacing: + + + +]> + + + + + ... + + + &types; +]]> + + Where types.xml is a resource in the your.domain + package and contains a custom typedef. + + + + + + hibernate-mapping + + + This element has several optional attributes. The schema and + catalog attributes specify that tables referred to in this mapping + belong to the named schema and/or catalog. If specified, tablenames will be qualified + by the given schema and catalog names. If missing, tablenames will be unqualified. + The default-cascade attribute specifies what cascade style + should be assumed for properties and collections which do not specify a + cascade attribute. The auto-import attribute lets us + use unqualified class names in the query language, by default. + + + + + + + + + + + + + ]]> + + + + schema (optional): The name of a database schema. + + + + + catalog (optional): The name of a database catalog. + + + + + default-cascade (optional - defaults to none): + A default cascade style. + + + + + default-access (optional - defaults to property): + The strategy Hibernate should use for accessing all properties. Can be a custom + implementation of PropertyAccessor. + + + + + default-lazy (optional - defaults to true): + The default value for unspecifed lazy attributes of class and + collection mappings. + + + + + auto-import (optional - defaults to true): + Specifies whether we can use unqualified class names (of classes in this mapping) + in the query language. + + + + + package (optional): Specifies a package prefix to assume for + unqualified class names in the mapping document. + + + + + + + If you have two persistent classes with the same (unqualified) name, you should set + auto-import="false". Hibernate will throw an exception if you attempt + to assign two classes to the same "imported" name. + + + + Note that the hibernate-mapping element allows you to nest + several persistent <class> mappings, as shown above. + It is however good practice (and expected by some tools) to map only a single + persistent class (or a single class hierarchy) in one mapping file and name + it after the persistent superclass, e.g. Cat.hbm.xml, + Dog.hbm.xml, or if using inheritance, + Animal.hbm.xml. + + + + + + class + + + You may declare a persistent class using the class element: + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + name (optional): The fully qualified Java class name of the + persistent class (or interface). If this attribute is missing, it is assumed + that the mapping is for a non-POJO entity. + + + + + table (optional - defaults to the unqualified class name): The + name of its database table. + + + + + discriminator-value (optional - defaults to the class name): A value + that distiguishes individual subclasses, used for polymorphic behaviour. Acceptable + values include null and not null. + + + + + mutable (optional, defaults to true): Specifies + that instances of the class are (not) mutable. + + + + + schema (optional): Override the schema name specified by + the root <hibernate-mapping> element. + + + + + catalog (optional): Override the catalog name specified by + the root <hibernate-mapping> element. + + + + + proxy (optional): Specifies an interface to use for lazy + initializing proxies. You may specify the name of the class itself. + + + + + dynamic-update (optional, defaults to false): + Specifies that UPDATE SQL should be generated at runtime and + contain only those columns whose values have changed. + + + + + dynamic-insert (optional, defaults to false): + Specifies that INSERT SQL should be generated at runtime and + contain only the columns whose values are not null. + + + + + select-before-update (optional, defaults to false): + Specifies that Hibernate should never perform an SQL UPDATE + unless it is certain that an object is actually modified. In certain cases (actually, only + when a transient object has been associated with a new session using update()), + this means that Hibernate will perform an extra SQL SELECT to determine + if an UPDATE is actually required. + + + + + polymorphism (optional, defaults to implicit): + Determines whether implicit or explicit query polymorphism is used. + + + + + where (optional) specify an arbitrary SQL WHERE + condition to be used when retrieving objects of this class + + + + + persister (optional): Specifies a custom ClassPersister. + + + + + batch-size (optional, defaults to 1) specify a "batch size" + for fetching instances of this class by identifier. + + + + + optimistic-lock (optional, defaults to version): + Determines the optimistic locking strategy. + + + + + lazy (optional): Lazy fetching may be completely disabled by setting + lazy="false". + + + + + entity-name (optional, defaults to the class name): Hibernate3 + allows a class to be mapped multiple times (to different tables, potentially), + and allows entity mappings that are represented by Maps or XML at the Java level. + In these cases, you should provide an explicit arbitrary name for the entity. See + and + for more information. + + + + + check (optional): A SQL expression used to generate a multi-row + check constraint for automatic schema generation. + + + + + rowid (optional): Hibernate can use so called ROWIDs on databases + which support. E.g. on Oracle, Hibernate can use the rowid extra + column for fast updates if you set this option to rowid. A ROWID + is an implementation detail and represents the physical location of a stored tuple. + + + + + subselect (optional): Maps an immutable and read-only entity + to a database subselect. Useful if you want to have a view instead of a base table, + but don't. See below for more information. + + + + + abstract (optional): Used to mark abstract superclasses in + <union-subclass> hierarchies. + + + + + + + It is perfectly acceptable for the named persistent class to be an interface. You would then + declare implementing classes of that interface using the <subclass> + element. You may persist any static inner class. You should specify the + class name using the standard form ie. eg.Foo$Bar. + + + + Immutable classes, mutable="false", may not be updated or deleted by the + application. This allows Hibernate to make some minor performance optimizations. + + + + The optional proxy attribute enables lazy initialization of persistent + instances of the class. Hibernate will initially return CGLIB proxies which implement + the named interface. The actual persistent object will be loaded when a method of the + proxy is invoked. See "Initializing collections and proxies" below. + + + Implicit polymorphism means that instances of the class will be returned + by a query that names any superclass or implemented interface or the class and that instances + of any subclass of the class will be returned by a query that names the class itself. + Explicit polymorphism means that class instances will be returned only + by queries that explicitly name that class and that queries that name the class will return + only instances of subclasses mapped inside this <class> declaration + as a <subclass> or <joined-subclass>. For + most purposes the default, polymorphism="implicit", is appropriate. + Explicit polymorphism is useful when two different classes are mapped to the same table + (this allows a "lightweight" class that contains a subset of the table columns). + + + + The persister attribute lets you customize the persistence strategy used for + the class. You may, for example, specify your own subclass of + org.hibernate.persister.EntityPersister or you might even provide a + completely new implementation of the interface + org.hibernate.persister.ClassPersister that implements persistence via, + for example, stored procedure calls, serialization to flat files or LDAP. See + org.hibernate.test.CustomPersister for a simple example (of "persistence" + to a Hashtable). + + + + Note that the dynamic-update and dynamic-insert + settings are not inherited by subclasses and so may also be specified on the + <subclass> or <joined-subclass> elements. + These settings may increase performance in some cases, but might actually decrease + performance in others. Use judiciously. + + + + Use of select-before-update will usually decrease performance. It is very + useful to prevent a database update trigger being called unnecessarily if you reattach a + graph of detached instances to a Session. + + + + If you enable dynamic-update, you will have a choice of optimistic + locking strategies: + + + + + version check the version/timestamp columns + + + + + all check all columns + + + + + dirty check the changed columns, allowing some concurrent updates + + + + + none do not use optimistic locking + + + + + We very strongly recommend that you use version/timestamp + columns for optimistic locking with Hibernate. This is the optimal strategy with + respect to performance and is the only strategy that correctly handles modifications + made to detached instances (ie. when Session.merge() is used). + + + + There is no difference between a view and a base table for a Hibernate mapping, as + expected this is transparent at the database level (note that some DBMS don't support + views properly, especially with updates). Sometimes you want to use a view, but can't + create one in the database (ie. with a legacy schema). In this case, you can map an + immutable and read-only entity to a given SQL subselect expression: + + + + + select item.name, max(bid.amount), count(*) + from item + join bid on bid.item_id = item.id + group by item.name + + + + + ... +]]> + + + Declare the tables to synchronize this entity with, ensuring that auto-flush happens + correctly, and that queries against the derived entity do not return stale data. + The <subselect> is available as both as an attribute and + a nested mapping element. + + + + + + id + + + Mapped classes must declare the primary key column of the database + table. Most classes will also have a JavaBeans-style property holding the unique identifier + of an instance. The <id> element defines the mapping from that + property to the primary key column. + + + + + + + + + + + + node="element-name|@attribute-name|element/@attribute|." + + +]]> + + + + name (optional): The name of the identifier property. + + + + + type (optional): A name that indicates the Hibernate type. + + + + + column (optional - defaults to the property name): The + name of the primary key column. + + + + + unsaved-value (optional - defaults to a "sensible" value): + An identifier property value that indicates that an instance is newly instantiated + (unsaved), distinguishing it from detached instances that were saved or loaded + in a previous session. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + + + If the name attribute is missing, it is assumed that the class has no + identifier property. + + + + The unsaved-value attribute is almost never needed in Hibernate3. + + + + There is an alternative <composite-id> declaration to allow access to + legacy data with composite keys. We strongly discourage its use for anything else. + + + + Generator + + + The optional <generator> child element names a Java class used + to generate unique identifiers for instances of the persistent class. If any parameters + are required to configure or initialize the generator instance, they are passed using the + <param> element. + + + + + uid_table + next_hi_value_column + +]]> + + + All generators implement the interface org.hibernate.id.IdentifierGenerator. + This is a very simple interface; some applications may choose to provide their own specialized + implementations. However, Hibernate provides a range of built-in implementations. There are shortcut + names for the built-in generators: + + + + increment + + + generates identifiers of type long, short or + int that are unique only when no other process is inserting data + into the same table. + Do not use in a cluster. + + + + + identity + + + supports identity columns in DB2, MySQL, MS SQL Server, Sybase and + HypersonicSQL. The returned identifier is of type long, + short or int. + + + + + sequence + + + uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator + in Interbase. The returned identifier is of type long, + short or int + + + + + hilo + + + uses a hi/lo algorithm to efficiently generate identifiers of + type long, short or int, + given a table and column (by default hibernate_unique_key and + next_hi respectively) as a source of hi values. The hi/lo + algorithm generates identifiers that are unique only for a particular database. + + + + + seqhilo + + + uses a hi/lo algorithm to efficiently generate identifiers of type + long, short or int, + given a named database sequence. + + + + + uuid + + + uses a 128-bit UUID algorithm to generate identifiers of type string, + unique within a network (the IP address is used). The UUID is encoded + as a string of hexadecimal digits of length 32. + + + + + guid + + + uses a database-generated GUID string on MS SQL Server and MySQL. + + + + + native + + + picks identity, sequence or + hilo depending upon the capabilities of the + underlying database. + + + + + assigned + + + lets the application to assign an identifier to the object before + save() is called. This is the default strategy + if no <generator> element is specified. + + + + + select + + + retrieves a primary key assigned by a database trigger by selecting + the row by some unique key and retrieving the primary key value. + + + + + foreign + + + uses the identifier of another associated object. Usually used in conjunction + with a <one-to-one> primary key association. + + + + + sequence-identity + + + a specialized sequence generation strategy which utilizes a + database sequence for the actual value generation, but combines + this with JDBC3 getGeneratedKeys to actually return the generated + identifier value as part of the insert statement execution. This + strategy is only known to be supported on Oracle 10g drivers + targetted for JDK 1.4. Note comments on these insert statements + are disabled due to a bug in the Oracle drivers. + + + + + + + + + + Hi/lo algorithm + + The hilo and seqhilo generators provide two alternate + implementations of the hi/lo algorithm, a favorite approach to identifier generation. The + first implementation requires a "special" database table to hold the next available "hi" value. + The second uses an Oracle-style sequence (where supported). + + + + + hi_value + next_value + 100 + +]]> + + + + hi_value + 100 + +]]> + + + Unfortunately, you can't use hilo when supplying your own + Connection to Hibernate. When Hibernate is using an application + server datasource to obtain connections enlisted with JTA, you must properly configure + the hibernate.transaction.manager_lookup_class. + + + + + UUID algorithm + + The UUID contains: IP address, startup time of the JVM (accurate to a quarter + second), system time and a counter value (unique within the JVM). It's not + possible to obtain a MAC address or memory address from Java code, so this is + the best we can do without using JNI. + + + + + Identity columns and sequences + + For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), you + may use identity key generation. For databases that support + sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you may use + sequence style key generation. Both these strategies require + two SQL queries to insert a new object. + + + + + person_id_sequence + +]]> + + + +]]> + + + For cross-platform development, the native strategy will + choose from the identity, sequence and + hilo strategies, dependant upon the capabilities of the + underlying database. + + + + + Assigned identifiers + + If you want the application to assign identifiers (as opposed to having + Hibernate generate them), you may use the assigned generator. + This special generator will use the identifier value already assigned to the + object's identifier property. This generator is used when the primary key + is a natural key instead of a surrogate key. This is the default behavior + if you do no specify a <generator> element. + + + + Choosing the assigned generator makes Hibernate use + unsaved-value="undefined", forcing Hibernate to go to + the database to determine if an instance is transient or detached, unless + there is a version or timestamp property, or you define + Interceptor.isUnsaved(). + + + + + Primary keys assigned by triggers + + For legacy schemas only (Hibernate does not generate DDL with triggers). + + + + + socialSecurityNumber + +]]> + + + In the above example, there is a unique valued property named + socialSecurityNumber defined by the class, as a + natural key, and a surrogate key named person_id + whose value is generated by a trigger. + + + + + + + + Enhanced identifier generators + + + Starting with release 3.2.3, there are 2 new generators which represent a re-thinking of 2 different + aspects of identifier generation. The first aspect is database portability; the second is optimization + (not having to query the database for every request for a new identifier value). These two new + generators are intended to take the place of some of the named generators described above (starting + in 3.3.x); however, they are included in the current releases and can be referenced by FQN. + + + + The first of these new generators is org.hibernate.id.enhanced.SequenceStyleGenerator + which is intended firstly as a replacement for the sequence generator and secondly as + a better portability generator than native (because native + (generally) chooses between identity and sequence which have + largely different semantics which can cause subtle isssues in applications eyeing portability). + org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in + a different manner. It chooses between using a table or a sequence in the database to store its + incrementing values depending on the capabilities of the dialect being used. The difference between this + and native is that table-based and sequence-based storage have the same exact + semantic (in fact sequences are exactly what Hibernate tries to emmulate with its table-based + generators). This generator has a number of configuration parameters: + + + + sequence_name (optional, defaults to hibernate_sequence): + The name of the sequence (or table) to be used. + + + + + initial_value (optional, defaults to 1): The initial + value to be retrieved from the sequence/table. In sequence creation terms, this is analogous + to the clause typical named "STARTS WITH". + + + + + increment_size (optional, defaults to 1): The value by + which subsequent calls to the sequence/table should differ. In sequence creation terms, this + is analogous to the clause typical named "INCREMENT BY". + + + + + force_table_use (optional, defaults to false): Should + we force the use of a table as the backing structure even though the dialect might support + sequence? + + + + + value_column (optional, defaults to next_val): Only + relevant for table structures! The name of the column on the table which is used to + hold the value. + + + + + optimizer (optional, defaults to none): + See + + + + + + The second of these new generators is org.hibernate.id.enhanced.TableGenerator which + is intended firstly as a replacement for the table generator (although it actually + functions much more like org.hibernate.id.MultipleHiLoPerTableGenerator) and secondly + as a re-implementation of org.hibernate.id.MultipleHiLoPerTableGenerator utilizing the + notion of pluggable optimiziers. Essentially this generator defines a table capable of holding + a number of different increment values simultaneously by using multiple distinctly keyed rows. This + generator has a number of configuration parameters: + + + + table_name (optional, defaults to hibernate_sequences): + The name of the table to be used. + + + + + value_column_name (optional, defaults to next_val): + The name of the column on the table which is used to hold the value. + + + + + segment_column_name (optional, defaults to sequence_name): + The name of the column on the table which is used to hold the "segement key". This is the + value which distinctly identifies which increment value to use. + + + + + segment_value (optional, defaults to default): + The "segment key" value for the segment from which we want to pull increment values for + this generator. + + + + + segment_value_length (optional, defaults to 255): + Used for schema generation; the column size to create this segment key column. + + + + + initial_value (optional, defaults to 1): + The initial value to be retrieved from the table. + + + + + increment_size (optional, defaults to 1): + The value by which subsequent calls to the table should differ. + + + + + optimizer (optional, defaults to ): + See + + + + + + + + Identifier generator optimization + + For identifier generators which store values in the database, it is inefficient for them to hit the + database on each and every call to generate a new identifier value. Instead, you'd ideally want to + group a bunch of them in memory and only hit the database when you have exhausted your in-memory + value group. This is the role of the pluggable optimizers. Currently only the two enhanced generators + ( support this notion. + + + + none (generally this is the default if no optimizer was specified): This + says to not perform any optimizations, and hit the database each and every request. + + + + + hilo: applies a hi/lo algorithm around the database retrieved values. The + values from the database for this optimizer are expected to be sequential. The values + retrieved from the database structure for this optimizer indicates the "group number"; the + increment_size is multiplied by that value in memory to define a group + "hi value". + + + + + pooled: like was discussed for hilo, this optimizers + attempts to minimize the number of hits to the database. Here, however, we simply store + the starting value for the "next group" into the database structure rather than a sequential + value in combination with an in-memory grouping algorithm. increment_size + here refers to the values coming from the database. + + + + + + + + composite-id + + + node="element-name|." + + + + ...... +]]> + + + For a table with a composite key, you may map multiple properties of the class + as identifier properties. The <composite-id> element + accepts <key-property> property mappings and + <key-many-to-one> mappings as child elements. + + + + + +]]> + + + Your persistent class must override equals() + and hashCode() to implement composite identifier equality. It must + also implements Serializable. + + + + Unfortunately, this approach to composite identifiers means that a persistent object + is its own identifier. There is no convenient "handle" other than the object itself. + You must instantiate an instance of the persistent class itself and populate its + identifier properties before you can load() the persistent state + associated with a composite key. We call this approach an embedded + composite identifier, and discourage it for serious applications. + + + + A second approach is what we call a mapped composite identifier, + where the identifier properties named inside the <composite-id> + element are duplicated on both the persistent class and a separate identifier class. + + + + + +]]> + + + In this example, both the composite identifier class, MedicareId, + and the entity class itself have properties named medicareNumber + and dependent. The identifier class must override + equals() and hashCode() and implement. + Serializable. The disadvantage of this approach is quite + obvious—code duplication. + + + + The following attributes are used to specify a mapped composite identifier: + + + + + + mapped (optional, defaults to false): + indicates that a mapped composite identifier is used, and that the contained + property mappings refer to both the entity class and the composite identifier + class. + + + + + class (optional, but required for a mapped composite identifier): + The class used as a composite identifier. + + + + + + We will describe a third, even more convenient approach where the composite identifier + is implemented as a component class in . The + attributes described below apply only to this alternative approach: + + + + + + name (optional, required for this approach): A property of + component type that holds the composite identifier (see chapter 9). + + + + + access (optional - defaults to property): + The strategy Hibernate should use for accessing the property value. + + + + + class (optional - defaults to the property type determined by + reflection): The component class used as a composite identifier (see next section). + + + + + + This third approach, an identifier component is the one we recommend + for almost all applications. + + + + + + discriminator + + + The <discriminator> element is required for polymorphic persistence + using the table-per-class-hierarchy mapping strategy and declares a discriminator column of the + table. The discriminator column contains marker values that tell the persistence layer what + subclass to instantiate for a particular row. A restricted set of types may be used: + string, character, integer, + byte, short, boolean, + yes_no, true_false. + + + + + + + + + + + ]]> + + + + column (optional - defaults to class) the + name of the discriminator column. + + + + + type (optional - defaults to string) a + name that indicates the Hibernate type + + + + + force (optional - defaults to false) + "force" Hibernate to specify allowed discriminator values even when retrieving + all instances of the root class. + + + + + insert (optional - defaults to true) + set this to false if your discriminator column is also part + of a mapped composite identifier. (Tells Hibernate to not include the column + in SQL INSERTs.) + + + + + formula (optional) an arbitrary SQL expression that is + executed when a type has to be evaluated. Allows content-based discrimination. + + + + + + + Actual values of the discriminator column are specified by the + discriminator-value attribute of the <class> and + <subclass> elements. + + + + The force attribute is (only) useful if the table contains rows with + "extra" discriminator values that are not mapped to a persistent class. This will not + usually be the case. + + + + Using the formula attribute you can declare an arbitrary SQL expression + that will be used to evaluate the type of a row: + + + ]]> + + + + + version (optional) + + + The <version> element is optional and indicates that + the table contains versioned data. This is particularly useful if you plan to + use long transactions (see below). + + + + + + + + + + + + + ]]> + + + + column (optional - defaults to the property name): The name + of the column holding the version number. + + + + + name: The name of a property of the persistent class. + + + + + type (optional - defaults to integer): + The type of the version number. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + unsaved-value (optional - defaults to undefined): + A version property value that indicates that an instance is newly instantiated + (unsaved), distinguishing it from detached instances that were saved or loaded + in a previous session. (undefined specifies that the identifier + property value should be used.) + + + + + generated (optional - defaults to never): + Specifies that this version property value is actually generated by the database. + See the discussion of generated properties. + + + + + insert (optional - defaults to true): + Specifies whether the version column should be included in SQL insert statements. + May be set to false if and only if the database column + is defined with a default value of 0. + + + + + + + Version numbers may be of Hibernate type long, integer, + short, timestamp or calendar. + + + + A version or timestamp property should never be null for a detached instance, so + Hibernate will detect any instance with a null version or timestamp as transient, + no matter what other unsaved-value strategies are specified. + Declaring a nullable version or timestamp property is an easy way to avoid + any problems with transitive reattachment in Hibernate, especially useful for people + using assigned identifiers or composite keys! + + + + + timestamp (optional) + + + The optional <timestamp> element indicates that the table contains + timestamped data. This is intended as an alternative to versioning. Timestamps are by nature + a less safe implementation of optimistic locking. However, sometimes the application might + use the timestamps in other ways. + + + + + + + + + + + + ]]> + + + + column (optional - defaults to the property name): The name + of a column holding the timestamp. + + + + + name: The name of a JavaBeans style property of + Java type Date or Timestamp of the + persistent class. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + unsaved-value (optional - defaults to null): + A version property value that indicates that an instance is newly instantiated + (unsaved), distinguishing it from detached instances that were saved or loaded + in a previous session. (undefined specifies that the identifier + property value should be used.) + + + + + source (optional - defaults to vm): + From where should Hibernate retrieve the timestamp value? From the database, + or from the current JVM? Database-based timestamps incur an overhead because + Hibernate must hit the database in order to determine the "next value", + but will be safer for use in clustered environments. Note also, that not + all Dialects are known to support retrieving of the + database's current timestamp, while others might be unsafe for usage + in locking due to lack of precision (Oracle 8 for example). + + + + + generated (optional - defaults to never): + Specifies that this timestamp property value is actually generated by the database. + See the discussion of generated properties. + + + + + + + Note that <timestamp> is equivalent to + <version type="timestamp">. And + <timestamp source="db"> is equivalent to + <version type="dbtimestamp"> + + + + + + property + + + The <property> element declares a persistent, JavaBean style + property of the class. + + + + + + + + + + + + + + + + + + + + ]]> + + + + name: the name of the property, with an initial lowercase + letter. + + + + + column (optional - defaults to the property name): the name + of the mapped database table column. This may also be specified by nested + <column> element(s). + + + + + type (optional): a name that indicates the Hibernate type. + + + + + update, insert (optional - defaults to true) : + specifies that the mapped columns should be included in SQL UPDATE + and/or INSERT statements. Setting both to false + allows a pure "derived" property whose value is initialized from some other + property that maps to the same colum(s) or by a trigger or other application. + + + + + formula (optional): an SQL expression that defines the value for a + computed property. Computed properties do not have a column + mapping of their own. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + lazy (optional - defaults to false): Specifies + that this property should be fetched lazily when the instance variable is first + accessed (requires build-time bytecode instrumentation). + + + + + unique (optional): Enable the DDL generation of a unique + constraint for the columns. Also, allow this to be the target of + a property-ref. + + + + + not-null (optional): Enable the DDL generation of a nullability + constraint for the columns. + + + + + optimistic-lock (optional - defaults to true): + Specifies that updates to this property do or do not require acquisition of the + optimistic lock. In other words, determines if a version increment should occur when + this property is dirty. + + + + + generated (optional - defaults to never): + Specifies that this property value is actually generated by the database. + See the discussion of generated properties. + + + + + + + typename could be: + + + + + + The name of a Hibernate basic type (eg. integer, string, character, + date, timestamp, float, binary, serializable, object, blob). + + + + + The name of a Java class with a default basic type (eg. int, float, + char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob). + + + + + The name of a serializable Java class. + + + + + The class name of a custom type (eg. com.illflow.type.MyCustomType). + + + + + + If you do not specify a type, Hibernate will use reflection upon the named + property to take a guess at the correct Hibernate type. Hibernate will try to + interpret the name of the return class of the property getter using rules 2, 3, + 4 in that order. However, this is not always enough. + In certain cases you will still need the type + attribute. (For example, to distinguish between Hibernate.DATE and + Hibernate.TIMESTAMP, or to specify a custom type.) + + + + The access attribute lets you control how Hibernate will access + the property at runtime. By default, Hibernate will call the property get/set pair. + If you specify access="field", Hibernate will bypass the get/set + pair and access the field directly, using reflection. You may specify your own + strategy for property access by naming a class that implements the interface + org.hibernate.property.PropertyAccessor. + + + + An especially powerful feature are derived properties. These properties are by + definition read-only, the property value is computed at load time. You declare + the computation as a SQL expression, this translates to a SELECT + clause subquery in the SQL query that loads an instance: + + + ]]> + + + Note that you can reference the entities own table by not declaring an alias on + a particular column (customerId in the given example). Also note + that you can use the nested <formula> mapping element + if you don't like to use the attribute. + + + + + + many-to-one + + + An ordinary association to another persistent class is declared using a + many-to-one element. The relational model is a + many-to-one association: a foreign key in one table is referencing + the primary key column(s) of the target table. + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + name: The name of the property. + + + + + column (optional): The name of the foreign key column. + This may also be specified by nested <column> + element(s). + + + + + class (optional - defaults to the property type + determined by reflection): The name of the associated class. + + + + + cascade (optional): Specifies which operations should + be cascaded from the parent object to the associated object. + + + + + fetch (optional - defaults to select): + Chooses between outer-join fetching or sequential select fetching. + + + + + update, insert (optional - defaults to true) + specifies that the mapped columns should be included in SQL UPDATE + and/or INSERT statements. Setting both to false + allows a pure "derived" association whose value is initialized from some other + property that maps to the same colum(s) or by a trigger or other application. + + + + + property-ref: (optional) The name of a property of the associated + class that is joined to this foreign key. If not specified, the primary key of + the associated class is used. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + unique (optional): Enable the DDL generation of a unique + constraint for the foreign-key column. Also, allow this to be the target of + a property-ref. This makes the association multiplicity + effectively one to one. + + + + + not-null (optional): Enable the DDL generation of a nullability + constraint for the foreign key columns. + + + + + optimistic-lock (optional - defaults to true): + Specifies that updates to this property do or do not require acquisition of the + optimistic lock. In other words, dertermines if a version increment should occur when + this property is dirty. + + + + + lazy (optional - defaults to proxy): + By default, single point associations are proxied. lazy="no-proxy" + specifies that the property should be fetched lazily when the instance variable + is first accessed (requires build-time bytecode instrumentation). + lazy="false" specifies that the association will always + be eagerly fetched. + + + + + not-found (optional - defaults to exception): + Specifies how foreign keys that reference missing rows will be handled: + ignore will treat a missing row as a null association. + + + + + entity-name (optional): The entity name of the associated class. + + + + + formula (optional): an SQL expression that defines the value for a + computed foreign key. + + + + + + + Setting a value of the cascade attribute to any meaningful + value other than none will propagate certain operations to the + associated object. The meaningful values are the names of Hibernate's basic + operations, persist, merge, delete, save-update, evict, replicate, lock, + refresh, as well as the special values delete-orphan + and all and comma-separated combinations of operation + names, for example, cascade="persist,merge,evict" or + cascade="all,delete-orphan". See + for a full explanation. Note that single valued associations (many-to-one and + one-to-one associations) do not support orphan delete. + + + + A typical many-to-one declaration looks as simple as this: + + + ]]> + + + The property-ref attribute should only be used for mapping legacy + data where a foreign key refers to a unique key of the associated table other than + the primary key. This is an ugly relational model. For example, suppose the + Product class had a unique serial number, that is not the primary + key. (The unique attribute controls Hibernate's DDL generation with + the SchemaExport tool.) + + + ]]> + + + Then the mapping for OrderItem might use: + + + ]]> + + + This is certainly not encouraged, however. + + + + If the referenced unique key comprises multiple properties of the associated entity, you should + map the referenced properties inside a named <properties> element. + + + + If the referenced unique key is the property of a component, you may specify a property path: + + + ]]> + + + + + one-to-one + + + A one-to-one association to another persistent class is declared using a + one-to-one element. + + + + + + + + + + + + + + + + ]]> + + + + name: The name of the property. + + + + + class (optional - defaults to the property type + determined by reflection): The name of the associated class. + + + + + cascade (optional) specifies which operations should + be cascaded from the parent object to the associated object. + + + + + constrained (optional) specifies that a foreign key constraint + on the primary key of the mapped table references the table of the associated + class. This option affects the order in which save() and + delete() are cascaded, and determines whether the association + may be proxied (it is also used by the schema export tool). + + + + + fetch (optional - defaults to select): + Chooses between outer-join fetching or sequential select fetching. + + + + + property-ref: (optional) The name of a property of the associated class + that is joined to the primary key of this class. If not specified, the primary key of + the associated class is used. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + formula (optional): Almost all one to one associations map to the + primary key of the owning entity. In the rare case that this is not the case, you may + specify a some other column, columns or expression to join on using an SQL formula. (See + org.hibernate.test.onetooneformula for an example.) + + + + + lazy (optional - defaults to proxy): + By default, single point associations are proxied. lazy="no-proxy" + specifies that the property should be fetched lazily when the instance variable + is first accessed (requires build-time bytecode instrumentation). + lazy="false" specifies that the association will always + be eagerly fetched. Note that if constrained="false", + proxying is impossible and Hibernate will eager fetch the association! + + + + + entity-name (optional): The entity name of the associated class. + + + + + + + There are two varieties of one-to-one association: + + + + primary key associations + + + unique foreign key associations + + + + + Primary key associations don't need an extra table column; if two rows are related by + the association then the two table rows share the same primary key value. So if you want + two objects to be related by a primary key association, you must make sure that they + are assigned the same identifier value! + + + + For a primary key association, add the following mappings to Employee and + Person, respectively. + + + ]]> + ]]> + + + Now we must ensure that the primary keys of related rows in the PERSON and + EMPLOYEE tables are equal. We use a special Hibernate identifier generation strategy + called foreign: + + + + + + employee + + + ... + +]]> + + + A newly saved instance of Person is then assigned the same primary + key value as the Employee instance refered with the employee + property of that Person. + + + + Alternatively, a foreign key with a unique constraint, from Employee to + Person, may be expressed as: + + + ]]> + + + And this association may be made bidirectional by adding the following to the + Person mapping: + + + ]]> + + + + + natural-id + + + + + ...... +]]> + + + Even though we recommend the use of surrogate keys as primary keys, you should still try + to identify natural keys for all entities. A natural key is a property or combination of + properties that is unique and non-null. If it is also immutable, even better. Map the + properties of the natural key inside the <natural-id> element. + Hibernate will generate the necessary unique key and nullability constraints, and your + mapping will be more self-documenting. + + + + We strongly recommend that you implement equals() and + hashCode() to compare the natural key properties of the entity. + + + + This mapping is not intended for use with entities with natural primary keys. + + + + + + mutable (optional, defaults to false): + By default, natural identifier properties as assumed to be immutable (constant). + + + + + + + + component, dynamic-component + + + The <component> element maps properties of a + child object to columns of the table of a parent class. Components may, in + turn, declare their own properties, components or collections. See + "Components" below. + + + + + + + + + + + + + + + + + + ........ +]]> + + + + name: The name of the property. + + + + + class (optional - defaults to the property type + determined by reflection): The name of the component (child) class. + + + + + insert: Do the mapped columns appear in SQL + INSERTs? + + + + + update: Do the mapped columns appear in SQL + UPDATEs? + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + lazy (optional - defaults to false): Specifies + that this component should be fetched lazily when the instance variable is first + accessed (requires build-time bytecode instrumentation). + + + + + optimistic-lock (optional - defaults to true): + Specifies that updates to this component do or do not require acquisition of the + optimistic lock. In other words, determines if a version increment should occur when + this property is dirty. + + + + + unique (optional - defaults to false): + Specifies that a unique constraint exists upon all mapped columns of the + component. + + + + + + + The child <property> tags map properties of the + child class to table columns. + + + + The <component> element allows a <parent> + subelement that maps a property of the component class as a reference back to the + containing entity. + + + + The <dynamic-component> element allows a Map + to be mapped as a component, where the property names refer to keys of the map, see + . + + + + + + properties + + + The <properties> element allows the definition of a named, + logical grouping of properties of a class. The most important use of the construct + is that it allows a combination of properties to be the target of a + property-ref. It is also a convenient way to define a multi-column + unique constraint. + + + + + + + + + + + + + + + ........ +]]> + + + + name: The logical name of the grouping - + not an actual property name. + + + + + insert: Do the mapped columns appear in SQL + INSERTs? + + + + + update: Do the mapped columns appear in SQL + UPDATEs? + + + + + optimistic-lock (optional - defaults to true): + Specifies that updates to these properties do or do not require acquisition of the + optimistic lock. In other words, determines if a version increment should occur when + these properties are dirty. + + + + + unique (optional - defaults to false): + Specifies that a unique constraint exists upon all mapped columns of the + component. + + + + + + + For example, if we have the following <properties> mapping: + + + + + ... + + + + + +]]> + + + Then we might have some legacy data association which refers to this unique key of + the Person table, instead of to the primary key: + + + + + + +]]> + + + We don't recommend the use of this kind of thing outside the context of mapping + legacy data. + + + + + + subclass + + + Finally, polymorphic persistence requires the declaration of each subclass of + the root persistent class. For the table-per-class-hierarchy + mapping strategy, the <subclass> declaration is used. + + + + + + + + + + + + + ..... +]]> + + + + name: The fully qualified class name of the subclass. + + + + + discriminator-value (optional - defaults to the class name): A + value that distiguishes individual subclasses. + + + + + proxy (optional): Specifies a class or interface to use for + lazy initializing proxies. + + + + + lazy (optional, defaults to true): Setting + lazy="false" disables the use of lazy fetching. + + + + + + + Each subclass should declare its own persistent properties and subclasses. + <version> and <id> properties + are assumed to be inherited from the root class. Each subclass in a heirarchy must + define a unique discriminator-value. If none is specified, the + fully qualified Java class name is used. + + + + For information about inheritance mappings, see . + + + + + + joined-subclass + + + Alternatively, each subclass may be mapped to its own table (table-per-subclass + mapping strategy). Inherited state is retrieved by joining with the table of the + superclass. We use the <joined-subclass> element. + + + + + + + + + + + + + + + ..... +]]> + + + + name: The fully qualified class name of the subclass. + + + + + table: The name of the subclass table. + + + + + proxy (optional): Specifies a class or interface to use + for lazy initializing proxies. + + + + + lazy (optional, defaults to true): Setting + lazy="false" disables the use of lazy fetching. + + + + + + + No discriminator column is required for this mapping strategy. Each subclass must, + however, declare a table column holding the object identifier using the + <key> element. The mapping at the start of the chapter + would be re-written as: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + For information about inheritance mappings, see . + + + + + + union-subclass + + + A third option is to map only the concrete classes of an inheritance hierarchy + to tables, (the table-per-concrete-class strategy) where each table defines all + persistent state of the class, including inherited state. In Hibernate, it is + not absolutely necessary to explicitly map such inheritance hierarchies. You + can simply map each class with a separate <class> + declaration. However, if you wish use polymorphic associations (e.g. an association + to the superclass of your hierarchy), you need to + use the <union-subclass> mapping. + + + + + + + + + + + + + ..... +]]> + + + + name: The fully qualified class name of the subclass. + + + + + table: The name of the subclass table. + + + + + proxy (optional): Specifies a class or interface to use + for lazy initializing proxies. + + + + + lazy (optional, defaults to true): Setting + lazy="false" disables the use of lazy fetching. + + + + + + + No discriminator column or key column is required for this mapping strategy. + + + + For information about inheritance mappings, see . + + + + + + join + + + Using the <join> element, it is possible to map + properties of one class to several tables, when there's a 1-to-1 relationship between the tables. + + + + + + + + + + + + + + + + + ... +]]> + + + + + table: The name of the joined table. + + + + + schema (optional): Override the schema name specified by + the root <hibernate-mapping> element. + + + + + catalog (optional): Override the catalog name specified by + the root <hibernate-mapping> element. + + + + + fetch (optional - defaults to join): + If set to join, the default, Hibernate will use an inner join + to retrieve a <join> defined by a class or its superclasses + and an outer join for a <join> defined by a subclass. + If set to select then Hibernate will use a sequential select for + a <join> defined on a subclass, which will be issued only + if a row turns out to represent an instance of the subclass. Inner joins will still + be used to retrieve a <join> defined by the class and its + superclasses. + + + + + inverse (optional - defaults to false): + If enabled, Hibernate will not try to insert or update the properties defined + by this join. + + + + + optional (optional - defaults to false): + If enabled, Hibernate will insert a row only if the properties defined by this + join are non-null and will always use an outer join to retrieve the properties. + + + + + + + For example, the address information for a person can be mapped to a separate + table (while preserving value type semantics for all properties): + + + + + ... + + + + + + + + ...]]> + + + This feature is often only useful for legacy data models, we recommend fewer + tables than classes and a fine-grained domain model. However, it is useful + for switching between inheritance mapping strategies in a single hierarchy, as + explained later. + + + + + + key + + + We've seen the <key> element crop up a few times + now. It appears anywhere the parent mapping element defines a join to + a new table, and defines the foreign key in the joined table, that references + the primary key of the original table. + + + + + + + + + + + + ]]> + + + + + column (optional): The name of the foreign key column. + This may also be specified by nested <column> + element(s). + + + + + on-delete (optional, defaults to noaction): + Specifies whether the foreign key constraint has database-level cascade delete + enabled. + + + + + property-ref (optional): Specifies that the foreign key refers + to columns that are not the primary key of the orginal table. (Provided for + legacy data.) + + + + + not-null (optional): Specifies that the foreign key columns + are not nullable (this is implied whenever the foreign key is also part of the + primary key). + + + + + update (optional): Specifies that the foreign key should never + be updated (this is implied whenever the foreign key is also part of the primary + key). + + + + + unique (optional): Specifies that the foreign key should have + a unique constraint (this is implied whenever the foreign key is also the primary key). + + + + + + + We recommend that for systems where delete performance is important, all keys should be + defined on-delete="cascade", and Hibernate will use a database-level + ON CASCADE DELETE constraint, instead of many individual + DELETE statements. Be aware that this feature bypasses Hibernate's + usual optimistic locking strategy for versioned data. + + + + The not-null and update attributes are useful when + mapping a unidirectional one to many association. If you map a unidirectional one to many + to a non-nullable foreign key, you must declare the key column using + <key not-null="true">. + + + + + + column and formula elements + + Any mapping element which accepts a column attribute will alternatively + accept a <column> subelement. Likewise, <formula> + is an alternative to the formula attribute. + + + ]]> + + SQL expression]]> + + + column and formula attributes may even be combined + within the same property or association mapping to express, for example, exotic join + conditions. + + + + + 'MAILING' +]]> + + + + + import + + + Suppose your application has two persistent classes with the same name, and you don't want to + specify the fully qualified (package) name in Hibernate queries. Classes may be "imported" + explicitly, rather than relying upon auto-import="true". You may even import + classes and interfaces that are not explicitly mapped. + + + ]]> + + + + + + + ]]> + + + + class: The fully qualified class name of of any Java class. + + + + + rename (optional - defaults to the unqualified class name): + A name that may be used in the query language. + + + + + + + + + any + + + There is one further type of property mapping. The <any> mapping element + defines a polymorphic association to classes from multiple tables. This type of mapping always + requires more than one column. The first column holds the type of the associated entity. + The remaining columns hold the identifier. It is impossible to specify a foreign key constraint + for this kind of association, so this is most certainly not meant as the usual way of mapping + (polymorphic) associations. You should use this only in very special cases (eg. audit logs, + user session data, etc). + + + + The meta-type attribute lets the application specify a custom type that + maps database column values to persistent classes which have identifier properties of the + type specified by id-type. You must specify the mapping from values of + the meta-type to class names. + + + + + + + + +]]> + + + + + + + + + + + + + + ..... + + + ..... +]]> + + + + name: the property name. + + + + + id-type: the identifier type. + + + + + meta-type (optional - defaults to string): + Any type that is allowed for a discriminator mapping. + + + + + cascade (optional- defaults to none): + the cascade style. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the property value. + + + + + optimistic-lock (optional - defaults to true): + Specifies that updates to this property do or do not require acquisition of the + optimistic lock. In other words, define if a version increment should occur if this + property is dirty. + + + + + + + + + + + Hibernate Types + + + Entities and values + + + To understand the behaviour of various Java language-level objects with respect + to the persistence service, we need to classify them into two groups: + + + + An entity exists independently of any other objects holding + references to the entity. Contrast this with the usual Java model where an + unreferenced object is garbage collected. Entities must be explicitly saved and + deleted (except that saves and deletions may be cascaded + from a parent entity to its children). This is different from the ODMG model of + object persistence by reachablity - and corresponds more closely to how + application objects are usually used in large systems. Entities support + circular and shared references. They may also be versioned. + + + + An entity's persistent state consists of references to other entities and + instances of value types. Values are primitives, + collections (not what's inside a collection), components and certain immutable + objects. Unlike entities, values (in particular collections and components) + are persisted and deleted by reachability. Since value + objects (and primitives) are persisted and deleted along with their containing + entity they may not be independently versioned. Values have no independent + identity, so they cannot be shared by two entities or collections. + + + + Up until now, we've been using the term "persistent class" to refer to + entities. We will continue to do that. Strictly speaking, however, not all + user-defined classes with persistent state are entities. A + component is a user defined class with value semantics. + A Java property of type java.lang.String also has value + semantics. Given this definition, we can say that all types (classes) provided + by the JDK have value type semantics in Java, while user-defined types may + be mapped with entity or value type semantics. This decision is up to the + application developer. A good hint for an entity class in a domain model are + shared references to a single instance of that class, while composition or + aggregation usually translates to a value type. + + + + We'll revisit both concepts throughout the documentation. + + + + The challenge is to map the Java type system (and the developers' definition of + entities and value types) to the SQL/database type system. The bridge between + both systems is provided by Hibernate: for entities we use + <class>, <subclass> and so on. + For value types we use <property>, + <component>, etc, usually with a type + attribute. The value of this attribute is the name of a Hibernate + mapping type. Hibernate provides many mappings (for standard + JDK value types) out of the box. You can write your own mapping types and implement your + custom conversion strategies as well, as you'll see later. + + + + All built-in Hibernate types except collections support null semantics. + + + + + + Basic value types + + + The built-in basic mapping types may be roughly categorized into + + + + integer, long, short, float, double, character, byte, + boolean, yes_no, true_false + + + Type mappings from Java primitives or wrapper classes to appropriate + (vendor-specific) SQL column types. boolean, yes_no + and true_false are all alternative encodings for + a Java boolean or java.lang.Boolean. + + + + + string + + + A type mapping from java.lang.String to + VARCHAR (or Oracle VARCHAR2). + + + + + date, time, timestamp + + + Type mappings from java.util.Date and its subclasses + to SQL types DATE, TIME and + TIMESTAMP (or equivalent). + + + + + calendar, calendar_date + + + Type mappings from java.util.Calendar to + SQL types TIMESTAMP and DATE + (or equivalent). + + + + + big_decimal, big_integer + + + Type mappings from java.math.BigDecimal and + java.math.BigInteger to NUMERIC + (or Oracle NUMBER). + + + + + locale, timezone, currency + + + Type mappings from java.util.Locale, + java.util.TimeZone and + java.util.Currency + to VARCHAR (or Oracle VARCHAR2). + Instances of Locale and Currency are + mapped to their ISO codes. Instances of TimeZone are + mapped to their ID. + + + + + class + + + A type mapping from java.lang.Class to + VARCHAR (or Oracle VARCHAR2). + A Class is mapped to its fully qualified name. + + + + + binary + + + Maps byte arrays to an appropriate SQL binary type. + + + + + text + + + Maps long Java strings to a SQL CLOB or + TEXT type. + + + + + serializable + + + Maps serializable Java types to an appropriate SQL binary type. You + may also indicate the Hibernate type serializable with + the name of a serializable Java class or interface that does not default + to a basic type. + + + + + clob, blob + + + Type mappings for the JDBC classes java.sql.Clob and + java.sql.Blob. These types may be inconvenient for some + applications, since the blob or clob object may not be reused outside of + a transaction. (Furthermore, driver support is patchy and inconsistent.) + + + + + + imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, + imm_serializable, imm_binary + + + + Type mappings for what are usually considered mutable Java types, where + Hibernate makes certain optimizations appropriate only for immutable + Java types, and the application treats the object as immutable. For + example, you should not call Date.setTime() for an + instance mapped as imm_timestamp. To change the + value of the property, and have that change made persistent, the + application must assign a new (nonidentical) object to the property. + + + + + + + + + Unique identifiers of entities and collections may be of any basic type except + binary, blob and clob. + (Composite identifiers are also allowed, see below.) + + + + The basic value types have corresponding Type constants defined on + org.hibernate.Hibernate. For example, Hibernate.STRING + represents the string type. + + + + + + Custom value types + + + It is relatively easy for developers to create their own value types. For example, + you might want to persist properties of type java.lang.BigInteger + to VARCHAR columns. Hibernate does not provide a built-in type + for this. But custom types are not limited to mapping a property (or collection element) + to a single table column. So, for example, you might have a Java property + getName()/setName() of type + java.lang.String that is persisted to the columns + FIRST_NAME, INITIAL, SURNAME. + + + + To implement a custom type, implement either org.hibernate.UserType + or org.hibernate.CompositeUserType and declare properties using the + fully qualified classname of the type. Check out + org.hibernate.test.DoubleStringType to see the kind of things that + are possible. + + + + + +]]> + + + Notice the use of <column> tags to map a property to multiple + columns. + + + + The CompositeUserType, EnhancedUserType, + UserCollectionType, and UserVersionType + interfaces provide support for more specialized uses. + + + + You may even supply parameters to a UserType in the mapping file. To + do this, your UserType must implement the + org.hibernate.usertype.ParameterizedType interface. To supply parameters + to your custom type, you can use the <type> element in your mapping + files. + + + + + 0 + +]]> + + + The UserType can now retrieve the value for the parameter named + default from the Properties object passed to it. + + + + If you use a certain UserType very often, it may be useful to define a + shorter name for it. You can do this using the <typedef> element. + Typedefs assign a name to a custom type, and may also contain a list of default + parameter values if the type is parameterized. + + + + 0 +]]> + + ]]> + + + It is also possible to override the parameters supplied in a typedef on a case-by-case basis + by using type parameters on the property mapping. + + + + Even though Hibernate's rich range of built-in types and support for components means you + will very rarely need to use a custom type, it is nevertheless + considered good form to use custom types for (non-entity) classes that occur frequently + in your application. For example, a MonetaryAmount class is a good + candidate for a CompositeUserType, even though it could easily be mapped + as a component. One motivation for this is abstraction. With a custom type, your mapping + documents would be future-proofed against possible changes in your way of representing + monetary values. + + + + + + + + Mapping a class more than once + + It is possible to provide more than one mapping for a particular persistent class. In this + case you must specify an entity name do disambiguate between instances + of the two mapped entities. (By default, the entity name is the same as the class name.) + Hibernate lets you specify the entity name when working with persistent objects, when writing + queries, or when mapping associations to the named entity. + + + + ... + + + + + + + + ... + +]]> + + + Notice how associations are now specified using entity-name instead of + class. + + + + + + SQL quoted identifiers + + You may force Hibernate to quote an identifier in the generated SQL by enclosing the table or + column name in backticks in the mapping document. Hibernate will use the correct quotation + style for the SQL Dialect (usually double quotes, but brackets for SQL + Server and backticks for MySQL). + + + + + + ... +]]> + + + + + + Metadata alternatives + + + XML isn't for everyone, and so there are some alternative ways to define O/R mapping metadata in Hibernate. + + + + Using XDoclet markup + + + Many Hibernate users prefer to embed mapping information directly in sourcecode using + XDoclet @hibernate.tags. We will not cover this approach in this + document, since strictly it is considered part of XDoclet. However, we include the + following example of the Cat class with XDoclet mappings. + + + + + + See the Hibernate web site for more examples of XDoclet and Hibernate. + + + + + + Using JDK 5.0 Annotations + + + JDK 5.0 introduced XDoclet-style annotations at the language level, type-safe and + checked at compile time. This mechnism is more powerful than XDoclet annotations and + better supported by tools and IDEs. IntelliJ IDEA, for example, supports auto-completion + and syntax highlighting of JDK 5.0 annotations. The new revision of the EJB specification + (JSR-220) uses JDK 5.0 annotations as the primary metadata mechanism for entity beans. + Hibernate3 implements the EntityManager of JSR-220 (the persistence API), + support for mapping metadata is available via the Hibernate Annotations + package, as a separate download. Both EJB3 (JSR-220) and Hibernate3 metadata is supported. + + + + This is an example of a POJO class annotated as an EJB entity bean: + + + orders; + + // Getter/setter and business methods +}]]> + + + Note that support for JDK 5.0 Annotations (and JSR-220) is still work in progress and + not completed. Please refer to the Hibernate Annotations module for more details. + + + + + + + Generated Properties + + Generated properties are properties which have their values generated by the + database. Typically, Hibernate applications needed to refresh + objects which contain any properties for which the database was generating values. + Marking properties as generated, however, lets the application delegate this + responsibility to Hibernate. Essentially, whenever Hibernate issues an SQL INSERT + or UPDATE for an entity which has defined generated properties, it immediately + issues a select afterwards to retrieve the generated values. + + + Properties marked as generated must additionally be non-insertable and non-updateable. + Only versions, + timestamps, and + simple properties can be marked as + generated. + + + never (the default) - means that the given property value + is not generated within the database. + + + insert - states that the given property value is generated on + insert, but is not regenerated on subsequent updates. Things like created-date would + fall into this category. Note that even thought + version and + timestamp properties can + be marked as generated, this option is not available there... + + + always - states that the property value is generated both + on insert and on update. + + + + + Auxiliary Database Objects + + Allows CREATE and DROP of arbitrary database objects, in conjunction with + Hibernate's schema evolution tools, to provide the ability to fully define + a user schema within the Hibernate mapping files. Although designed specifically + for creating and dropping things like triggers or stored procedures, really any + SQL command that can be run via a java.sql.Statement.execute() + method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for + defining auxiliary database objects... + + + The first mode is to explicitly list the CREATE and DROP commands out in the mapping + file: + + + ... + + CREATE TRIGGER my_trigger ... + DROP TRIGGER my_trigger + +]]> + + The second mode is to supply a custom class which knows how to construct the + CREATE and DROP commands. This custom class must implement the + org.hibernate.mapping.AuxiliaryDatabaseObject interface. + + + ... + + + +]]> + + Additionally, these database objects can be optionally scoped such that they only + apply when certain dialects are used. + + + ... + + + + + +]]> + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/batch.xml b/documentation/envers/src/main/docbook/en-US/content/batch.xml new file mode 100755 index 0000000000..d985e10b99 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/batch.xml @@ -0,0 +1,374 @@ + + + + + + + Batch processing + + + A naive approach to inserting 100 000 rows in the database using Hibernate might + look like this: + + + + + + This would fall over with an OutOfMemoryException somewhere + around the 50 000th row. That's because Hibernate caches all the newly inserted + Customer instances in the session-level cache. + + + + In this chapter we'll show you how to avoid this problem. First, however, if you + are doing batch processing, it is absolutely critical that you enable the use of + JDBC batching, if you intend to achieve reasonable performance. Set the JDBC batch + size to a reasonable number (say, 10-50): + + + + + + Note that Hibernate disables insert batching at the JDBC level transparently if you + use an identiy identifier generator. + + + + You also might like to do this kind of work in a process where interaction with + the second-level cache is completely disabled: + + + + + + However, this is not absolutely necessary, since we can explicitly set the + CacheMode to disable interaction with the second-level cache. + + + + Batch inserts + + + When making new objects persistent, you must flush() and + then clear() the session regularly, to control the size of + the first-level cache. + + + + + + + + Batch updates + + + For retrieving and updating data the same ideas apply. In addition, you need to + use scroll() to take advantage of server-side cursors for + queries that return many rows of data. + + + + + + + + The StatelessSession interface + + Alternatively, Hibernate provides a command-oriented API that may be used for + streaming data to and from the database in the form of detached objects. A + StatelessSession has no persistence context associated + with it and does not provide many of the higher-level life cycle semantics. + In particular, a stateless session does not implement a first-level cache nor + interact with any second-level or query cache. It does not implement + transactional write-behind or automatic dirty checking. Operations performed + using a stateless session do not ever cascade to associated instances. Collections + are ignored by a stateless session. Operations performed via a stateless session + bypass Hibernate's event model and interceptors. Stateless sessions are vulnerable + to data aliasing effects, due to the lack of a first-level cache. A stateless + session is a lower-level abstraction, much closer to the underlying JDBC. + + + + + + Note that in this code example, the Customer instances returned + by the query are immediately detached. They are never associated with any persistence + context. + + + + The insert(), update() and delete() operations + defined by the StatelessSession interface are considered to be + direct database row-level operations, which result in immediate execution of a SQL + INSERT, UPDATE or DELETE respectively. Thus, + they have very different semantics to the save(), saveOrUpdate() + and delete() operations defined by the Session + interface. + + + + + + DML-style operations + + + As already discussed, automatic and transparent object/relational mapping is concerned + with the management of object state. This implies that the object state is available + in memory, hence manipulating (using the SQL Data Manipulation Language + (DML) statements: INSERT, UPDATE, DELETE) + data directly in the database will not affect in-memory state. However, Hibernate provides methods + for bulk SQL-style DML statement execution which are performed through the + Hibernate Query Language (HQL). + + + + The pseudo-syntax for UPDATE and DELETE statements + is: ( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?. Some + points to note: + + + + + + In the from-clause, the FROM keyword is optional + + + + + There can only be a single entity named in the from-clause; it can optionally be + aliased. If the entity name is aliased, then any property references must + be qualified using that alias; if the entity name is not aliased, then it is + illegal for any property references to be qualified. + + + + + No joins (either implicit or explicit) + can be specified in a bulk HQL query. Sub-queries may be used in the where-clause; + the subqueries, themselves, may contain joins. + + + + + The where-clause is also optional. + + + + + + As an example, to execute an HQL UPDATE, use the + Query.executeUpdate() method (the method is named for + those familiar with JDBC's PreparedStatement.executeUpdate()): + + + + + + HQL UPDATE statements, by default do not effect the + version + or the timestamp property values + for the affected entities; this is in keeping with the EJB3 specification. However, + you can force Hibernate to properly reset the version or + timestamp property values through the use of a versioned update. + This is achieved by adding the VERSIONED keyword after the UPDATE + keyword. + + + + + Note that custom version types (org.hibernate.usertype.UserVersionType) + are not allowed in conjunction with a update versioned statement. + + + + To execute an HQL DELETE, use the same Query.executeUpdate() + method: + + + + + + The int value returned by the Query.executeUpdate() + method indicate the number of entities effected by the operation. Consider this may or may not + correlate to the number of rows effected in the database. An HQL bulk operation might result in + multiple actual SQL statements being executed, for joined-subclass, for example. The returned + number indicates the number of actual entities affected by the statement. Going back to the + example of joined-subclass, a delete against one of the subclasses may actually result + in deletes against not just the table to which that subclass is mapped, but also the "root" + table and potentially joined-subclass tables further down the inheritence hierarchy. + + + + The pseudo-syntax for INSERT statements is: + INSERT INTO EntityName properties_list select_statement. Some + points to note: + + + + + + Only the INSERT INTO ... SELECT ... form is supported; not the INSERT INTO ... VALUES ... form. + + + The properties_list is analogous to the column speficiation + in the SQL INSERT statement. For entities involved in mapped + inheritence, only properties directly defined on that given class-level can be + used in the properties_list. Superclass properties are not allowed; and subclass + properties do not make sense. In other words, INSERT + statements are inherently non-polymorphic. + + + + + select_statement can be any valid HQL select query, with the caveat that the return types + must match the types expected by the insert. Currently, this is checked during query + compilation rather than allowing the check to relegate to the database. Note however + that this might cause problems between Hibernate Types which are + equivalent as opposed to equal. This might cause + issues with mismatches between a property defined as a org.hibernate.type.DateType + and a property defined as a org.hibernate.type.TimestampType, even though the + database might not make a distinction or might be able to handle the conversion. + + + + + For the id property, the insert statement gives you two options. You can either + explicitly specify the id property in the properties_list (in which case its value + is taken from the corresponding select expression) or omit it from the properties_list + (in which case a generated value is used). This later option is only available when + using id generators that operate in the database; attempting to use this option with + any "in memory" type generators will cause an exception during parsing. Note that + for the purposes of this discussion, in-database generators are considered to be + org.hibernate.id.SequenceGenerator (and its subclasses) and + any implementors of org.hibernate.id.PostInsertIdentifierGenerator. + The most notable exception here is org.hibernate.id.TableHiLoGenerator, + which cannot be used because it does not expose a selectable way to get its values. + + + + + For properties mapped as either version or timestamp, + the insert statement gives you two options. You can either specify the property in the + properties_list (in which case its value is taken from the corresponding select expressions) + or omit it from the properties_list (in which case the seed value defined + by the org.hibernate.type.VersionType is used). + + + + + + An example HQL INSERT statement execution: + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/best_practices.xml b/documentation/envers/src/main/docbook/en-US/content/best_practices.xml new file mode 100644 index 0000000000..d123d80878 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/best_practices.xml @@ -0,0 +1,250 @@ + + + + + + + Best Practices + + + + Write fine-grained classes and map them using <component>. + + + Use an Address class to encapsulate street, + suburb, state, postcode. + This encourages code reuse and simplifies refactoring. + + + + + Declare identifier properties on persistent classes. + + + Hibernate makes identifier properties optional. There are all sorts of reasons why + you should use them. We recommend that identifiers be 'synthetic' (generated, with + no business meaning). + + + + + Identify natural keys. + + + Identify natural keys for all entities, and map them using + <natural-id>. Implement equals() and + hashCode() to compare the properties that make up the natural key. + + + + + Place each class mapping in its own file. + + + Don't use a single monolithic mapping document. Map com.eg.Foo in + the file com/eg/Foo.hbm.xml. This makes particularly good sense in + a team environment. + + + + + Load mappings as resources. + + + Deploy the mappings along with the classes they map. + + + + + Consider externalising query strings. + + + This is a good practice if your queries call non-ANSI-standard SQL functions. + Externalising the query strings to mapping files will make the application more + portable. + + + + + Use bind variables. + + + As in JDBC, always replace non-constant values by "?". Never use string manipulation to + bind a non-constant value in a query! Even better, consider using named parameters in + queries. + + + + + Don't manage your own JDBC connections. + + + Hibernate lets the application manage JDBC connections. This approach should be considered + a last-resort. If you can't use the built-in connections providers, consider providing your + own implementation of org.hibernate.connection.ConnectionProvider. + + + + + Consider using a custom type. + + + Suppose you have a Java type, say from some library, that needs to be persisted but doesn't + provide the accessors needed to map it as a component. You should consider implementing + org.hibernate.UserType. This approach frees the application + code from implementing transformations to / from a Hibernate type. + + + + + Use hand-coded JDBC in bottlenecks. + + + In performance-critical areas of the system, some kinds of operations might benefit from + direct JDBC. But please, wait until you know something is a bottleneck. + And don't assume that direct JDBC is necessarily faster. If you need to use direct JDBC, it might + be worth opening a Hibernate Session and using that JDBC connection. That + way you can still use the same transaction strategy and underlying connection provider. + + + + + Understand Session flushing. + + + From time to time the Session synchronizes its persistent state with the database. Performance will + be affected if this process occurs too often. You may sometimes minimize unnecessary flushing by + disabling automatic flushing or even by changing the order of queries and other operations within a + particular transaction. + + + + + In a three tiered architecture, consider using detached objects. + + + When using a servlet / session bean architecture, you could pass persistent objects loaded in + the session bean to and from the servlet / JSP layer. Use a new session to service each request. + Use Session.merge() or Session.saveOrUpdate() to + synchronize objects with the database. + + + + + In a two tiered architecture, consider using long persistence contexts. + + + Database Transactions have to be as short as possible for best scalability. However, it is often + neccessary to implement long running application transactions, a single + unit-of-work from the point of view of a user. An application transaction might span several + client request/response cycles. It is common to use detached objects to implement application + transactions. An alternative, extremely appropriate in two tiered architecture, is to maintain + a single open persistence contact (session) for the whole life cycle of the application transaction + and simply disconnect from the JDBC connection at the end of each request and reconnect at the + beginning of the subsequent request. Never share a single session across more than one application + transaction, or you will be working with stale data. + + + + + Don't treat exceptions as recoverable. + + + This is more of a necessary practice than a "best" practice. When an exception occurs, roll back + the Transaction and close the Session. If you don't, Hibernate + can't guarantee that in-memory state accurately represents persistent state. As a special case of this, + do not use Session.load() to determine if an instance with the given identifier + exists on the database; use Session.get() or a query instead. + + + + + Prefer lazy fetching for associations. + + + Use eager fetching sparingly. Use proxies and lazy collections for most associations to classes that + are not likely to be completely held in the second-level cache. For associations to cached classes, + where there is an a extremely high probability of a cache hit, explicitly disable eager fetching using + lazy="false". When an join fetching is appropriate to a particular use + case, use a query with a left join fetch. + + + + + + Use the open session in view pattern, or a disciplined + assembly phase to avoid problems with unfetched data. + + + + Hibernate frees the developer from writing tedious Data Transfer Objects (DTO). + In a traditional EJB architecture, DTOs serve dual purposes: first, they work around the problem + that entity beans are not serializable; second, they implicitly define an assembly phase where + all data to be used by the view is fetched and marshalled into the DTOs before returning control + to the presentation tier. Hibernate eliminates the first purpose. However, you will still need + an assembly phase (think of your business methods as having a strict contract with the presentation + tier about what data is available in the detached objects) unless you are prepared to hold the + persistence context (the session) open across the view rendering process. This is not a limitation + of Hibernate! It is a fundamental requirement of safe transactional data access. + + + + + Consider abstracting your business logic from Hibernate. + + + Hide (Hibernate) data-access code behind an interface. Combine the DAO and + Thread Local Session patterns. You can even have some classes persisted by + handcoded JDBC, associated to Hibernate via a UserType. (This advice is + intended for "sufficiently large" applications; it is not appropriate for an application with + five tables!) + + + + + Don't use exotic association mappings. + + + Good usecases for a real many-to-many associations are rare. Most of the time you need + additional information stored in the "link table". In this case, it is much better to + use two one-to-many associations to an intermediate link class. In fact, we think that + most associations are one-to-many and many-to-one, you should be careful when using any + other association style and ask yourself if it is really neccessary. + + + + + Prefer bidirectional associations. + + + Unidirectional associations are more difficult to query. In a large application, almost + all associations must be navigable in both directions in queries. + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/collection_mapping.xml b/documentation/envers/src/main/docbook/en-US/content/collection_mapping.xml new file mode 100644 index 0000000000..d09cf76f20 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/collection_mapping.xml @@ -0,0 +1,1260 @@ + + + + + + + Collection Mapping + + + Persistent collections + + + Hibernate requires that persistent collection-valued fields be declared + as an interface type, for example: + + + + + + The actual interface might be java.util.Set, + java.util.Collection, java.util.List, + java.util.Map, java.util.SortedSet, + java.util.SortedMap or ... anything you like! (Where + "anything you like" means you will have to write an implementation of + org.hibernate.usertype.UserCollectionType.) + + + + Notice how we initialized the instance variable with an instance of + HashSet. This is the best way to initialize collection + valued properties of newly instantiated (non-persistent) instances. When + you make the instance persistent - by calling persist(), + for example - Hibernate will actually replace the HashSet + with an instance of Hibernate's own implementation of Set. + Watch out for errors like this: + + + + + + The persistent collections injected by Hibernate behave like + HashMap, HashSet, + TreeMap, TreeSet or + ArrayList, depending upon the interface type. + + + + Collections instances have the usual behavior of value types. They are + automatically persisted when referenced by a persistent object and + automatically deleted when unreferenced. If a collection is passed from one + persistent object to another, its elements might be moved from one table to + another. Two entities may not share a reference to the same collection + instance. Due to the underlying relational model, collection-valued properties + do not support null value semantics; Hibernate does not distinguish between + a null collection reference and an empty collection. + + + + You shouldn't have to worry much about any of this. Use persistent collections + the same way you use ordinary Java collections. Just make sure you understand + the semantics of bidirectional associations (discussed later). + + + + + + Collection mappings + + + + There are quite a range of mappings that can be generated for collections, covering + many common relational models. We suggest you experiment with the schema generation tool + to get a feeling for how various mapping declarations translate to database tables. + + + + + The Hibernate mapping element used for mapping a collection depends upon + the type of the interface. For example, a <set> + element is used for mapping properties of type Set. + + + + + + + + +]]> + + + Apart from <set>, there is also + <list>, <map>, + <bag>, <array> and + <primitive-array> mapping elements. The + <map> element is representative: + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + name the collection property name + + + + + table (optional - defaults to property name) the + name of the collection table (not used for one-to-many associations) + + + + + schema (optional) the name of a table schema to + override the schema declared on the root element + + + + + lazy (optional - defaults to true) + may be used to disable lazy fetching and specify that the association is + always eagerly fetched, or to enable "extra-lazy" fetching where most + operations do not initialize the collection (suitable for very large + collections) + + + + + inverse (optional - defaults to false) + mark this collection as the "inverse" end of a bidirectional association + + + + + cascade (optional - defaults to none) + enable operations to cascade to child entities + + + + + sort (optional) specify a sorted collection with + natural sort order, or a given comparator class + + + + + order-by (optional, JDK1.4 only) specify a table column (or columns) + that define the iteration order of the Map, Set + or bag, together with an optional asc or desc + + + + + where (optional) specify an arbitrary SQL WHERE + condition to be used when retrieving or removing the collection (useful if the + collection should contain only a subset of the available data) + + + + + fetch (optional, defaults to select) Choose + between outer-join fetching, fetching by sequential select, and fetching by sequential + subselect. + + + + + batch-size (optional, defaults to 1) specify a + "batch size" for lazily fetching instances of this collection. + + + + + access (optional - defaults to property): The + strategy Hibernate should use for accessing the collection property value. + + + + + optimistic-lock (optional - defaults to true): + Species that changes to the state of the collection results in increment of the + owning entity's version. (For one to many associations, it is often reasonable to + disable this setting.) + + + + + mutable (optional - defaults to true): + A value of false specifies that the elements of the + collection never change (a minor performance optimization in some cases). + + + + + + + Collection foreign keys + + + Collection instances are distinguished in the database by the foreign key of + the entity that owns the collection. This foreign key is referred to as the + collection key column (or columns) of the collection + table. The collection key column is mapped by the <key> + element. + + + + There may be a nullability constraint on the foreign key column. For most + collections, this is implied. For unidirectional one to many associations, + the foreign key column is nullable by default, so you might need to specify + not-null="true". + + + ]]> + + + The foreign key constraint may use ON DELETE CASCADE. + + + ]]> + + + See the previous chapter for a full definition of the <key> + element. + + + + + + Collection elements + + + Collections may contain almost any other Hibernate type, including all basic types, + custom types, components, and of course, references to other entities. This is an + important distinction: an object in a collection might be handled with "value" + semantics (its life cycle fully depends on the collection owner) or it might be a + reference to another entity, with its own life cycle. In the latter case, only the + "link" between the two objects is considered to be state held by the collection. + + + + The contained type is referred to as the collection element type. + Collection elements are mapped by <element> or + <composite-element>, or in the case of entity references, + with <one-to-many> or <many-to-many>. + The first two map elements with value semantics, the next two are used to map entity + associations. + + + + + + Indexed collections + + + All collection mappings, except those with set and bag semantics, need an + index column in the collection table - a column that maps to an + array index, or List index, or Map key. The + index of a Map may be of any basic type, mapped with + <map-key>, it may be an entity reference mapped with + <map-key-many-to-many>, or it may be a composite type, + mapped with <composite-map-key>. The index of an array or + list is always of type integer and is mapped using the + <list-index> element. The mapped column contains + sequential integers (numbered from zero, by default). + + + + + + + + ]]> + + + + column_name (required): The name of the column holding the + collection index values. + + + + + base (optional, defaults to 0): The value + of the index column that corresponds to the first element of the list or array. + + + + + + + + + + + + ]]> + + + + column (optional): The name of the column holding the + collection index values. + + + + + formula (optional): A SQL formula used to evaluate the + key of the map. + + + + + type (reguired): The type of the map keys. + + + + + + + + + + + + ]]> + + + + column (optional): The name of the foreign key + column for the collection index values. + + + + + formula (optional): A SQL formula used to evaluate the + foreign key of the map key. + + + + + class (required): The entity class used as the map key. + + + + + + + + If your table doesn't have an index column, and you still wish to use List + as the property type, you should map the property as a Hibernate <bag>. + A bag does not retain its order when it is retrieved from the database, but it may be + optionally sorted or ordered. + + + + + + Collections of values and many-to-many associations + + + Any collection of values or many-to-many association requires a dedicated + collection table with a foreign key column or columns, + collection element column or columns and possibly + an index column or columns. + + + + For a collection of values, we use the <element> tag. + + + + + + + + + ]]> + + + + column (optional): The name of the column holding the + collection element values. + + + + + formula (optional): An SQL formula used to evaluate the + element. + + + + + type (required): The type of the collection element. + + + + + + + A many-to-many association is specified using the + <many-to-many> element. + + + + + + + + + + + + + + ]]> + + + + column (optional): The name of the element foreign key column. + + + + + formula (optional): An SQL formula used to evaluate the element + foreign key value. + + + + + class (required): The name of the associated class. + + + + + fetch (optional - defaults to join): + enables outer-join or sequential select fetching for this association. This + is a special case; for full eager fetching (in a single SELECT) + of an entity and its many-to-many relationships to other entities, you would + enable join fetching not only of the collection itself, + but also with this attribute on the <many-to-many> + nested element. + + + + + unique (optional): Enable the DDL generation of a unique + constraint for the foreign-key column. This makes the association multiplicity + effectively one to many. + + + + + not-found (optional - defaults to exception): + Specifies how foreign keys that reference missing rows will be handled: + ignore will treat a missing row as a null association. + + + + + entity-name (optional): The entity name of the associated class, + as an alternative to class. + + + + + property-ref: (optional) The name of a property of the associated + class that is joined to this foreign key. If not specified, the primary key of + the associated class is used. + + + + + + + Some examples, first, a set of strings: + + + + + +]]> + + + A bag containing integers (with an iteration order determined by the + order-by attribute): + + + + + +]]> + + + An array of entities - in this case, a many to many association: + + + + + + +]]> + + + A map from string indices to dates: + + + + + + +]]> + + + A list of components (discussed in the next chapter): + + + + + + + + + + +]]> + + + + + One-to-many associations + + + A one to many association links the tables of two classes + via a foreign key, with no intervening collection table. This mapping loses + certain semantics of normal Java collections: + + + + + + An instance of the contained entity class may not belong to more than + one instance of the collection + + + + + An instance of the contained entity class may not appear at more than + one value of the collection index + + + + + + An association from Product to Part requires + existence of a foreign key column and possibly an index column to the Part + table. A <one-to-many> tag indicates that this is a one to many + association. + + + + + + + + + ]]> + + + + class (required): The name of the associated class. + + + + + not-found (optional - defaults to exception): + Specifies how cached identifiers that reference missing rows will be handled: + ignore will treat a missing row as a null association. + + + + + entity-name (optional): The entity name of the associated class, + as an alternative to class. + + + + + + + Notice that the <one-to-many> element does not need to + declare any columns. Nor is it necessary to specify the table + name anywhere. + + + + Very important note: If the foreign key column of a + <one-to-many> association is declared NOT NULL, + you must declare the <key> mapping + not-null="true" or use a bidirectional association + with the collection mapping marked inverse="true". See the discussion + of bidirectional associations later in this chapter. + + + + This example shows a map of Part entities by name (where + partName is a persistent property of Part). + Notice the use of a formula-based index. + + + + + + +]]> + + + + + + Advanced collection mappings + + + Sorted collections + + + Hibernate supports collections implementing java.util.SortedMap and + java.util.SortedSet. You must specify a comparator in the mapping file: + + + + + + + + + + + +]]> + + + Allowed values of the sort attribute are unsorted, + natural and the name of a class implementing + java.util.Comparator. + + + + Sorted collections actually behave like java.util.TreeSet or + java.util.TreeMap. + + + + If you want the database itself to order the collection elements use the + order-by attribute of set, bag + or map mappings. This solution is only available under + JDK 1.4 or higher (it is implemented using LinkedHashSet or + LinkedHashMap). This performs the ordering in the SQL query, + not in memory. + + + + + + + + + + + +]]> + + + Note that the value of the order-by attribute is an SQL ordering, not + a HQL ordering! + + + + Associations may even be sorted by some arbitrary criteria at runtime using a collection + filter(). + + + + + + + + Bidirectional associations + + + A bidirectional association allows navigation from both + "ends" of the association. Two kinds of bidirectional association are + supported: + + + + one-to-many + + + set or bag valued at one end, single-valued at the other + + + + + many-to-many + + + set or bag valued at both ends + + + + + + + + + You may specify a bidirectional many-to-many association simply by mapping two + many-to-many associations to the same database table and declaring one end as + inverse (which one is your choice, but it can not be an + indexed collection). + + + + Here's an example of a bidirectional many-to-many association; each category can + have many items and each item can be in many categories: + + + + + ... + + + + + + + + + ... + + + + + + +]]> + + + Changes made only to the inverse end of the association are not + persisted. This means that Hibernate has two representations in memory for every + bidirectional association, one link from A to B and another link from B to A. This + is easier to understand if you think about the Java object model and how we create + a many-to-many relationship in Java: + + + + + + The non-inverse side is used to save the in-memory representation to the database. + + + + You may define a bidirectional one-to-many association by mapping a one-to-many association + to the same table column(s) as a many-to-one association and declaring the many-valued + end inverse="true". + + + + + .... + + + + + + + + + .... + +]]> + + + Mapping one end of an association with inverse="true" doesn't + affect the operation of cascades, these are orthogonal concepts! + + + + + + Bidirectional associations with indexed collections + + A bidirectional association where one end is represented as a <list> + or <map> requires special consideration. If there is a property of + the child class which maps to the index column, no problem, we can continue using + inverse="true" on the collection mapping: + + + + + .... + + + + + + + + + + .... + + +]]> + + + But, if there is no such property on the child class, we can't think of the association as + truly bidirectional (there is information available at one end of the association that is + not available at the other end). In this case, we can't map the collection + inverse="true". Instead, we could use the following mapping: + + + + + .... + + + + + + + + + + .... + +]]> + + + Note that in this mapping, the collection-valued end of the association is responsible for + updates to the foreign key. TODO: Does this really result in some unnecessary update statements? + + + + + + Ternary associations + + + There are three possible approaches to mapping a ternary association. One is to use a + Map with an association as its index: + + + + + + +]]> + + + + + +]]> + + + A second approach is to simply remodel the association as an entity class. This + is the approach we use most commonly. + + + + A final alternative is to use composite elements, which we will discuss later. + + + + + + <literal>Using an <idbag></literal> + + + If you've fully embraced our view that composite keys are a bad thing and that + entities should have synthetic identifiers (surrogate keys), then you might + find it a bit odd that the many to many associations and collections of values + that we've shown so far all map to tables with composite keys! Now, this point + is quite arguable; a pure association table doesn't seem to benefit much from + a surrogate key (though a collection of composite values might). + Nevertheless, Hibernate provides a feature that allows you to map many to many + associations and collections of values to a table with a surrogate key. + + + + The <idbag> element lets you map a List + (or Collection) with bag semantics. + + + + + + + + +]]> + + + As you can see, an <idbag> has a synthetic id generator, + just like an entity class! A different surrogate key is assigned to each collection + row. Hibernate does not provide any mechanism to discover the surrogate key value + of a particular row, however. + + + + Note that the update performance of an <idbag> is + much better than a regular <bag>! + Hibernate can locate individual rows efficiently and update or delete them + individually, just like a list, map or set. + + + + In the current implementation, the native identifier generation + strategy is not supported for <idbag> collection identifiers. + + + + + + + + + + + + Collection examples + + + The previous sections are pretty confusing. So lets look at an example. This + class: + + + + + + has a collection of Child instances. If each + child has at most one parent, the most natural mapping is a + one-to-many association: + + + + + + + + + + + + + + + + + + + + + +]]> + + + This maps to the following table definitions: + + + + + + If the parent is required, use a bidirectional one-to-many + association: + + + + + + + + + + + + + + + + + + + + + + +]]> + + + Notice the NOT NULL constraint: + + + + + + Alternatively, if you absolutely insist that this association should be unidirectional, + you can declare the NOT NULL constraint on the <key> + mapping: + + + + + + + + + + + + + + + + + + + + + +]]> + + + On the other hand, if a child might have multiple parents, a many-to-many + association is appropriate: + + + + + + + + + + + + + + + + + + + + + +]]> + + + Table definitions: + + + + + + For more examples and a complete walk-through a parent/child relationship mapping, + see . + + + + Even more exotic association mappings are possible, we will catalog all possibilities + in the next chapter. + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/component_mapping.xml b/documentation/envers/src/main/docbook/en-US/content/component_mapping.xml new file mode 100644 index 0000000000..436a02852b --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/component_mapping.xml @@ -0,0 +1,429 @@ + + + + + + + Component Mapping + + + The notion of a component is re-used in several different contexts, + for different purposes, throughout Hibernate. + + + + Dependent objects + + + 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: + + + + + + + + Now Name may be persisted as a component of + Person. Notice that Name defines getter + and setter methods for its persistent properties, but doesn't need to declare + any interfaces or identifier properties. + + + + Our Hibernate mapping would look like: + + + + + + + + + + + + +]]> + + + The person table would have the columns pid, + birthday, + initial, + first and + last. + + + + 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 + ad hoc. 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. + + + + The properties of a component may be of any Hibernate type (collections, many-to-one + associations, other components, etc). Nested components should not + be considered an exotic usage. Hibernate is intended to support a very fine-grained + object model. + + + + The <component> element allows a <parent> + subelement that maps a property of the component class as a reference back to the + containing entity. + + + + + + + + + + + + + +]]> + + + + + Collections of dependent objects + + + Collections of components are supported (eg. an array of type + Name). Declare your component collection by + replacing the <element> tag with a + <composite-element> tag. + + + + + + + + + +]]> + + + Note: if you define a Set of composite elements, it is + very important to implement equals() and + hashCode() correctly. + + + + Composite elements may contain components but not collections. If your + composite element itself contains + components, use the <nested-composite-element> + 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. + + + + Please note that a composite element mapping doesn't support null-able properties + if you're using a <set>. 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 + <list>, <map>, + <bag> or <idbag>. + + + + A special case of a composite element is a composite element with a nested + <many-to-one> 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 Order to Item where + purchaseDate, price and + quantity are properties of the association: + + + + .... + + + + + + + + + +]]> + + + Of course, there can't be a reference to the purchae on the other side, for + bidirectional association navigation. Remember that components are value types and + don't allow shared references. A single Purchase can be in the + set of an Order, but it can't be referenced by the Item + at the same time. + + + Even ternary (or quaternary, etc) associations are possible: + + + .... + + + + + + + +]]> + + + Composite elements may appear in queries using the same syntax as + associations to other entities. + + + + + + Components as Map indices + + + The <composite-map-key> element lets you map a + component class as the key of a Map. Make sure you override + hashCode() and equals() correctly on + the component class. + + + + + Components as composite identifiers + + + You may use a component as an identifier of an entity class. Your component + class must satisfy certain requirements: + + + + + + It must implement java.io.Serializable. + + + + + It must re-implement equals() and + hashCode(), consistently with the database's + notion of composite key equality. + + + + + + Note: in Hibernate3, the second requirement is not an absolutely hard + requirement of Hibernate. But do it anyway. + + + + You can't use an IdentifierGenerator to generate composite keys. + Instead the application must assign its own identifiers. + + + + Use the <composite-id> tag (with nested + <key-property> elements) in place of the usual + <id> declaration. For example, the + OrderLine class has a primary key that depends upon + the (composite) primary key of Order. + + + + + + + + + + + + + + + + + .... + +]]> + + + Now, any foreign keys referencing the OrderLine table are also + composite. You must declare this in your mappings for other classes. An association + to OrderLine would be mapped like this: + + + + + + + +]]> + + + (Note that the <column> tag is an alternative to the + column attribute everywhere.) + + + + A many-to-many association to OrderLine also + uses the composite foreign key: + + + + + + + + + +]]> + + + The collection of OrderLines in Order would + use: + + + + + + + + +]]> + + + (The <one-to-many> element, as usual, declares no columns.) + + + + If OrderLine itself owns a collection, it also has a composite + foreign key. + + + + .... + .... + + + + + + + + + ... + + +]]> + + + + + Dynamic components + + + You may even map a property of type Map: + + + + + + +]]> + + + The semantics of a <dynamic-component> mapping are identical + to <component>. The advantage of this kind of mapping is + the ability to determine the actual properties of the bean at deployment time, just + by editing the mapping document. Runtime manipulation of the mapping document is + also possible, using a DOM parser. Even better, you can access (and change) Hibernate's + configuration-time metamodel via the Configuration object. + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/configuration.xml b/documentation/envers/src/main/docbook/en-US/content/configuration.xml index 4219debcb5..b87575d865 100644 --- a/documentation/envers/src/main/docbook/en-US/content/configuration.xml +++ b/documentation/envers/src/main/docbook/en-US/content/configuration.xml @@ -25,184 +25,1735 @@ - - + Configuration - + - To start working with Envers, all configuration that you must do is add the event - listeners to persistence.xml, as described in the . + Because Hibernate is designed to operate in many different environments, there + are a large number of configuration parameters. Fortunately, most have sensible + default values and Hibernate is distributed with an example + hibernate.properties file in etc/ that shows + the various options. Just put the example file in your classpath and customize it. - - However, as Envers generates some tables, it is possible to set the prefix and suffix - that is added to the entity name to create a versions table for an entity, as well - as set the names of the fields that are generated. - + + Programmatic configuration - - In more detail, here are the properites that you can set: - + + An instance of org.hibernate.cfg.Configuration represents an entire set of mappings + of an application's Java types to an SQL database. The org.hibernate.cfg.Configuration + is used to build an (immutable) org.hibernate.SessionFactory. The mappings + are compiled from various XML mapping files. + - - Envers Configuration Properties - - - - - - - Property name - Default value - Description - - + + You may obtain a org.hibernate.cfg.Configuration instance by instantiating + it directly and specifying XML mapping documents. If the mapping files are in the classpath, + use addResource(): + + + + + + An alternative (sometimes better) way is to specify the mapped class, and + let Hibernate find the mapping document for you: + + + + + + Then Hibernate will look for mapping files named /org/hibernate/auction/Item.hbm.xml + and /org/hibernate/auction/Bid.hbm.xml in the classpath. This approach eliminates any + hardcoded filenames. + + + + A org.hibernate.cfg.Configuration also allows you to specify configuration + properties: + + + + + + This is not the only way to pass configuration properties to Hibernate. + The various options include: + + + + + + Pass an instance of java.util.Properties to + Configuration.setProperties(). + + + + + Place a file named hibernate.properties in a root directory of the classpath. + + + + + Set System properties using java -Dproperty=value. + + + + + Include <property> elements in + hibernate.cfg.xml (discussed later). + + + + + + hibernate.properties is the easiest approach if you want to get started quickly. + + + + The org.hibernate.cfg.Configuration is intended as a startup-time object, + to be discarded once a SessionFactory is created. + + + + + + Obtaining a SessionFactory + + + When all mappings have been parsed by the org.hibernate.cfg.Configuration, + the application must obtain a factory for org.hibernate.Session instances. + This factory is intended to be shared by all application threads: + + + + + + Hibernate does allow your application to instantiate more than one + org.hibernate.SessionFactory. This is useful if you are using more than + one database. + + + + + + JDBC connections + + + Usually, you want to have the org.hibernate.SessionFactory create and pool + JDBC connections for you. If you take this approach, opening a org.hibernate.Session + is as simple as: + + + + + + As soon as you do something that requires access to the database, a JDBC connection will be obtained from + the pool. + + + + For this to work, we need to pass some JDBC connection properties to Hibernate. All Hibernate property + names and semantics are defined on the class org.hibernate.cfg.Environment. We will + now describe the most important settings for JDBC connection configuration. + + + + Hibernate will obtain (and pool) connections using java.sql.DriverManager + if you set the following properties: + + +
+ Hibernate JDBC Properties + + + + + + Property name + Purpose + + - - - org.hibernate.envers.auditTablePrefix - - - - - - String that will be prepended to the name of an audited entity to create - the name of the entity, that will hold audit information. - - - - - org.hibernate.envers.auditTableSuffix - - - _audit - - - String that will be appended to the name of an audited entity to create - the name of the entity, that will hold audit information. If you - audit an entity with a table name Person, in the default setting Envers - will generate a Person_audit table to store historical data. - - - - - org.hibernate.envers.revisionFieldName - - - REV - - - Name of a field in the audit entity that will hold the revision number. - - - - - org.hibernate.envers.revisionTypeFieldName - - - REVTYPE - - - Name of a field in the aduit entity that will hold the type of the - revision (currently, this can be: add, mod, del). - - - - - org.hibernate.envers.revisionOnCollectionChange - - - true - - - Should a revision be generated when a not-owned relation field changes - (this can be either a collection in a one-to-many relation, or the field - using "mappedBy" attribute in a one-to-one relation). - - - - - org.hibernate.envers.warnOnUnsupportedTypes - - - false - - - TODO: remove - - - - - org.hibernate.envers.doNotAuditOptimisticLockingField - - - true - - - When true, properties to be used for optimistic locking, annotated with - @Version, will be automatically not audited - (their history won't be stored; it normally doesn't make sense to store it). - - + + + hibernate.connection.driver_class + + + JDBC driver class + + + + + hibernate.connection.url + + + JDBC URL + + + + + hibernate.connection.username + + + database user + + + + + hibernate.connection.password + + + database user password + + + + + hibernate.connection.pool_size + + + maximum number of pooled connections + + - -
+ + - - To change the name of the revision table and its fields (the table, in which the - numbers of revisions and their timestamps are stored), you can use the - @RevisionEntity annotation. - For more information, see . - + + Hibernate's own connection pooling algorithm is however quite rudimentary. + It is intended to help you get started and is not intended for use + in a production system or even for performance testing. You should + use a third party pool for best performance and stability. Just replace the + hibernate.connection.pool_size property with connection + pool specific settings. This will turn off Hibernate's internal pool. For + example, you might like to use C3P0. + - - To set the value of any of the properties described above, simply add an entry to - your persistence.xml. For example: - + + C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib + directory. Hibernate will use its org.hibernate.connection.C3P0ConnectionProvider + for connection pooling if you set hibernate.c3p0.* properties. If you'd like to use Proxool + refer to the packaged hibernate.properties and the Hibernate web site for more + information. + - -org.hibernate.ejb.HibernatePersistence -... - - - + + Here is an example hibernate.properties file for C3P0: + - - - - - - + - - - - -]]> + + For use inside an application server, you should almost always configure Hibernate to obtain connections + from an application server javax.sql.Datasource registered in JNDI. You'll + need to set at least one of the following properties: + - - You can also set the name of the versions table on a per-entity basis, using the - @AuditTable annotation (see also in the javadoc). It may be tedious to add this - annotation to every audited entity, so if possible, it's better to use a prefix/suffix. - + + Hibernate Datasource Properties + + + + + + Property name + Purpose + + + + + + hibernate.connection.datasource + + + datasource JNDI name + + + + + hibernate.jndi.url + + + URL of the JNDI provider (optional) + + + + + hibernate.jndi.class + + + class of the JNDI InitialContextFactory (optional) + + + + + hibernate.connection.username + + + database user (optional) + + + + + hibernate.connection.password + + + database user password (optional) + + + + +
- - If you have a mapping with secondary tables, version tables for them will be generated in - the same way (by adding the prefix and suffix). If you wish to overwrite this behaviour, - you can use the @SecondaryAuditTable and - @SecondaryAuditTables annotations. - + + Here's an example hibernate.properties file for an application server provided JNDI + datasource: + + + + + + JDBC connections obtained from a JNDI datasource will automatically participate + in the container-managed transactions of the application server. + + + + Arbitrary connection properties may be given by prepending "hibernate.connection" to the + connection property name. For example, you may specify a charSet + connection property using hibernate.connection.charSet. + + + + You may define your own plugin strategy for obtaining JDBC connections by implementing the + interface org.hibernate.connection.ConnectionProvider, and specifying your + custom implementation via the hibernate.connection.provider_class property. + + +
+ + + Optional configuration properties + + + There are a number of other properties that control the behaviour of Hibernate at runtime. All are optional + and have reasonable default values. + + + + Warning: some of these properties are "system-level" only. System-level properties can + be set only via java -Dproperty=value or hibernate.properties. They + may not be set by the other techniques described above. + + + + Hibernate Configuration Properties + + + + + + Property name + Purpose + + + + + + hibernate.dialect + + + The classname of a Hibernate org.hibernate.dialect.Dialect which + allows Hibernate to generate SQL optimized for a particular relational database. + + eg. + full.classname.of.Dialect + + + In most cases Hibernate will actually be able to chose the correct + org.hibernate.dialect.Dialect implementation to use based on the + JDBC metadata returned by the JDBC driver. + + + + + + hibernate.show_sql + + + Write all SQL statements to console. This is an alternative + to setting the log category org.hibernate.SQL + to debug. + + eg. + true | false + + + + + + hibernate.format_sql + + + Pretty print the SQL in the log and console. + + eg. + true | false + + + + + + hibernate.default_schema + + + Qualify unqualified table names with the given schema/tablespace + in generated SQL. + + eg. + SCHEMA_NAME + + + + + + hibernate.default_catalog + + + Qualify unqualified table names with the given catalog + in generated SQL. + + eg. + CATALOG_NAME + + + + + + hibernate.session_factory_name + + + The org.hibernate.SessionFactory will be automatically + bound to this name in JNDI after it has been created. + + eg. + jndi/composite/name + + + + + + hibernate.max_fetch_depth + + + Set a maximum "depth" for the outer join fetch tree + for single-ended associations (one-to-one, many-to-one). + A 0 disables default outer join fetching. + + eg. + recommended values between 0 and + 3 + + + + + + hibernate.default_batch_fetch_size + + + Set a default size for Hibernate batch fetching of associations. + + eg. + recommended values 4, 8, + 16 + + + + + + hibernate.default_entity_mode + + + Set a default mode for entity representation for all sessions + opened from this SessionFactory + + dynamic-map, dom4j, + pojo + + + + + + hibernate.order_updates + + + Force Hibernate to order SQL updates by the primary key value + of the items being updated. This will result in fewer transaction + deadlocks in highly concurrent systems. + + eg. + true | false + + + + + + hibernate.generate_statistics + + + If enabled, Hibernate will collect statistics useful for + performance tuning. + + eg. + true | false + + + + + + hibernate.use_identifier_rollback + + + If enabled, generated identifier properties will be + reset to default values when objects are deleted. + + eg. + true | false + + + + + + hibernate.use_sql_comments + + + If turned on, Hibernate will generate comments inside the SQL, for + easier debugging, defaults to false. + + eg. + true | false + + + + + +
+ + + Hibernate JDBC and Connection Properties + + + + + Property name + Purpose + + + + + + hibernate.jdbc.fetch_size + + + A non-zero value determines the JDBC fetch size (calls + Statement.setFetchSize()). + + + + + hibernate.jdbc.batch_size + + + A non-zero value enables use of JDBC2 batch updates by Hibernate. + + eg. + recommended values between 5 and 30 + + + + + + hibernate.jdbc.batch_versioned_data + + + Set this property to true if your JDBC driver returns + correct row counts from executeBatch() (it is usually + safe to turn this option on). Hibernate will then use batched DML for + automatically versioned data. Defaults to false. + + eg. + true | false + + + + + + hibernate.jdbc.factory_class + + + Select a custom org.hibernate.jdbc.Batcher. Most applications + will not need this configuration property. + + eg. + classname.of.BatcherFactory + + + + + + hibernate.jdbc.use_scrollable_resultset + + + Enables use of JDBC2 scrollable resultsets by Hibernate. + This property is only necessary when using user supplied + JDBC connections, Hibernate uses connection metadata otherwise. + + eg. + true | false + + + + + + hibernate.jdbc.use_streams_for_binary + + + Use streams when writing/reading binary or serializable + types to/from JDBC. *system-level property* + + eg. + true | false + + + + + + hibernate.jdbc.use_get_generated_keys + + + Enable use of JDBC3 PreparedStatement.getGeneratedKeys() + to retrieve natively generated keys after insert. Requires JDBC3+ driver + and JRE1.4+, set to false if your driver has problems with the Hibernate + identifier generators. By default, tries to determine the driver capabilities + using connection metadata. + + eg. + true|false + + + + + + hibernate.connection.provider_class + + + The classname of a custom org.hibernate.connection.ConnectionProvider + which provides JDBC connections to Hibernate. + + eg. + classname.of.ConnectionProvider + + + + + + hibernate.connection.isolation + + + Set the JDBC transaction isolation level. Check java.sql.Connection + for meaningful values but note that most databases do not support all isolation levels and some + define additional, non-standard isolations. + + eg. + 1, 2, 4, 8 + + + + + + hibernate.connection.autocommit + + + Enables autocommit for JDBC pooled connections (not recommended). + + eg. + true | false + + + + + + hibernate.connection.release_mode + + + Specify when Hibernate should release JDBC connections. By default, + a JDBC connection is held until the session is explicitly closed or + disconnected. For an application server JTA datasource, you should use + after_statement to aggressively release connections + after every JDBC call. For a non-JTA connection, it often makes sense to + release the connection at the end of each transaction, by using + after_transaction. auto will + choose after_statement for the JTA and CMT transaction + strategies and after_transaction for the JDBC + transaction strategy. + + eg. + auto (default) | on_close | + after_transaction | after_statement + + + Note that this setting only affects Sessions returned from + SessionFactory.openSession. For Sessions + obtained through SessionFactory.getCurrentSession, the + CurrentSessionContext implementation configured for use + controls the connection release mode for those Sessions. + See + + + + + + hibernate.connection.<propertyName> + + + Pass the JDBC property <propertyName> + to DriverManager.getConnection(). + + + + + hibernate.jndi.<propertyName> + + + Pass the property <propertyName> to + the JNDI InitialContextFactory. + + + + +
+ + + Hibernate Cache Properties + + + + + + Property name + Purpose + + + + + + hibernate.cache.provider_class + + + The classname of a custom CacheProvider. + + eg. + classname.of.CacheProvider + + + + + + hibernate.cache.use_minimal_puts + + + Optimize second-level cache operation to minimize writes, at the + cost of more frequent reads. This setting is most useful for + clustered caches and, in Hibernate3, is enabled by default for + clustered cache implementations. + + eg. + true|false + + + + + + hibernate.cache.use_query_cache + + + Enable the query cache, individual queries still have to be set cachable. + + eg. + true|false + + + + + + hibernate.cache.use_second_level_cache + + + May be used to completely disable the second level cache, which is enabled + by default for classes which specify a <cache> + mapping. + + eg. + true|false + + + + + + hibernate.cache.query_cache_factory + + + The classname of a custom QueryCache interface, + defaults to the built-in StandardQueryCache. + + eg. + classname.of.QueryCache + + + + + + hibernate.cache.region_prefix + + + A prefix to use for second-level cache region names. + + eg. + prefix + + + + + + hibernate.cache.use_structured_entries + + + Forces Hibernate to store data in the second-level cache + in a more human-friendly format. + + eg. + true|false + + + + + +
+ + + Hibernate Transaction Properties + + + + + + Property name + Purpose + + + + + + hibernate.transaction.factory_class + + + The classname of a TransactionFactory + to use with Hibernate Transaction API + (defaults to JDBCTransactionFactory). + + eg. + classname.of.TransactionFactory + + + + + + jta.UserTransaction + + + A JNDI name used by JTATransactionFactory to + obtain the JTA UserTransaction from the + application server. + + eg. + jndi/composite/name + + + + + + hibernate.transaction.manager_lookup_class + + + The classname of a TransactionManagerLookup + - required when JVM-level caching is enabled or when using hilo + generator in a JTA environment. + + eg. + classname.of.TransactionManagerLookup + + + + + + hibernate.transaction.flush_before_completion + + + If enabled, the session will be automatically flushed during the + before completion phase of the transaction. Built-in and + automatic session context management is preferred, see + . + + eg. + true | false + + + + + + hibernate.transaction.auto_close_session + + + If enabled, the session will be automatically closed during the + after completion phase of the transaction. Built-in and + utomatic session context management is preferred, see + . + + eg. + true | false + + + + + +
+ + + Miscellaneous Properties + + + + + + Property name + Purpose + + + + + + hibernate.current_session_context_class + + + Supply a (custom) strategy for the scoping of the "current" + Session. See + for more + information about the built-in strategies. + + eg. + jta | thread | + managed | custom.Class + + + + + + hibernate.query.factory_class + + + Chooses the HQL parser implementation. + + eg. + org.hibernate.hql.ast.ASTQueryTranslatorFactory or + org.hibernate.hql.classic.ClassicQueryTranslatorFactory + + + + + + hibernate.query.substitutions + + + Mapping from tokens in Hibernate queries to SQL tokens + (tokens might be function or literal names, for example). + + eg. + hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC + + + + + + hibernate.hbm2ddl.auto + + + Automatically validate or export schema DDL to the database + when the SessionFactory is created. With + create-drop, the database schema will be + dropped when the SessionFactory is closed + explicitly. + + eg. + validate | update | + create | create-drop + + + + + + hibernate.cglib.use_reflection_optimizer + + + Enables use of CGLIB instead of runtime reflection (System-level + property). Reflection can sometimes be useful when troubleshooting, + note that Hibernate always requires CGLIB even if you turn off the + optimizer. You can not set this property in hibernate.cfg.xml. + + eg. + true | false + + + + + +
+ + + SQL Dialects + + + You should always set the hibernate.dialect property to the correct + org.hibernate.dialect.Dialect subclass for your database. If you + specify a dialect, Hibernate will use sensible defaults for some of the + other properties listed above, saving you the effort of specifying them manually. + + + + Hibernate SQL Dialects (<literal>hibernate.dialect</literal>) + + + + + RDBMS + Dialect + + + + + DB2 org.hibernate.dialect.DB2Dialect + + + DB2 AS/400 org.hibernate.dialect.DB2400Dialect + + + DB2 OS390 org.hibernate.dialect.DB2390Dialect + + + PostgreSQL org.hibernate.dialect.PostgreSQLDialect + + + MySQL org.hibernate.dialect.MySQLDialect + + + MySQL with InnoDB org.hibernate.dialect.MySQLInnoDBDialect + + + MySQL with MyISAM org.hibernate.dialect.MySQLMyISAMDialect + + + Oracle (any version) org.hibernate.dialect.OracleDialect + + + Oracle 9i/10g org.hibernate.dialect.Oracle9Dialect + + + Sybase org.hibernate.dialect.SybaseDialect + + + Sybase Anywhere org.hibernate.dialect.SybaseAnywhereDialect + + + Microsoft SQL Server org.hibernate.dialect.SQLServerDialect + + + SAP DB org.hibernate.dialect.SAPDBDialect + + + Informix org.hibernate.dialect.InformixDialect + + + HypersonicSQL org.hibernate.dialect.HSQLDialect + + + Ingres org.hibernate.dialect.IngresDialect + + + Progress org.hibernate.dialect.ProgressDialect + + + Mckoi SQL org.hibernate.dialect.MckoiDialect + + + Interbase org.hibernate.dialect.InterbaseDialect + + + Pointbase org.hibernate.dialect.PointbaseDialect + + + FrontBase org.hibernate.dialect.FrontbaseDialect + + + Firebird org.hibernate.dialect.FirebirdDialect + + + +
+ +
+ + + Outer Join Fetching + + + If your database supports ANSI, Oracle or Sybase style outer joins, outer join + fetching will often increase performance by limiting the number of round + trips to and from the database (at the cost of possibly more work performed by + the database itself). Outer join fetching allows a whole graph of objects connected + by many-to-one, one-to-many, many-to-many and one-to-one associations to be retrieved + in a single SQL SELECT. + + + + Outer join fetching may be disabled globally by setting + the property hibernate.max_fetch_depth to 0. + A setting of 1 or higher enables outer join fetching for + one-to-one and many-to-one associations which have been mapped with + fetch="join". + + + + See for more information. + + + + + + Binary Streams + + + Oracle limits the size of byte arrays that may + be passed to/from its JDBC driver. If you wish to use large instances of + binary or serializable type, you should + enable hibernate.jdbc.use_streams_for_binary. + This is a system-level setting only. + + + + + + Second-level and query cache + + + The properties prefixed by hibernate.cache + allow you to use a process or cluster scoped second-level cache system + with Hibernate. See the for + more details. + + + + + + Query Language Substitution + + + You may define new Hibernate query tokens using hibernate.query.substitutions. + For example: + + + hibernate.query.substitutions true=1, false=0 + + + would cause the tokens true and false to be translated to + integer literals in the generated SQL. + + + hibernate.query.substitutions toLowercase=LOWER + + + would allow you to rename the SQL LOWER function. + + + + + + Hibernate statistics + + + If you enable hibernate.generate_statistics, Hibernate will + expose a number of metrics that are useful when tuning a running system via + SessionFactory.getStatistics(). Hibernate can even be configured + to expose these statistics via JMX. Read the Javadoc of the interfaces in + org.hibernate.stats for more information. + + + +
+ + + Logging + + + Hibernate utilizes Simple Logging Facade for Java + (SLF4J) in order to log various system events. SLF4J can direct your logging output to + several logging frameworks (NOP, Simple, log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your + chosen binding. In order to setup logging properly you will need slf4j-api.jar in + your classpath together with the jar file for your preferred binding - slf4j-log4j12.jar + in the case of Log4J. See the SLF4J documentation for more detail. + To use Log4j you will also need to place a log4j.properties file in your classpath, + an example properties file is distributed with Hibernate in the src/ directory. + + + + We strongly recommend that you familiarize yourself with Hibernate's log + messages. A lot of work has been put into making the Hibernate log as + detailed as possible, without making it unreadable. It is an essential + troubleshooting device. The most interesting log categories are the + following: + + + + Hibernate Log Categories + + + + + + Category + Function + + + + + org.hibernate.SQL + Log all SQL DML statements as they are executed + + + org.hibernate.type + Log all JDBC parameters + + + org.hibernate.tool.hbm2ddl + Log all SQL DDL statements as they are executed + + + org.hibernate.pretty + + Log the state of all entities (max 20 entities) associated + with the session at flush time + + + + org.hibernate.cache + Log all second-level cache activity + + + org.hibernate.transaction + Log transaction related activity + + + org.hibernate.jdbc + Log all JDBC resource acquisition + + + org.hibernate.hql.ast.AST + + Log HQL and SQL ASTs during query parsing + + + + org.hibernate.secure + Log all JAAS authorization requests + + + org.hibernate + + Log everything (a lot of information, but very useful for + troubleshooting) + + + + +
+ + + When developing applications with Hibernate, you should almost always work with + debug enabled for the category org.hibernate.SQL, + or, alternatively, the property hibernate.show_sql enabled. + + + +
+ + + Implementing a <literal>NamingStrategy</literal> + + + The interface org.hibernate.cfg.NamingStrategy allows you + to specify a "naming standard" for database objects and schema elements. + + + + You may provide rules for automatically generating database identifiers from + Java identifiers or for processing "logical" column and table names given in + the mapping file into "physical" table and column names. This feature helps + reduce the verbosity of the mapping document, eliminating repetitive noise + (TBL_ prefixes, for example). The default strategy used by + Hibernate is quite minimal. + + + + You may specify a different strategy by calling + Configuration.setNamingStrategy() before adding mappings: + + + + + + org.hibernate.cfg.ImprovedNamingStrategy is a built-in + strategy that might be a useful starting point for some applications. + + + + + + XML configuration file + + + An alternative approach to configuration is to specify a full configuration in + a file named hibernate.cfg.xml. This file can be used as a + replacement for the hibernate.properties file or, if both + are present, to override properties. + + + + The XML configuration file is by default expected to be in the root o + your CLASSPATH. Here is an example: + + + + + + + + + + + + java:/comp/env/jdbc/MyDB + org.hibernate.dialect.MySQLDialect + false + + org.hibernate.transaction.JTATransactionFactory + + java:comp/UserTransaction + + + + + + + + + + + + +]]> + + + As you can see, the advantage of this approach is the externalization of the + mapping file names to configuration. The hibernate.cfg.xml + is also more convenient once you have to tune the Hibernate cache. Note that is + your choice to use either hibernate.properties or + hibernate.cfg.xml, both are equivalent, except for the above + mentioned benefits of using the XML syntax. + + + + With the XML configuration, starting Hibernate is then as simple as + + + + + + You can pick a different XML configuration file using + + + + + + + + J2EE Application Server integration + + + Hibernate has the following integration points for J2EE infrastructure: + + + + + + Container-managed datasources: Hibernate can use + JDBC connections managed by the container and provided through JNDI. Usually, + a JTA compatible TransactionManager and a + ResourceManager take care of transaction management (CMT), + esp. distributed transaction handling across several datasources. You may + of course also demarcate transaction boundaries programmatically (BMT) or + you might want to use the optional Hibernate Transaction + API for this to keep your code portable. + + + + + + + + Automatic JNDI binding: Hibernate can bind its + SessionFactory to JNDI after startup. + + + + + + + + JTA Session binding: The Hibernate Session + may be automatically bound to the scope of JTA transactions. Simply + lookup the SessionFactory from JNDI and get the current + Session. Let Hibernate take care of flushing and closing the + Session when your JTA transaction completes. Transaction + demarcation is either declarative (CMT) or programmatic (BMT/UserTransaction). + + + + + + + + JMX deployment: If you have a JMX capable application server + (e.g. JBoss AS), you can chose to deploy Hibernate as a managed MBean. This saves + you the one line startup code to build your SessionFactory from + a Configuration. The container will startup your + HibernateService, and ideally also take care of service + dependencies (Datasource has to be available before Hibernate starts, etc). + + + + + + Depending on your environment, you might have to set the configuration option + hibernate.connection.aggressive_release to true if your + application server shows "connection containment" exceptions. + + + + Transaction strategy configuration + + + The Hibernate Session API is independent of any transaction + demarcation system in your architecture. If you let Hibernate use JDBC directly, + through a connection pool, you may begin and end your transactions by calling + the JDBC API. If you run in a J2EE application server, you might want to use bean-managed + transactions and call the JTA API and UserTransaction when needed. + + + + To keep your code portable between these two (and other) environments we recommend the optional + Hibernate Transaction API, which wraps and hides the underlying system. + You have to specify a factory class for Transaction instances by setting the + Hibernate configuration property hibernate.transaction.factory_class. + + + + There are three standard (built-in) choices: + + + + + org.hibernate.transaction.JDBCTransactionFactory + + delegates to database (JDBC) transactions (default) + + + + org.hibernate.transaction.JTATransactionFactory + + + delegates to container-managed transaction if an existing transaction is + underway in this context (e.g. EJB session bean method), otherwise + a new transaction is started and bean-managed transaction are used. + + + + + org.hibernate.transaction.CMTTransactionFactory + + delegates to container-managed JTA transactions + + + + + + You may also define your own transaction strategies (for a CORBA transaction service, + for example). + + + + Some features in Hibernate (i.e. the second level cache, Contextual Sessions with JTA, etc.) + require access to the JTA TransactionManager in a managed environment. + In an application server you have to specify how Hibernate should obtain a reference to the + TransactionManager, since J2EE does not standardize a single mechanism: + + + + JTA TransactionManagers + + + + + + Transaction Factory + Application Server + + + + + org.hibernate.transaction.JBossTransactionManagerLookup + JBoss + + + org.hibernate.transaction.WeblogicTransactionManagerLookup + Weblogic + + + org.hibernate.transaction.WebSphereTransactionManagerLookup + WebSphere + + + org.hibernate.transaction.WebSphereExtendedJTATransactionLookup + WebSphere 6 + + + org.hibernate.transaction.OrionTransactionManagerLookup + Orion + + + org.hibernate.transaction.ResinTransactionManagerLookup + Resin + + + org.hibernate.transaction.JOTMTransactionManagerLookup + JOTM + + + org.hibernate.transaction.JOnASTransactionManagerLookup + JOnAS + + + org.hibernate.transaction.JRun4TransactionManagerLookup + JRun4 + + + org.hibernate.transaction.BESTransactionManagerLookup + Borland ES + + + +
+ +
+ + + JNDI-bound <literal>SessionFactory</literal> + + + A JNDI bound Hibernate SessionFactory can simplify the lookup + of the factory and the creation of new Sessions. Note that this + is not related to a JNDI bound Datasource, both simply use the + same registry! + + + + If you wish to have the SessionFactory bound to a JNDI namespace, specify + a name (eg. java:hibernate/SessionFactory) using the property + hibernate.session_factory_name. If this property is omitted, the + SessionFactory will not be bound to JNDI. (This is especially useful in + environments with a read-only JNDI default implementation, e.g. Tomcat.) + + + + When binding the SessionFactory to JNDI, Hibernate will use the values of + hibernate.jndi.url, hibernate.jndi.class to instantiate + an initial context. If they are not specified, the default InitialContext + will be used. + + + + Hibernate will automatically place the SessionFactory in JNDI after + you call cfg.buildSessionFactory(). This means you will at least have + this call in some startup code (or utility class) in your application, unless you use + JMX deployment with the HibernateService (discussed later). + + + + If you use a JNDI SessionFactory, an EJB or any other class may + obtain the SessionFactory using a JNDI lookup. + + + + We recommend that you bind the SessionFactory to JNDI in + a managed environment and use a static singleton otherwise. + To shield your application code from these details, we also recommend to hide the + actual lookup code for a SessionFactory in a helper class, + such as HibernateUtil.getSessionFactory(). Note that such a + class is also a convenient way to startup Hibernate—see chapter 1. + + + + + + Current Session context management with JTA + + + The easiest way to handle Sessions and transactions is + Hibernates automatic "current" Session management. + See the discussion of current sessions. + Using the "jta" session context, if there is no Hibernate + Session associated with the current JTA transaction, one will + be started and associated with that JTA transaction the first time you call + sessionFactory.getCurrentSession(). The Sessions + retrieved via getCurrentSession() in "jta" context + will be set to automatically flush before the transaction completes, close + after the transaction completes, and aggressively release JDBC connections + after each statement. This allows the Sessions to + be managed by the life cycle of the JTA transaction to which it is associated, + keeping user code clean of such management concerns. Your code can either use + JTA programmatically through UserTransaction, or (recommended + for portable code) use the Hibernate Transaction API to set + transaction boundaries. If you run in an EJB container, declarative transaction + demarcation with CMT is preferred. + + + + + + JMX deployment + + + The line cfg.buildSessionFactory() still has to be executed + somewhere to get a SessionFactory into JNDI. You can do this + either in a static initializer block (like the one in + HibernateUtil) or you deploy Hibernate as a managed + service. + + + + Hibernate is distributed with org.hibernate.jmx.HibernateService + for deployment on an application server with JMX capabilities, such as JBoss AS. + The actual deployment and configuration is vendor specific. Here is an example + jboss-service.xml for JBoss 4.0.x: + + + + + + + + + jboss.jca:service=RARDeployer + jboss.jca:service=LocalTxCM,name=HsqlDS + + + java:/hibernate/SessionFactory + + + java:HsqlDS + org.hibernate.dialect.HSQLDialect + + + + org.hibernate.transaction.JTATransactionFactory + + org.hibernate.transaction.JBossTransactionManagerLookup + true + true + + + 5 + + + true + org.hibernate.cache.EhCacheProvider + true + + + true + + + auction/Item.hbm.xml,auction/Category.hbm.xml + + + +]]> + + + This file is deployed in a directory called META-INF and packaged + in a JAR file with the extension .sar (service archive). You also need + to package Hibernate, its required third-party libraries, your compiled persistent classes, + as well as your mapping files in the same archive. Your enterprise beans (usually session + beans) may be kept in their own JAR file, but you may include this EJB JAR file in the + main service archive to get a single (hot-)deployable unit. Consult the JBoss AS + documentation for more information about JMX service and EJB deployment. + + + + +
- - If you want to audit a relation mapped with @OneToMany+@JoinColumn, - please see for a description of the additional - @AuditJoinTable annotation that you'll probably want to use. -
diff --git a/documentation/envers/src/main/docbook/en-US/content/events.xml b/documentation/envers/src/main/docbook/en-US/content/events.xml new file mode 100755 index 0000000000..b7855ae1c1 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/events.xml @@ -0,0 +1,292 @@ + + + + + + + Interceptors and events + + + It is often useful for the application to react to certain events that occur + inside Hibernate. This allows implementation of certain kinds of generic + functionality, and extension of Hibernate functionality. + + + + Interceptors + + + The Interceptor interface provides callbacks from the session to the + application allowing the application to inspect and/or manipulate properties of a + persistent object before it is saved, updated, deleted or loaded. One + possible use for this is to track auditing information. For example, the following + Interceptor automatically sets the createTimestamp + when an Auditable is created and updates the + lastUpdateTimestamp property when an Auditable is + updated. + + + + You may either implement Interceptor directly or (better) extend + EmptyInterceptor. + + + + + + Interceptors come in two flavors: Session-scoped and + SessionFactory-scoped. + + + + A Session-scoped interceptor is specified + when a session is opened using one of the overloaded SessionFactory.openSession() + methods accepting an Interceptor. + + + + + + A SessionFactory-scoped interceptor is registered with the Configuration + object prior to building the SessionFactory. In this case, the supplied interceptor + will be applied to all sessions opened from that SessionFactory; this is true unless + a session is opened explicitly specifying the interceptor to use. SessionFactory-scoped + interceptors must be thread safe, taking care to not store session-specific state since multiple + sessions will use this interceptor (potentially) concurrently. + + + + + + + + Event system + + + If you have to react to particular events in your persistence layer, you may + also use the Hibernate3 event architecture. The event + system can be used in addition or as a replacement for interceptors. + + + + Essentially all of the methods of the Session interface correlate + to an event. You have a LoadEvent, a FlushEvent, etc + (consult the XML configuration-file DTD or the org.hibernate.event + package for the full list of defined event types). When a request is made of one of + these methods, the Hibernate Session generates an appropriate + event and passes it to the configured event listeners for that type. Out-of-the-box, + these listeners implement the same processing in which those methods always resulted. + However, you are free to implement a customization of one of the listener interfaces + (i.e., the LoadEvent is processed by the registered implemenation + of the LoadEventListener interface), in which case their + implementation would be responsible for processing any load() requests + made of the Session. + + + + The listeners should be considered effectively singletons; meaning, they are shared between + requests, and thus should not save any state as instance variables. + + + + A custom listener should implement the appropriate interface for the event it wants to + process and/or extend one of the convenience base classes (or even the default event + listeners used by Hibernate out-of-the-box as these are declared non-final for this + purpose). Custom listeners can either be registered programmatically through the + Configuration object, or specified in the Hibernate configuration + XML (declarative configuration through the properties file is not supported). Here's an + example of a custom load event listener: + + + + + + You also need a configuration entry telling Hibernate to use the listener in addition + to the default listener: + + + + + ... + + + + + +]]> + + + Instead, you may register it programmatically: + + + + + + Listeners registered declaratively cannot share instances. If the same class name is + used in multiple <listener/> elements, each reference will + result in a separate instance of that class. If you need the capability to share + listener instances between listener types you must use the programmatic registration + approach. + + + + Why implement an interface and define the specific type during configuration? Well, a + listener implementation could implement multiple event listener interfaces. Having the + type additionally defined during registration makes it easier to turn custom listeners on + or off during configuration. + + + + + + Hibernate declarative security + + Usually, declarative security in Hibernate applications is managed in a session facade + layer. Now, Hibernate3 allows certain actions to be permissioned via JACC, and authorized + via JAAS. This is optional functionality built on top of the event architecture. + + + + First, you must configure the appropriate event listeners, to enable the use of JAAS + authorization. + + + + + +]]> + + + Note that <listener type="..." class="..."/> is just a shorthand + for <event type="..."><listener class="..."/></event> + when there is exactly one listener for a particular event type. + + + + Next, still in hibernate.cfg.xml, bind the permissions to roles: + + + +]]> + + + The role names are the roles understood by your JACC provider. + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/example.xml b/documentation/envers/src/main/docbook/en-US/content/example.xml deleted file mode 100644 index bbb092d746..0000000000 --- a/documentation/envers/src/main/docbook/en-US/content/example.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - Short example - - - For example, using the entities defined above, the following code will generate - revision number 1, which will contain two new Person and - two new Address entities: - - - - - - Now we change some entities. This will generate revision number 2, which will contain - modifications of one person entity and two address entities (as the collection of - persons living at address2 and address1 changes): - - - - - - We can retrieve the old versions (the audit) easily: - - - - - - diff --git a/documentation/envers/src/main/docbook/en-US/content/example_mappings.xml b/documentation/envers/src/main/docbook/en-US/content/example_mappings.xml new file mode 100644 index 0000000000..14f899c499 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/example_mappings.xml @@ -0,0 +1,685 @@ + + + + + + + Example: Various Mappings + + + This chapters shows off some more complex association mappings. + + + + Employer/Employee + + + The following model of the relationship between Employer and + Employee uses an actual entity class (Employment) + 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. + + + + + + + + + + + + + Heres a possible mapping document: + + + + + + + + employer_id_seq + + + + + + + + + + employment_id_seq + + + + + + + + + + + + + + + + + + + + + employee_id_seq + + + + + + + + + + +]]> + + + And heres the table schema generated by SchemaExport. + + + + + + + + Author/Work + + + Consider the following model of the relationships between Work, + Author and Person. We represent the relationship + between Work and Author as a many-to-many + association. We choose to represent the relationship between Author + and Person as one-to-one association. Another possibility would be to + have Author extend Person. + + + + + + + + + + + + + The following mapping document correctly represents these relationships: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + There are four tables in this mapping. works, + authors and persons hold work, author + and person data respectively. author_work is an association + table linking authors to works. Heres the table schema, as generated by + SchemaExport. + + + + + + + + Customer/Order/Product + + + Now consider a model of the relationships between Customer, + Order and LineItem and Product. + There is a one-to-many association between Customer and + Order, but how should we represent Order / + LineItem / Product? I've chosen to map + LineItem as an association class representing the many-to-many + association between Order and Product. In + Hibernate, this is called a composite element. + + + + + + + + + + + + + The mapping document: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + customers, orders, line_items and + products hold customer, order, order line item and product data + respectively. line_items also acts as an association table linking + orders with products. + + + + + + + + Miscellaneous example mappings + + + These examples are all taken from the Hibernate test suite. You + will find many other useful example mappings there. Look in the + test folder of the Hibernate distribution. + + + TODO: put words around this stuff + + + "Typed" one-to-one association + + + + name + 'HOME' + + + name + 'MAILING' + + + + + + + + + + + +]]> + + + + Composite key example + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( select sum(li.quantity*p.price) + from LineItem li, Product p + where li.productId = p.productId + and li.customerId = customerId + and li.orderNumber = orderNumber ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ( select sum(li.quantity) + from LineItem li + where li.productId = productId ) + + + +]]> + + + + Many-to-many with shared composite key attribute + + + + + + + + + + + + + org + + + + + + + + + + + + + + + + + + org + + + +]]> + + + + Content based discrimination + + + + + + + + + + case + when title is not null then 'E' + when salesperson is not null then 'C' + else 'P' + end + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + Associations on alternate keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/example_parentchild.xml b/documentation/envers/src/main/docbook/en-US/content/example_parentchild.xml new file mode 100644 index 0000000000..14779d97cb --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/example_parentchild.xml @@ -0,0 +1,388 @@ + + + + + + + Example: Parent/Child + + + One of the very first things that new users try to do with Hibernate is to model a parent / child type + relationship. There are two different approaches to this. For various reasons the most convenient + approach, especially for new users, is to model both Parent and Child + as entity classes with a <one-to-many> association from Parent + to Child. (The alternative approach is to declare the Child as a + <composite-element>.) Now, it turns out that default semantics of a one to many + association (in Hibernate) are much less close to the usual semantics of a parent / child relationship than + those of a composite element mapping. We will explain how to use a bidirectional one to many + association with cascades to model a parent / child relationship efficiently and elegantly. + It's not at all difficult! + + + + A note about collections + + + Hibernate collections are considered to be a logical part of their owning entity; never of the + contained entities. This is a crucial distinction! It has the following consequences: + + + + + + When we remove / add an object from / to a collection, the version number of the collection owner + is incremented. + + + + + If an object that was removed from a collection is an instance of a value type (eg, a composite + element), that object will cease to be persistent and its state will be completely removed from + the database. Likewise, adding a value type instance to the collection will cause its state to be + immediately persistent. + + + + + On the other hand, if an entity is removed from a collection (a one-to-many or many-to-many + association), it will not be deleted, by default. This behaviour is completely consistent - a + change to the internal state of another entity should not cause the associated entity to vanish! + Likewise, adding an entity to a collection does not cause that entity to become persistent, by + default. + + + + + + Instead, the default behaviour is that adding an entity to a collection merely creates a link between + the two entities, while removing it removes the link. This is very appropriate for all sorts of cases. + Where it is not appropriate at all is the case of a parent / child relationship, where the life of the + child is bound to the life cycle of the parent. + + + + + + Bidirectional one-to-many + + + Suppose we start with a simple <one-to-many> association from + Parent to Child. + + + + + +]]> + + + If we were to execute the following code + + + + + + Hibernate would issue two SQL statements: + + + + + an INSERT to create the record for c + + + + an UPDATE to create the link from p to + c + + + + + + This is not only inefficient, but also violates any NOT NULL constraint on the + parent_id column. We can fix the nullability constraint violation by specifying + not-null="true" in the collection mapping: + + + + + +]]> + + + However, this is not the recommended solution. + + + The underlying cause of this behaviour is that the link (the foreign key parent_id) + from p to c is not considered part of the state of the + Child object and is therefore not created in the INSERT. So the + solution is to make the link part of the Child mapping. + + + ]]> + + + (We also need to add the parent property to the Child class.) + + + + Now that the Child entity is managing the state of the link, we tell the collection + not to update the link. We use the inverse attribute. + + + + + +]]> + + + The following code would be used to add a new Child + + + + + + And now, only one SQL INSERT would be issued! + + + + To tighten things up a bit, we could create an addChild() method of + Parent. + + + + + + Now, the code to add a Child looks like + + + + + + + + Cascading life cycle + + + The explicit call to save() is still annoying. We will address this by + using cascades. + + + + + +]]> + + + This simplifies the code above to + + + + + + Similarly, we don't need to iterate over the children when saving or deleting a Parent. + The following removes p and all its children from the database. + + + + + + However, this code + + + + + + will not remove c from the database; it will ony remove the link to p + (and cause a NOT NULL constraint violation, in this case). You need to explicitly + delete() the Child. + + + + + + Now, in our case, a Child can't really exist without its parent. So if we remove + a Child from the collection, we really do want it to be deleted. For this, we must + use cascade="all-delete-orphan". + + + + + +]]> + + + Note: even though the collection mapping specifies inverse="true", cascades are + still processed by iterating the collection elements. So if you require that an object be saved, + deleted or updated by cascade, you must add it to the collection. It is not enough to simply call + setParent(). + + + + + + Cascades and <literal>unsaved-value</literal> + + + Suppose we loaded up a Parent in one Session, made some changes + in a UI action and wish to persist these changes in a new session by calling update(). + The Parent will contain a collection of childen and, since cascading update is enabled, + Hibernate needs to know which children are newly instantiated and which represent existing rows in the + database. Lets assume that both Parent and Child have genenerated + identifier properties of type Long. Hibernate will use the identifier and + version/timestamp property value to determine which of the children are new. (See + .) In Hibernate3, it is no longer necessary to specify + an unsaved-value explicitly. + + + + The following code will update parent and child and insert + newChild. + + + + + + Well, that's all very well for the case of a generated identifier, but what about assigned identifiers + and composite identifiers? This is more difficult, since Hibernate can't use the identifier property to + distinguish between a newly instantiated object (with an identifier assigned by the user) and an + object loaded in a previous session. In this case, Hibernate will either use the timestamp or version + property, or will actually query the second-level cache or, worst case, the database, to see if the + row exists. + + + + + + + Conclusion + + + There is quite a bit to digest here and it might look confusing first time around. However, in practice, + it all works out very nicely. Most Hibernate applications use the parent / child pattern in many places. + + + + We mentioned an alternative in the first paragraph. None of the above issues exist in the case of + <composite-element> mappings, which have exactly the semantics of a parent / child + relationship. Unfortunately, there are two big limitations to composite element classes: composite elements + may not own collections, and they should not be the child of any entity other than the unique parent. + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/example_weblog.xml b/documentation/envers/src/main/docbook/en-US/content/example_weblog.xml new file mode 100644 index 0000000000..78ac629c25 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/example_weblog.xml @@ -0,0 +1,457 @@ + + + + + + + Example: Weblog Application + + + Persistent Classes + + + The persistent classes represent a weblog, and an item posted + in a weblog. They are to be modelled as a standard parent/child + relationship, but we will use an ordered bag, instead of a set. + + + + + + + + + + Hibernate Mappings + + + The XML mappings should now be quite straightforward. + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + Hibernate Code + + + The following class demonstrates some of the kinds of things + we can do with these classes, using Hibernate. + + + :minDate" + ); + + Calendar cal = Calendar.getInstance(); + cal.roll(Calendar.MONTH, false); + q.setCalendar("minDate", cal); + + result = q.list(); + tx.commit(); + } + catch (HibernateException he) { + if (tx!=null) tx.rollback(); + throw he; + } + finally { + session.close(); + } + return result; + } +}]]> + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/exceptions.xml b/documentation/envers/src/main/docbook/en-US/content/exceptions.xml deleted file mode 100644 index 4f1f57611e..0000000000 --- a/documentation/envers/src/main/docbook/en-US/content/exceptions.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - Mapping exceptions - - - - What isn't and will not be supported - - - Bags (the corresponding Java type is List), as they can contain non-unique elements. - The reason is that persisting, for example a bag of String-s, violates a principle - of relational databases: that each table is a set of tuples. In case of bags, - however (which require a join table), if there is a duplicate element, the two - tuples corresponding to the elements will be the same. Hibernate allows this, - however Envers (or more precisely: the database connector) will throw an exception - when trying to persist two identical elements, because of a unique constraint violation. - - - - There are at least two ways out if you need bag semantics: - - - - - - use an indexed collection, with the @IndexColumn annotation, or - - - - - provide a unique id for your elements with the @CollectionId annotation. - - - - - - - - - What isn't and <emphasis>will</emphasis> be supported - - - - - collections of components - - - - - relations in components - - - - - joined and table-per-class inheritance - - - - - - - - - <literal>@OneToMany</literal>+<literal>@JoinColumn</literal> - - - When a collection is mapped using these two annotations, Hibernate doesn't - generate a join table. Envers, however, has to do this, so that when you read the - revisions in which the related entity has changed, you don't get false results. - - - To be able to name the additional join table, there is a special annotation: - @AuditJoinTable, which has similar semantics to JPA's - @JoinTable. - - - - - - diff --git a/documentation/envers/src/main/docbook/en-US/content/filters.xml b/documentation/envers/src/main/docbook/en-US/content/filters.xml new file mode 100755 index 0000000000..5892ee26c7 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/filters.xml @@ -0,0 +1,173 @@ + + + + + + + Filtering data + + + Hibernate3 provides an innovative new approach to handling data with "visibility" rules. + A Hibernate filter is a global, named, parameterized filter that may be + enabled or disabled for a particular Hibernate session. + + + + Hibernate filters + + + Hibernate3 adds the ability to pre-define filter criteria and attach those filters at both + a class and a collection level. A filter criteria is the ability to define a restriction clause + very similiar to the existing "where" attribute available on the class and various collection + elements. Except these filter conditions can be parameterized. The application can then make + the decision at runtime whether given filters should be enabled and what their parameter + values should be. Filters can be used like database views, but parameterized inside the + application. + + + + In order to use filters, they must first be defined and then attached to the appropriate + mapping elements. To define a filter, use the <filter-def/> element + within a <hibernate-mapping/> element: + + + + +]]> + + + Then, this filter can be attached to a class: + + + + ... + +]]> + + + or, to a collection: + + + + +]]> + + + or, even to both (or multiples of each) at the same time. + + + + The methods on Session are: enableFilter(String filterName), + getEnabledFilter(String filterName), and disableFilter(String filterName). + By default, filters are not enabled for a given session; they must be explcitly + enabled through use of the Session.enableFilter() method, which returns an + instance of the Filter interface. Using the simple filter defined above, this + would look like: + + + + + + Note that methods on the org.hibernate.Filter interface do allow the method-chaining common to much of Hibernate. + + + + A full example, using temporal data with an effective record date pattern: + + + + + + + +... + + + +... + + + + + +... + + + + + +]]> + + + Then, in order to ensure that you always get back currently effective records, simply + enable the filter on the session prior to retrieving employee data: + + + :targetSalary") + .setLong("targetSalary", new Long(1000000)) + .list(); +]]> + + + In the HQL above, even though we only explicitly mentioned a salary constraint on the results, + because of the enabled filter the query will return only currently active employees who have + a salary greater than a million dollars. + + + + Note: if you plan on using filters with outer joining (either through HQL or load fetching) be + careful of the direction of the condition expression. Its safest to set this up for left + outer joining; in general, place the parameter first followed by the column name(s) after + the operator. + + + + After being defined a filter might be attached to multiple entities and/or + collections each with its own condition. That can be tedious when the + conditions are the same each time. Thus <filter-def/> + allows defining a default condition, either as an attribute or CDATA: + + + xyz">... +abc=xyz]]> + + + This default condition will then be used whenever the filter is attached to something + without specifying a condition. Note that this means you can give a specific condition + as part of the attachment of the filter which overrides the default condition in that + particular case. + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/inheritance_mapping.xml b/documentation/envers/src/main/docbook/en-US/content/inheritance_mapping.xml new file mode 100644 index 0000000000..4fda14b97c --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/inheritance_mapping.xml @@ -0,0 +1,518 @@ + + + + + + + Inheritance Mapping + + + The Three Strategies + + + Hibernate supports the three basic inheritance mapping strategies: + + + + + + table per class hierarchy + + + + + table per subclass + + + + + table per concrete class + + + + + + In addition, Hibernate supports a fourth, slightly different kind of + polymorphism: + + + + + + implicit polymorphism + + + + + + It is possible to use different mapping strategies for different + branches of the same inheritance hierarchy, and then make use of implicit + polymorphism to achieve polymorphism across the whole hierarchy. However, + Hibernate does not support mixing <subclass>, + and <joined-subclass> and + <union-subclass> mappings under the same root + <class> element. It is possible to mix together + the table per hierarchy and table per subclass strategies, under the + the same <class> element, by combining the + <subclass> and <join> + elements (see below). + + + + It is possible to define subclass, union-subclass, + and joined-subclass mappings in separate mapping documents, directly beneath + hibernate-mapping. This allows you to extend a class hierachy just by adding + a new mapping file. You must specify an extends attribute in the subclass mapping, + naming a previously mapped superclass. Note: Previously this feature made the ordering of the mapping + documents important. Since Hibernate3, the ordering of mapping files does not matter when using the + extends keyword. The ordering inside a single mapping file still needs to be defined as superclasses + before subclasses. + + + + + + + ]]> + + + + Table per class hierarchy + + + Suppose we have an interface Payment, with implementors + CreditCardPayment, CashPayment, + ChequePayment. The table per hierarchy mapping would + look like: + + + + + + + + + ... + + + ... + + + ... + + + ... + +]]> + + + Exactly one table is required. There is one big limitation of this mapping + strategy: columns declared by the subclasses, such as CCTYPE, + may not have NOT NULL constraints. + + + + + + Table per subclass + + + A table per subclass mapping would look like: + + + + + + + + ... + + + + ... + + + + ... + + + + ... + +]]> + + + 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). + + + + + + Table per subclass, using a discriminator + + + Note that Hibernate's implementation of table per subclass requires + no discriminator column. Other object/relational mappers use a + different implementation of table per subclass which 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 would like to use + a discriminator column with the table per subclass strategy, you + may combine the use of <subclass> and + <join>, as follow: + + + + + + + + + ... + + + + + ... + + + + + + ... + + + + + + ... + + +]]> + + + The optional fetch="select" declaration tells Hibernate + not to fetch the ChequePayment subclass data using an + outer join when querying the superclass. + + + + + + Mixing table per class hierarchy with table per subclass + + + You may even mix the table per hierarchy and table per subclass strategies + using this approach: + + + + + + + + + ... + + + + ... + + + + ... + + + ... + +]]> + + + For any of these mapping strategies, a polymorphic association to the root + Payment class is mapped using + <many-to-one>. + + + ]]> + + + + + Table per concrete class + + + There are two ways we could go about mapping the table per concrete class + strategy. The first is to use <union-subclass>. + + + + + + + + ... + + + ... + + + ... + + + ... + +]]> + + + Three tables are involved for the subclasses. Each table defines columns for + all properties of the class, including inherited properties. + + + + 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. + (We might relax this in a future release of Hibernate.) The identity + generator strategy is not allowed in union subclass inheritance, indeed + the primary key seed has to be shared accross all unioned subclasses + of a hierarchy. + + + + If your superclass is abstract, map it with abstract="true". + Of course, if it is not abstract, an additional table (defaults to + PAYMENT in the example above) is needed to hold instances + of the superclass. + + + + + + Table per concrete class, using implicit polymorphism + + + An alternative approach is to make use of implicit polymorphism: + + + + + + + + ... + + + + + + + + ... + + + + + + + + ... +]]> + + + Notice that nowhere do we mention the Payment interface + explicitly. Also notice that properties of Payment are + mapped in each of the subclasses. If you want to avoid duplication, consider + using XML entities + (e.g. [ <!ENTITY allproperties SYSTEM "allproperties.xml"> ] + in the DOCTYPE declartion and + &allproperties; in the mapping). + + + + The disadvantage of this approach is that Hibernate does not generate SQL + UNIONs when performing polymorphic queries. + + + + For this mapping strategy, a polymorphic association to Payment + is usually mapped using <any>. + + + + + + + + +]]> + + + + + Mixing implicit polymorphism with other inheritance mappings + + + There is one further thing to notice about this mapping. Since the subclasses + are each mapped in their own <class> element (and since + Payment is just an interface), each of the subclasses could + easily be part of another inheritance hierarchy! (And you can still use polymorphic + queries against the Payment interface.) + + + + + + + + + ... + + + + + + + + + ... + + + + ... + + + + + ... + +]]> + + + Once again, we don't mention Payment explicitly. If we + execute a query against the Payment interface - for + example, from Payment - Hibernate + automatically returns instances of CreditCardPayment + (and its subclasses, since they also implement Payment), + CashPayment and ChequePayment but + not instances of NonelectronicTransaction. + + + + + + + + Limitations + + + There are certain limitations to the "implicit polymorphism" approach to + the table per concrete-class mapping strategy. There are somewhat less + restrictive limitations to <union-subclass> + mappings. + + + + The following table shows the limitations of table per concrete-class + mappings, and of implicit polymorphism, in Hibernate. + + + + Features of inheritance mappings + + + + + + + + + + + + Inheritance strategy + Polymorphic many-to-one + Polymorphic one-to-one + Polymorphic one-to-many + Polymorphic many-to-many + Polymorphic load()/get() + Polymorphic queries + Polymorphic joins + Outer join fetching + + + + + table per class-hierarchy + <many-to-one> + <one-to-one> + <one-to-many> + <many-to-many> + s.get(Payment.class, id) + from Payment p + from Order o join o.payment p + supported + + + table per subclass + <many-to-one> + <one-to-one> + <one-to-many> + <many-to-many> + s.get(Payment.class, id) + from Payment p + from Order o join o.payment p + supported + + + table per concrete-class (union-subclass) + <many-to-one> + <one-to-one> + <one-to-many> (for inverse="true" only) + <many-to-many> + s.get(Payment.class, id) + from Payment p + from Order o join o.payment p + supported + + + table per concrete class (implicit polymorphism) + <any> + not supported + not supported + <many-to-any> + s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult() + from Payment p + not supported + not supported + + + +
+ +
+ +
diff --git a/documentation/envers/src/main/docbook/en-US/content/performance.xml b/documentation/envers/src/main/docbook/en-US/content/performance.xml new file mode 100644 index 0000000000..fd9771239f --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/performance.xml @@ -0,0 +1,1439 @@ + + + + + + + Improving performance + + + Fetching strategies + + + A fetching strategy is the strategy Hibernate will use for + retrieving associated objects if the application needs to navigate the association. + Fetch strategies may be declared in the O/R mapping metadata, or over-ridden by a + particular HQL or Criteria query. + + + + Hibernate3 defines the following fetching strategies: + + + + + + Join fetching - Hibernate retrieves the + associated instance or collection in the same SELECT, + using an OUTER JOIN. + + + + + Select fetching - a second SELECT + is used to retrieve the associated entity or collection. Unless + you explicitly disable lazy fetching by specifying lazy="false", + this second select will only be executed when you actually access the + association. + + + + + Subselect fetching - a second SELECT + is used to retrieve the associated collections for all entities retrieved in a + previous query or fetch. Unless you explicitly disable lazy fetching by specifying + lazy="false", this second select will only be executed when you + actually access the association. + + + + + Batch fetching - an optimization strategy + for select fetching - Hibernate retrieves a batch of entity instances + or collections in a single SELECT, by specifying + a list of primary keys or foreign keys. + + + + + + Hibernate also distinguishes between: + + + + + + Immediate fetching - an association, collection or + attribute is fetched immediately, when the owner is loaded. + + + + + Lazy collection fetching - a collection is fetched + when the application invokes an operation upon that collection. (This + is the default for collections.) + + + + + "Extra-lazy" collection fetching - individual + elements of the collection are accessed from the database as needed. + Hibernate tries not to fetch the whole collection into memory unless + absolutely needed (suitable for very large collections) + + + + + Proxy fetching - a single-valued association is + fetched when a method other than the identifier getter is invoked + upon the associated object. + + + + + "No-proxy" fetching - a single-valued association is + fetched when the instance variable is accessed. Compared to proxy fetching, + this approach is less lazy (the association is fetched even when only the + identifier is accessed) but more transparent, since no proxy is visible to + the application. This approach requires buildtime bytecode instrumentation + and is rarely necessary. + + + + + Lazy attribute fetching - an attribute or single + valued association is fetched when the instance variable is accessed. + This approach requires buildtime bytecode instrumentation and is rarely + necessary. + + + + + + We have two orthogonal notions here: when is the association + fetched, and how is it fetched (what SQL is used). Don't + confuse them! We use fetch to tune performance. We may use + lazy to define a contract for what data is always available + in any detached instance of a particular class. + + + + Working with lazy associations + + + By default, Hibernate3 uses lazy select fetching for collections and lazy proxy + fetching for single-valued associations. These defaults make sense for almost + all associations in almost all applications. + + + + Note: if you set + hibernate.default_batch_fetch_size, Hibernate will use the + batch fetch optimization for lazy fetching (this optimization may also be enabled + at a more granular level). + + + + However, lazy fetching poses one problem that you must be aware of. Access to a + lazy association outside of the context of an open Hibernate session will result + in an exception. For example: + + + + + + Since the permissions collection was not initialized when the + Session was closed, the collection will not be able to + load its state. Hibernate does not support lazy initialization + for detached objects. The fix is to move the code that reads + from the collection to just before the transaction is committed. + + + + Alternatively, we could use a non-lazy collection or association, + by specifying lazy="false" for the association mapping. + However, it is intended that lazy initialization be used for almost all + collections and associations. If you define too many non-lazy associations + in your object model, Hibernate will end up needing to fetch the entire + database into memory in every transaction! + + + + On the other hand, we often want to choose join fetching (which is non-lazy by + nature) instead of select fetching in a particular transaction. We'll now see + how to customize the fetching strategy. In Hibernate3, the mechanisms for + choosing a fetch strategy are identical for single-valued associations and + collections. + + + + + + Tuning fetch strategies + + + Select fetching (the default) is extremely vulnerable to N+1 selects problems, + so we might want to enable join fetching in the mapping document: + + + + + + + + ]]> + + + The fetch strategy defined in the mapping document affects: + + + + + + retrieval via get() or load() + + + + + retrieval that happens implicitly when an association is navigated + + + + + Criteria queries + + + + + HQL queries if subselect fetching is used + + + + + + No matter what fetching strategy you use, the defined non-lazy graph is guaranteed + to be loaded into memory. Note that this might result in several immediate selects + being used to execute a particular HQL query. + + + + Usually, we don't use the mapping document to customize fetching. Instead, we + keep the default behavior, and override it for a particular transaction, using + left join fetch in HQL. This tells Hibernate to fetch + the association eagerly in the first select, using an outer join. In the + Criteria query API, you would use + setFetchMode(FetchMode.JOIN). + + + + If you ever feel like you wish you could change the fetching strategy used by + get() or load(), simply use a + Criteria query, for example: + + + + + + (This is Hibernate's equivalent of what some ORM solutions call a "fetch plan".) + + + + A completely different way to avoid problems with N+1 selects is to use the + second-level cache. + + + + + + Single-ended association proxies + + + Lazy fetching for collections is implemented using Hibernate's own implementation + of persistent collections. However, a different mechanism is needed for lazy + behavior in single-ended associations. The target entity of the association must + be proxied. Hibernate implements lazy initializing proxies for persistent objects + using runtime bytecode enhancement (via the excellent CGLIB library). + + + + By default, Hibernate3 generates proxies (at startup) for all persistent classes + and uses them to enable lazy fetching of many-to-one and + one-to-one associations. + + + + The mapping file may declare an interface to use as the proxy interface for that + class, with the proxy attribute. By default, Hibernate uses a subclass + of the class. Note that the proxied class must implement a default constructor + with at least package visibility. We recommend this constructor for all persistent classes! + + + + There are some gotchas to be aware of when extending this approach to polymorphic + classes, eg. + + + + ...... + + ..... + +]]> + + + Firstly, instances of Cat will never be castable to + DomesticCat, even if the underlying instance is an + instance of DomesticCat: + + + + + + Secondly, it is possible to break proxy ==. + + + + + + However, the situation is not quite as bad as it looks. Even though we now have two references + to different proxy objects, the underlying instance will still be the same object: + + + + + + Third, you may not use a CGLIB proxy for a final class or a class + with any final methods. + + + + Finally, if your persistent object acquires any resources upon instantiation (eg. in + initializers or default constructor), then those resources will also be acquired by + the proxy. The proxy class is an actual subclass of the persistent class. + + + + These problems are all due to fundamental limitations in Java's single inheritance model. + If you wish to avoid these problems your persistent classes must each implement an interface + that declares its business methods. You should specify these interfaces in the mapping file. eg. + + + + ...... + + ..... + +]]> + + + where CatImpl implements the interface Cat and + DomesticCatImpl implements the interface DomesticCat. Then + proxies for instances of Cat and DomesticCat may be returned + by load() or iterate(). (Note that list() + does not usually return proxies.) + + + + + + Relationships are also lazily initialized. This means you must declare any properties to be of + type Cat, not CatImpl. + + + + Certain operations do not require proxy initialization + + + + + + equals(), if the persistent class does not override + equals() + + + + + hashCode(), if the persistent class does not override + hashCode() + + + + + The identifier getter method + + + + + + Hibernate will detect persistent classes that override equals() or + hashCode(). + + + + By choosing lazy="no-proxy" instead of the default + lazy="proxy", we can avoid the problems associated with typecasting. + However, we will require buildtime bytecode instrumentation, and all operations + will result in immediate proxy initialization. + + + + + + Initializing collections and proxies + + + A LazyInitializationException will be thrown by Hibernate if an uninitialized + collection or proxy is accessed outside of the scope of the Session, ie. when + the entity owning the collection or having the reference to the proxy is in the detached state. + + + + Sometimes we need to ensure that a proxy or collection is initialized before closing the + Session. Of course, we can alway force initialization by calling + cat.getSex() or cat.getKittens().size(), for example. + But that is confusing to readers of the code and is not convenient for generic code. + + + + The static methods Hibernate.initialize() and Hibernate.isInitialized() + provide the application with a convenient way of working with lazily initialized collections or + proxies. Hibernate.initialize(cat) will force the initialization of a proxy, + cat, as long as its Session is still open. + Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection + of kittens. + + + + Another option is to keep the Session open until all needed + collections and proxies have been loaded. In some application architectures, + particularly where the code that accesses data using Hibernate, and the code that + uses it are in different application layers or different physical processes, it + can be a problem to ensure that the Session is open when a + collection is initialized. There are two basic ways to deal with this issue: + + + + + + In a web-based application, a servlet filter can be used to close the + Session only at the very end of a user request, once + the rendering of the view is complete (the Open Session in + View pattern). Of course, this places heavy demands on the + correctness of the exception handling of your application infrastructure. + It is vitally important that the Session is closed and the + transaction ended before returning to the user, even when an exception occurs + during rendering of the view. See the Hibernate Wiki for examples of this + "Open Session in View" pattern. + + + + + In an application with a separate business tier, the business logic must + "prepare" all collections that will be needed by the web tier before + returning. This means that the business tier should load all the data and + return all the data already initialized to the presentation/web tier that + is required for a particular use case. Usually, the application calls + Hibernate.initialize() for each collection that will + be needed in the web tier (this call must occur before the session is closed) + or retrieves the collection eagerly using a Hibernate query with a + FETCH clause or a FetchMode.JOIN in + Criteria. This is usually easier if you adopt the + Command pattern instead of a Session Facade. + + + + + You may also attach a previously loaded object to a new Session + with merge() or lock() before + accessing uninitialized collections (or other proxies). No, Hibernate does not, + and certainly should not do this automatically, since it + would introduce ad hoc transaction semantics! + + + + + + Sometimes you don't want to initialize a large collection, but still need some + information about it (like its size) or a subset of the data. + + + + You can use a collection filter to get the size of a collection without initializing it: + + + + + + The createFilter() method is also used to efficiently retrieve subsets + of a collection without needing to initialize the whole collection: + + + + + + + + Using batch fetching + + + Hibernate can make efficient use of batch fetching, that is, Hibernate can load several uninitialized + proxies if one proxy is accessed (or collections. Batch fetching is an optimization of the lazy select + fetching strategy. There are two ways you can tune batch fetching: on the class and the collection level. + + + + Batch fetching for classes/entities is easier to understand. Imagine you have the following situation + at runtime: You have 25 Cat instances loaded in a Session, each + Cat has a reference to its owner, a Person. + The Person class is mapped with a proxy, lazy="true". If you now + iterate through all cats and call getOwner() on each, Hibernate will by default + execute 25 SELECT statements, to retrieve the proxied owners. You can tune this + behavior by specifying a batch-size in the mapping of Person: + + + ...]]> + + + Hibernate will now execute only three queries, the pattern is 10, 10, 5. + + + + You may also enable batch fetching of collections. For example, if each Person has + a lazy collection of Cats, and 10 persons are currently loaded in the + Session, iterating through all persons will generate 10 SELECTs, + one for every call to getCats(). If you enable batch fetching for the + cats collection in the mapping of Person, Hibernate can pre-fetch + collections: + + + + + ... + +]]> + + + With a batch-size of 3, Hibernate will load 3, 3, 3, 1 collections in four + SELECTs. Again, the value of the attribute depends on the expected number of + uninitialized collections in a particular Session. + + + + Batch fetching of collections is particularly useful if you have a nested tree of items, ie. + the typical bill-of-materials pattern. (Although a nested set or a + materialized path might be a better option for read-mostly trees.) + + + + + + Using subselect fetching + + + If one lazy collection or single-valued proxy has to be fetched, Hibernate loads all of + them, re-running the original query in a subselect. This works in the same way as + batch-fetching, without the piecemeal loading. + + + + + + + + Using lazy property fetching + + + Hibernate3 supports the lazy fetching of individual properties. This optimization technique + is also known as fetch groups. Please note that this is mostly a + marketing feature, as in practice, optimizing row reads is much more important than + optimization of column reads. However, only loading some properties of a class might + be useful in extreme cases, when legacy tables have hundreds of columns and the data model + can not be improved. + + + + To enable lazy property loading, set the lazy attribute on your + particular property mappings: + + + + + + + + + +]]> + + + Lazy property loading requires buildtime bytecode instrumentation! If your persistent + classes are not enhanced, Hibernate will silently ignore lazy property settings and + fall back to immediate fetching. + + + + For bytecode instrumentation, use the following Ant task: + + + + + + + + + + + + + + +]]> + + + A different (better?) way to avoid unnecessary column reads, at least for + read-only transactions is to use the projection features of HQL or Criteria + queries. This avoids the need for buildtime bytecode processing and is + certainly a preferred solution. + + + + You may force the usual eager fetching of properties using fetch all + properties in HQL. + + + + + + + + The Second Level Cache + + + A Hibernate Session is a transaction-level cache of persistent data. It is + possible to configure a cluster or JVM-level (SessionFactory-level) cache on + a class-by-class and collection-by-collection basis. You may even plug in a clustered cache. Be + careful. Caches are never aware of changes made to the persistent store by another application + (though they may be configured to regularly expire cached data). + + + + You have the option to tell Hibernate which caching implementation to use by + specifying the name of a class that implements org.hibernate.cache.CacheProvider + using the property hibernate.cache.provider_class. Hibernate + comes bundled with a number of built-in integrations with open-source cache providers + (listed below); additionally, you could implement your own and plug it in as + outlined above. Note that versions prior to 3.2 defaulted to use EhCache as the + default cache provider; that is no longer the case as of 3.2. + + + + Cache Providers + + + + + + + + + Cache + Provider class + Type + Cluster Safe + Query Cache Supported + + + + + Hashtable (not intended for production use) + org.hibernate.cache.HashtableCacheProvider + memory + + yes + + + EHCache + org.hibernate.cache.EhCacheProvider + memory, disk + + yes + + + OSCache + org.hibernate.cache.OSCacheProvider + memory, disk + + yes + + + SwarmCache + org.hibernate.cache.SwarmCacheProvider + clustered (ip multicast) + yes (clustered invalidation) + + + + JBoss Cache 1.x + org.hibernate.cache.TreeCacheProvider + clustered (ip multicast), transactional + yes (replication) + yes (clock sync req.) + + + JBoss Cache 2 + org.hibernate.cache.jbc2.JBossCacheRegionFactory + clustered (ip multicast), transactional + yes (replication or invalidation) + yes (clock sync req.) + + + +
+ + + Cache mappings + + + The <cache> element of a class or collection mapping has the + following form: + + + + + + + + + ]]> + + + + usage (required) specifies the caching strategy: + transactional, + read-write, + nonstrict-read-write or + read-only + + + + + region (optional, defaults to the class or + collection role name) specifies the name of the second level cache + region + + + + + include (optional, defaults to all) + non-lazy specifies that properties of the entity mapped + with lazy="true" may not be cached when attribute-level + lazy fetching is enabled + + + + + + + Alternatively (preferably?), you may specify <class-cache> and + <collection-cache> elements in hibernate.cfg.xml. + + + + The usage attribute specifies a cache concurrency strategy. + + + + + + Strategy: read only + + + If your application needs to read but never modify instances of a persistent class, a + read-only cache may be used. This is the simplest and best performing + strategy. It's even perfectly safe for use in a cluster. + + + + + .... +]]> + + + + + + Strategy: read/write + + + If the application needs to update data, a read-write cache might be appropriate. + This cache strategy should never be used if serializable transaction isolation level is required. + If the cache is used in a JTA environment, you must specify the property + hibernate.transaction.manager_lookup_class, naming a strategy for obtaining the + JTA TransactionManager. In other environments, you should ensure that the transaction + is completed when Session.close() or Session.disconnect() is called. + If you wish to use this strategy in a cluster, you should ensure that the underlying cache implementation + supports locking. The built-in cache providers do not. + + + + + .... + + + .... + +]]> + + + + + Strategy: nonstrict read/write + + + If the application only occasionally needs to update data (ie. if it is extremely unlikely that two + transactions would try to update the same item simultaneously) and strict transaction isolation is + not required, a nonstrict-read-write cache might be appropriate. If the cache is + used in a JTA environment, you must specify hibernate.transaction.manager_lookup_class. + In other environments, you should ensure that the transaction is completed when + Session.close() or Session.disconnect() is called. + + + + + + Strategy: transactional + + + The transactional cache strategy provides support for fully transactional cache + providers such as JBoss TreeCache. Such a cache may only be used in a JTA environment and you must + specify hibernate.transaction.manager_lookup_class. + + + + + + Cache-provider/concurrency-strategy compatibility + + + + None of the cache providers support all of the cache concurrency strategies. + + + + + The following table shows which providers are compatible with which concurrency strategies. + + + + Cache Concurrency Strategy Support + + + + + + + + + Cache + read-only + nonstrict-read-write + read-write + transactional + + + + + Hashtable (not intended for production use) + yes + yes + yes + + + + EHCache + yes + yes + yes + + + + OSCache + yes + yes + yes + + + + SwarmCache + yes + yes + + + + + JBoss Cache 1.x + yes + + + yes + + + JBoss Cache 2 + yes + + + yes + + + +
+ +
+ +
+ + + Managing the caches + + + Whenever you pass an object to save(), update() + or saveOrUpdate() and whenever you retrieve an object using + load(), get(), list(), + iterate() or scroll(), that object is added + to the internal cache of the Session. + + + When flush() is subsequently called, the state of that object will + be synchronized with the database. If you do not want this synchronization to occur or + if you are processing a huge number of objects and need to manage memory efficiently, + the evict() method may be used to remove the object and its collections + from the first-level cache. + + + + + + The Session also provides a contains() method to determine + if an instance belongs to the session cache. + + + + To completely evict all objects from the session cache, call Session.clear() + + + + For the second-level cache, there are methods defined on SessionFactory for + evicting the cached state of an instance, entire class, collection instance or entire collection + role. + + + + + + The CacheMode controls how a particular session interacts with the second-level + cache. + + + + + + CacheMode.NORMAL - read items from and write items to the second-level cache + + + + + CacheMode.GET - read items from the second-level cache, but don't write to + the second-level cache except when updating data + + + + + CacheMode.PUT - write items to the second-level cache, but don't read from + the second-level cache + + + + + CacheMode.REFRESH - write items to the second-level cache, but don't read from + the second-level cache, bypass the effect of hibernate.cache.use_minimal_puts, forcing + a refresh of the second-level cache for all items read from the database + + + + + + To browse the contents of a second-level or query cache region, use the Statistics + API: + + + + + + You'll need to enable statistics, and, optionally, force Hibernate to keep the cache entries in a + more human-understandable format: + + + + + + + + The Query Cache + + + Query result sets may also be cached. This is only useful for queries that are run + frequently with the same parameters. To use the query cache you must first enable it: + + + + + + This setting causes the creation of two new cache regions - one holding cached query + result sets (org.hibernate.cache.StandardQueryCache), the other + holding timestamps of the most recent updates to queryable tables + (org.hibernate.cache.UpdateTimestampsCache). Note that the query + cache does not cache the state of the actual entities in the result set; it caches + only identifier values and results of value type. So the query cache should always be + used in conjunction with the second-level cache. + + + + Most queries do not benefit from caching, so by default queries are not cached. To + enable caching, call Query.setCacheable(true). This call allows + the query to look for existing cache results or add its results to the cache when + it is executed. + + + + If you require fine-grained control over query cache expiration policies, you may + specify a named cache region for a particular query by calling + Query.setCacheRegion(). + + + + + + If the query should force a refresh of its query cache region, you should call + Query.setCacheMode(CacheMode.REFRESH). This is particularly useful + in cases where underlying data may have been updated via a separate process (i.e., + not modified through Hibernate) and allows the application to selectively refresh + particular query result sets. This is a more efficient alternative to eviction of + a query cache region via SessionFactory.evictQueries(). + + + + + + Understanding Collection performance + + + We've already spent quite some time talking about collections. + In this section we will highlight a couple more issues about + how collections behave at runtime. + + + + Taxonomy + + Hibernate defines three basic kinds of collections: + + + + collections of values + + + one to many associations + + + many to many associations + + + + + This classification distinguishes the various table and foreign key + relationships but does not tell us quite everything we need to know + about the relational model. To fully understand the relational structure + and performance characteristics, we must also consider the structure of + the primary key that is used by Hibernate to update or delete collection + rows. This suggests the following classification: + + + + + indexed collections + + + sets + + + bags + + + + + All indexed collections (maps, lists, arrays) have a primary key consisting + of the <key> and <index> + columns. In this case collection updates are usually extremely efficient - + the primary key may be efficiently indexed and a particular row may be efficiently + located when Hibernate tries to update or delete it. + + + + Sets have a primary key consisting of <key> and element + columns. This may be less efficient for some types of collection element, particularly + composite elements or large text or binary fields; the database may not be able to index + a complex primary key as efficiently. On the other hand, for one to many or many to many + associations, particularly in the case of synthetic identifiers, it is likely to be just + as efficient. (Side-note: if you want SchemaExport to actually create + the primary key of a <set> for you, you must declare all columns + as not-null="true".) + + + + <idbag> mappings define a surrogate key, so they are + always very efficient to update. In fact, they are the best case. + + + + Bags are the worst case. Since a bag permits duplicate element values and has no + index column, no primary key may be defined. Hibernate has no way of distinguishing + between duplicate rows. Hibernate resolves this problem by completely removing + (in a single DELETE) and recreating the collection whenever it + changes. This might be very inefficient. + + + + Note that for a one-to-many association, the "primary key" may not be the physical + primary key of the database table - but even in this case, the above classification + is still useful. (It still reflects how Hibernate "locates" individual rows of the + collection.) + + + + + + Lists, maps, idbags and sets are the most efficient collections to update + + + From the discussion above, it should be clear that indexed collections + and (usually) sets allow the most efficient operation in terms of adding, + removing and updating elements. + + + + There is, arguably, one more advantage that indexed collections have over sets for + many to many associations or collections of values. Because of the structure of a + Set, Hibernate doesn't ever UPDATE a row when + an element is "changed". Changes to a Set always work via + INSERT and DELETE (of individual rows). Once + again, this consideration does not apply to one to many associations. + + + + After observing that arrays cannot be lazy, we would conclude that lists, maps and + idbags are the most performant (non-inverse) collection types, with sets not far + behind. Sets are expected to be the most common kind of collection in Hibernate + applications. This is because the "set" semantics are most natural in the relational + model. + + + + However, in well-designed Hibernate domain models, we usually see that most collections + are in fact one-to-many associations with inverse="true". For these + associations, the update is handled by the many-to-one end of the association, and so + considerations of collection update performance simply do not apply. + + + + + + Bags and lists are the most efficient inverse collections + + + Just before you ditch bags forever, there is a particular case in which bags (and also lists) + are much more performant than sets. For a collection with inverse="true" + (the standard bidirectional one-to-many relationship idiom, for example) we can add elements + to a bag or list without needing to initialize (fetch) the bag elements! This is because + Collection.add() or Collection.addAll() must always + return true for a bag or List (unlike a Set). This can + make the following common code much faster. + + + + + + + + One shot delete + + + Occasionally, deleting collection elements one by one can be extremely inefficient. Hibernate + isn't completely stupid, so it knows not to do that in the case of an newly-empty collection + (if you called list.clear(), for example). In this case, Hibernate will + issue a single DELETE and we are done! + + + + Suppose we add a single element to a collection of size twenty and then remove two elements. + Hibernate will issue one INSERT statement and two DELETE + statements (unless the collection is a bag). This is certainly desirable. + + + + However, suppose that we remove eighteen elements, leaving two and then add thee new elements. + There are two possible ways to proceed + + + + + delete eighteen rows one by one and then insert three rows + + + remove the whole collection (in one SQL DELETE) and insert + all five current elements (one by one) + + + + + Hibernate isn't smart enough to know that the second option is probably quicker in this case. + (And it would probably be undesirable for Hibernate to be that smart; such behaviour might + confuse database triggers, etc.) + + + + Fortunately, you can force this behaviour (ie. the second strategy) at any time by discarding + (ie. dereferencing) the original collection and returning a newly instantiated collection with + all the current elements. This can be very useful and powerful from time to time. + + + + Of course, one-shot-delete does not apply to collections mapped inverse="true". + + + + + + + + Monitoring performance + + + Optimization is not much use without monitoring and access to performance numbers. + Hibernate provides a full range of figures about its internal operations. + Statistics in Hibernate are available per SessionFactory. + + + + Monitoring a SessionFactory + + + You can access SessionFactory metrics in two ways. + Your first option is to call sessionFactory.getStatistics() and + read or display the Statistics yourself. + + + + Hibernate can also use JMX to publish metrics if you enable the + StatisticsService MBean. You may enable a single MBean for all your + SessionFactory or one per factory. See the following code for + minimalistic configuration examples: + + + + + + + + + TODO: This doesn't make sense: In the first case, we retrieve and use the MBean directly. In the second one, we must give + the JNDI name in which the session factory is held before using it. Use + hibernateStatsBean.setSessionFactoryJNDIName("my/JNDI/Name") + + + You can (de)activate the monitoring for a SessionFactory + + + + + at configuration time, set hibernate.generate_statistics to false + + + + + + + at runtime: sf.getStatistics().setStatisticsEnabled(true) + or hibernateStatsBean.setStatisticsEnabled(true) + + + + + + Statistics can be reset programmatically using the clear() method. + A summary can be sent to a logger (info level) using the logSummary() + method. + + + + + + Metrics + + + Hibernate provides a number of metrics, from very basic to the specialized information + only relevant in certain scenarios. All available counters are described in the + Statistics interface API, in three categories: + + + + + Metrics related to the general Session usage, such as + number of open sessions, retrieved JDBC connections, etc. + + + + + Metrics related to he entities, collections, queries, and caches as a + whole (aka global metrics), + + + + + Detailed metrics related to a particular entity, collection, query or + cache region. + + + + + + For example, you can check the cache hit, miss, and put ratio of entities, collections + and queries, and the average time a query needs. Beware that the number of milliseconds + is subject to approximation in Java. Hibernate is tied to the JVM precision, on some + platforms this might even only be accurate to 10 seconds. + + + + Simple getters are used to access the global metrics (i.e. not tied to a particular entity, + collection, cache region, etc.). You can access the metrics of a particular entity, collection + or cache region through its name, and through its HQL or SQL representation for queries. Please + refer to the Statistics, EntityStatistics, + CollectionStatistics, SecondLevelCacheStatistics, + and QueryStatistics API Javadoc for more information. The following + code shows a simple example: + + + + + + To work on all entities, collections, queries and region caches, you can retrieve + the list of names of entities, collections, queries and region caches with the + following methods: getQueries(), getEntityNames(), + getCollectionRoleNames(), and + getSecondLevelCacheRegionNames(). + + + + + + +
diff --git a/documentation/envers/src/main/docbook/en-US/content/persistent_classes.xml b/documentation/envers/src/main/docbook/en-US/content/persistent_classes.xml new file mode 100644 index 0000000000..b7d601cb4f --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/persistent_classes.xml @@ -0,0 +1,561 @@ + + + + + + + Persistent Classes + + + Persistent classes are classes in an application that implement the entities + of the business problem (e.g. Customer and Order in an E-commerce application). + Not all instances of a persistent class are considered to be in the persistent + state - an instance may instead be transient or detached. + + + + Hibernate works best if these classes follow some simple rules, also known + as the Plain Old Java Object (POJO) programming model. However, none of these + rules are hard requirements. Indeed, Hibernate3 assumes very little about + the nature of your persistent objects. You may express a domain model in other + ways: using trees of Map instances, for example. + + + + A simple POJO example + + + Most Java applications require a persistent class representing felines. + + + + + + There are four main rules to follow here: + + + + + Implement a no-argument constructor + + + Cat has a no-argument constructor. All persistent classes must + have a default constructor (which may be non-public) so that Hibernate can instantiate + them using Constructor.newInstance(). We strongly recommend having a + default constructor with at least package visibility for runtime proxy + generation in Hibernate. + + + + + Provide an identifier property (optional) + + + Cat has a property called id. This property + maps to the primary key column of a database table. The property might have been called + anything, and its type might have been any primitive type, any primitive "wrapper" + type, java.lang.String or java.util.Date. (If + your legacy database table has composite keys, you can even use a user-defined class + with properties of these types - see the section on composite identifiers later.) + + + + The identifier property is strictly optional. You can leave them off and let Hibernate + keep track of object identifiers internally. We do not recommend this, however. + + + + In fact, some functionality is available only to classes which declare an + identifier property: + + + + + + Transitive reattachment for detached objects (cascade update or cascade + merge) - see + + + + + Session.saveOrUpdate() + + + + + Session.merge() + + + + + + We recommend you declare consistently-named identifier properties on persistent + classes. We further recommend that you use a nullable (ie. non-primitive) type. + + + + + Prefer non-final classes (optional) + + A central feature of Hibernate, proxies, depends upon the + persistent class being either non-final, or the implementation of an interface + that declares all public methods. + + + You can persist final classes that do not implement an interface + with Hibernate, but you won't be able to use proxies for lazy association fetching - + which will limit your options for performance tuning. + + + You should also avoid declaring public final methods on the + non-final classes. If you want to use a class with a public final + method, you must explicitly disable proxying by setting lazy="false". + + + + + Declare accessors and mutators for persistent fields (optional) + + + Cat declares accessor methods for all its persistent fields. + Many other ORM tools directly persist instance variables. We believe it is + better to provide an indirection between the relational schema and internal + data structures of the class. By default, Hibernate persists JavaBeans style + properties, and recognizes method names of the form getFoo, + isFoo and setFoo. You may switch to direct + field access for particular properties, if needed. + + + + Properties need not be declared public - Hibernate can + persist a property with a default, protected or + private get / set pair. + + + + + + + + Implementing inheritance + + + A subclass must also observe the first and second rules. It inherits its + identifier property from the superclass, Cat. + + + + + + + Implementing <literal>equals()</literal> and <literal>hashCode()</literal> + + + You have to override the equals() and hashCode() + methods if you + + + + + intend to put instances of persistent classes in a Set + (the recommended way to represent many-valued associations) + and + + + + + intend to use reattachment of detached instances + + + + + + Hibernate guarantees equivalence of persistent identity (database row) and Java identity + only inside a particular session scope. So as soon as we mix instances retrieved in + different sessions, we must implement equals() and + hashCode() if we wish to have meaningful semantics for + Sets. + + + + The most obvious way is to implement equals()/hashCode() + by comparing the identifier value of both objects. If the value is the same, both must + be the same database row, they are therefore equal (if both are added to a Set, + we will only have one element in the Set). Unfortunately, we can't use that + approach with generated identifiers! Hibernate will only assign identifier values to objects + that are persistent, a newly created instance will not have any identifier value! Furthermore, + if an instance is unsaved and currently in a Set, saving it will assign + an identifier value to the object. If equals() and hashCode() + are based on the identifier value, the hash code would change, breaking the contract of the + Set. See the Hibernate website for a full discussion of this problem. Note + that this is not a Hibernate issue, but normal Java semantics of object identity and equality. + + + + We recommend implementing equals() and hashCode() + using Business key equality. Business key equality means that the + equals() method compares only the properties that form the business + key, a key that would identify our instance in the real world (a + natural candidate key): + + + + + + Note that a business key does not have to be as solid as a database + primary key candidate (see ). + Immutable or unique properties are usually good + candidates for a business key. + + + + + + Dynamic models + + + Note that the following features are currently considered + experimental and may change in the near future. + + + + Persistent entities don't necessarily have to be represented as POJO classes + or as JavaBean objects at runtime. Hibernate also supports dynamic models + (using Maps of Maps at runtime) and the + representation of entities as DOM4J trees. With this approach, you don't + write persistent classes, only mapping files. + + + + By default, Hibernate works in normal POJO mode. You may set a default entity + representation mode for a particular SessionFactory using the + default_entity_mode configuration option (see + . + + + + The following examples demonstrates the representation using Maps. + First, in the mapping file, an entity-name has to be declared + instead of (or in addition to) a class name: + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + Note that even though associations are declared using target class names, + the target type of an associations may also be a dynamic entity instead + of a POJO. + + + + After setting the default entity mode to dynamic-map + for the SessionFactory, we can at runtime work with + Maps of Maps: + + + + + + The advantages of a dynamic mapping are quick turnaround time for prototyping + without the need for entity class implementation. However, you lose compile-time + type checking and will very likely deal with many exceptions at runtime. Thanks + to the Hibernate mapping, the database schema can easily be normalized and sound, + allowing to add a proper domain model implementation on top later on. + + + + Entity representation modes can also be set on a per Session + basis: + + + + + + + Please note that the call to getSession() using an + EntityMode is on the Session API, not the + SessionFactory. That way, the new Session + shares the underlying JDBC connection, transaction, and other context + information. This means you don't have tocall flush() + and close() on the secondary Session, and + also leave the transaction and connection handling to the primary unit of work. + + + + More information about the XML representation capabilities can be found + in . + + + + + + Tuplizers + + + org.hibernate.tuple.Tuplizer, and its sub-interfaces, are responsible + for managing a particular representation of a piece of data, given that representation's + org.hibernate.EntityMode. If a given piece of data is thought of as + a data structure, then a tuplizer is the thing which knows how to create such a data structure + and how to extract values from and inject values into such a data structure. For example, + for the POJO entity mode, the correpsonding tuplizer knows how create the POJO through its + constructor and how to access the POJO properties using the defined property accessors. + There are two high-level types of Tuplizers, represented by the + org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer + interfaces. EntityTuplizers are responsible for managing the above mentioned + contracts in regards to entities, while ComponentTuplizers do the same for + components. + + + + Users may also plug in their own tuplizers. Perhaps you require that a java.util.Map + implementation other than java.util.HashMap be used while in the + dynamic-map entity-mode; or perhaps you need to define a different proxy generation strategy + than the one used by default. Both would be achieved by defining a custom tuplizer + implementation. Tuplizers definitions are attached to the entity or component mapping they + are meant to manage. Going back to the example of our customer entity: + + + + + + + + + + + + + ... + + + + +public class CustomMapTuplizerImpl + extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer { + // override the buildInstantiator() method to plug in our custom map... + protected final Instantiator buildInstantiator( + org.hibernate.mapping.PersistentClass mappingInfo) { + return new CustomMapInstantiator( mappingInfo ); + } + + private static final class CustomMapInstantiator + extends org.hibernate.tuple.DynamicMapInstantitor { + // override the generateMap() method to return our custom map... + protected final Map generateMap() { + return new CustomMap(); + } + } +}]]> + + + + + + Extentsions + + TODO: Document user-extension framework in the property and proxy packages + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/preface.xml b/documentation/envers/src/main/docbook/en-US/content/preface.xml index 62d790e9a1..cf4c3aa350 100644 --- a/documentation/envers/src/main/docbook/en-US/content/preface.xml +++ b/documentation/envers/src/main/docbook/en-US/content/preface.xml @@ -29,56 +29,104 @@ Preface - The Envers project aims to enable easy auditing of persistent classes. All that you - have to do is annotate your persistent class or some of its properties, that you - want to audit, with @Audited. For each audited entity, a table - will be created, which will hold the history of changes made to the entity. You - can then retrieve and query historical data without much effort. + Working with object-oriented software and a relational database can be cumbersome + and time consuming in today's enterprise environments. Hibernate is an object/relational + mapping tool for Java environments. The term object/relational mapping (ORM) refers to + the technique of mapping a data representation from an object model to a relational + data model with a SQL-based schema. - Similarly to Subversion, the library has a concept of revisions. Basically, one - transaction is one revision (unless the transaction didn't modify any audited entities). - As the revisions are global, having a revision number, you can query for various - entities at that revision, retrieving a (partial) view of the database at that - revision. You can find a revision number having a date, and the other way round, - you can get the date at which a revision was commited. + Hibernate not only takes care of the mapping from Java classes to + database tables (and from Java data types to SQL data types), but also provides data + query and retrieval facilities and can significantly reduce development time otherwise + spent with manual data handling in SQL and JDBC. - The library works with Hibernate and Hibernate Annotations or Entity Manager. - For the auditing to work properly, the entities must have immutable unique - identifiers (primary keys). You can use Envers wherever Hibernate works: - standalone, inside JBoss AS, with JBoss Seam or Spring. + Hibernates goal is to relieve the developer from 95 percent of common data persistence + related programming tasks. Hibernate may not be the best solution for data-centric + applications that only use stored-procedures to implement the business logic in the + database, it is most useful with object-oriented domain models and business logic in + the Java-based middle-tier. However, Hibernate can certainly help you to remove or + encapsulate vendor-specific SQL code and will help with the common task of result set + translation from a tabular representation to a graph of objects. - Some of the features: + If you are new to Hibernate and Object/Relational Mapping or even Java, + please follow these steps: - versioning of all mappings defined by the JPA specification, except joined and - table-per-class inheritance + Read for a tutorial with step-by-step + instructions. The source code for the tutorial is included in the + distribution in the doc/reference/tutorial/ + directory. - versioning of some Hibernate mappings, which extend JPA, like custom types and - collections/maps of "simple" types (Strings, Integers, etc.) - (see for one exception) + Read to understand the environments where + Hibernate can be used. - logging data for each revision using a "revision entity" + Have a look at the eg/ directory in the Hibernate + distribution, it contains a simple standalone application. Copy your + JDBC driver to the lib/ directory and edit + etc/hibernate.properties, specifying correct values for + your database. From a command prompt in the distribution directory, + type ant eg (using Ant), or under Windows, type + build eg. - querying historical data + Use this reference documentation as your primary source of information. + Consider reading Java Persistence with Hibernate + (http://www.manning.com/bauer2) if you need more help with application + design or if you prefer a step-by-step tutorial. Also visit + http://caveatemptor.hibernate.org and download the example application + for Java Persistence with Hibernate. - + + + FAQs are answered on the Hibernate website. + + + + + Third party demos, examples, and tutorials are linked on the Hibernate + website. + + + + + The Community Area on the Hibernate website is a good resource for + design patterns and various integration solutions (Tomcat, JBoss AS, + Struts, EJB, etc.). + + + + + + If you have questions, use the user forum linked on the Hibernate website. We also + provide a JIRA issue trackings system for bug reports and feature requests. If you + are interested in the development of Hibernate, join the developer mailing list. If + you are interested in translating this documentation into your language, contact us + on the developer mailing list. + + + + Commercial development support, production support, and training for Hibernate is + available through JBoss Inc. (see http://www.hibernate.org/SupportTraining/). + Hibernate is a Professional Open Source project and a critical component of the + JBoss Enterprise Middleware System (JEMS) suite of products. + + diff --git a/documentation/envers/src/main/docbook/en-US/content/query_criteria.xml b/documentation/envers/src/main/docbook/en-US/content/query_criteria.xml new file mode 100644 index 0000000000..ea8bb85465 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/query_criteria.xml @@ -0,0 +1,463 @@ + + + + + + + Criteria Queries + + + Hibernate features an intuitive, extensible criteria query API. + + + + Creating a <literal>Criteria</literal> instance + + + The interface org.hibernate.Criteria represents a query against + a particular persistent class. The Session is a factory for + Criteria instances. + + + + + + + + Narrowing the result set + + + An individual query criterion is an instance of the interface + org.hibernate.criterion.Criterion. The class + org.hibernate.criterion.Restrictions defines + factory methods for obtaining certain built-in + Criterion types. + + + + + + Restrictions may be grouped logically. + + + + + + + + There are quite a range of built-in criterion types (Restrictions + subclasses), but one that is especially useful lets you specify SQL directly. + + + + + + The {alias} placeholder with be replaced by the row alias + of the queried entity. + + + + An alternative approach to obtaining a criterion is to get it from a + Property instance. You can create a Property + by calling Property.forName(). + + + + + + + + Ordering the results + + + You may order the results using org.hibernate.criterion.Order. + + + + + + + + + + Associations + + + You may easily specify constraints upon related entities by navigating + associations using createCriteria(). + + + + + + note that the second createCriteria() returns a new + instance of Criteria, which refers to the elements of + the kittens collection. + + + + The following, alternate form is useful in certain circumstances. + + + + + + (createAlias() does not create a new instance of + Criteria.) + + + + Note that the kittens collections held by the Cat instances + returned by the previous two queries are not pre-filtered + by the criteria! If you wish to retrieve just the kittens that match the + criteria, you must use a ResultTransformer. + + + + + + + + Dynamic association fetching + + + You may specify association fetching semantics at runtime using + setFetchMode(). + + + + + + This query will fetch both mate and kittens + by outer join. See for more information. + + + + + + Example queries + + + The class org.hibernate.criterion.Example allows + you to construct a query criterion from a given instance. + + + + + + Version properties, identifiers and associations are ignored. By default, + null valued properties are excluded. + + + + You can adjust how the Example is applied. + + + + + + You can even use examples to place criteria upon associated objects. + + + + + + + + Projections, aggregation and grouping + + The class org.hibernate.criterion.Projections is a + factory for Projection instances. We apply a + projection to a query by calling setProjection(). + + + + + + + + There is no explicit "group by" necessary in a criteria query. Certain + projection types are defined to be grouping projections, + which also appear in the SQL group by clause. + + + + An alias may optionally be assigned to a projection, so that the projected value + may be referred to in restrictions or orderings. Here are two different ways to + do this: + + + + + + + + The alias() and as() methods simply wrap a + projection instance in another, aliased, instance of Projection. + As a shortcut, you can assign an alias when you add the projection to a + projection list: + + + + + + + + You can also use Property.forName() to express projections: + + + + + + + + + + Detached queries and subqueries + + The DetachedCriteria class lets you create a query outside the scope + of a session, and then later execute it using some arbitrary Session. + + + + + + A DetachedCriteria may also be used to express a subquery. Criterion + instances involving subqueries may be obtained via Subqueries or + Property. + + + + + + + + Even correlated subqueries are possible: + + + + + + + + + + Queries by natural identifier + + + For most queries, including criteria queries, the query cache is not very efficient, + because query cache invalidation occurs too frequently. However, there is one special + kind of query where we can optimize the cache invalidation algorithm: lookups by a + constant natural key. In some applications, this kind of query occurs frequently. + The criteria API provides special provision for this use case. + + + + First, you should map the natural key of your entity using + <natural-id>, and enable use of the second-level cache. + + + + + + + + + + + + +]]> + + + Note that this functionality is not intended for use with entities with + mutable natural keys. + + + + Next, enable the Hibernate query cache. + + + + Now, Restrictions.naturalId() allows us to make use of + the more efficient cache algorithm. + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/query_hql.xml b/documentation/envers/src/main/docbook/en-US/content/query_hql.xml new file mode 100644 index 0000000000..051585a16e --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/query_hql.xml @@ -0,0 +1,1261 @@ + + + + + + + HQL: The Hibernate Query Language + + + Hibernate is equipped with an extremely powerful query language that (quite intentionally) + looks very much like SQL. But don't be fooled by the syntax; HQL is fully object-oriented, + understanding notions like inheritence, polymorphism and association. + + + + Case Sensitivity + + + Queries are case-insensitive, except for names of Java classes and properties. + So SeLeCT is the same as + sELEct is the same as + SELECT but + org.hibernate.eg.FOO is not + org.hibernate.eg.Foo and + foo.barSet is not + foo.BARSET. + + + + This manual uses lowercase HQL keywords. Some users find queries with uppercase keywords + more readable, but we find this convention ugly when embedded in Java code. + + + + + + The from clause + + + The simplest possible Hibernate query is of the form: + + + + + + which simply returns all instances of the class eg.Cat. + We don't usually need to qualify the class name, since auto-import + is the default. So we almost always just write: + + + + + + Most of the time, you will need to assign an alias, since + you will want to refer to the Cat in other parts of the + query. + + + + + + This query assigns the alias cat to Cat + instances, so we could use that alias later in the query. The as + keyword is optional; we could also write: + + + + + + Multiple classes may appear, resulting in a cartesian product or "cross" join. + + + + + + + It is considered good practice to name query aliases using an initial lowercase, + consistent with Java naming standards for local variables + (eg. domesticCat). + + + + + + Associations and joins + + + We may also assign aliases to associated entities, or even to elements of a + collection of values, using a join. + + + + + + + + + + The supported join types are borrowed from ANSI SQL + + + + + + inner join + + + + + left outer join + + + + + right outer join + + + + + full join (not usually useful) + + + + + + The inner join, left outer join and + right outer join constructs may be abbreviated. + + + + + + You may supply extra join conditions using the HQL with + keyword. + + + 10.0]]> + + + In addition, a "fetch" join allows associations or collections of values to be + initialized along with their parent objects, using a single select. This is particularly + useful in the case of a collection. It effectively overrides the outer join and + lazy declarations of the mapping file for associations and collections. See + for more information. + + + + + + A fetch join does not usually need to assign an alias, because the associated objects + should not be used in the where clause (or any other clause). Also, + the associated objects are not returned directly in the query results. Instead, they may + be accessed via the parent object. The only reason we might need an alias is if we are + recursively join fetching a further collection: + + + + + + Note that the fetch construct may not be used in queries called using + iterate() (though scroll() can be used). Nor should + fetch be used together with setMaxResults() or + setFirstResult() as these operations are based on the result rows, which + usually contain duplicates for eager collection fetching, hence, the number of rows is not what + you'd expect. + Nor may fetch be used together with an ad hoc with condition. + It is possible to create a cartesian product by join fetching more than one collection in a + query, so take care in this case. Join fetching multiple collection roles also sometimes gives + unexpected results for bag mappings, so be careful about how you formulate your queries in this + case. Finally, note that full join fetch and right join fetch + are not meaningful. + + + + If you are using property-level lazy fetching (with bytecode instrumentation), it is + possible to force Hibernate to fetch the lazy properties immediately (in the first + query) using fetch all properties. + + + + + + + + + Forms of join syntax + + + HQL supports two forms of association joining: implicit and explicit. + + + + The queries shown in the previous section all use the explicit form where + the join keyword is explicitly used in the from clause. This is the recommended form. + + + + The implicit form does not use the join keyword. Instead, the + associations are "dereferenced" using dot-notation. implicit joins + can appear in any of the HQL clauses. implicit join result + in inner joins in the resulting SQL statement. + + + + + + + Refering to identifier property + + + There are, generally speaking, 2 ways to refer to an entity's identifier property: + + + + + The special property (lowercase) id may be used to reference the identifier + property of an entity provided that entity does not define a non-identifier property + named id. + + + + + If the entity defines a named identifier property, you may use that property name. + + + + + + References to composite identifier properties follow the same naming rules. If the + entity has a non-identifier property named id, the composite identifier property can only + be referenced by its defined named; otherwise, the special id property + can be used to rerference the identifier property. + + + + Note: this has changed significantly starting in version 3.2.2. In previous versions, + id always referred to the identifier property no + matter what its actual name. A ramification of that decision was that non-identifier + properties named id could never be referenced in Hibernate queries. + + + + + The select clause + + + The select clause picks which objects and properties to return in + the query result set. Consider: + + + + + + The query will select mates of other Cats. + Actually, you may express this query more compactly as: + + + + + + Queries may return properties of any value type including properties of component type: + + + + + + + + Queries may return multiple objects and/or properties as an array of type + Object[], + + + + + + or as a List, + + + + + + or as an actual typesafe Java object, + + + + + + assuming that the class Family has an appropriate constructor. + + + + You may assign aliases to selected expressions using as: + + + + + + This is most useful when used together with select new map: + + + + + + This query returns a Map from aliases to selected values. + + + + + + Aggregate functions + + + HQL queries may even return the results of aggregate functions on properties: + + + + + + + + The supported aggregate functions are + + + + + + avg(...), sum(...), min(...), max(...) + + + + + count(*) + + + + + count(...), count(distinct ...), count(all...) + + + + + + You may use arithmetic operators, concatenation, and recognized SQL functions + in the select clause: + + + + + + + + The distinct and all keywords may be used and + have the same semantics as in SQL. + + + + + + + + Polymorphic queries + + + A query like: + + + + + + returns instances not only of Cat, but also of subclasses like + DomesticCat. Hibernate queries may name any Java + class or interface in the from clause. The query will return instances + of all persistent classes that extend that class or implement the interface. The following + query would return all persistent objects: + + + + + + The interface Named might be implemented by various persistent + classes: + + + + + + Note that these last two queries will require more than one SQL SELECT. This + means that the order by clause does not correctly order the whole result set. + (It also means you can't call these queries using Query.scroll().) + + + + + + The where clause + + + The where clause allows you to narrow the list of instances returned. + If no alias exists, you may refer to properties by name: + + + + + + If there is an alias, use a qualified property name: + + + + + + returns instances of Cat named 'Fritz'. + + + + + + will return all instances of Foo for which + there exists an instance of bar with a + date property equal to the + startDate property of the + Foo. Compound path expressions make the + where clause extremely powerful. Consider: + + + + + + This query translates to an SQL query with a table (inner) join. If you were to write + something like + + + + + + you would end up with a query that would require four table joins in SQL. + + + + The = operator may be used to compare not only properties, but also + instances: + + + + + + + + The special property (lowercase) id may be used to reference the + unique identifier of an object. See + for more information. + + + + + + The second query is efficient. No table join is required! + + + + Properties of composite identifiers may also be used. Suppose Person + has a composite identifier consisting of country and + medicareNumber. Again, see + for more information regarding referencing identifier properties. + + + + + + + + Once again, the second query requires no table join. + + + + Likewise, the special property class accesses the discriminator value + of an instance in the case of polymorphic persistence. A Java class name embedded in the + where clause will be translated to its discriminator value. + + + + + + You may also use components or composite user types, or properties of said + component types. See for more details. + + + + An "any" type has the special properties id and class, + allowing us to express a join in the following way (where AuditLog.item + is a property mapped with <any>). + + + + + + Notice that log.item.class and payment.class + would refer to the values of completely different database columns in the above query. + + + + + + Expressions + + + Expressions allowed in the where clause include + most of the kind of things you could write in SQL: + + + + + + mathematical operators +, -, *, / + + + + + binary comparison operators =, >=, <=, <>, !=, like + + + + + logical operations and, or, not + + + + + Parentheses ( ), indicating grouping + + + + + in, + not in, + between, + is null, + is not null, + is empty, + is not empty, + member of and + not member of + + + + + "Simple" case, case ... when ... then ... else ... end, and + "searched" case, case when ... then ... else ... end + + + + + string concatenation ...||... or concat(...,...) + + + + + current_date(), current_time(), + current_timestamp() + + + + + second(...), minute(...), + hour(...), day(...), + month(...), year(...), + + + + + Any function or operator defined by EJB-QL 3.0: substring(), trim(), + lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod() + + + + + coalesce() and nullif() + + + + + str() for converting numeric or temporal values to a + readable string + + + + + cast(... as ...), where the second argument is the name of + a Hibernate type, and extract(... from ...) if ANSI + cast() and extract() is supported by + the underlying database + + + + + the HQL index() function, that applies to aliases of + a joined indexed collection + + + + + HQL functions that take collection-valued path expressions: size(), + minelement(), maxelement(), minindex(), maxindex(), along with the + special elements() and indices functions + which may be quantified using some, all, exists, any, in. + + + + + Any database-supported SQL scalar function like sign(), + trunc(), rtrim(), sin() + + + + + JDBC-style positional parameters ? + + + + + named parameters :name, :start_date, :x1 + + + + + SQL literals 'foo', 69, 6.66E+2, + '1970-01-01 10:00:01.0' + + + + + Java public static final constants eg.Color.TABBY + + + + + + in and between may be used as follows: + + + + + + + + and the negated forms may be written + + + + + + + + Likewise, is null and is not null may be used to test + for null values. + + + + Booleans may be easily used in expressions by declaring HQL query substitutions in Hibernate + configuration: + + + true 1, false 0]]> + + + This will replace the keywords true and false with the + literals 1 and 0 in the translated SQL from this HQL: + + + + + + You may test the size of a collection with the special property size, or + the special size() function. + + + 0]]> + + 0]]> + + + For indexed collections, you may refer to the minimum and maximum indices using + minindex and maxindex functions. Similarly, + you may refer to the minimum and maximum elements of a collection of basic type + using the minelement and maxelement + functions. + + + current_date]]> + + 100]]> + + 10000]]> + + + The SQL functions any, some, all, exists, in are supported when passed the element + or index set of a collection (elements and indices functions) + or the result of a subquery (see below). + + + + + + + + + all elements(p.scores)]]> + + + + + Note that these constructs - size, elements, + indices, minindex, maxindex, + minelement, maxelement - may only be used in + the where clause in Hibernate3. + + + + Elements of indexed collections (arrays, lists, maps) may be referred to by + index (in a where clause only): + + + + + + + + + + + + The expression inside [] may even be an arithmetic expression. + + + + + + HQL also provides the built-in index() function, for elements + of a one-to-many association or collection of values. + + + + + + Scalar SQL functions supported by the underlying database may be used + + + + + + If you are not yet convinced by all this, think how much longer and less readable the + following query would be in SQL: + + + + + + Hint: something like + + + + + + + + The order by clause + + + The list returned by a query may be ordered by any property of a returned class or components: + + + + + + The optional asc or desc indicate ascending or descending order + respectively. + + + + + The group by clause + + + A query that returns aggregate values may be grouped by any property of a returned class or components: + + + + + + + + A having clause is also allowed. + + + + + + SQL functions and aggregate functions are allowed in the having + and order by clauses, if supported by the underlying database + (eg. not in MySQL). + + + 100 +order by count(kitten) asc, sum(kitten.weight) desc]]> + + + Note that neither the group by clause nor the + order by clause may contain arithmetic expressions. + Also note that Hibernate currently does not expand a grouped entity, + so you can't write group by cat if all properties + of cat are non-aggregated. You have to list all + non-aggregated properties explicitly. + + + + + + Subqueries + + + For databases that support subselects, Hibernate supports subqueries within queries. A subquery must + be surrounded by parentheses (often by an SQL aggregate function call). Even correlated subqueries + (subqueries that refer to an alias in the outer query) are allowed. + + + ( + select avg(cat.weight) from DomesticCat cat +)]]> + + + + + + + + + + + Note that HQL subqueries may occur only in the select or where clauses. + + + + Note that subqueries can also utilize row value constructor syntax. See + for more details. + + + + + + HQL examples + + + Hibernate queries can be quite powerful and complex. In fact, the power of the query language + is one of Hibernate's main selling points. Here are some example queries very similar to queries + that I used on a recent project. Note that most queries you will write are much simpler than these! + + + + The following query returns the order id, number of items and total value of the order for all + unpaid orders for a particular customer and given minimum total value, ordering the results by + total value. In determining the prices, it uses the current catalog. The resulting SQL query, + against the ORDER, ORDER_LINE, PRODUCT, + CATALOG and PRICE tables has four inner joins and an + (uncorrelated) subselect. + + + = all ( + select cat.effectiveDate + from Catalog as cat + where cat.effectiveDate < sysdate + ) +group by order +having sum(price.amount) > :minAmount +order by sum(price.amount) desc]]> + + + What a monster! Actually, in real life, I'm not very keen on subqueries, so my query was + really more like this: + + + :minAmount +order by sum(price.amount) desc]]> + + + The next query counts the number of payments in each status, excluding all payments in the + AWAITING_APPROVAL status where the most recent status change was made by the + current user. It translates to an SQL query with two inner joins and a correlated subselect + against the PAYMENT, PAYMENT_STATUS and + PAYMENT_STATUS_CHANGE tables. + + + PaymentStatus.AWAITING_APPROVAL + or ( + statusChange.timeStamp = ( + select max(change.timeStamp) + from PaymentStatusChange change + where change.payment = payment + ) + and statusChange.user <> :currentUser + ) +group by status.name, status.sortOrder +order by status.sortOrder]]> + + + If I would have mapped the statusChanges collection as a list, instead of a set, + the query would have been much simpler to write. + + + PaymentStatus.AWAITING_APPROVAL + or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :currentUser +group by status.name, status.sortOrder +order by status.sortOrder]]> + + + The next query uses the MS SQL Server isNull() function to return all + the accounts and unpaid payments for the organization to which the current user belongs. + It translates to an SQL query with three inner joins, an outer join and a subselect against + the ACCOUNT, PAYMENT, PAYMENT_STATUS, + ACCOUNT_TYPE, ORGANIZATION and + ORG_USER tables. + + + + + + For some databases, we would need to do away with the (correlated) subselect. + + + + + + + + Bulk update and delete + + + HQL now supports update, delete and + insert ... select ... statements. + See for details. + + + + + Tips & Tricks + + + You can count the number of query results without actually returning them: + + + + + + To order a result by the size of a collection, use the following query: + + + + + + If your database supports subselects, you can place a condition upon selection + size in the where clause of your query: + + + = 1]]> + + + If your database doesn't support subselects, use the following query: + + + = 1]]> + + + As this solution can't return a User with zero messages + because of the inner join, the following form is also useful: + + + + + + Properties of a JavaBean can be bound to named query parameters: + + + + + + Collections are pageable by using the Query interface with a filter: + + + + + + Collection elements may be ordered or grouped using a query filter: + + + + + + You can find the size of a collection without initializing it: + + + + + + + + Components + + + Components might be used in just about every way that simple value types can be used in HQL + queries. They can appear in the select clause: + + + + + + + where the Person's name property is a component. Components can also be used + in the where clause: + + + + + + + Components can also be used in the order by clause: + + + + + + + Another common use of components is in row value constructors. + + + + + Row value constructor syntax + + + HQL supports the use of ANSI SQL row value constructor syntax (sometimes + called tuple syntax), even though the underlying database may not support + that notion. Here we are generally referring to multi-valued comparisons, typically associated + with components. Consider an entity Person which defines a name component: + + + + + + That's valid syntax, although a little verbose. It be nice to make this a bit more concise and use + row value constructor syntax: + + + + + + It can also be useful to specify this in the select clause: + + + + + + Another time using row value constructor syntax can be beneficial + is when using subqueries needing to compare against multiple values: + + + + + + One thing to consider when deciding if you want to use this syntax is that the query will + be dependent upon the ordering of the component sub-properties in the metadata. + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/query_sql.xml b/documentation/envers/src/main/docbook/en-US/content/query_sql.xml new file mode 100644 index 0000000000..e36876d9f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/query_sql.xml @@ -0,0 +1,784 @@ + + + + + + + Native SQL + + You may also express queries in the native SQL dialect of your + database. This is useful if you want to utilize database specific features + such as query hints or the CONNECT keyword in Oracle. It + also provides a clean migration path from a direct SQL/JDBC based + application to Hibernate. + + Hibernate3 allows you to specify handwritten SQL (including stored + procedures) for all create, update, delete, and load operations. + + + Using a <literal>SQLQuery</literal> + + Execution of native SQL queries is controlled via the + SQLQuery interface, which is obtained by calling + Session.createSQLQuery(). The following describes how + to use this API for querying. + + + Scalar queries + + The most basic SQL query is to get a list of scalars + (values). + + + + These will both return a List of Object arrays (Object[]) with + scalar values for each column in the CATS table. Hibernate will use + ResultSetMetadata to deduce the actual order and types of the returned + scalar values. + + To avoid the overhead of using + ResultSetMetadata or simply to be more explicit in + what is returned one can use addScalar(). + + + + This query specified: + + + + the SQL query string + + + + the columns and types to return + + + + This will still return Object arrays, but now it will not use + ResultSetMetadata but will instead explicitly get the + ID, NAME and BIRTHDATE column as respectively a Long, String and a Short + from the underlying resultset. This also means that only these three + columns will be returned, even though the query is using + * and could return more than the three listed + columns. + + It is possible to leave out the type information for all or some + of the scalars. + + + + This is essentially the same query as before, but now + ResultSetMetaData is used to decide the type of NAME + and BIRTHDATE where as the type of ID is explicitly specified. + + How the java.sql.Types returned from ResultSetMetaData is mapped + to Hibernate types is controlled by the Dialect. If a specific type is + not mapped or does not result in the expected type it is possible to + customize it via calls to registerHibernateType in + the Dialect. + + + + Entity queries + + The above queries were all about returning scalar values, + basically returning the "raw" values from the resultset. The following + shows how to get entity objects from a native sql query via + addEntity(). + + + + This query specified: + + + + the SQL query string + + + + the entity returned by the query + + + + Assuming that Cat is mapped as a class with the columns ID, NAME + and BIRTHDATE the above queries will both return a List where each + element is a Cat entity. + + If the entity is mapped with a many-to-one to + another entity it is required to also return this when performing the + native query, otherwise a database specific "column not found" error + will occur. The additional columns will automatically be returned when + using the * notation, but we prefer to be explicit as in the following + example for a many-to-one to a + Dog: + + + + This will allow cat.getDog() to function properly. + + + + Handling associations and collections + + It is possible to eagerly join in the Dog to + avoid the possible extra roundtrip for initializing the proxy. This is + done via the addJoin() method, which allows you to + join in an association or collection. + + + + In this example the returned Cat's will have + their dog property fully initialized without any + extra roundtrip to the database. Notice that we added a alias name + ("cat") to be able to specify the target property path of the join. It + is possible to do the same eager joining for collections, e.g. if the + Cat had a one-to-many to Dog + instead. + + + + + At this stage we are reaching the limits of what is possible with native queries without starting to + enhance the sql queries to make them usable in Hibernate; the problems starts to arise when returning + multiple entities of the same type or when the default alias/column names are not enough. + + + + + Returning multiple entities + + Until now the result set column names are assumed to be the same + as the column names specified in the mapping document. This can be + problematic for SQL queries which join multiple tables, since the same + column names may appear in more than one table. + + Column alias injection is needed in the following query (which + most likely will fail): + + + + The intention for this query is to return two Cat instances per + row, a cat and its mother. This will fail since there is a conflict of + names since they are mapped to the same column names and on some + databases the returned column aliases will most likely be on the form + "c.ID", "c.NAME", etc. which are not equal to the columns specified in + the mappings ("ID" and "NAME"). + + The following form is not vulnerable to column name + duplication: + + + + This query specified: + + + + the SQL query string, with placeholders for Hibernate to + inject column aliases + + + + the entities returned by the query + + + + The {cat.*} and {mother.*} notation used above is a shorthand for + "all properties". Alternatively, you may list the columns explicitly, but + even in this case we let Hibernate inject the SQL column aliases for + each property. The placeholder for a column alias is just the property + name qualified by the table alias. In the following example, we retrieve + Cats and their mothers from a different table (cat_log) to the one + declared in the mapping metadata. Notice that we may even use the + property aliases in the where clause if we like. + + + + + Alias and property references + + For most cases the above alias injection is needed, but for + queries relating to more complex mappings like composite properties, + inheritance discriminators, collections etc. there are some specific + aliases to use to allow Hibernate to inject the proper aliases. + + The following table shows the different possibilities of using + the alias injection. Note: the alias names in the result are examples, + each alias will have a unique and probably different name when + used. + + + Alias injection names + + + + + + + + + + + Description + + Syntax + + Example + + + + + + A simple property + + {[aliasname].[propertyname] + + A_NAME as {item.name} + + + + A composite property + + {[aliasname].[componentname].[propertyname]} + + CURRENCY as {item.amount.currency}, VALUE as + {item.amount.value} + + + + Discriminator of an entity + + {[aliasname].class} + + DISC as {item.class} + + + + All properties of an entity + + {[aliasname].*} + + {item.*} + + + + A collection key + + {[aliasname].key} + + ORGID as {coll.key} + + + + The id of an collection + + {[aliasname].id} + + EMPID as {coll.id} + + + + The element of an collection + + {[aliasname].element} + + XID as {coll.element} + + + + roperty of the element in the collection + + {[aliasname].element.[propertyname]} + + NAME as {coll.element.name} + + + + All properties of the element in the collection + + {[aliasname].element.*} + + {coll.element.*} + + + + All properties of the the collection + + {[aliasname].*} + + {coll.*} + + + +
+
+
+ + + Returning non-managed entities + + It is possible to apply a ResultTransformer to native sql queries. Allowing it to e.g. return non-managed entities. + + + + This query specified: + + + + the SQL query string + + + + a result transformer + + + + + The above query will return a list of CatDTO which has been instantiated and injected the values of NAME and BIRTHNAME into its corresponding + properties or fields. + + + + + Handling inheritance + + Native sql queries which query for entities that is mapped as part + of an inheritance must include all properties for the baseclass and all + it subclasses. + + + + Parameters + + Native sql queries support positional as well as named + parameters: + + + + + + +
+ + + Named SQL queries + + Named SQL queries may be defined in the mapping document and called + in exactly the same way as a named HQL query. In this case, we do + not need to call + addEntity(). + + + + SELECT person.NAME AS {person.name}, + person.AGE AS {person.age}, + person.SEX AS {person.sex} + FROM PERSON person + WHERE person.NAME LIKE :namePattern +]]> + + + + The <return-join> and + <load-collection> elements are used to join + associations and define queries which initialize collections, + respectively. + + + + + SELECT person.NAME AS {person.name}, + person.AGE AS {person.age}, + person.SEX AS {person.sex}, + address.STREET AS {address.street}, + address.CITY AS {address.city}, + address.STATE AS {address.state}, + address.ZIP AS {address.zip} + FROM PERSON person + JOIN ADDRESS address + ON person.ID = address.PERSON_ID AND address.TYPE='MAILING' + WHERE person.NAME LIKE :namePattern +]]> + + A named SQL query may return a scalar value. You must declare the + column alias and Hibernate type using the + <return-scalar> element: + + + + + SELECT p.NAME AS name, + p.AGE AS age, + FROM PERSON p WHERE p.NAME LIKE 'Hiber%' +]]> + + You can externalize the resultset mapping informations in a + <resultset> element to either reuse them across + several named queries or through the + setResultSetMapping() API. + + + + + + + + SELECT person.NAME AS {person.name}, + person.AGE AS {person.age}, + person.SEX AS {person.sex}, + address.STREET AS {address.street}, + address.CITY AS {address.city}, + address.STATE AS {address.state}, + address.ZIP AS {address.zip} + FROM PERSON person + JOIN ADDRESS address + ON person.ID = address.PERSON_ID AND address.TYPE='MAILING' + WHERE person.NAME LIKE :namePattern +]]> + + You can alternatively use the resultset mapping information in your + hbm files directly in java code. + + + + + Using return-property to explicitly specify column/alias + names + + With <return-property> you can explicitly + tell Hibernate what column aliases to use, instead of using the + {}-syntax to let Hibernate inject its own + aliases. + + + + + + + + SELECT person.NAME AS myName, + person.AGE AS myAge, + person.SEX AS mySex, + FROM PERSON person WHERE person.NAME LIKE :name + +]]> + + <return-property> also works with + multiple columns. This solves a limitation with the + {}-syntax which can not allow fine grained control of + multi-column properties. + + + + + + + + + + SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer}, + STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate}, + REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY + FROM EMPLOYMENT + WHERE EMPLOYER = :id AND ENDDATE IS NULL + ORDER BY STARTDATE ASC +]]> + + Notice that in this example we used + <return-property> in combination with the + {}-syntax for injection. Allowing users to choose how + they want to refer column and properties. + + If your mapping has a discriminator you must use + <return-discriminator> to specify the + discriminator column. + + + + Using stored procedures for querying + + Hibernate 3 introduces support for queries via stored procedures + and functions. Most of the following documentation is equivalent for + both. The stored procedure/function must return a resultset as the first + out-parameter to be able to work with Hibernate. An example of such a + stored function in Oracle 9 and higher is as follows: + + + + To use this query in Hibernate you need to map it via a named + query. + + + + + + + + + + + + + + + { ? = call selectAllEmployments() } +]]> + + Notice stored procedures currently only return scalars and + entities. <return-join> and + <load-collection> are not supported. + + + Rules/limitations for using stored procedures + + To use stored procedures with Hibernate the procedures/functions + have to follow some rules. If they do not follow those rules they are + not usable with Hibernate. If you still want to use these procedures + you have to execute them via session.connection(). + The rules are different for each database, since database vendors have + different stored procedure semantics/syntax. + + Stored procedure queries can't be paged with + setFirstResult()/setMaxResults(). + + Recommended call form is standard SQL92: { ? = call + functionName(<parameters>) } or { ? = call + procedureName(<parameters>}. Native call syntax is not + supported. + + For Oracle the following rules apply: + + + + A function must return a result set. The first parameter of + a procedure must be an OUT that returns a + result set. This is done by using a + SYS_REFCURSOR type in Oracle 9 or 10. In Oracle + you need to define a REF CURSOR type, see + Oracle literature. + + + + For Sybase or MS SQL server the following rules apply: + + + + The procedure must return a result set. Note that since + these servers can/will return multiple result sets and update + counts, Hibernate will iterate the results and take the first + result that is a result set as its return value. Everything else + will be discarded. + + + + If you can enable SET NOCOUNT ON in your + procedure it will probably be more efficient, but this is not a + requirement. + + + + + + + + Custom SQL for create, update and delete + + Hibernate3 can use custom SQL statements for create, update, and + delete operations. The class and collection persisters in Hibernate + already contain a set of configuration time generated strings (insertsql, + deletesql, updatesql etc.). The mapping tags + <sql-insert>, + <sql-delete>, and + <sql-update> override these strings: + + + + + + + INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? ) + UPDATE PERSON SET NAME=UPPER(?) WHERE ID=? + DELETE FROM PERSON WHERE ID=? +]]> + + The SQL is directly executed in your database, so you are free to + use any dialect you like. This will of course reduce the portability of + your mapping if you use database specific SQL. + + Stored procedures are supported if the callable + attribute is set: + + + + + + + {call createPerson (?, ?)} + {? = call deletePerson (?)} + {? = call updatePerson (?, ?)} +]]> + + The order of the positional parameters are currently vital, as they + must be in the same sequence as Hibernate expects them. + + You can see the expected order by enabling debug logging for the + org.hibernate.persister.entity level. With this level + enabled Hibernate will print out the static SQL that is used to create, + update, delete etc. entities. (To see the expected sequence, remember to + not include your custom SQL in the mapping files as that will override the + Hibernate generated static sql.) + + The stored procedures are in most cases (read: better do it than + not) required to return the number of rows inserted/updated/deleted, as + Hibernate has some runtime checks for the success of the statement. + Hibernate always registers the first statement parameter as a numeric + output parameter for the CUD operations: + + + + + + Custom SQL for loading + + You may also declare your own SQL (or HQL) queries for entity + loading: + + + + SELECT NAME AS {pers.name}, ID AS {pers.id} + FROM PERSON + WHERE ID=? + FOR UPDATE +]]> + + This is just a named query declaration, as discussed earlier. You + may reference this named query in a class mapping: + + + + + + + +]]> + + This even works with stored procedures. + + You may even define a query for collection loading: + + + + + +]]> + + + + SELECT {emp.*} + FROM EMPLOYMENT emp + WHERE EMPLOYER = :id + ORDER BY STARTDATE ASC, EMPLOYEE ASC +]]> + + You could even define an entity loader that loads a collection by + join fetching: + + + + + SELECT NAME AS {pers.*}, {emp.*} + FROM PERSON pers + LEFT OUTER JOIN EMPLOYMENT emp + ON pers.ID = emp.PERSON_ID + WHERE ID=? +]]> + +
diff --git a/documentation/envers/src/main/docbook/en-US/content/quickstart.xml b/documentation/envers/src/main/docbook/en-US/content/quickstart.xml deleted file mode 100644 index c45c4fdf58..0000000000 --- a/documentation/envers/src/main/docbook/en-US/content/quickstart.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - Quickstart - - - When configuring your persistence unit (the persistence.xml file), add the following event - listeners: (this will allow Envers to check if any audited entities were modified) - - - -org.hibernate.ejb.HibernatePersistence -... - - - - - - - - - - - -]]> - - - Then, annotate your persistent class with @Audited - this will make all - properties versioned. For example: - - - - - - And the referenced entity: - - - persons; - - // add getters, setters, constructors, equals and hashCode here -} -]]> - - - And that's it! You create, modify and delete the entites as always. If you look - at the generated schema, you will notice that it is unchanged by adding auditing - for the Address and Person entities. Also, the data they hold is the same. There are, - however, two new tables - Address_audit and Person_audit, - which store the historical data, whenever you commit a transaction. - - - - Instead of annotating the whole class and auditing all properties, you can annotate - only some persistent properties with @Audited. This will cause only - these properties to be audited. - - - - You can access the audit of an entity using the AuditReader interface, which you - can obtain when having an open EntityManager. See also the javadocs. - - - - - - The T find(Class<T> cls, Object primaryKey, Number revision) - method returns an entity with the given primary key, with the data it contained at - the given revision. If the entity didn't exist at this revision, null - is returned. Only the audited properties will be set on the returned entity. - The rest will be null. - - - - You can also get a list of revisions at which an entity was modified using the - getRevisions method, as well as retrieve the date, - at which a revision was created using the getRevisionDate method. - - - diff --git a/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml b/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml deleted file mode 100644 index 8c6a35c401..0000000000 --- a/documentation/envers/src/main/docbook/en-US/content/revisionlog.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - Logging data for revisions - - - Envers provides an easy way to log additional data for each revision. You simply need - to annotate one entity with @RevisionEntity, and a new instance of - this entity will be persisted when a new revision is created (that is, whenever an - audited entity is modified). As revisions are global, you can have at most one revisions entity. - - - - This entity must have at least two properties: - - - - - - an integer- or long-valued property, annotated with @RevisionNumber. Most - often, this will be an auto-generated primary key. - - - - - a long-valued property, annotated with @RevisionTimestamp. Value of - this property will be automatically set by Envers. - - - - - - You can either add these properties to your entity, or extend - org.hibernate.envers.DefaultRevisionEntity, which already has those two properties. - - - - To fill the entity with additional data, you'll need to implement the - org.jboss.envers.RevisionListener interface. Its newRevision method will - be called when a new revision is created, before persisting the revision entity. - The implementation should be stateless and thread-safe. The listener then has to be - attached to the revisions entity by specifying it as a parameter to the - @RevisionEntity annotation. - - - - A simplest example of a revisions entity, which with each revision associates the - username of the user making the change is: - - - - - - Or, if you don't want to extend any class: - - - - - - An example listener, which, if used in a JBoss Seam application, stores the - currently logged in user username: - - - - - - Having an "empty" revision entity - that is, with no additional properties except the - two mandatory ones - is also an easy way to change the names of the table and of the - properties in the revisions table automatically generated by Envers. - - - - In case there is no entity annotated with @RevisionEntity, a default - table will be generated, with the name REVINFO. - - - - diff --git a/documentation/envers/src/main/docbook/en-US/content/session_api.xml b/documentation/envers/src/main/docbook/en-US/content/session_api.xml new file mode 100644 index 0000000000..a1fa6374fe --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/session_api.xml @@ -0,0 +1,1287 @@ + + + + + + + Working with objects + + + Hibernate is a full object/relational mapping solution that not only shields + the developer from the details of the underlying database management + system, but also offers state management of objects. This is, + contrary to the management of SQL statements in common JDBC/SQL + persistence layers, a very natural object-oriented view of persistence in Java + applications. + + + + In other words, Hibernate application developers should always think about the + state of their objects, and not necessarily about the + execution of SQL statements. This part is taken care of by Hibernate and is only + relevant for the application developer when tuning the performance of the system. + + + + Hibernate object states + + + Hibernate defines and supports the following object states: + + + + + + Transient - an object is transient if it has just + been instantiated using the new operator, and it + is not associated with a Hibernate Session. It has no + persistent representation in the database and no identifier value has been + assigned. Transient instances will be destroyed by the garbage collector if + the application doesn't hold a reference anymore. Use the Hibernate + Session to make an object persistent (and let Hibernate + take care of the SQL statements that need to be executed for this transition). + + + + + Persistent - a persistent instance has a representation + in the database and an identifier value. It might just have been saved or loaded, + however, it is by definition in the scope of a Session. + Hibernate will detect any changes made to an object in persistent state and + synchronize the state with the database when the unit of work completes. + Developers don't execute manual UPDATE statements, or + DELETE statements when an object should be made transient. + + + + + Detached - a detached instance is an object that has been + persistent, but its Session has been closed. The reference + to the object is still valid, of course, and the detached instance might even + be modified in this state. A detached instance can be reattached to a new + Session at a later point in time, making it (and all the + modifications) persistent again. This feature enables a programming model for + long running units of work that require user think-time. We call them + application transactions, i.e. a unit of work from the + point of view of the user. + + + + + + We'll now discuss the states and state transitions (and the Hibernate methods that + trigger a transition) in more detail. + + + + + + Making objects persistent + + + Newly instantiated instances of a a persistent class are considered + transient by Hibernate. We can make a transient + instance persistent by associating it with a + session: + + + + + + If Cat has a generated identifier, the identifier is + generated and assigned to the cat when save() + is called. If Cat has an assigned + identifier, or a composite key, the identifier should be assigned to + the cat instance before calling save(). + You may also use persist() instead of save(), + with the semantics defined in the EJB3 early draft. + + + + + + persist() makes a transient instance persistent. + However, it doesn't guarantee that the identifier value will be assigned to + the persistent instance immediately, the assignment might happen at flush time. + persist() also guarantees that it will not execute an + INSERT statement if it is called outside of transaction + boundaries. This is useful in long-running conversations with an extended + Session/persistence context. + + + + + save() does guarantee to return an identifier. If an INSERT + has to be executed to get the identifier ( e.g. "identity" generator, not + "sequence"), this INSERT happens immediately, no matter if you are inside or + outside of a transaction. This is problematic in a long-running conversation + with an extended Session/persistence context. + + + + + + Alternatively, you may assign the identifier using an overloaded version + of save(). + + + + + + If the object you make persistent has associated objects (e.g. the + kittens collection in the previous example), + these objects may be made persistent in any order you like unless you + have a NOT NULL constraint upon a foreign key column. + There is never a risk of violating foreign key constraints. However, you + might violate a NOT NULL constraint if you + save() the objects in the wrong order. + + + + Usually you don't bother with this detail, as you'll very likely use Hibernate's + transitive persistence feature to save the associated + objects automatically. Then, even NOT NULL + constraint violations don't occur - Hibernate will take care of everything. + Transitive persistence is discussed later in this chapter. + + + + + + Loading an object + + + The load() methods of Session gives you + a way to retrieve a persistent instance if you already know its identifier. + load() takes a class object and will load the state into + a newly instantiated instance of that class, in persistent state. + + + + + + + + Alternatively, you can load state into a given instance: + + + + + + Note that load() will throw an unrecoverable exception if + there is no matching database row. If the class is mapped with a proxy, + load() just returns an uninitialized proxy and does not + actually hit the database until you invoke a method of the proxy. This + behaviour is very useful if you wish to create an association to an object + without actually loading it from the database. It also allows multiple + instances to be loaded as a batch if batch-size is + defined for the class mapping. + + + + If you are not certain that a matching row exists, you should use the + get() method, which hits the database immediately and + returns null if there is no matching row. + + + + + + You may even load an object using an SQL SELECT ... FOR UPDATE, + using a LockMode. See the API documentation for more information. + + + + + + Note that any associated instances or contained collections are + not selected FOR UPDATE, unless you decide + to specify lock or all as a + cascade style for the association. + + + + It is possible to re-load an object and all its collections at any time, using the + refresh() method. This is useful when database triggers are used to + initialize some of the properties of the object. + + + + + + An important question usually appears at this point: How much does Hibernate load + from the database and how many SQL SELECTs will it use? This + depends on the fetching strategy and is explained in + . + + + + + + Querying + + + If you don't know the identifiers of the objects you are looking for, + you need a query. Hibernate supports an easy-to-use but powerful object + oriented query language (HQL). For programmatic query creation, Hibernate + supports a sophisticated Criteria and Example query feature (QBC and QBE). + You may also express your query in the native SQL of your database, with + optional support from Hibernate for result set conversion into objects. + + + + Executing queries + + + HQL and native SQL queries are represented with an instance of org.hibernate.Query. + This interface offers methods for parameter binding, result set handling, and for the execution + of the actual query. You always obtain a Query using the current + Session: + + + + + + A query is usually executed by invoking list(), the + result of the query will be loaded completely into a collection in memory. + Entity instances retrieved by a query are in persistent state. The + uniqueResult() method offers a shortcut if you + know your query will only return a single object. Note that queries that + make use of eager fetching of collections usually return duplicates of + the root objects (but with their collections initialized). You can filter + these duplicates simply through a Set. + + + + Iterating results + + + Occasionally, you might be able to achieve better performance by + executing the query using the iterate() method. + This will only usually be the case if you expect that the actual + entity instances returned by the query will already be in the session + or second-level cache. If they are not already cached, + iterate() will be slower than list() + and might require many database hits for a simple query, usually + 1 for the initial select which only returns identifiers, + and n additional selects to initialize the actual instances. + + + + + + + Queries that return tuples + + + Hibernate queries sometimes return tuples of objects, in which case each tuple + is returned as an array: + + + + + + + + Scalar results + + + Queries may specify a property of a class in the select clause. + They may even call SQL aggregate functions. Properties or aggregates are considered + "scalar" results (and not entities in persistent state). + + + + + + + + Bind parameters + + + Methods on Query are provided for binding values to + named parameters or JDBC-style ? parameters. + Contrary to JDBC, Hibernate numbers parameters from zero. + Named parameters are identifiers of the form :name in + the query string. The advantages of named parameters are: + + + + + + named parameters are insensitive to the order they occur in the + query string + + + + + they may occur multiple times in the same query + + + + + they are self-documenting + + + + + + + + + + + + + + Pagination + + + If you need to specify bounds upon your result set (the maximum number of rows + you want to retrieve and / or the first row you want to retrieve) you should + use methods of the Query interface: + + + + + + Hibernate knows how to translate this limit query into the native + SQL of your DBMS. + + + + + + Scrollable iteration + + + If your JDBC driver supports scrollable ResultSets, the + Query interface may be used to obtain a + ScrollableResults object, which allows flexible + navigation of the query results. + + + i++ ) && cats.next() ) pageOfCats.add( cats.get(1) ); + +} +cats.close()]]> + + + Note that an open database connection (and cursor) is required for this + functionality, use setMaxResult()/setFirstResult() + if you need offline pagination functionality. + + + + + + Externalizing named queries + + + You may also define named queries in the mapping document. (Remember to use a + CDATA section if your query contains characters that could + be interpreted as markup.) + + + ? +] ]>]]> + + + Parameter binding and executing is done programatically: + + + + + + Note that the actual program code is independent of the query language that + is used, you may also define native SQL queries in metadata, or migrate + existing queries to Hibernate by placing them in mapping files. + + + + Also note that a query declaration inside a <hibernate-mapping> + element requires a global unique name for the query, while a query declaration inside a + <class> element is made unique automatically by prepending the + fully qualified name of the class, for example + eg.Cat.ByNameAndMaximumWeight. + + + + + + + + Filtering collections + + A collection filter is a special type of query that may be applied to + a persistent collection or array. The query string may refer to this, + meaning the current collection element. + + + + + + The returned collection is considered a bag, and it's a copy of the given + collection. The original collection is not modified (this is contrary to + the implication of the name "filter", but consistent with expected behavior). + + + + Observe that filters do not require a from clause (though they may have + one if required). Filters are not limited to returning the collection elements themselves. + + + + + + Even an empty filter query is useful, e.g. to load a subset of elements in a + huge collection: + + + + + + + + Criteria queries + + + HQL is extremely powerful but some developers prefer to build queries dynamically, + using an object-oriented API, rather than building query strings. Hibernate provides + an intuitive Criteria query API for these cases: + + + + + + The Criteria and the associated Example + API are discussed in more detail in . + + + + + + Queries in native SQL + + + You may express a query in SQL, using createSQLQuery() and + let Hibernate take care of the mapping from result sets to objects. Note + that you may at any time call session.connection() and + use the JDBC Connection directly. If you chose to use the + Hibernate API, you must enclose SQL aliases in braces: + + + + + + + + SQL queries may contain named and positional parameters, just like Hibernate queries. + More information about native SQL queries in Hibernate can be found in + . + + + + + + + + Modifying persistent objects + + + Transactional persistent instances (ie. objects loaded, saved, created or + queried by the Session) may be manipulated by the application + and any changes to persistent state will be persisted when the Session + is flushed (discussed later in this chapter). There is no need + to call a particular method (like update(), which has a different + purpose) to make your modifications persistent. So the most straightforward way to update + the state of an object is to load() it, + and then manipulate it directly, while the Session is open: + + + + + + Sometimes this programming model is inefficient since it would require both an SQL + SELECT (to load an object) and an SQL UPDATE + (to persist its updated state) in the same session. Therefore Hibernate offers an + alternate approach, using detached instances. + + + + Note that Hibernate does not offer its own API for direct execution of + UPDATE or DELETE statements. Hibernate is a + state management service, you don't have to think in + statements to use it. JDBC is a perfect API for executing + SQL statements, you can get a JDBC Connection at any time + by calling session.connection(). Furthermore, the notion + of mass operations conflicts with object/relational mapping for online + transaction processing-oriented applications. Future versions of Hibernate + may however provide special mass operation functions. See + for some possible batch operation tricks. + + + + + + Modifying detached objects + + + Many applications need to retrieve an object in one transaction, send it to the + UI layer for manipulation, then save the changes in a new transaction. + Applications that use this kind of approach in a high-concurrency environment + usually use versioned data to ensure isolation for the "long" unit of work. + + + + Hibernate supports this model by providing for reattachment of detached instances + using the Session.update() or Session.merge() + methods: + + + + + + If the Cat with identifier catId had already + been loaded by secondSession when the application tried to + reattach it, an exception would have been thrown. + + + + Use update() if you are sure that the session does + not contain an already persistent instance with the same identifier, and + merge() if you want to merge your modifications at any time + without consideration of the state of the session. In other words, update() + is usually the first method you would call in a fresh session, ensuring that + reattachment of your detached instances is the first operation that is executed. + + + + The application should individually update() detached instances + reachable from the given detached instance if and only if it wants + their state also updated. This can be automated of course, using transitive + persistence, see . + + + + The lock() method also allows an application to reassociate + an object with a new session. However, the detached instance has to be unmodified! + + + + + + Note that lock() can be used with various + LockModes, see the API documentation and the + chapter on transaction handling for more information. Reattachment is not + the only usecase for lock(). + + + + Other models for long units of work are discussed in . + + + + + + Automatic state detection + + + Hibernate users have requested a general purpose method that either saves a + transient instance by generating a new identifier or updates/reattaches + the detached instances associated with its current identifier. + The saveOrUpdate() method implements this functionality. + + + + + + The usage and semantics of saveOrUpdate() seems to be confusing + for new users. Firstly, so long as you are not trying to use instances from one session + in another new session, you should not need to use update(), + saveOrUpdate(), or merge(). Some whole + applications will never use either of these methods. + + + + Usually update() or saveOrUpdate() are used in + the following scenario: + + + + + + the application loads an object in the first session + + + + + the object is passed up to the UI tier + + + + + some modifications are made to the object + + + + + the object is passed back down to the business logic tier + + + + + the application persists these modifications by calling + update() in a second session + + + + + + saveOrUpdate() does the following: + + + + + + if the object is already persistent in this session, do nothing + + + + + if another object associated with the session has the same identifier, + throw an exception + + + + + if the object has no identifier property, save() it + + + + + if the object's identifier has the value assigned to a newly instantiated + object, save() it + + + + + if the object is versioned (by a <version> or + <timestamp>), and the version property value + is the same value assigned to a newly instantiated object, + save() it + + + + + otherwise update() the object + + + + + + and merge() is very different: + + + + + + if there is a persistent instance with the same identifier currently + associated with the session, copy the state of the given object onto + the persistent instance + + + + + if there is no persistent instance currently associated with the session, + try to load it from the database, or create a new persistent instance + + + + + the persistent instance is returned + + + + + the given instance does not become associated with the session, it + remains detached + + + + + + + + Deleting persistent objects + + + Session.delete() will remove an object's state from the database. + Of course, your application might still hold a reference to a deleted object. + It's best to think of delete() as making a persistent instance + transient. + + + + + + You may delete objects in any order you like, without risk of foreign key + constraint violations. It is still possible to violate a NOT + NULL constraint on a foreign key column by deleting objects in + the wrong order, e.g. if you delete the parent, but forget to delete the + children. + + + + + + Replicating object between two different datastores + + + It is occasionally useful to be able to take a graph of persistent instances + and make them persistent in a different datastore, without regenerating identifier + values. + + + + + + The ReplicationMode determines how replicate() + will deal with conflicts with existing rows in the database. + + + + + + ReplicationMode.IGNORE - ignore the object when there is + an existing database row with the same identifier + + + + + ReplicationMode.OVERWRITE - overwrite any existing database + row with the same identifier + + + + + ReplicationMode.EXCEPTION - throw an exception if there is + an existing database row with the same identifier + + + + + ReplicationMode.LATEST_VERSION - overwrite the row if its + version number is earlier than the version number of the object, or ignore + the object otherwise + + + + + + Usecases for this feature include reconciling data entered into different database + instances, upgrading system configuration information during product upgrades, + rolling back changes made during non-ACID transactions and more. + + + + + + Flushing the Session + + + From time to time the Session will execute the SQL statements + needed to synchronize the JDBC connection's state with the state of objects held in + memory. This process, flush, occurs by default at the following + points + + + + + + before some query executions + + + + + from org.hibernate.Transaction.commit() + + + + + from Session.flush() + + + + + + The SQL statements are issued in the following order + + + + + + all entity insertions, in the same order the corresponding objects + were saved using Session.save() + + + + + all entity updates + + + + + all collection deletions + + + + + all collection element deletions, updates and insertions + + + + + all collection insertions + + + + + all entity deletions, in the same order the corresponding objects + were deleted using Session.delete() + + + + + + (An exception is that objects using native ID generation are + inserted when they are saved.) + + + + Except when you explicity flush(), there are absolutely no + guarantees about when the Session executes + the JDBC calls, only the order in which they are executed. + However, Hibernate does guarantee that the Query.list(..) + will never return stale data; nor will they return the wrong data. + + + + It is possible to change the default behavior so that flush occurs less frequently. + The FlushMode class defines three different modes: only flush + at commit time (and only when the Hibernate Transaction API + is used), flush automatically using the explained routine, or never flush unless + flush() is called explicitly. The last mode is useful for long running + units of work, where a Session is kept open and disconnected for + a long time (see ). + + + + + + During flush, an exception might occur (e.g. if a DML operation violates a constraint). + Since handling exceptions involves some understanding of Hibernate's transactional + behavior, we discuss it in . + + + + + + Transitive persistence + + + It is quite cumbersome to save, delete, or reattach individual objects, + especially if you deal with a graph of associated objects. A common case is + a parent/child relationship. Consider the following example: + + + + If the children in a parent/child relationship would be value typed (e.g. a collection + of addresses or strings), their life cycle would depend on the parent and no + further action would be required for convenient "cascading" of state changes. + When the parent is saved, the value-typed child objects are saved as + well, when the parent is deleted, the children will be deleted, etc. This + even works for operations such as the removal of a child from the collection; + Hibernate will detect this and, since value-typed objects can't have shared + references, delete the child from the database. + + + + Now consider the same scenario with parent and child objects being entities, + not value-types (e.g. categories and items, or parent and child cats). Entities + have their own life cycle, support shared references (so removing an entity from + the collection does not mean it can be deleted), and there is by default no + cascading of state from one entity to any other associated entities. Hibernate + does not implement persistence by reachability by default. + + + + For each basic operation of the Hibernate session - including persist(), merge(), + saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate() - there is a + corresponding cascade style. Respectively, the cascade styles are named create, + merge, save-update, delete, lock, refresh, evict, replicate. If you want an + operation to be cascaded along an association, you must indicate that in the mapping + document. For example: + + + ]]> + + + Cascade styles my be combined: + + + ]]> + + + You may even use cascade="all" to specify that all + operations should be cascaded along the association. The default cascade="none" + specifies that no operations are to be cascaded. + + + + A special cascade style, delete-orphan, applies only to one-to-many + associations, and indicates that the delete() operation should + be applied to any child object that is removed from the association. + + + + + Recommendations: + + + + + + It doesn't usually make sense to enable cascade on a <many-to-one> + or <many-to-many> association. Cascade is often useful for + <one-to-one> and <one-to-many> + associations. + + + + + If the child object's lifespan is bounded by the lifespan of the parent + object, make it a life cycle object by specifying + cascade="all,delete-orphan". + + + + + Otherwise, you might not need cascade at all. But if you think that you will often be + working with the parent and children together in the same transaction, and you want to save + yourself some typing, consider using cascade="persist,merge,save-update". + + + + + + Mapping an association (either a single valued association, or a collection) with + cascade="all" marks the association as a + parent/child style relationship where save/update/delete of the + parent results in save/update/delete of the child or children. + + + Futhermore, a mere reference to a child from a persistent parent will result in + save/update of the child. This metaphor is incomplete, however. A child which becomes + unreferenced by its parent is not automatically deleted, except + in the case of a <one-to-many> association mapped with + cascade="delete-orphan". The precise semantics of cascading + operations for a parent/child relationship are as follows: + + + + + + If a parent is passed to persist(), all children are passed to + persist() + + + + + If a parent is passed to merge(), all children are passed to + merge() + + + + + If a parent is passed to save(), update() or + saveOrUpdate(), all children are passed to saveOrUpdate() + + + + + If a transient or detached child becomes referenced by a persistent parent, + it is passed to saveOrUpdate() + + + + + If a parent is deleted, all children are passed to delete() + + + + + If a child is dereferenced by a persistent parent, nothing + special happens - the application should explicitly delete + the child if necessary - unless cascade="delete-orphan", + in which case the "orphaned" child is deleted. + + + + + + Finally, note that cascading of operations can be applied to an object graph at + call time or at flush time. All operations, + if enabled, are cascaded to associated entities reachable when the operation is + executed. However, save-upate and delete-orphan + are transitive for all associated entities reachable during flush of the + Session. + + + + + + Using metadata + + + Hibernate requires a very rich meta-level model of all entity and value types. From time + to time, this model is very useful to the application itself. For example, the application + might use Hibernate's metadata to implement a "smart" deep-copy algorithm that understands + which objects should be copied (eg. mutable value types) and which should not (eg. + immutable value types and, possibly, associated entities). + + + Hibernate exposes metadata via the ClassMetadata and + CollectionMetadata interfaces and the Type + hierarchy. Instances of the metadata interfaces may be obtained from the + SessionFactory. + + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/toolset_guide.xml b/documentation/envers/src/main/docbook/en-US/content/toolset_guide.xml new file mode 100644 index 0000000000..b47abeb1c1 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/toolset_guide.xml @@ -0,0 +1,631 @@ + + + + + + + Toolset Guide + + + Roundtrip engineering with Hibernate is possible using a set of Eclipse plugins, + commandline tools, as well as Ant tasks. + + + + The Hibernate Tools currently include plugins for the Eclipse + IDE as well as Ant tasks for reverse engineering of existing databases: + + + + + Mapping Editor: An editor for Hibernate XML mapping files, + supporting auto-completion and syntax highlighting. It also supports semantic + auto-completion for class names and property/field names, making it much more versatile than a normal XML editor. + + + Console: The console is a new view in Eclipse. In addition to + a tree overview of your console configurations, you also get an interactive view + of your persistent classes and their relationships. The console allows you to + execute HQL queries against your database and browse the result directly in + Eclipse. + + + Development Wizards: Several wizards are provided with the + Hibernate Eclipse tools; you can use a wizard to quickly generate Hibernate configuration + (cfg.xml) files, or you may even completely reverse engineer an existing database schema + into POJO source files and Hibernate mapping files. The reverse engineering wizard + supports customizable templates. + + + Ant Tasks: + + + + + + Please refer to the Hibernate Tools package and it's documentation + for more information. + + + + However, the Hibernate main package comes bundled with an integrated tool (it can even + be used from "inside" Hibernate on-the-fly): SchemaExport aka + hbm2ddl. + + + + Automatic schema generation + + + DDL may be generated from your mapping files by a Hibernate utility. The generated + schema includes referential integrity constraints (primary and foreign keys) for + entity and collection tables. Tables and sequences are also created for mapped + identifier generators. + + + + You must specify a SQL Dialect via the + hibernate.dialect property when using this tool, as DDL + is highly vendor specific. + + + + First, customize your mapping files to improve the generated schema. + + + + Customizing the schema + + + Many Hibernate mapping elements define optional attributes named length, + precision and scale. You may set the length, precision + and scale of a column with this attribute. + + + + ]]> + ]]> + + + Some tags also accept a not-null attribute (for generating a + NOT NULL constraint on table columns) and a unique + attribute (for generating UNIQUE constraint on table columns). + + + ]]> + + ]]> + + + A unique-key attribute may be used to group columns in + a single unique key constraint. Currently, the specified value of the + unique-key attribute is not used + to name the constraint in the generated DDL, only to group the columns in + the mapping file. + + + +]]> + + + An index attribute specifies the name of an index that + will be created using the mapped column or columns. Multiple columns may be + grouped into the same index, simply by specifying the same index name. + + + +]]> + + + A foreign-key attribute may be used to override the name + of any generated foreign key constraint. + + + ]]> + + + Many mapping elements also accept a child <column> element. + This is particularly useful for mapping multi-column types: + + + + + + +]]> + + + The default attribute lets you specify a default value for + a column (you should assign the same value to the mapped property before + saving a new instance of the mapped class). + + + + +]]> + + + +]]> + + + The sql-type attribute allows the user to override the default + mapping of a Hibernate type to SQL datatype. + + + + +]]> + + + The check attribute allows you to specify a check constraint. + + + + +]]> + + + ... + +]]> + + + + Summary + + + + + + + Attribute + Values + Interpretation + + + + + length + number + column length + + + precision + number + column decimal precision + + + scale + number + column decimal scale + + + not-null + true|false + specfies that the column should be non-nullable + + + unique + true|false + specifies that the column should have a unique constraint + + + index + index_name + specifies the name of a (multi-column) index + + + unique-key + unique_key_name + specifies the name of a multi-column unique constraint + + + foreign-key + foreign_key_name + + specifies the name of the foreign key constraint generated + for an association, for a <one-to-one>, + <many-to-one>, <key>, + or <many-to-many> mapping element. Note that + inverse="true" sides will not be considered + by SchemaExport. + + + + sql-type + SQL column type + + overrides the default column type (attribute of + <column> element only) + + + + default + SQL expression + + specify a default value for the column + + + + check + SQL expression + + create an SQL check constraint on either column or table + + + + +
+ + + The <comment> element allows you to specify comments + for the generated schema. + + + + Current customers only + ... +]]> + + + + Balance in USD + +]]> + + + This results in a comment on table or + comment on column statement in the generated + DDL (where supported). + + +
+ + + Running the tool + + + The SchemaExport tool writes a DDL script to standard out and/or + executes the DDL statements. + + + + java -cp hibernate_classpaths + org.hibernate.tool.hbm2ddl.SchemaExport options mapping_files + + + + <literal>SchemaExport</literal> Command Line Options + + + + + + Option + Description + + + + + --quiet + don't output the script to stdout + + + --drop + only drop the tables + + + --create + only create the tables + + + --text + don't export to the database + + + --output=my_schema.ddl + output the ddl script to a file + + + --naming=eg.MyNamingStrategy + select a NamingStrategy + + + --config=hibernate.cfg.xml + read Hibernate configuration from an XML file + + + --properties=hibernate.properties + read database properties from a file + + + --format + format the generated SQL nicely in the script + + + --delimiter=; + set an end of line delimiter for the script + + + +
+ + + You may even embed SchemaExport in your application: + + + + +
+ + + Properties + + + Database properties may be specified + + + + + as system properties with -D<property> + + + in hibernate.properties + + + in a named properties file with --properties + + + + + The needed properties are: + + + + SchemaExport Connection Properties + + + + + + Property Name + Description + + + + + hibernate.connection.driver_class + jdbc driver class + + + hibernate.connection.url + jdbc url + + + hibernate.connection.username + database user + + + hibernate.connection.password + user password + + + hibernate.dialect + dialect + + + +
+ +
+ + + Using Ant + + + You can call SchemaExport from your Ant build script: + + + + + + + + + + +]]> + + + + + Incremental schema updates + + + The SchemaUpdate tool will update an existing schema with "incremental" changes. + Note that SchemaUpdate depends heavily upon the JDBC metadata API, so it will + not work with all JDBC drivers. + + + + java -cp hibernate_classpaths + org.hibernate.tool.hbm2ddl.SchemaUpdate options mapping_files + + + + <literal>SchemaUpdate</literal> Command Line Options + + + + + + Option + Description + + + + + --quiet + don't output the script to stdout + + + --text + don't export the script to the database + + + --naming=eg.MyNamingStrategy + select a NamingStrategy + + + --properties=hibernate.properties + read database properties from a file + + + --config=hibernate.cfg.xml + specify a .cfg.xml file + + + +
+ + + You may embed SchemaUpdate in your application: + + + + +
+ + + Using Ant for incremental schema updates + + + You can call SchemaUpdate from the Ant script: + + + + + + + + + + +]]> + + + + + Schema validation + + + The SchemaValidator tool will validate that the existing database schema "matches" + your mapping documents. Note that SchemaValidator depends heavily upon the JDBC + metadata API, so it will not work with all JDBC drivers. This tool is extremely useful for testing. + + + + java -cp hibernate_classpaths + org.hibernate.tool.hbm2ddl.SchemaValidator options mapping_files + + + + <literal>SchemaValidator</literal> Command Line Options + + + + + + Option + Description + + + + + --naming=eg.MyNamingStrategy + select a NamingStrategy + + + --properties=hibernate.properties + read database properties from a file + + + --config=hibernate.cfg.xml + specify a .cfg.xml file + + + +
+ + + You may embed SchemaValidator in your application: + + + + +
+ + + Using Ant for schema validation + + + You can call SchemaValidator from the Ant script: + + + + + + + + + + +]]> + + + +
+ +
+ diff --git a/documentation/envers/src/main/docbook/en-US/content/transactions.xml b/documentation/envers/src/main/docbook/en-US/content/transactions.xml new file mode 100644 index 0000000000..25e80f4237 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/transactions.xml @@ -0,0 +1,1136 @@ + + + + + + + Transactions And Concurrency + + + The most important point about Hibernate and concurrency control is that it is very + easy to understand. Hibernate directly uses JDBC connections and JTA resources without + adding any additional locking behavior. We highly recommend you spend some time with the + JDBC, ANSI, and transaction isolation specification of your database management system. + + + + Hibernate does not lock objects in memory. Your application can expect the behavior as + defined by the isolation level of your database transactions. Note that thanks to the + Session, which is also a transaction-scoped cache, Hibernate + provides repeatable reads for lookup by identifier and entity queries (not + reporting queries that return scalar values). + + + + In addition to versioning for automatic optimistic concurrency control, Hibernate also + offers a (minor) API for pessimistic locking of rows, using the + SELECT FOR UPDATE syntax. Optimistic concurrency control and + this API are discussed later in this chapter. + + + + We start the discussion of concurrency control in Hibernate with the granularity of + Configuration, SessionFactory, and + Session, as well as database transactions and long conversations. + + + + Session and transaction scopes + + + A SessionFactory is an expensive-to-create, threadsafe object + intended to be shared by all application threads. It is created once, usually on + application startup, from a Configuration instance. + + + + A Session is an inexpensive, non-threadsafe object that should be + used once, for a single request, a conversation, single unit of work, and then discarded. + A Session will not obtain a JDBC Connection + (or a Datasource) unless it is needed, hence consume no + resources until used. + + + + To complete this picture you also have to think about database transactions. A + database transaction has to be as short as possible, to reduce lock contention in + the database. Long database transactions will prevent your application from scaling + to highly concurrent load. Hence, it is almost never good design to hold a + database transaction open during user think time, until the unit of work is + complete. + + + + What is the scope of a unit of work? Can a single Hibernate Session + span several database transactions or is this a one-to-one relationship of scopes? When + should you open and close a Session and how do you demarcate the + database transaction boundaries? + + + + Unit of work + + + First, don't use the session-per-operation antipattern, that is, + don't open and close a Session for every simple database call in + a single thread! Of course, the same is true for database transactions. Database calls + in an application are made using a planned sequence, they are grouped into atomic + units of work. (Note that this also means that auto-commit after every single + SQL statement is useless in an application, this mode is intended for ad-hoc SQL + console work. Hibernate disables, or expects the application server to do so, + auto-commit mode immediately.) Database transactions are never optional, all + communication with a database has to occur inside a transaction, no matter if + you read or write data. As explained, auto-commit behavior for reading data + should be avoided, as many small transactions are unlikely to perform better than + one clearly defined unit of work. The latter is also much more maintainable + and extensible. + + + + The most common pattern in a multi-user client/server application is + session-per-request. In this model, a request from the client + is sent to the server (where the Hibernate persistence layer runs), a new Hibernate + Session is opened, and all database operations are executed in this unit + of work. Once the work has been completed (and the response for the client has been prepared), + the session is flushed and closed. You would also use a single database transaction to + serve the clients request, starting and committing it when you open and close the + Session. The relationship between the two is one-to-one and this + model is a perfect fit for many applications. + + + + The challenge lies in the implementation. Hibernate provides built-in management of + the "current session" to simplify this pattern. All you have to do is start a + transaction when a server request has to be processed, and end the transaction + before the response is sent to the client. You can do this in any way you + like, common solutions are ServletFilter, AOP interceptor with a + pointcut on the service methods, or a proxy/interception container. An EJB container + is a standardized way to implement cross-cutting aspects such as transaction + demarcation on EJB session beans, declaratively with CMT. If you decide to + use programmatic transaction demarcation, prefer the Hibernate Transaction + API shown later in this chapter, for ease of use and code portability. + + + + Your application code can access a "current session" to process the request + by simply calling sessionFactory.getCurrentSession() anywhere + and as often as needed. You will always get a Session scoped + to the current database transaction. This has to be configured for either + resource-local or JTA environments, see . + + + + Sometimes it is convenient to extend the scope of a Session and + database transaction until the "view has been rendered". This is especially useful + in servlet applications that utilize a separate rendering phase after the request + has been processed. Extending the database transaction until view rendering is + complete is easy to do if you implement your own interceptor. However, it is not + easily doable if you rely on EJBs with container-managed transactions, as a + transaction will be completed when an EJB method returns, before rendering of any + view can start. See the Hibernate website and forum for tips and examples around + this Open Session in View pattern. + + + + + + Long conversations + + + The session-per-request pattern is not the only useful concept you can use to design + units of work. Many business processes require a whole series of interactions with the user + interleaved with database accesses. In web and enterprise applications it is + not acceptable for a database transaction to span a user interaction. Consider the following + example: + + + + + + The first screen of a dialog opens, the data seen by the user has been loaded in + a particular Session and database transaction. The user is free to + modify the objects. + + + + + The user clicks "Save" after 5 minutes and expects his modifications to be made + persistent; he also expects that he was the only person editing this information and + that no conflicting modification can occur. + + + + + + We call this unit of work, from the point of view of the user, a long running + conversation (or application transaction). + There are many ways how you can implement this in your application. + + + + A first naive implementation might keep the Session and database + transaction open during user think time, with locks held in the database to prevent + concurrent modification, and to guarantee isolation and atomicity. This is of course + an anti-pattern, since lock contention would not allow the application to scale with + the number of concurrent users. + + + + Clearly, we have to use several database transactions to implement the conversation. + In this case, maintaining isolation of business processes becomes the + partial responsibility of the application tier. A single conversation + usually spans several database transactions. It will be atomic if only one of + these database transactions (the last one) stores the updated data, all others + simply read data (e.g. in a wizard-style dialog spanning several request/response + cycles). This is easier to implement than it might sound, especially if + you use Hibernate's features: + + + + + + Automatic Versioning - Hibernate can do automatic + optimistic concurrency control for you, it can automatically detect + if a concurrent modification occurred during user think time. Usually + we only check at the end of the conversation. + + + + + Detached Objects - If you decide to use the already + discussed session-per-request pattern, all loaded instances + will be in detached state during user think time. Hibernate allows you to + reattach the objects and persist the modifications, the pattern is called + session-per-request-with-detached-objects. Automatic + versioning is used to isolate concurrent modifications. + + + + + Extended (or Long) Session - The Hibernate + Session may be disconnected from the underlying JDBC + connection after the database transaction has been committed, and reconnected + when a new client request occurs. This pattern is known as + session-per-conversation and makes + even reattachment unnecessary. Automatic versioning is used to isolate + concurrent modifications and the Session is usually + not allowed to be flushed automatically, but explicitly. + + + + + + Both session-per-request-with-detached-objects and + session-per-conversation have advantages and disadvantages, + we discuss them later in this chapter in the context of optimistic concurrency control. + + + + + + Considering object identity + + + An application may concurrently access the same persistent state in two + different Sessions. However, an instance of a persistent class + is never shared between two Session instances. Hence there are + two different notions of identity: + + + + + Database Identity + + + foo.getId().equals( bar.getId() ) + + + + + JVM Identity + + + foo==bar + + + + + + + Then for objects attached to a particular Session + (i.e. in the scope of a Session) the two notions are equivalent, and + JVM identity for database identity is guaranteed by Hibernate. However, while the application + might concurrently access the "same" (persistent identity) business object in two different + sessions, the two instances will actually be "different" (JVM identity). Conflicts are + resolved using (automatic versioning) at flush/commit time, using an optimistic approach. + + + + This approach leaves Hibernate and the database to worry about concurrency; it also provides + the best scalability, since guaranteeing identity in single-threaded units of work only doesn't + need expensive locking or other means of synchronization. The application never needs to + synchronize on any business object, as long as it sticks to a single thread per + Session. Within a Session the application may safely use + == to compare objects. + + + + However, an application that uses == outside of a Session, + might see unexpected results. This might occur even in some unexpected places, for example, + if you put two detached instances into the same Set. Both might have the same + database identity (i.e. they represent the same row), but JVM identity is by definition not + guaranteed for instances in detached state. The developer has to override the equals() + and hashCode() methods in persistent classes and implement + his own notion of object equality. There is one caveat: Never use the database + identifier to implement equality, use a business key, a combination of unique, usually + immutable, attributes. The database identifier will change if a transient object is made + persistent. If the transient instance (usually together with detached instances) is held in a + Set, changing the hashcode breaks the contract of the Set. + Attributes for business keys don't have to be as stable as database primary keys, you only + have to guarantee stability as long as the objects are in the same Set. See + the Hibernate website for a more thorough discussion of this issue. Also note that this is not + a Hibernate issue, but simply how Java object identity and equality has to be implemented. + + + + + + Common issues + + + Never use the anti-patterns session-per-user-session or + session-per-application (of course, there are rare exceptions to + this rule). Note that some of the following issues might also appear with the recommended + patterns, make sure you understand the implications before making a design decision: + + + + + + A Session is not thread-safe. Things which are supposed to work + concurrently, like HTTP requests, session beans, or Swing workers, will cause race + conditions if a Session instance would be shared. If you keep your + Hibernate Session in your HttpSession (discussed + later), you should consider synchronizing access to your Http session. Otherwise, + a user that clicks reload fast enough may use the same Session in + two concurrently running threads. + + + + + An exception thrown by Hibernate means you have to rollback your database transaction + and close the Session immediately (discussed later in more detail). + If your Session is bound to the application, you have to stop + the application. Rolling back the database transaction doesn't put your business + objects back into the state they were at the start of the transaction. This means the + database state and the business objects do get out of sync. Usually this is not a + problem, because exceptions are not recoverable and you have to start over after + rollback anyway. + + + + + The Session caches every object that is in persistent state (watched + and checked for dirty state by Hibernate). This means it grows endlessly until you + get an OutOfMemoryException, if you keep it open for a long time or simply load too + much data. One solution for this is to call clear() and evict() + to manage the Session cache, but you most likely should consider a + Stored Procedure if you need mass data operations. Some solutions are shown in + . Keeping a Session open for the duration + of a user session also means a high probability of stale data. + + + + + + + + + + Database transaction demarcation + + + Database (or system) transaction boundaries are always necessary. No communication with + the database can occur outside of a database transaction (this seems to confuse many developers + who are used to the auto-commit mode). Always use clear transaction boundaries, even for + read-only operations. Depending on your isolation level and database capabilities this might not + be required but there is no downside if you always demarcate transactions explicitly. Certainly, + a single database transaction is going to perform better than many small transactions, even + for reading data. + + + + A Hibernate application can run in non-managed (i.e. standalone, simple Web- or Swing applications) + and managed J2EE environments. In a non-managed environment, Hibernate is usually responsible for + its own database connection pool. The application developer has to manually set transaction + boundaries, in other words, begin, commit, or rollback database transactions himself. A managed environment + usually provides container-managed transactions (CMT), with the transaction assembly defined declaratively + in deployment descriptors of EJB session beans, for example. Programmatic transaction demarcation is + then no longer necessary. + + + + However, it is often desirable to keep your persistence layer portable between non-managed + resource-local environments, and systems that can rely on JTA but use BMT instead of CMT. + In both cases you'd use programmatic transaction demarcation. Hibernate offers a wrapper + API called Transaction that translates into the native transaction system of + your deployment environment. This API is actually optional, but we strongly encourage its use + unless you are in a CMT session bean. + + + + Usually, ending a Session involves four distinct phases: + + + + + + flush the session + + + + + commit the transaction + + + + + close the session + + + + + handle exceptions + + + + + + Flushing the session has been discussed earlier, we'll now have a closer look at transaction + demarcation and exception handling in both managed- and non-managed environments. + + + + + Non-managed environment + + + If a Hibernate persistence layer runs in a non-managed environment, database connections + are usually handled by simple (i.e. non-DataSource) connection pools from which + Hibernate obtains connections as needed. The session/transaction handling idiom looks + like this: + + + + + + You don't have to flush() the Session explicitly - + the call to commit() automatically triggers the synchronization (depending + upon the FlushMode for the session. + A call to close() marks the end of a session. The main implication + of close() is that the JDBC connection will be relinquished by the + session. This Java code is portable and runs in both non-managed and JTA environments. + + + + A much more flexible solution is Hibernate's built-in "current session" context + management, as described earlier: + + + + + + You will very likely never see these code snippets in a regular application; + fatal (system) exceptions should always be caught at the "top". In other words, the + code that executes Hibernate calls (in the persistence layer) and the code that handles + RuntimeException (and usually can only clean up and exit) are in + different layers. The current context management by Hibernate can significantly + simplify this design, as all you need is access to a SessionFactory. + Exception handling is discussed later in this chapter. + + + + Note that you should select org.hibernate.transaction.JDBCTransactionFactory + (which is the default), and for the second example "thread" as your + hibernate.current_session_context_class. + + + + + + Using JTA + + + If your persistence layer runs in an application server (e.g. behind EJB session beans), + every datasource connection obtained by Hibernate will automatically be part of the global + JTA transaction. You can also install a standalone JTA implementation and use it without + EJB. Hibernate offers two strategies for JTA integration. + + + + If you use bean-managed transactions (BMT) Hibernate will tell the application server to start + and end a BMT transaction if you use the Transaction API. So, the + transaction management code is identical to the non-managed environment. + + + + + + If you want to use a transaction-bound Session, that is, the + getCurrentSession() functionality for easy context propagation, + you will have to use the JTA UserTransaction API directly: + + + + + + With CMT, transaction demarcation is done in session bean deployment descriptors, not programmatically, + hence, the code is reduced to: + + + + + + In a CMT/EJB even rollback happens automatically, since an unhandled RuntimeException + thrown by a session bean method tells the container to set the global transaction to rollback. + This means you do not need to use the Hibernate Transaction API at + all with BMT or CMT, and you get automatic propagation of the "current" Session bound to the + transaction. + + + + Note that you should choose org.hibernate.transaction.JTATransactionFactory + if you use JTA directly (BMT), and org.hibernate.transaction.CMTTransactionFactory + in a CMT session bean, when you configure Hibernate's transaction factory. Remember to also set + hibernate.transaction.manager_lookup_class. Furthermore, make sure + that your hibernate.current_session_context_class is either unset (backwards + compatibility), or set to "jta". + + + + The getCurrentSession() operation has one downside in a JTA environment. + There is one caveat to the use of after_statement connection release + mode, which is then used by default. Due to a silly limitation of the JTA spec, it is not + possible for Hibernate to automatically clean up any unclosed ScrollableResults or + Iterator instances returned by scroll() or + iterate(). You must release the underlying database + cursor by calling ScrollableResults.close() or + Hibernate.close(Iterator) explicitly from a finally + block. (Of course, most applications can easily avoid using scroll() or + iterate() at all from the JTA or CMT code.) + + + + + + Exception handling + + + If the Session throws an exception (including any + SQLException), you should immediately rollback the database + transaction, call Session.close() and discard the + Session instance. Certain methods of Session + will not leave the session in a consistent state. No + exception thrown by Hibernate can be treated as recoverable. Ensure that the + Session will be closed by calling close() + in a finally block. + + + + The HibernateException, which wraps most of the errors that + can occur in a Hibernate persistence layer, is an unchecked exception (it wasn't + in older versions of Hibernate). In our opinion, we shouldn't force the application + developer to catch an unrecoverable exception at a low layer. In most systems, unchecked + and fatal exceptions are handled in one of the first frames of the method call + stack (i.e. in higher layers) and an error message is presented to the application + user (or some other appropriate action is taken). Note that Hibernate might also throw + other unchecked exceptions which are not a HibernateException. These + are, again, not recoverable and appropriate action should be taken. + + + + Hibernate wraps SQLExceptions thrown while interacting with the database + in a JDBCException. In fact, Hibernate will attempt to convert the exception + into a more meaningful subclass of JDBCException. The underlying + SQLException is always available via JDBCException.getCause(). + Hibernate converts the SQLException into an appropriate + JDBCException subclass using the SQLExceptionConverter + attached to the SessionFactory. By default, the + SQLExceptionConverter is defined by the configured dialect; however, it is + also possible to plug in a custom implementation (see the javadocs for the + SQLExceptionConverterFactory class for details). The standard + JDBCException subtypes are: + + + + + + JDBCConnectionException - indicates an error + with the underlying JDBC communication. + + + + + SQLGrammarException - indicates a grammar + or syntax problem with the issued SQL. + + + + + ConstraintViolationException - indicates some + form of integrity constraint violation. + + + + + LockAcquisitionException - indicates an error + acquiring a lock level necessary to perform the requested operation. + + + + + GenericJDBCException - a generic exception + which did not fall into any of the other categories. + + + + + + + + Transaction timeout + + + One extremely important feature provided by a managed environment like EJB + that is never provided for non-managed code is transaction timeout. Transaction + timeouts ensure that no misbehaving transaction can indefinitely tie up + resources while returning no response to the user. Outside a managed (JTA) + environment, Hibernate cannot fully provide this functionality. However, + Hibernate can at least control data access operations, ensuring that database + level deadlocks and queries with huge result sets are limited by a defined + timeout. In a managed environment, Hibernate can delegate transaction timeout + to JTA. This functionality is abstracted by the Hibernate + Transaction object. + + + + + + Note that setTimeout() may not be called in a CMT bean, + where transaction timeouts must be defined declaratively. + + + + + + + + Optimistic concurrency control + + + The only approach that is consistent with high concurrency and high + scalability is optimistic concurrency control with versioning. Version + checking uses version numbers, or timestamps, to detect conflicting updates + (and to prevent lost updates). Hibernate provides for three possible approaches + to writing application code that uses optimistic concurrency. The use cases + we show are in the context of long conversations, but version checking + also has the benefit of preventing lost updates in single database transactions. + + + + Application version checking + + + In an implementation without much help from Hibernate, each interaction with the + database occurs in a new Session and the developer is responsible + for reloading all persistent instances from the database before manipulating them. + This approach forces the application to carry out its own version checking to ensure + conversation transaction isolation. This approach is the least efficient in terms of + database access. It is the approach most similar to entity EJBs. + + + + + + The version property is mapped using <version>, + and Hibernate will automatically increment it during flush if the entity is + dirty. + + + + Of course, if you are operating in a low-data-concurrency environment and don't + require version checking, you may use this approach and just skip the version + check. In that case, last commit wins will be the default + strategy for your long conversations. Keep in mind that this might + confuse the users of the application, as they might experience lost updates without + error messages or a chance to merge conflicting changes. + + + + Clearly, manual version checking is only feasible in very trivial circumstances + and not practical for most applications. Often not only single instances, but + complete graphs of modified objects have to be checked. Hibernate offers automatic + version checking with either an extended Session or detached instances + as the design paradigm. + + + + + + Extended session and automatic versioning + + + A single Session instance and its persistent instances are + used for the whole conversation, known as session-per-conversation. + Hibernate checks instance versions at flush time, throwing an exception if concurrent + modification is detected. It's up to the developer to catch and handle this exception + (common options are the opportunity for the user to merge changes or to restart the + business conversation with non-stale data). + + + + The Session is disconnected from any underlying JDBC connection + when waiting for user interaction. This approach is the most efficient in terms + of database access. The application need not concern itself with version checking or + with reattaching detached instances, nor does it have to reload instances in every + database transaction. + + + + + The foo object still knows which Session it was + loaded in. Beginning a new database transaction on an old session obtains a new connection + and resumes the session. Committing a database transaction disconnects a session + from the JDBC connection and returns the connection to the pool. After reconnection, to + force a version check on data you aren't updating, you may call Session.lock() + with LockMode.READ on any objects that might have been updated by another + transaction. You don't need to lock any data that you are updating. + Usually you would set FlushMode.MANUAL on an extended Session, + so that only the last database transaction cycle is allowed to actually persist all + modifications made in this conversation. Hence, only this last database transaction + would include the flush() operation, and then also + close() the session to end the conversation. + + + + This pattern is problematic if the Session is too big to + be stored during user think time, e.g. an HttpSession should + be kept as small as possible. As the Session is also the + (mandatory) first-level cache and contains all loaded objects, we can probably + use this strategy only for a few request/response cycles. You should use a + Session only for a single conversation, as it will soon also + have stale data. + + + + (Note that earlier Hibernate versions required explicit disconnection and reconnection + of a Session. These methods are deprecated, as beginning and + ending a transaction has the same effect.) + + + + Also note that you should keep the disconnected Session close + to the persistence layer. In other words, use an EJB stateful session bean to + hold the Session in a three-tier environment, and don't transfer + it to the web layer (or even serialize it to a separate tier) to store it in the + HttpSession. + + + + The extended session pattern, or session-per-conversation, is + more difficult to implement with automatic current session context management. + You need to supply your own implementation of the CurrentSessionContext + for this, see the Hibernate Wiki for examples. + + + + + + Detached objects and automatic versioning + + + Each interaction with the persistent store occurs in a new Session. + However, the same persistent instances are reused for each interaction with the database. + The application manipulates the state of detached instances originally loaded in another + Session and then reattaches them using Session.update(), + Session.saveOrUpdate(), or Session.merge(). + + + + + + Again, Hibernate will check instance versions during flush, throwing an + exception if conflicting updates occurred. + + + + You may also call lock() instead of update() + and use LockMode.READ (performing a version check, bypassing all + caches) if you are sure that the object has not been modified. + + + + + + Customizing automatic versioning + + + You may disable Hibernate's automatic version increment for particular properties and + collections by setting the optimistic-lock mapping attribute to + false. Hibernate will then no longer increment versions if the + property is dirty. + + + + Legacy database schemas are often static and can't be modified. Or, other applications + might also access the same database and don't know how to handle version numbers or + even timestamps. In both cases, versioning can't rely on a particular column in a table. + To force a version check without a version or timestamp property mapping, with a + comparison of the state of all fields in a row, turn on optimistic-lock="all" + in the <class> mapping. Note that this conceptually only works + if Hibernate can compare the old and new state, i.e. if you use a single long + Session and not session-per-request-with-detached-objects. + + + + Sometimes concurrent modification can be permitted as long as the changes that have been + made don't overlap. If you set optimistic-lock="dirty" when mapping the + <class>, Hibernate will only compare dirty fields during flush. + + + + In both cases, with dedicated version/timestamp columns or with full/dirty field + comparison, Hibernate uses a single UPDATE statement (with an + appropriate WHERE clause) per entity to execute the version check + and update the information. If you use transitive persistence to cascade reattachment + to associated entities, Hibernate might execute unnecessary updates. This is usually + not a problem, but on update triggers in the database might be + executed even when no changes have been made to detached instances. You can customize + this behavior by setting select-before-update="true" in the + <class> mapping, forcing Hibernate to SELECT + the instance to ensure that changes did actually occur, before updating the row. + + + + + + + + Pessimistic Locking + + + It is not intended that users spend much time worrying about locking strategies. It's usually + enough to specify an isolation level for the JDBC connections and then simply let the + database do all the work. However, advanced users may sometimes wish to obtain + exclusive pessimistic locks, or re-obtain locks at the start of a new transaction. + + + + Hibernate will always use the locking mechanism of the database, never lock objects + in memory! + + + + The LockMode class defines the different lock levels that may be acquired + by Hibernate. A lock is obtained by the following mechanisms: + + + + + + LockMode.WRITE is acquired automatically when Hibernate updates or inserts + a row. + + + + + LockMode.UPGRADE may be acquired upon explicit user request using + SELECT ... FOR UPDATE on databases which support that syntax. + + + + + LockMode.UPGRADE_NOWAIT may be acquired upon explicit user request using a + SELECT ... FOR UPDATE NOWAIT under Oracle. + + + + + LockMode.READ is acquired automatically when Hibernate reads data + under Repeatable Read or Serializable isolation level. May be re-acquired by explicit user + request. + + + + + LockMode.NONE represents the absence of a lock. All objects switch to this + lock mode at the end of a Transaction. Objects associated with the session + via a call to update() or saveOrUpdate() also start out + in this lock mode. + + + + + + The "explicit user request" is expressed in one of the following ways: + + + + + + A call to Session.load(), specifying a LockMode. + + + + + A call to Session.lock(). + + + + + A call to Query.setLockMode(). + + + + + + If Session.load() is called with UPGRADE or + UPGRADE_NOWAIT, and the requested object was not yet loaded by + the session, the object is loaded using SELECT ... FOR UPDATE. + If load() is called for an object that is already loaded with + a less restrictive lock than the one requested, Hibernate calls + lock() for that object. + + + + Session.lock() performs a version number check if the specified lock + mode is READ, UPGRADE or + UPGRADE_NOWAIT. (In the case of UPGRADE or + UPGRADE_NOWAIT, SELECT ... FOR UPDATE is used.) + + + + If the database does not support the requested lock mode, Hibernate will use an appropriate + alternate mode (instead of throwing an exception). This ensures that applications will + be portable. + + + + + + Connection Release Modes + + + The legacy (2.x) behavior of Hibernate in regards to JDBC connection management + was that a Session would obtain a connection when it was first + needed and then hold unto that connection until the session was closed. + Hibernate 3.x introduced the notion of connection release modes to tell a session + how to handle its JDBC connections. Note that the following discussion is pertinent + only to connections provided through a configured ConnectionProvider; + user-supplied connections are outside the breadth of this discussion. The different + release modes are identified by the enumerated values of + org.hibernate.ConnectionReleaseMode: + + + + + + ON_CLOSE - is essentially the legacy behavior described above. The + Hibernate session obtains a connection when it first needs to perform some JDBC access + and holds unto that connection until the session is closed. + + + + + AFTER_TRANSACTION - says to release connections after a + org.hibernate.Transaction has completed. + + + + + AFTER_STATEMENT (also referred to as aggressive release) - says to + release connections after each and every statement execution. This aggressive releasing + is skipped if that statement leaves open resources associated with the given session; + currently the only situation where this occurs is through the use of + org.hibernate.ScrollableResults. + + + + + + The configuration parameter hibernate.connection.release_mode is used + to specify which release mode to use. The possible values: + + + + + + auto (the default) - this choice delegates to the release mode + returned by the org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode() + method. For JTATransactionFactory, this returns ConnectionReleaseMode.AFTER_STATEMENT; for + JDBCTransactionFactory, this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely + a good idea to change this default behavior as failures due to the value of this setting + tend to indicate bugs and/or invalid assumptions in user code. + + + + + on_close - says to use ConnectionReleaseMode.ON_CLOSE. This setting + is left for backwards compatibility, but its use is highly discouraged. + + + + + after_transaction - says to use ConnectionReleaseMode.AFTER_TRANSACTION. + This setting should not be used in JTA environments. Also note that with + ConnectionReleaseMode.AFTER_TRANSACTION, if a session is considered to be in auto-commit + mode connections will be released as if the release mode were AFTER_STATEMENT. + + + + + after_statement - says to use ConnectionReleaseMode.AFTER_STATEMENT. Additionally, + the configured ConnectionProvider is consulted to see if it supports this + setting (supportsAggressiveRelease()). If not, the release mode is reset + to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only safe in environments where + we can either re-acquire the same underlying JDBC connection each time we make a call into + ConnectionProvider.getConnection() or in auto-commit environments where + it does not matter whether we get back the same connection. + + + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/content/tutorial.xml b/documentation/envers/src/main/docbook/en-US/content/tutorial.xml new file mode 100644 index 0000000000..e2dfa9c05a --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/tutorial.xml @@ -0,0 +1,1617 @@ + + + + +]> + + + + + Introduction to Hibernate + + + Preface + + + This chapter is an introduction to Hibernate by way of a tutorial, + intended for new users of Hibernate. We start with a simple + application using an in-memory database. We build the + application in small, easy to understand steps. The tutorial is + based on another, earlier one developed by Michael Gloegl. All + code is contained in the tutorials/web directory + of the project source. + + + + + + + This tutorial expects the user have knowledge of both Java and + SQL. If you are new or uncomfortable with either, it is advised + that you start with a good introduction to that technology prior + to attempting to learn Hibernate. It will save time and effort + in the long run. + + + + + + There is another tutorial/example application in the + /tutorials/eg directory of the project source. + That example is console based and as such would not have the + dependency on a servlet container to execute. The basic setup is + the same as the instructions below. + + + + + Part 1 - The first Hibernate Application + + + Let's assume we need a small database application that can store + events we want to attend, and information about the host(s) of + these events. We will use an in-memory, Java database named HSQLDB + to avoid describing installation/setup of any particular database + servers. Feel free to tweak this tutorial to use whatever database + you feel comfortable using. + + + + The first thing we need to do is set up our development environment, + and specifically to setup all the required dependencies to Hibernate + as well as other libraries. Hibernate is built using Maven which + amongst other features provides dependecy management; + moreover it provides transitive + dependecy management which simply means that to use + Hibernate we can simply define our dependency on Hibernate, Hibernate + itself defines the dependencies it needs which then become transitive + dependencies of our project. + + + + + ... + + + + ${groupId} + hibernate-core + + + + + javax.servlet + servlet-api + + + +]]> + + + + Essentially we are describing here the + /tutorials/web/pom.xml file. See the + Maven site for more information. + + + + + + While not strictly necessary, most IDEs have integration with Maven + to read these POM files and automatically set up a project for you + which can save lots of time and effort. + + + + + Next we create a class that represents the event we want to store in database. + + + + The first class + + + Our first persistent class is a simple JavaBean class with some properties: + + + + + + You can see that this class uses standard JavaBean naming conventions for property + getter and setter methods, as well as private visibility for the fields. This is + a recommended design - but not required. Hibernate can also access fields directly, + the benefit of accessor methods is robustness for refactoring. The no-argument + constructor is required to instantiate an object of this class through reflection. + + + + The id property holds a unique identifier value for a particular event. + All persistent entity classes (there are less important dependent classes as well) will need + such an identifier property if we want to use the full feature set of Hibernate. In fact, + most applications (esp. web applications) need to distinguish objects by identifier, so you + should consider this a feature rather than a limitation. However, we usually don't manipulate + the identity of an object, hence the setter method should be private. Only Hibernate will assign + identifiers when an object is saved. You can see that Hibernate can access public, private, + and protected accessor methods, as well as (public, private, protected) fields directly. The + choice is up to you and you can match it to fit your application design. + + + + The no-argument constructor is a requirement for all persistent classes; Hibernate + has to create objects for you, using Java Reflection. The constructor can be + private, however, package visibility is required for runtime proxy generation and + efficient data retrieval without bytecode instrumentation. + + + + Place this Java source file in a directory called src in the + development folder, and in its correct package. The directory should now look like this: + + + ++src + +events + Event.java]]> + + + In the next step, we tell Hibernate about this persistent class. + + + + + + The mapping file + + + Hibernate needs to know how to load and store objects of the persistent class. + This is where the Hibernate mapping file comes into play. The mapping file + tells Hibernate what table in the database it has to access, and what columns + in that table it should use. + + + + The basic structure of a mapping file looks like this: + + + + + + +[...] +]]> + + + Note that the Hibernate DTD is very sophisticated. You can use it for + auto-completion of XML mapping elements and attributes in your editor or + IDE. You also should open up the DTD file in your text editor - it's the + easiest way to get an overview of all elements and attributes and to see + the defaults, as well as some comments. Note that Hibernate will not + load the DTD file from the web, but first look it up from the classpath + of the application. The DTD file is included in hibernate3.jar + as well as in the src/ directory of the Hibernate distribution. + + + + We will omit the DTD declaration in future examples to shorten the code. It is + of course not optional. + + + + Between the two hibernate-mapping tags, include a + class element. All persistent entity classes (again, there + might be dependent classes later on, which are not first-class entities) need + such a mapping, to a table in the SQL database: + + + + + + + + +]]> + + + So far we told Hibernate how to persist and load object of class Event + to the table EVENTS, each instance represented by a row in that table. + Now we continue with a mapping of the unique identifier property to the tables primary key. + In addition, as we don't want to care about handling this identifier, we configure Hibernate's + identifier generation strategy for a surrogate primary key column: + + + + + + + + + + +]]> + + + The id element is the declaration of the identifier property, + name="id" declares the name of the Java property - + Hibernate will use the getter and setter methods to access the property. + The column attribute tells Hibernate which column of the + EVENTS table we use for this primary key. The nested + generator element specifies the identifier generation strategy, + in this case we used native, which picks the best strategy depending + on the configured database (dialect). Hibernate supports database generated, globally + unique, as well as application assigned identifiers (or any strategy you have written + an extension for). + + + + Finally we include declarations for the persistent properties of the class in + the mapping file. By default, no properties of the class are considered + persistent: + + + + + + + + + + + + +]]> + + + Just as with the id element, the name + attribute of the property element tells Hibernate which getter + and setter methods to use. So, in this case, Hibernate will look for + getDate()/setDate(), as well as getTitle()/setTitle(). + + + + Why does the date property mapping include the + column attribute, but the title + doesn't? Without the column attribute Hibernate + by default uses the property name as the column name. This works fine for + title. However, date is a reserved + keyword in most database, so we better map it to a different name. + + + + The next interesting thing is that the title mapping also lacks + a type attribute. The types we declare and use in the mapping + files are not, as you might expect, Java data types. They are also not SQL + database types. These types are so called Hibernate mapping types, + converters which can translate from Java to SQL data types and vice versa. Again, + Hibernate will try to determine the correct conversion and mapping type itself if + the type attribute is not present in the mapping. In some cases this + automatic detection (using Reflection on the Java class) might not have the default you + expect or need. This is the case with the date property. Hibernate can't + know if the property (which is of java.util.Date) should map to a + SQL date, timestamp, or time column. + We preserve full date and time information by mapping the property with a + timestamp converter. + + + + This mapping file should be saved as Event.hbm.xml, right in + the directory next to the Event Java class source file. + The naming of mapping files can be arbitrary, however the hbm.xml + suffix is a convention in the Hibernate developer community. The directory structure + should now look like this: + + + ++src + +events + Event.java + Event.hbm.xml]]> + + + We continue with the main configuration of Hibernate. + + + + + + Hibernate configuration + + + We now have a persistent class and its mapping file in place. It is time to configure + Hibernate. Before we do this, we will need a database. HSQL DB, a java-based SQL DBMS, + can be downloaded from the HSQL DB website(http://hsqldb.org/). Actually, you only need the hsqldb.jar + from this download. Place this file in the lib/ directory of the + development folder. + + + + Create a directory called data in the root of the development directory - + this is where HSQL DB will store its data files. Now start the database by running + java -classpath ../lib/hsqldb.jar org.hsqldb.Server in this data directory. + You can see it start up and bind to a TCP/IP socket, this is where our application + will connect later. If you want to start with a fresh database during this tutorial, + shutdown HSQL DB (press CTRL + C in the window), delete all files in the + data/ directory, and start HSQL DB again. + + + + Hibernate is the layer in your application which connects to this database, so it needs + connection information. The connections are made through a JDBC connection pool, which we + also have to configure. The Hibernate distribution contains several open source JDBC connection + pooling tools, but will use the Hibernate built-in connection pool for this tutorial. Note that + you have to copy the required library into your classpath and use different + connection pooling settings if you want to use a production-quality third party + JDBC pooling software. + + + + For Hibernate's configuration, we can use a simple hibernate.properties file, a + slightly more sophisticated hibernate.cfg.xml file, or even complete + programmatic setup. Most users prefer the XML configuration file: + + + + + + + + + + + org.hsqldb.jdbcDriver + jdbc:hsqldb:hsql://localhost + sa + + + + 1 + + + org.hibernate.dialect.HSQLDialect + + + thread + + + org.hibernate.cache.NoCacheProvider + + + true + + + create + + + + + +]]> + + + Note that this XML configuration uses a different DTD. We configure + Hibernate's SessionFactory - a global factory responsible + for a particular database. If you have several databases, use several + <session-factory> configurations, usually in + several configuration files (for easier startup). + + + + The first four property elements contain the necessary + configuration for the JDBC connection. The dialect property + element specifies the particular SQL variant Hibernate generates. + Hibernate's automatic session management for persistence contexts will + come in handy as you will soon see. + The hbm2ddl.auto option turns on automatic generation of + database schemas - directly into the database. This can of course also be turned + off (by removing the config option) or redirected to a file with the help of + the SchemaExport Ant task. Finally, we add the mapping file(s) + for persistent classes to the configuration. + + + + Copy this file into the source directory, so it will end up in the + root of the classpath. Hibernate automatically looks for a file called + hibernate.cfg.xml in the root of the classpath, on startup. + + + + + + Building with Ant + + + We'll now build the tutorial with Ant. You will need to have Ant installed - get + it from the Ant download page. + How to install Ant will not be covered here. Please refer to the + Ant manual. After you + have installed Ant, we can start to create the buildfile. It will be called + build.xml and placed directly in the development directory. + + + + A basic build file looks like this: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + This will tell Ant to add all files in the lib directory ending with .jar + to the classpath used for compilation. It will also copy all non-Java source files to the + target directory, e.g. configuration and Hibernate mapping files. If you now run Ant, you + should get this output: + + + ant +Buildfile: build.xml + +copy-resources: + [copy] Copying 2 files to C:\hibernateTutorial\bin + +compile: + [javac] Compiling 1 source file to C:\hibernateTutorial\bin + +BUILD SUCCESSFUL +Total time: 1 second ]]> + + + + + Startup and helpers + + + It's time to load and store some Event objects, but first + we have to complete the setup with some infrastructure code. We have to startup + Hibernate. This startup includes building a global SessionFactory + object and to store it somewhere for easy access in application code. + A SessionFactory can open up new Session's. + A Session represents a single-threaded unit of work, the + SessionFactory is a thread-safe global object, instantiated once. + + + + We'll create a HibernateUtil helper class which takes care + of startup and makes accessing a SessionFactory convenient. + Let's have a look at the implementation: + + + + + + This class does not only produce the global SessionFactory in + its static initializer (called once by the JVM when the class is loaded), but also + hides the fact that it uses a static singleton. It might as well lookup the + SessionFactory from JNDI in an application server. + + + + If you give the SessionFactory a name in your configuration + file, Hibernate will in fact try to bind it to JNDI after it has been built. + To avoid this code completely you could also use JMX deployment and let the + JMX-capable container instantiate and bind a HibernateService + to JNDI. These advanced options are discussed in the Hibernate reference + documentation. + + + + Place HibernateUtil.java in the development source directory, in + a package next to events: + + + ++src + +events + Event.java + Event.hbm.xml + +util + HibernateUtil.java + hibernate.cfg.xml ++data +build.xml]]> + + + This should again compile without problems. We finally need to configure a logging + system - Hibernate uses commons logging and leaves you the choice between Log4j and + JDK 1.4 logging. Most developers prefer Log4j: copy log4j.properties + from the Hibernate distribution (it's in the etc/ directory) to + your src directory, next to hibernate.cfg.xml. + Have a look at the example configuration and change the settings if you like to have + more verbose output. By default, only Hibernate startup message are shown on stdout. + + + + The tutorial infrastructure is complete - and we are ready to do some real work with + Hibernate. + + + + + + Loading and storing objects + + + Finally, we can use Hibernate to load and store objects. We write an + EventManager class with a main() method: + + + + + + We create a new Event object, and hand it over to Hibernate. + Hibernate now takes care of the SQL and executes INSERTs + on the database. Let's have a look at the Session and + Transaction-handling code before we run this. + + + + A Session is a single unit of work. For now we'll keep things + simple and assume a one-to-one granularity between a Hibernate Session + and a database transaction. To shield our code from the actual underlying transaction + system (in this case plain JDBC, but it could also run with JTA) we use the + Transaction API that is available on the Hibernate Session. + + + + What does sessionFactory.getCurrentSession() do? First, you can call it + as many times and anywhere you like, once you get hold of your SessionFactory + (easy thanks to HibernateUtil). The getCurrentSession() + method always returns the "current" unit of work. Remember that we switched the configuration + option for this mechanism to "thread" in hibernate.cfg.xml? Hence, + the current unit of work is bound to the current Java thread that executes our application. + However, this is not the full picture, you also have to consider scope, when a unit of work + begins and when it ends. + + + + A Session begins when it is first needed, when the first call to + getCurrentSession() is made. It is then bound by Hibernate to the current + thread. When the transaction ends, either through commit or rollback, Hibernate automatically + unbinds the Session from the thread and closes it for you. If you call + getCurrentSession() again, you get a new Session and can + start a new unit of work. This thread-bound programming model is the most + popular way of using Hibernate, as it allows flexible layering of your code (transaction + demarcation code can be separated from data access code, we'll do this later in this tutorial). + + + + Related to the unit of work scope, should the Hibernate Session be used to + execute one or several database operations? The above example uses one Session + for one operation. This is pure coincidence, the example is just not complex enough to show any + other approach. The scope of a Hibernate Session is flexible but you should + never design your application to use a new Hibernate Session for + every database operation. So even if you see it a few more times in + the following (very trivial) examples, consider session-per-operation + an anti-pattern. A real (web) application is shown later in this tutorial. + + + + Have a look at for more information + about transaction handling and demarcation. We also skipped any error handling and + rollback in the previous example. + + + + To run this first routine we have to add a callable target to the Ant build file: + + + + + + + +]]> + + + The value of the action argument is set on the command line when + calling the target: + + + ant run -Daction=store]]> + + + You should see, after compilation, Hibernate starting up and, depending on your + configuration, lots of log output. At the end you will find the following line: + + + + + + This is the INSERT executed by Hibernate, the question marks + represent JDBC bind parameters. To see the values bound as arguments, or to reduce + the verbosity of the log, check your log4j.properties. + + + + Now we'd like to list stored events as well, so we add an option to the main method: + + + + + + We also add a new listEvents() method: + + + + + + What we do here is use an HQL (Hibernate Query Language) query to load all existing + Event objects from the database. Hibernate will generate the + appropriate SQL, send it to the database and populate Event objects + with the data. You can create more complex queries with HQL, of course. + + + + Now, to execute and test all of this, follow these steps: + + + + + + Run ant run -Daction=store to store something into the database + and, of course, to generate the database schema before through hbm2ddl. + + + + + Now disable hbm2ddl by commenting out the property in your hibernate.cfg.xml + file. Usually you only leave it turned on in continuous unit testing, but another + run of hbm2ddl would drop everything you have stored - the + create configuration setting actually translates into "drop all + tables from the schema, then re-create all tables, when the SessionFactory is build". + + + + + + If you now call Ant with -Daction=list, you should see the events + you have stored so far. You can of course also call the store action a few + times more. + + + + Note: Most new Hibernate users fail at this point and we see questions about + Table not found error messages regularly. However, if you follow the + steps outlined above you will not have this problem, as hbm2ddl creates the database + schema on the first run, and subsequent application restarts will use this schema. If + you change the mapping and/or database schema, you have to re-enable hbm2ddl once again. + + + + + + + + Part 2 - Mapping associations + + + We mapped a persistent entity class to a table. Let's build on this and add some class associations. + First we'll add people to our application, and store a list of events they participate in. + + + + Mapping the Person class + + + The first cut of the Person class is simple: + + + + + + Create a new mapping file called Person.hbm.xml (don't forget the + DTD reference at the top): + + + + + + + + + + + + + +]]> + + + Finally, add the new mapping to Hibernate's configuration: + + + +]]> + + + We'll now create an association between these two entities. Obviously, persons + can participate in events, and events have participants. The design questions + we have to deal with are: directionality, multiplicity, and collection + behavior. + + + + + + A unidirectional Set-based association + + + We'll add a collection of events to the Person class. That way we can + easily navigate to the events for a particular person, without executing an explicit query - + by calling aPerson.getEvents(). We use a Java collection, a Set, + because the collection will not contain duplicate elements and the ordering is not relevant for us. + + + + We need a unidirectional, many-valued associations, implemented with a Set. + Let's write the code for this in the Java classes and then map it: + + + + + + Before we map this association, think about the other side. Clearly, we could just keep this + unidirectional. Or, we could create another collection on the Event, if we + want to be able to navigate it bi-directional, i.e. anEvent.getParticipants(). + This is not necessary, from a functional perspective. You could always execute an explicit query + to retrieve the participants for a particular event. This is a design choice left to you, but what + is clear from this discussion is the multiplicity of the association: "many" valued on both sides, + we call this a many-to-many association. Hence, we use Hibernate's + many-to-many mapping: + + + + + + + + + + + + + + + +]]> + + + Hibernate supports all kinds of collection mappings, a <set> being most + common. For a many-to-many association (or n:m entity relationship), an + association table is needed. Each row in this table represents a link between a person and an event. + The table name is configured with the table attribute of the set + element. The identifier column name in the association, for the person's side, is defined with the + <key> element, the column name for the event's side with the + column attribute of the <many-to-many>. You also + have to tell Hibernate the class of the objects in your collection (correct: the class on the + other side of the collection of references). + + + + The database schema for this mapping is therefore: + + + | *EVENT_ID | | | + | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | + | TITLE | |__________________| | AGE | + |_____________| | FIRSTNAME | + | LASTNAME | + |_____________| + ]]> + + + + + Working the association + + + Let's bring some people and events together in a new method in EventManager: + + + + + + After loading a Person and an Event, simply + modify the collection using the normal collection methods. As you can see, there is no explicit call + to update() or save(), Hibernate automatically + detects that the collection has been modified and needs to be updated. This is called automatic + dirty checking, and you can also try it by modifying the name or the date property of + any of your objects. As long as they are in persistent state, that is, bound + to a particular Hibernate Session (i.e. they have been just loaded or saved in + a unit of work), Hibernate monitors any changes and executes SQL in a write-behind fashion. The + process of synchronizing the memory state with the database, usually only at the end of a unit of + work, is called flushing. In our code, the unit of work ends with a commit + (or rollback) of the database transaction - as defined by the thread configuration + option for the CurrentSessionContext class. + + + + You might of course load person and event in different units of work. Or you modify an object + outside of a Session, when it is not in persistent state (if it was persistent + before, we call this state detached). You can even modify a collection when + it is detached: + + + + + + The call to update makes a detached object persistent again, you could + say it binds it to a new unit of work, so any modifications you made to it while detached + can be saved to the database. This includes any modifications (additions/deletions) you + made to a collection of that entity object. + + + + Well, this is not much use in our current situation, but it's an important concept you can + design into your own application. For now, complete this exercise by adding a new action + to the EventManager's main method and call it from the command line. If + you need the identifiers of a person and an event - the save() method + returns it (you might have to modify some of the previous methods to return that identifier): + + + + + + This was an example of an association between two equally important classes, two entities. + As mentioned earlier, there are other classes and types in a typical model, usually "less + important". Some you have already seen, like an int or a String. + We call these classes value types, and their instances depend + on a particular entity. Instances of these types don't have their own identity, nor are they + shared between entities (two persons don't reference the same firstname + object, even if they have the same first name). Of course, value types can not only be found in + the JDK (in fact, in a Hibernate application all JDK classes are considered value types), but + you can also write dependent classes yourself, Address or MonetaryAmount, + for example. + + + + You can also design a collection of value types. This is conceptually very different from a + collection of references to other entities, but looks almost the same in Java. + + + + + + Collection of values + + + We add a collection of value typed objects to the Person entity. We want to + store email addresses, so the type we use is String, and the collection is + again a Set: + + + + + The mapping of this Set: + + + + + +]]> + + + The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection + does not contain references to another entity, but a collection of elements of type + String (the lowercase name tells you it's a Hibernate mapping type/converter). + Once again, the table attribute of the set element determines + the table name for the collection. The key element defines the foreign-key column + name in the collection table. The column attribute in the element + element defines the column name where the String values will actually be stored. + + + + Have a look at the updated schema: + + + | *EVENT_ID | | | |___________________| + | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | *PERSON_ID | + | TITLE | |__________________| | AGE | | *EMAIL_ADDR | + |_____________| | FIRSTNAME | |___________________| + | LASTNAME | + |_____________| + ]]> + + + You can see that the primary key of the collection table is in fact a composite key, + using both columns. This also implies that there can't be duplicate email addresses + per person, which is exactly the semantics we need for a set in Java. + + + + You can now try and add elements to this collection, just like we did before by + linking persons and events. It's the same code in Java: + + + + + + This time we didn't use a fetch query to initialize the collection. + Hence, the call to its getter method will trigger an additional select to initialize + it, so we can add an element to it. Monitor the SQL log and try to optimize this with + an eager fetch. + + + + + + Bi-directional associations + + + Next we are going to map a bi-directional association - making the association between + person and event work from both sides in Java. Of course, the database schema doesn't + change, we still have many-to-many multiplicity. A relational database is more flexible + than a network programming language, so it doesn't need anything like a navigation + direction - data can be viewed and retrieved in any possible way. + + + + First, add a collection of participants to the Event Event class: + + + + + + Now map this side of the association too, in Event.hbm.xml. + + + + + +]]> + + + As you see, these are normal set mappings in both mapping documents. + Notice that the column names in key and many-to-many are + swapped in both mapping documents. The most important addition here is the + inverse="true" attribute in the set element of the + Event's collection mapping. + + + + What this means is that Hibernate should take the other side - the Person class - + when it needs to find out information about the link between the two. This will be a lot easier to + understand once you see how the bi-directional link between our two entities is created . + + + + + + Working bi-directional links + + + First, keep in mind that Hibernate does not affect normal Java semantics. How did we create a + link between a Person and an Event in the unidirectional + example? We added an instance of Event to the collection of event references, + of an instance of Person. So, obviously, if we want to make this link working + bi-directional, we have to do the same on the other side - adding a Person + reference to the collection in an Event. This "setting the link on both sides" + is absolutely necessary and you should never forget doing it. + + + + Many developers program defensively and create link management methods to + correctly set both sides, e.g. in Person: + + + + + + Notice that the get and set methods for the collection are now protected - this allows classes in the + same package and subclasses to still access the methods, but prevents everybody else from messing + with the collections directly (well, almost). You should probably do the same with the collection + on the other side. + + + + What about the inverse mapping attribute? For you, and for Java, a bi-directional + link is simply a matter of setting the references on both sides correctly. Hibernate however doesn't + have enough information to correctly arrange SQL INSERT and UPDATE + statements (to avoid constraint violations), and needs some help to handle bi-directional associations + properly. Making one side of the association inverse tells Hibernate to basically + ignore it, to consider it a mirror of the other side. That's all that is necessary + for Hibernate to work out all of the issues when transformation a directional navigation model to + a SQL database schema. The rules you have to remember are straightforward: All bi-directional associations + need one side as inverse. In a one-to-many association it has to be the many-side, + in many-to-many association you can pick either side, there is no difference. + + + + + + + + Part 3 - The EventManager web application + + + Let's turn the following discussion into a small web application... + + + + A Hibernate web application uses Session and Transaction + almost like a standalone application. However, some common patterns are useful. We now write + an EventManagerServlet. This servlet can list all events stored in the + database, and it provides an HTML form to enter new events. + + + + Writing the basic servlet + + + Create a new class in your source directory, in the events + package: + + + + + + The servlet handles HTTP GET requests only, hence, the method + we implement is doGet(): + + + + + + The pattern we are applying here is called session-per-request. + When a request hits the servlet, a new Hibernate Session is + opened through the first call to getCurrentSession() on the + SessionFactory. Then a database transaction is started—all + data access as to occur inside a transaction, no matter if data is read or written + (we don't use the auto-commit mode in applications). + + + + Do not use a new Hibernate Session for + every database operation. Use one Hibernate Session that is + scoped to the whole request. Use getCurrentSession(), so that + it is automatically bound to the current Java thread. + + + + Next, the possible actions of the request are processed and the response HTML + is rendered. We'll get to that part soon. + + + + Finally, the unit of work ends when processing and rendering is complete. If any + problem occurred during processing or rendering, an exception will be thrown + and the database transaction rolled back. This completes the + session-per-request pattern. Instead of the transaction + demarcation code in every servlet you could also write a servlet filter. + See the Hibernate website and Wiki for more information about this pattern, + called Open Session in View—you'll need it as soon + as you consider rendering your view in JSP, not in a servlet. + + + + + + Processing and rendering + + + Let's implement the processing of the request and rendering of the page. + + +Event Manager"); + +// Handle actions +if ( "store".equals(request.getParameter("action")) ) { + + String eventTitle = request.getParameter("eventTitle"); + String eventDate = request.getParameter("eventDate"); + + if ( "".equals(eventTitle) || "".equals(eventDate) ) { + out.println("Please enter event title and date."); + } else { + createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate)); + out.println("Added event."); + } +} + +// Print page +printEventForm(out); +listEvents(out, dateFormatter); + +// Write HTML footer +out.println(""); +out.flush(); +out.close();]]> + + + Granted, this coding style with a mix of Java and HTML would not scale + in a more complex application—keep in mind that we are only illustrating + basic Hibernate concepts in this tutorial. The code prints an HTML + header and a footer. Inside this page, an HTML form for event entry and + a list of all events in the database are printed. The first method is + trivial and only outputs HTML: + + + Add new event:"); + out.println("
"); + out.println("Title:
"); + out.println("Date (e.g. 24.12.2009):
"); + out.println(""); + out.println("
"); +}]]>
+ + + The listEvents() method uses the Hibernate + Session bound to the current thread to execute + a query: + + + 0) { + out.println("

Events in database:

"); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + for (Iterator it = result.iterator(); it.hasNext();) { + Event event = (Event) it.next(); + out.println(""); + out.println(""); + out.println(""); + out.println(""); + } + out.println("
Event titleEvent date
" + event.getTitle() + "" + dateFormatter.format(event.getDate()) + "
"); + } +}]]>
+ + + Finally, the store action is dispatched to the + createAndStoreEvent() method, which also uses + the Session of the current thread: + + + + + + That's it, the servlet is complete. A request to the servlet will be processed + in a single Session and Transaction. As + earlier in the standalone application, Hibernate can automatically bind these + objects to the current thread of execution. This gives you the freedom to layer + your code and access the SessionFactory in any way you like. + Usually you'd use a more sophisticated design and move the data access code + into data access objects (the DAO pattern). See the Hibernate Wiki for more + examples. + + +
+ + + Deploying and testing + + + To deploy this application you have to create a web archive, a WAR. Add the + following Ant target to your build.xml: + + + + + + + + + + +]]> + + + This target creates a file called hibernate-tutorial.war + in your project directory. It packages all libraries and the web.xml + descriptor, which is expected in the base directory of your project: + + + + + + + Event Manager + events.EventManagerServlet + + + + Event Manager + /eventmanager + +]]> + + + Before you compile and deploy the web application, note that an additional library + is required: jsdk.jar. This is the Java servlet development kit, + if you don't have this library already, get it from the Sun website and copy it to + your library directory. However, it will be only used for compilation and excluded + from the WAR package. + + + + To build and deploy call ant war in your project directory + and copy the hibernate-tutorial.war file into your Tomcat + webapp directory. If you don't have Tomcat installed, download + it and follow the installation instructions. You don't have to change any Tomcat + configuration to deploy this application though. + + + + Once deployed and Tomcat is running, access the application at + http://localhost:8080/hibernate-tutorial/eventmanager. Make + sure you watch the Tomcat log to see Hibernate initialize when the first + request hits your servlet (the static initializer in HibernateUtil + is called) and to get the detailed output if any exceptions occurs. + + + + +
+ + + Summary + + + This tutorial covered the basics of writing a simple standalone Hibernate application + and a small web application. + + + + If you already feel confident with Hibernate, continue browsing through the reference + documentation table of contents for topics you find interesting - most asked are + transactional processing (), fetch + performance (), or the usage of the API () + and the query features (). + + + + Don't forget to check the Hibernate website for more (specialized) tutorials. + + + + +
diff --git a/documentation/envers/src/main/docbook/en-US/content/xml.xml b/documentation/envers/src/main/docbook/en-US/content/xml.xml new file mode 100755 index 0000000000..3bd340a4a0 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/content/xml.xml @@ -0,0 +1,313 @@ + + + + + + + XML Mapping + + + Note that this is an experimental feature in Hibernate 3.0 and is under + extremely active development. + + + + Working with XML data + + + Hibernate lets you work with persistent XML data in much the same way + you work with persistent POJOs. A parsed XML tree can be thought of + as just another way to represent the relational data at the object level, + instead of POJOs. + + + + Hibernate supports dom4j as API for manipulating XML trees. You can write + queries that retrieve dom4j trees from the database and have any + modification you make to the tree automatically synchronized to the + database. You can even take an XML document, parse it using dom4j, and + write it to the database with any of Hibernate's basic operations: + persist(), saveOrUpdate(), merge(), delete(), replicate() + (merging is not yet supported). + + + + This feature has many applications including data import/export, + externalization of entity data via JMS or SOAP and XSLT-based reporting. + + + + A single mapping may be used to simultaneously map properties of a class + and nodes of an XML document to the database, or, if there is no class to map, + it may be used to map just the XML. + + + + Specifying XML and class mapping together + + + Here is an example of mapping a POJO and XML simultaneously: + + + + + + + + + + + ... + +]]> + + + + Specifying only an XML mapping + + + Here is an example where there is no POJO class: + + + + + + + + + + + ... + +]]> + + + This mapping allows you to access the data as a dom4j tree, or as a graph of + property name/value pairs (java Maps). The property names + are purely logical constructs that may be referred to in HQL queries. + + + + + + + + XML mapping metadata + + + Many Hibernate mapping elements accept the node attribute. + This let's you specify the name of an XML attribute or element that holds the + property or entity data. The format of the node attribute + must be one of the following: + + + + + "element-name" - map to the named XML element + + + "@attribute-name" - map to the named XML attribute + + + "." - map to the parent element + + + + "element-name/@attribute-name" - + map to the named attribute of the named element + + + + + + For collections and single valued associations, there is an additional + embed-xml attribute. If embed-xml="true", + the default, the XML tree for the associated entity (or collection of value type) + will be embedded directly in the XML tree for the entity that owns the association. + Otherwise, if embed-xml="false", then only the referenced + identifier value will appear in the XML for single point associations and + collections will simply not appear at all. + + + + You should be careful not to leave embed-xml="true" for + too many associations, since XML does not deal well with circularity! + + + + + + + + + + + + + + + + + + + ... + +]]> + + + in this case, we have decided to embed the collection of account ids, but not + the actual account data. The following HQL query: + + + + + + Would return datasets such as this: + + + + 987632567 + 985612323 + + Gavin + A + King + + ... +]]> + + + If you set embed-xml="true" on the <one-to-many> + mapping, the data might look more like this: + + + + + + 100.29 + + + + -2370.34 + + + Gavin + A + King + + ... +]]> + + + + + + Manipulating XML data + + + Let's rearead and update XML documents in the application. We do this by + obtaining a dom4j session: + + + + + + + + It is extremely useful to combine this feature with Hibernate's replicate() + operation to implement XML-based data import/export. + + + + + + diff --git a/documentation/envers/src/main/docbook/en-US/images/AuthorWork.png b/documentation/envers/src/main/docbook/en-US/images/AuthorWork.png new file mode 100644 index 0000000000000000000000000000000000000000..ef4ab7227ae9e9a7b647f8bef39b8f76abc7ba64 GIT binary patch literal 6000 zcmcgwc~}$KvS$zbs=xq(8zQobBC^DY2UM(rYPfJ;?f-8F1Ea7dFM=O1y6#fG z1O*9nT(+2`DP6CvTp{D4h-U+yuZTe}b3~(Ulybg7+(hrf821n6UIqxMZ0y@^+3$my z0~oM4$XP6w2SYo$$v?5KRj9=@~3NG&2PvIo)#o%ljFqx~H!2`%fP8FQk9ozz}2rnsvzDF&^fJHs9jQ0C| zMAIrfS_(%6+SpRDWs!@NT_L;>CvW!)HZ?NBZpo{n@|10&piZ7K1%~73yHd zN17sARHfOEics=*V|k(qm-N=qN^ww-SjQ6YgRISGi5I~j(049+U6p80)AHVo`5TYR z?Ji!(rPVM1N}~avi25u7xarJl=+cI4kE=A1t^V7Pu+j4y3@v@4Rq1K?cQkbdli!67 z$$lOAtrG*9kG~AoKE0*&SmN_a#F~wDWDx{^9Psh%&xF>v!>!{;d!c@`%Uuiy=5?n1 zmXY%0O3jv4%tY4Pdxk$^NxLBiTK+DQ`c37>dsgnl-*2uhP5gsXttO@raK-Lrg>YbFQdyFiZL7 zp-{tqG?53s#+2S#aeP02k`<%AzNP(6i|5MuESa2fWYx0g8%mGW!ncN6Pq}x0w zsxRvi(&l&y*#RnTFv>?6Wa8)>PQalZorhxKA%j@VUhJ@biA>~@GFeKdF`~dae82XA z!FI~f9@*freLoqBg&q?EaS|F>20n@v-pds*fqbxt7VD9>B{^jSH2 zki|UOng`(ylZTi$o2M|Jv_QRhwzCofo2LUC+xCME%Sic3On_+dfhfu&q%#LWPlv>x zja6QrCdQ4@a0%IC9#i;5@Jnf4jhXx+<97L3s;>k)tb^w^u$LuSZX5K+Slyu24vJEM zS4z0~c9>5w*8)Hv3HZZj#c17}&2LE*Ud~oH{4-r?hV73PJ6F0czT5eH$&?oQB-iI4 zWU{q>yT!1t%#AhmcsO5SB;xXBSm}|W8txRQs9gx!KRk9r7lj0g{T6tzoqX-_dpLd| zc}a*fdEucEWCnfoy-}wfUXJw#wa!|X%SK|Wvx=>^9+g08MyeaGlZ*lvB2bETs3--^ z+wLO`AdtKJ?#u@Zsd0Ih5Dft}<(D?$bBc!XLHSqjdP0;~MCGtdW1kzy1&AjyxUS(( z-~8oS^x7v-cRr?z2PQQ6Zq9wHyho@aQtZVU!kEil!1T=LzS75WRAj$fhdWW4Mv-^; z_JZ6&$xmf$0MX1b)g(9Ja4rP@X^B!o$Gq`%4Mrw_Qkk| zsx(i;K-|#ST}t$MR*jZ|Q#g`Rdpj+eYM@saUHxEQQlH3+gpuXzEt_9?lw+yBlI(q; z1YTUjQER0Be%h2ZWO`0v6WKewc^rlNuTCZu$^^YWBISHyL@tUQ{jD@6?c-i3z6#AF z`Syfp$0zz@-*t)A!cbXn9U|yk0K{qIBXk1C(E)h``C)#I_(AEc+Mpq^8RAg)>+BfvKDEJ^tgQbKc5aTF%Em+A{W@>ZMYyoLh zppW?w)Ely(0ZIR(EM&lM7V)1F7MX+Yk*4DN({4-)b!fB@ zjv>tMVC|{nI_J&elzHw!z+GYi^Kc!yzQ0iQ$4@n>&-6;V73%A0+=%a)6Z(o3?KG`d zhCLC2BX*-QqMDvI@bn6n8j@u0Pcfn5w{WhnZg`Xhb=Qepe)I7D=w%sr|0S(Rz{4Hu zjy=d&n@d$d$y6RhDtw)Pfw-IF_E&psmHO{5b?L5~49?JD&QLM(FZSKHstA5|AEOU2 zqmVXYEHGMMz1D2lg0z?Qd=;h_-bm+GzsLiON%3SaE5IdJBJLcGKbeOJL)IILV=E|e zi;73B9=0_rEkr9R0$AvxXF%tKL#cSPIeu4_LYS-+CX4^xxLf^RdECilWXmi5xe+y- z2O3RwN_!h`b^B#{VD_qrZzEM?o&H+xHUW5o>{;K)-i*+Ieu;BDoV1-)_-{;8bMH_KUD146pelqjOK?es?-U3FBi0$x^mZ2Rd3bR zhMMF1DqM>^HnLOfF(t)a%CM=Do+A9rnBwCk7ytpz{~+Nw@pb0`?hdw+;&; z-Dh^yGX%&k%(S<6M2@r6_uA-50u$ma{1#B`p}N*|`_|-6*q<0~u3_=jeel-r(gIwm z`RxZGi!ay3di9|VVx@SSQtC!64Gp}1^3*x)GDW2nm9w`07kvvlMz>*hrxgcckXMp6 zt*yy9S{99&Or-5$*85Uxgo&k{{Ku}JCgIv#(|^ZDFL8~xeQ)tju7$3kZw47ZX#+UC zn$rp zQup#SX5JDXQe~Zif{T5Qi6Tk0Jcj+NASJ<0hDZGeK^i`kN@DhG*M9$YUvsERC0~Mm zjIq!X<+H>Z|8Xvy1003?vy1t9YIr2`m>iDfG= zizy)`EBo4zk?VgOrtZkh1-gGT57md_;3?ZIg$?tM7*ywZlY#3(EYv0nz9om&vG7~C zVPF;~!7~8G*#=L&T-zsXN?uNTJU-HE?inftS+i;uC#pXi=~#S!DVxc=H8iWzs3~4P zrNlDfB&s1KB|&!9MZxF(fHLlH*z92EaWN<_lJW?kis{P2(avdCKl?RQw~Ip#K2CEV zxuJOB#J&pR8EX1O%x_% zLzeOBzkzRh?On};Scdw;-}GK)shoK~YU}6s4Os7d{(5Knpqxxn;d^0`=UTZ3u0D?u zn;wW+gNT88br0GFq0ppQ;?|6I29c$Dq#NHSxhQThe&Lpeg=Z+0Sa6B0(6LUoLX_u4 zbV}IrO~ScJTtK%F^h)=T-157%5bq`txj+s8w&Q0R^0OK;lQcut6DB=If9?asxQ+Mp z{HV6SG9)W_k5lActkE0eTxZ_~dkqJ}dEevQKvg8MW;|_QrR&AaoD9cz8P|*+c^x|j zFlwC`H;D~3iK2H^lRu5L(zj7kqcUm!M^{LMo!~mCpA|}dE656GDfAnGUc3q|kEdi{9%YSC^IV9gdw7l15sZ%~=L*_t0QqKnWfk*UCWQ?4J67ctyu&H?K)h&6WRt?VlS4UFtec zGCwrXm{907&F_&20!y)y(Seaf)u$wU)(a(wI7x(>USgyKtF!r|^6@_E>FWAIFTKY2m>`u_OHQ`2)B>V;S>|4e98gCfx zgJmEHoNqr-4mcfb_}?O8%=gYx|7!tg@0J(W^sJktB% z)h!?HLt1)lbA~_93BSE;7xjBRbuuU=@H1m2H#HYyIqX1?!1?fi`M)q0SJp$hg7^^o z(u^qL+7oW}8sEXrkGo0upLNfMnS_X>pc$OFhu0)oH9q2Qg*)9+9o~sSQa;kGhTDo+ z79=r<-N7L-?f>y%-BR{mKrTuUD#}#6gJ~RR2`7^9i$w-C=8q~%h{~ZoKSJR{WWB4O z4|(M!O6b}~*n2$~to9?E{WkG_tYx9X6C7H}m#;?=2j*REdv|P+trJQ-spkE5*gnZe z2RtiLJgj85Ni^fNAhFFnugNs7ERvGBcoFn|a)Ec)c{1hI*X#U1{jqK<`>JDwn>^s= zxvf_NhCCQf;9O6wOjTP!5{>4qs(Oo68+kj3u()GLPz>)*BNg~%yUB|%G96U6AKb@Lb{exWYn(qjB`V? zt~nfKQwQqg($UAGMu10GsbMrUX&_Dn{VsV#A_J!ly0tUJ27wPJb8p+QoM%@nW` zZgtJ7ig_y?-0u1@J%p1T7@KIIWhq5bT(Y#d*j13G#V*S-gdnNnpP<5aH+&0luFCJ& z1;3T|Gn~joJwR?K6ejElF34YrH6-Eg1#rVH&eD?y(7sJ;qG`Nvd?5V zeRo!A_?Dwt@0{*l$OG415CJw_v!3cIN>|SI&Tq+9DrH<|<%iOmxgpJ?#$hHW1D3Tf z4N5)D#Z)SQhAAkPn00ts->+ie=HOA#ci)zG^^|kk16;gXE0lx$x2au zhH_7V6Jf`$;ff-+scYK#v$yP^uL3L^+sWf}2Xysmset<@Csyd9a^yo%O5e|^v8>5_ zxT`kb>5z?Pf2f8<06E*q%*w}gIXGOrKHo~LuKHot%L{ipWB(98FZKB)m+aO7wvMZF zt9*AB`Tu3-)0-DCzEs=BEDHU?%MKiaq`u`mbQu1sJvUU8o|V)m`5fxzCTbg zeTq4HBAr+&o@eNNOedj-@vv6hw9u0e4LqC{fQkrg_KLt+rx_x-%===bQlQNcSylAD zAcZEwK7+9A{_4xgF7*m)k+=8Y1B=AeG4qIe9;hfgcUNY?mhItfMHjl%NqFIeRldJy z$6naSD*IURSR?fO3>RD5ABlaE>gU!Rk4L06Hb(@I-Whr8>R6oB=%tGSLB zuzzLdsrtf0VDo!^`>N!n8ZoHowR2M6`SZOM`4NqdTtvA|UY3nXmBQmME(Sn=8J36m zZY95PJ4vzaS#C-*C9Er`OFt;>b*&wbah@NHa}C>Q_2P7}7uv?F1qfzqe%&;T`=5Kt s!@4YyYuoy89rz1N{x`eM#Rx}CqVUzTP53Exx18gwsnzMyQ|{6K0iLOqX8-^I literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/AuthorWork.zargo b/documentation/envers/src/main/docbook/en-US/images/AuthorWork.zargo new file mode 100644 index 0000000000000000000000000000000000000000..f249b229518e35bf28becaf24bc2d04bdc18e0dc GIT binary patch literal 8387 zcmZ{KWl)?;w>9n(e1f~XyW1dxyTjmv4DKEv1cE~XB)9~3cXtmA!Ge1T9xQyEA78!a zzIE^J>guOu*VDDDWz|}(sfvh12#5BXybJX?;r?Z~uirA>UJh;^25uhCoK_z8Zr)lm z&XL@N-FG#96Tv0@05SOqO(WL4s}HjKI;(IFj_n1?U}Rad0KEMLwHbV^ zv0mz6pT`O3ZT!w3uvjrFCy%Wcyxom4Z9-uTv)wg{y;i$qLhl1JpY}H2J#7%|t`ANR3PMqAP}-_R&%;1AsY&Z0 zkH+A=z`ylO(veC9Ptp{eEtz-(9vKlxheAn72ek=>^SN_+_e?^~^%f|6o17$_-%W?- z)V~aT;nqJ=r3>h6m!oKT{H?mFsfvm=IylWv3J(YO^qMvQ&#>bB&#?NrIG&lAq^>p- zg`BIsMB0h!FyOKg{9K2oLP?o+KEu>^ruJN7RJEL!jJ1l(ZrXdgsl5?_a0tb8=!CUg z%|&wfa5M1JH)1v2fgw3KUsHmT?Hc-|P~`aQqa(q@_B&p;njsgfXNf|6?!VVtLZ2rp zq&B-K#HC6KNhK&#&Py7GCN?*oO+!-ma0^c_taS0G3r4^^iQ8cL5OSQjv>^6^5r5zv z4J(Qi;~io=DlFjrbLK~hKL^<+mwojyyN;1E_nmVi^rTGwH~!C4!XGjd$0}nnc%yG{ zPjXWZ{4+?Ro`SX4nC2in%rQ?&UsKM_yUMhfFXy7srI8Dq}7pBtCw>Ta2y9 z9$BfR24_2usdRQGP=+Wo9ISmLXbjJfkA(gw6X^SW8IWjmbo6^`sRDjzKHgFbMXvKlP_~qSCl%sAzHgyYIw_U%Sp$w1qSdagOrDRloo8~!KJI~8rQACbKE0ZcvaQZ zo9n{AuyI^ngIm@ay`gj zL)gq(%&1Q8i~8=L!Y5wN`O>I9UNe{-)k#!X<&Fkps@2Yl$EoKVOkiE|r*zTURB=@o zmQdyWF^Jk?*pH>eN(xT}sG3hLJC!*7(CUSO1*SPlpqcZ4c@mxAnEb?}mFk?S$=~g9 z$pTEJ`acEDiiTe~Bo6i&(OfID$Ew2^dKvV&4@+a=JvxIARm!aNhI_B=iMh;n~E*&0rRDu+*n3-g? zez!zf2qHBZ$cj{4MXfn3$+(X9XdFS*%qBx=DEwkWc+?~#u5}3{NgHCONTXvj9Ui8i zbj{c&bkwZjvwe&oMH^0uzEX{PY&L(VCPzcIKYu0zljkRsL=rvUN?Q#Nrfk~?R`X=d z&O1`z=1euTpOs-zLKXOCw!v!AGdPMX8M^%CB1UtOG%emHfX(A_>xT!|;}eqRJcIg* z49A_|C+c^C+`wl*^6(R3O*?rcsq!o&IxzCaOO9npqguJUq`LcG1Y_~a@WX=FZ z8fR^f*EX>#Sw^taaa1dTou5@1kJhY5g8 z;6AkO4d^p4k^5pf1MDW;v{?b^w`KUpyHLrgZu+rp>267z)*q1qtOOr@qXe)9mej|c zm%+7qeCBSSy8)>i1{ojAGdB*rd!>?KEaWKcsLp7L$@n=UKDb0IxPoe@?#Dic1KdoY zRP7&4ZDb$gO4Y@J_S-586~oc8mPH87-m!C1DO^bx&NX*;NXZkbYgUAo_hX$du4yXz z?=ZU=Chhu&>|qPCt!xpB98-5&j+?;b_NLC0RA>g2a!9F`xZ^LEigaf&_jSGz`wmeS ztKyM-!iB)H0t%N1<7M#g1yzH!d#Nwp{T>#GEW&rVJo`e+_NP1inavIpb8U_Ay`(`XD1*1;hD=FG3c7&GY zk$h1paz>>Jk9n7F-gi}!RDn|y{*tE^YuBbXJcvK#pPr3ETlyP!pdS4Bg?7q#zc^Rw zW~pN%cYnJXqcZGDdFS`jMSnTMsei8qt;o09=u?~TXwF?D*kE<*A|9Wkxqj0Bf2`O` zYvZs-7Om~a4hP=qO`c*}AyV5UK-cpl2CS&~9%U`z06Ij=SrOrq6##X>oruXUJ7LMC znYbviEaRyHsr{3*{D^E{UuZ#8S1*t9c=m@@45K{jW^*(XXJJ8s3MDr1XnjCgG7Tnx zZ&P`XJrbgLEJJZ z+d#{7yn4MsJw@ei3^@u*+bC*GZrX%7ei`{Aeq?~GS<}2#T9upfSrzw95OpN{2{jC{TuFC#?s1E z0i2yn7j1JfTB{@J!YTNMqlVTnrg8u=HvL>{8ZKm^H2cf7{lZ8sOBs6UV!QxO!;uh+ zUc8P?2Xal$9h~`FtDiZBAR}UD^60wkG=rL{pQ6WmT=I(bpN|OV@(#vXD@jJbw}!Li zi0<5Je+hqQ;w3^PPzn8H)&m^76@Fpb{#7>jO@JR#sNZ_Im|LDKrXg-nM5hABIuTlioRn zFC0F=!f@JZMM^oD4$=g03g-k^^t`A$yfE9#3K{kPn)QdDBA9eCzBCCS+myZ$Y%o$u zi|~nKv%oQXFMNLsB2pbf=7?JYbl@WS>cBmQ)>V5|F(Nw;=LamLkI@WeF8JhkBodD~ z)zEF~y@;rjiS9=H_!a-NtdgIc9$j0TIs?w}*JhdsUx22rO=y=P82SU`=JD<}y)3OV z&78mh5X zY!0&qlju zcN`eA;^hH%Szjtb&_fTl!D)Txre8P2NZdzk6Xy0TeK>RX;-WU%jgcVhl?qFXze3+{ zYiQ}@F~7-7Cn@p`=tf;R7qO;*l)g$dqi96WQmkJ{lJZY#TwH+FJw| zsKiw?FDA@RKbUE*Bg`8?vFy`BW1!1Eu}Sa%s`>?QFn4Jd2?X{HvtuPq>Y9Z>sPvGm z!+TV9ZN`-`dcE`K8y`8z^r05&r9Hhfw>%dzHNQ6hJ{qhTmhT~16s2Y9p{#Xe;6Wz- zJf$hj+d48A41)y^mZ>v2Ezy?gewV$>L97s!>FF>Ee4INzYWu}XErrphQln-a-N*_c8Kdvqp@v*EP?Bet8Yc_-V*~CbIkinu6M3JjqLM|Gr=tI^f;h0 zs9{w$SMhtXR?%dZlUq3ty$+fpE{5GGX~V)oXISeyoN@0Zgy zV8(Yw8%4yn6qQE)s3B@eR7@OU$7*qaGH20lAa*}p1 zZ9}8335rVh9A}fdcxk*Ot=BN1t7&?I$K*eyXT{^bWX&*u0KY(<(+wP#H>N}T+2Z#> zHWhTI9%>`c5at99LvdUU8`UNgIY%5??0w8(V4zB-K5qinpXRAql!nU7;BTnL(Ht;d zT@4#VVvI&C6A-S_hnPD2^KM4dz*HxJ;Mkj;-mE zoe4P+D@^_mx;6lhBuRvb*nzQ!=yxD&o~c7OwPy}+{*IY>XygzHzBRLH+f&4m+vsuO z-)PZA>IrxJ1A5DZfkQWS6=WHEo`U{9-))uen7tF$NRY8CK|mD?;L&Et(Ips&{D{~# zf2-s@_62_*6(M272`d=hCgiscGu$LDh&xIJgZ<^qQ5XsSAk}H@Z@!7JJn8rodtFk1 zPWK&qh~Sb}dR0-LK!T-7D_WgyjcN2&<&k8wdmo_r-3R+wWn&%gDNeL(nqg>R1WyEX z*-}{q8~GFuD{H2z4j@_MPIpop0`}K3fBTRx(c1Odu*ciq2N;swz=+ zq`gXXDps$yGsZJctmXJpPxgB~E@-sH(pP9>CJSQ+A8N9~7@8SeGAlrVmLJAJ4ra$F}2uaM&9ZJ`BP%LZCgo$ zAO!}TNd-T>vuEJBz9Y;oOpm8V)Mv+o{fiJMs$lWbo+W=)!UqB1(y*TF+D)mRF=jrl z7=M58cl9l&i~Cx{iWf1gtv12umr}6ep2V#b zJ}h&xgS?~%zkg_ra8fTVHHIFTEk4ahSKHwoF-d?aFM$}}`-{Mk$X%*#V#YzLsyE=2 zU@urV_{i5-TW8h^mv314n4yYh7qcT5v1|qz|;_cxoU|{8N*=c z!z=C$Pmx{tC9K+kTG3iVc=F@aw#yts)? zt6!}(0`6Vir{2f}y9?gL*ZbCgS$+Ius^gY?$$xBI_AUC{}Gf zQlsCKXHC)@U{pKIKxG+cHaoEx0Vmi5N0!sSMEG#_4u_ef*KAJfE!zv{);kjp`>ATM^ID$GrdGQ7Gq(I60fXwZUI2T9-8D%h7i8xPlJ3o) zJEPm9tP7AVECN1;hPHkin&e=LxdDXbtTDW{x(eKSS~-cm9)`y8RnQCAMbnoEoCy2M zGr~raR~FD`lw(-%QiY4afuni27z%e;F3)j$w0jfO1hc9ler!8*+;T$8SuE#iMAu}w zEsir7usePeS*jlPO?&=3Cie=lJAC_aER!ZYW40^DayDG53;L>(*8x3fip-gOm}s-; z)Jx?wdJ)&4(`6-|PAR-wrg_h6hA@DW^W3+k3J2QwT#_*ihe93V8}7RcelKgqr!`sz zg$RI##A#L|&SV{(O$Xphhwr;|cPve$e&iHsEeXeyE*I%?Ym7Gc8-GpGyupXwyj_Tb zAVKy#@G)N(n%a6%r|T*bO*Cb3giC~bOk>`GbvjW|6f{D5r@6p2$e{X1FMx@a5t%1d zK!3+uerW0ph9jNwF+p@uXM+BSTN}Gt2v|zK!~FLX=<_fe=20HRj{!8iwU&AV_8@gn zaWhPG9Y?t8t1_uC6Lt4uX2lS}QySPe5{tL&+;WI3jIib_z^XmXOIf#{~r@W(;y@! zyS)o!@5_nnsvu$5%N+~<3-gaEA9@v9TOnXwlNpcYSzPgeCYAyF8pRU_FM;*2#q?2s{q@&_xxlDKGr-qiNm6w?< zMi$1_5OAXSMjDvpX85Q2=psWno>zZbOS@S@epwo>MjkCDB8=M^GhQ``Z8820co$yy z^GtNSUyl$paJo8V`Af->+t2I0hL{EYML^TNL{IdGZJ~3G_;XpzCtUvAw;Ox|9;Q!I z6rrrH!Kp}BA7nh$^X`MpP30}!fpE;XlLO5Cf7WjKKW-y!2DXr7a{MK)J=hD3-?r!nwn8B%(7c0D-~*0WF?!feDpGhI|&2#?TXvdAi6fs&gz>?BM@4VSCO>j=Mt*THPBU1HGEk2TMs~1{qRz z;Pl5#dW{|$p#pzW2tgCJ6pzp+X83#y4`n_kuSoXt%vDS)@Ad1xo(h2D#n4cr41P-|0L;3z?E?woQ}oblk`P>2@h+1XC|k(U5OD;Opl*kVM| z+=>DsZBZ6+-QvNhTucu&Mp|)eVA5Dc=F-M7pPBzCTs*kE1(A)-6{KB_8@1681Fwxr z)ih)a107W@kd5e?3YA@qs(oNbIAX143KuQZ%1nUnwkb2c05S)qM6zeZx22biTnW0` zu4UtA4tMmj#u5kJB?H&=N}fO$z!VdOLoS44*5L zL3x&IevCQ2#$7q1;;mHFzin?u_N;SGylAQG%7kGLW-Vx)%7RXRbjT>%`J7o_v+dLG z1PbVLOmbEVbr2yLmzx>Z_%z9lQE@tlJDqXjE&{tSMY^0#Vv$+z%{pM7q&=7-J#1;s z#v;7yM{Y^j-7v zLF=&eIE93g+23(jdqOq02~ty$&t`1S<7Jy=K-}Jn0V3_-;IDyYcbxfKk`hq~Vi}io-k-~suCC<2Tt5NkwqlPJq?j?hNaqqioamFZ zkZ%`nQ_fuP6i}8tIBuY<4zBBc*C>~H6Rif*Z4dFuC9cl(;Kz_Fk@GRR)mc+CV%~Og zctlTbKOOlKvl2quxpp`O;22=X;>@luq!h(UI zHGmQp#@-JXNX9clQUOw>ix#HSr$^%zSn1j|s+?!O&6$nO51`Wz&nv}~yHQjV%V68e zubD`olU8|He*{Fu0t0fr`^sifH zj$Mb|wN-RRZGGEd4{? z&T(vt{%x%zIts02G2aTr{X157u|-AK>2Ijjgg*D;k%2PuK2Q6Mqcb5p=D2&D%N0Nl z(QNgJ6hApzM@>{ViT3@D`Ig!#MCZGZ-BB(Hl;FRy+igCXVoJ{?l#>8-3=QA&qt7>!X?BN&DcK1msGONY@$?d>E!c-G6pfwL=k-aQ=s_@G3 zYQ~XNL(Uj+Xb&ToTChV%EhwZDRMPh-Jm%gu*mD$?%zOLhDk|L~=C135J^TwQ|ES(+ zxcV`k{W6ygf<*gEYU{V?hv=sBiOVwN7$PKdo zdGE{jLiO){bX3sMPdf)x`V)z@XKb|UCA*2;Xg8J#BeD|085=j29~Gr2HBsxkEk(^v zFfGOoj8083>FMds;Qh?bF%Ily%ge~}38mn!Bo&!`AM)r3D=G6~ca0e_%%kSRl(6o| zR;&1kbwDAxfo=TuMggsuNpO6GlTDg)fULArZl?a8&_MZM(e~wfp6>v)DS-byuO>vOWwKdACMrN%XS5^>(wn5-#gCjLeI2Zs?nl!Pjx!@;$C z{3A`nBM`#u0jjcgHud^=yNTakp=0{N| zK3zSnvzGz}7i_uX->dFkg_VL5o+qxB|KX=03Y7n78^+k4PdnOj^smN4OfFQ7OvmDG zRLvs}z)_=71EC6emqbwWoGdQXChETpl>%4!_&plD1(VE^>`!t50H1e-OsG;z2>&eJ zuK^Yo+27=9pcxKus3!OHt|eSx4aDW;#>2^SIlM&TNVcj+fkZBrKPtOV?h_sB8vOfi z8t!q!o1QCFw0@zGZhJBiZ=cQuqs&DrXyOe@nE=q?s{a=Q#fN2 z4SbU@_2VQgp?}`_vWw9w>9i56DdtsxF^?gYzA<^*AgLozIz1QO%%wNIoY*A-=W??A z?Q>an@Q!*rnNFt)@VGJK*+x&tolUGwjZ{zI$#gu-eK}T012*HLV?m6NuCIWU%O>&k zYU+Vk@UpQNQli2`nc#yo9*02N?b8Gr?gI4(MMQTpB} zRC^x9QcCJ@1krlHR%v41uXki)dR}#!6TZfxHt~6u!N)OVGQBr3XquJ{^lS{GzfGcx zdm(wR9B}i|XK@Q3ct~(Nov1cO;8ZRS=YZvT=~R?a-qrh{l@mU5-^^XmZh>$qlNQK~ z3lr^a7Pn}=!3h=?T3t7n-&bPJ7!zK1JiepY9_Kw6JP2)v1wX5SP6&Lg@iBJ|P_!n$ z>duHo##N*h7T}BtC9b^(#t3F>-F44JfZZ4YioJMO zo@kk#zBfPO8hS78cfRHuW@JJcq)6+of38vR`|?Nbr10jf>}S;0oi}Ij3JUKx8nO&m z=T-@U@KluWl`zh>9kppxl5wXokLDn>FU3M;PBpull47|?pdoipw6?c`^7;$+At!NH z(_cR`sK2p$ z{tgV8L6t(*Ik2o-d~Ucp=ErW}rrZW0m$~fl^mRtmH`Q|a7ItYWxvL|TXg_?p^Ux@3 zxdOe;I#DSxY&5HjELFe&cqm{!{w$T^@Y*LJ{;K~sie`6mo;JQD)m_@hjpv~dIPGRCJF!?;u(J((^d;gh2WVFW z+)2Z{%||k_^45E*Jaust%dPncXdToJb;5#AsY%i0*H}X%wDi!!%6m3XsC$YLD6=X?HhA@xQx6GwlG4pIvoxmPYU|+jXL;*#$T;s>PuUpm>_p)G zGQaU@vhfvg%}Fug(UEENijbg`xb*q5*%+UZZP-eAtqprodeCDp+$L=IF(G<@wSDIS zZRQ@I0|lH8`-&G@IyTw%*Z=s^wa4WMxk%e%_vbV!5aizZsq$Xzm#YMwJ8!NI*c=YO z$u_x|DKyG>!RohNs#W!2>%;w&X&lEu%S92wSr+aT^LFZy#w6S8o2S;=Aw262uYl6A zBLzM(Y$b_+TNP)jf(m?@%7I~(YR||wZz?B#U4E%?DygMDt(WvxJ^h1vwMaZSScbYT z4x568>f?u6usJKcDh{6-^5YffV*C-9Ve^cv-~8Zg;rOfN)oND(dx1N!bEG3M3Gen5 z-RBbCfXa6AmMY-@%hggFBtipSpj_`sRBdHIe3~N`swEyIRvzEaN^nTN<8(#R3;l`L z7=8ezgd`N~X9?9)Z(ct9j$X!p1(9s^>ci zktMR*8`owJ^MBf$T%(gsVT0r-^G$4>wXeQ9*I3|pvuIoB#hR(tw8XkscM;yaf2^|0 zr-LIUB6NuwsD4TeewPBl=jKt90Ww!<(Lhn>LfwLyx zCU#`7NC1{;ma$+nTF}dg$Au9dLnE6XwjeV@T|pb4wS&J)p&3c4Q7Gv{D@5ji&sd`k zEuKI#%X>gd+rKYZ7pDjgeWpurS^NAt>6cUk&1(u4*$iS9#!c`SaH9HkT&4K1Vv#(B zRr(Y`h8*@SDZ;&5psWc6Qr;j*{t1ZZ^B+SS%3U9{m#b`oD1kCOhN2dXHDW^(-l0HD zNg}UHF;(+ABBlnq{@FNTau!$UO)3WeDCo_!l0$1$)nL_uXP=-m>2iy(e( zxi?@}$2**rnK>P7#JT_$wlHj5@b~tV-P(~i86Nw7&AaC~q?32V464L4PD%Icb#Zy0E$D1C=z-@F>XJb})uiYk5D!&GBmvZaw_ z)k^T_PJ!YZ)K)j(F^23D30^v{VD`fJlKoOg2+feoZ1(q8n{dI0huL&bVPaJ`&*p{WKQ{MXMMLPKO-J5Z{mx`F`P2*jjxB41oJi}(=Cc@)V zEEfnoYSz97qTk&vDz{IZuNo0^D|yDcf%|HO%SJAT6FU#*XkFhzTN*TlDjpyv9P^F~ zaq`8}Bnm2bOYC2ex7<3O`saASCstj`@DwAOrUFMR1(!x zF3-@%rH}FR{La5NXL&!>y_T92p}Io;$3JZ%bR*A0VTN#HtLDy5EQV74J|j8Ms`i;q z{Hu<}hn(~e-sb=h{9n5F|73;x3Lt|)?e$3XO#b7z9UybYORdCW<1h!k;0mF&C@I$9 zY8T1Xa3)eNHV=Ad7{{0Fqa#6SRRzugS*qsxBh&V~I&R#_FNr0+^)!#2X}1FA!beX@ z?)j|nIvpQ@)KK&w~5pI^aSXH2Ua=q`GOZ=v+37?oMJHvprO_F(`t%W(H zxH7aTK_Q76DP?A;WZK0Yq~5*O$1L4QYR@L6WOP31wWc{>IlkJYyN@$VgPkRI8VF|i zY&Y(xJkbLQ?A0hPD%qShuSM?6&e6yxe9o(v|m z@|W+=hk^?39#c)8EmFqMTqqxa2AR1knB#c)yE}@dn8w}}PMNyLUue}0UnqH}Jo+1O zrp4%QlQ59!#}~f;a3)ch-Bi5y*lqI%S_zZCo+hK8x;(T0^w7KHVAe%X*MR(Ryrmsx zb2xt@V8qIud7`Ui>iFKp&J<+hI*7WCTeXeIeYR#lzFc0sNW;Z{F=r*%SoEk=e?L0Z z&cDRn7$IW~!QMD0N6eF;H0QrYsBNp>u}1G$3F3szCO`frN}p9Hb}Gf?Wf1`~)y6la zIpufwE-_1+v)lBGMAonFJf4FIynAIX-OW zx8!WxTlYC;=^Kw=IH&2HHaBe0X5Bga;ci@=mqOc<2S8bYy*+{CcQ8kJI;xM5X#}FX zyc?3=++}yEb&r_km|fm05N5>v3z{S7LoG#_n-zW07@N~@d#ENx%RHA6`3)@Ry zblqbvOa^k#kxkU&Nqr>*;~QFG+e3l!3NvEE<{HDpYj}n;E-QF|S?b1E=$*9T6I)$$ z+tYe*INiRXJM(UnsETN_XUk9vZ*bZBN8prrCzjU?-lr#FDL#6w=0USr^-Z>QF)N-X zGZ0EXpdvu?$Ac9$+enNpBf5j3iphvi2?iDZ5Q-hwPN4HAeCnvnLe_A&J26H0=m`rb}hiZVheO2sSq; zR+S#)X}!MTUXS}gdFFe6Tx*!fkvk(QAj~WbtXv&TS;_KB#hh!An?8wv#u)n9&+@|w zPbwS#eRTh6aHKejb6F%MsbA;CE|_!I-z`z2_!^FGda5%vq_5ZVRs-a#o}FLS7PkEg z_BG9O5}$l~^m+JG1oW zTf6G`zQ%W%eTzJRqme>V70dhV5^_f13HEH*{k-ErQxbREMTy&s<72PeR&VJkfG7da zB0c5}6C)cQ?K`8l{>7}!bZ7r!+l9)Z+fuel4&bHS4=f?wv3(|a73I6E3Ww-xmyQ4U^dhQL!9|-&} zQzkQn@|B^rgh6J4ha#)r0%QFNJKp8wpswFX;1N|VVaR%UeRJ|>OHY&XmPi?;Z#BkW zjg*|xxgRKQ1=iPFX+|~}$x*#x2OT5B2MQly>7*Qn4W^|9)zaeoPJ;suI^EnyU{~!T zub6#P7&_|H(FPm%NAUkynA^=*8R}X$#Gycyurm_r)QpDG^QRT(_RHMsP>0O|cPfQX ziMtw|UP#(fqqMW1v}@!9S9C0>yDA#kG18CwDq|9Uvau~U>t4554Mf$B03oY1ceX#U zLcB2ZvS#mCB2}0a!Fj85-UQ)Tl4_H1ll0X0H!|?1{r)}zf0d*Jfi|T-XaW5qy_=`- zFdZI2nr#8jADwpN4`2y8`Ga5B?fTJ&|1-4&%NGjH?yaj>_!V#*#_(QrU7GZnXuca-hT4ErLJ||7feW8P z!2P?yM#GP~cs`tXueYRW_ZpGwLF8Z_D+bN;;UG`*rmQQXj)tiFx=h>wzH*!-6AFJy zY0zbJ8d~VGy*pvf@5?H;V~FX^Utb5I>?Z z&jmOvkucdolI}O-R;;h)=ghBPMbmk|AoetG66#j0`xH&qHwr~qTuz9wzQDQJQ-qzp z@N?a5u;I^1M~I`)1M$&UBfLcP0~aKG`>i{s2!+3bd;1YLR_#%m|JA9ApcMOh15Qo~ t$88P=kufyt8yB4ywax)^-oHl|@$(T;mQk2VLH=k%>76&y%0K52@;{dj%ccMT literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/CustomerOrderProduct.zargo b/documentation/envers/src/main/docbook/en-US/images/CustomerOrderProduct.zargo new file mode 100644 index 0000000000000000000000000000000000000000..016c559eee0ce17c78de186db1349335a93e3800 GIT binary patch literal 7864 zcmZ`;1yCH!lE&SF%i1$Tm5a0o7oL+}NHEiOSrAV`4VzPK#G-Q5!w4ekyB7INg> zRlWbN?)B8vOjk{Hbxn*S)vgn=X3^M@n>}~$;54x6+E7n6x(oG z33bv222Ku=vCbyDz9~6=!!9#wsg8*=!!FSfjnUy7kY}wm`McM#UL4T$o}s4EI%t`8 z;WV5@ldYO9Iu+%Bg5JcC0td(JH+fe2Q1rT3Y#5Iw$QzmET05UBwj_V+2#a;PPck0u zIuA@nJqemPDIG5AQl7I4OsY5L-=9GH!V}{Y;5fIRj z5T5=2w9n-KX`g+Z9gaQUSJ#qX7q%*2Ke?okP6mM=A_J1QM;*L7vk1HS zTNL|6W2TA!2-BosJ{c(7zGwJAl~O=E?PP7pIO^kaH;Ef`b#aXj@2(mA?NIQ-clC-f zW`}JpAn>}jBn{Q#f07<5gCb9GsKVumpGxT>G=94^}s5J9S(k*F#pn=v+=F1O<&HxLJ> ztt4oEXedv*^Z7#D^q!bCmT6Ty0fQr7FJz!K@XPc?Z_eRON>l=rM!dcHolTt?v%B_F zbDDo*fa;?{(-fsn63$Ntnj%%*WS~+ztIU=2@wt5pSo%((WT3#Yef9B=;iKkW#ii#B02mGZy7(wdj+n44`Q;&t9dDas;H8^I#W+Ip_J7N8)1=wg~M zrBheS$nx=iQ7BZXhi2IbhTS%k_m+R4$v=7kA!->h6)ZzmX}z!DOd+tPHw$7(rb{PJ zj*du~y(n0}>%kM>`ne;{5a(dp`^n|vNddgF z2Uq!9mC>2Kovj+h-eSi;3l=p;1A zM|xa7=r#tax&L|(^k!T*Sinldlz!eQAlD~NGotP93dk0!HU!v#mrOVyI&Xm?8Qzo+Ep-5a zY%bNlJbA^_HG)m@_%;fs?OO;I$dx>Ww%%85+UGF7A-drm!30XH@0Dljcr)MQq%UcK z$jPt6>O;Wn_kkIEU`84Tpr>B`j+GUc_vHoDOz_lBZ44vS zW-bFkrt7*nQxY081L;pp>$cH-#}3lI2D>z46;n0pD2H!bqrOiZ)Oaz})4Xb1#EdxP z`0(*NUiuD5aKm7H>U-78;cl;mX!mcLWn~2=tr{!cg8hV%a&8IQaqk9{6=k|)?8rV7KT;y1lr}d z+%=xgUWWm#^i%G+h?fLBYa;RW12^b-ha$`}L9i@3!Aj3EP;}0P$Vjy?%`{2miZ{NJ zbrx`xawAK= zQ&X0XwavcU_c}%Bn7mN)?Shn&Oh;PF2MxP&yV&CoWzGRf8O|TI9%+uMp5AV_StOPQ zp2}!FR_TC>+8iLDv}5Uu+uvQ)3$~V*3u#zzk2}!9Hd3efkKm_|pdS^XsInrQKC(D_ zw?O23MsNr0peOkoX*#4gPrg_9*Y)^<_G}oDc_-*7khe1cB@W-OIQMK0-<^O%_?>V{ zX9?9DTtdLfszU&8)C`wOk|@#0@|w zpn&xkAVhETwDq1eB7yh)(B)AHvR#_8e1Y347TXrBFtXeeqSHK$SpzqOf>KO?*;SjP z@#8NRA1niZ{3sS&WO39-j1kOx>MumWXxnUUImjWgGMh)=*(wHC-UXO16IaC)6!55W#weSur%{4@_tI`M~tF#ti;O)AEwQ*J>JhsWRtVCP042G%V} zRU|6nEpmw6PT6{g77Pt+NMhqXi3?e@?*vK~BbvNX+6Y6bk6ND9OJnpci`pC|&}zQ0iXzg=lL>n!_;X zr%EA+-G1_SSxYhO=>!0NO3SyO9C|{Xa&$=I=J9ajGm<2hu?6-WC(Z-2Pae!l9guQJ z_StPJx$K8DuHNoJyd;NQMIR&Kw&>=Cn~CPYHYDxn;dRy*2wm_o6LOkuV$rq2c5+KW zoY`;*>q}zwN*E_K8VDCiiXtw{i&IUL2ahS56s=0KE0#CUxj!Xd;?h$?0vYy5ST?$i|zh-r42+4&SeZ8 z%PkQNIa^*r3`cWwLfFN`nlr`gGOT%O&F(P-cOzs8^v#hMqmJ!}DBBqxPa#yj{5d#_ zAFH15`V=Z9|HS2f1w_0wHZ`f4M;%xBm>q$GGmrkxa+GzPjwQac?GTf*R+`VwZGuCu zOMtE+JO{O1(FW$^7(u8H>WJ)dF2?n*qBU;ufJrBrw)Hd^&cE{9hu)KikXBpRGeb}p zg+WryJ`oPLd43TNm!O#Jx|ulTYV?)>szC!Wp2E$6ayLI_1gmXGB+|eE`BBO>>9%r% zpZ?0EX4Sa2lu_={$K-L9Oitz@0b|8-;n}kBg$-JbtOY0P8%oG{ssl8!Du-Qc3^BcO zPE^RGe&xw0a>NDYHBLuE=DugC6-Tm(F|g@KdeNKliy_&E&B{CU)G1Y040K`Hj-H9P z7OMmkbSs9Y>qxGmwpH_}rtg6ehxUpy+mO@G*(fv{CZ4+8-&KxaZm}1&eswBWCNUI(XQLj)r@30Il=;H*?cN8= zh{)^LxFiZ&2qKawuRoSZ5W64P;JC`ifLr8J)cjTg(cTJlvDo)2-B*TSYs5jUxJaUIaKf{EIxJQ`3nuf`kpd}57s@c>Up&0Apu=t~ z%~C@M@4_%q)$k7d<wG-H>PC+3OY2v1^o-Z7;T_ z)zA)b96YS@0mv{0r3u@f11a2d>q((4xxP5leEJCGenVCP8X1FAq#6@IKLvX@Uf|;( zCN67P3KkDW^F&obYYs|e*x z1&H^Uj!t_74f3njI#Fy}cUH(ZW@^Mp{W7GHkAj|b7@V60fN_d%=gZ$NeE0wDmyOp} zWPK3EA}XC*ov~A>mrs$B8mJL|h|jP(_A_l9OJKmY+^D+gPtHd><1)bpc@d)(o4q$= z-ML}<4P%A5HC8g4)RyT6zsSBP{C-i&VK8crR&+W^cq(eARSSC$?BKZL>=>BS+tF+K z3b|uimGj>Js!F_uDGKtP8?({oOQR$rbJ9I|yMc_E9<53sgdhZJMEOxu!OVhv6h@Eq zfI$9(ue1W~CQhEWjnJZVsJ@e6a|$8Afw%=#nkzo9=wgN($;waN@qIggo#?O;rD@0H znus)5Ddb)+DL<2Ng^Y4xk!xepbT{;x9)AH+OaB6C^IlWK>~SqIIP_Xd@tjs`HaoPp zqDi8H63~S&ZF)*Rde_+Pe`mdl6JLviwU}HmG3Yq9*-#AG0nE~jBE*a9_(-PAl(&2K z(%U_7v6XC3eierPPPhHsIq0z15gq)*n>yW1ar8YEb;-Ecy<7cTOKGNZnQ>C;Vxe>H za6mw%b38UpfwQOF0K5NEo$}Ltp-ZCID{&2o@n)#i!9w}2Y}TKf5pUz9%E?35MJ@wuYjRfoR!ivdbz71^~`TEONp}I|@%q!X`Me?~~ zh4a^=)mX5Q6YssN@^S3%vBx)d&F#r{b34&T9Wlzs5M7%(%HJI^m@U=$ZuiM959~q? z(HE$xRh>BOxWk++#rsnzMJ=Mnz{}8f$>C&tKl5!L>9xE9DWWg%g8-Uw?C`x$A~00q z2cKkOeF2#Cg-IGw=7eJe!^l9+v3kN2Taj80ROS{DF0E~;zu|PT(q-9B)dUwAvQjP8>ECmn5{YV!_u{X%v~6S5$X(GQy#9Pc2m!^T@$IwLpORv{F(j z5`P(M<29rYGTEg7(&%r(>qx}ely$&Mas#>QT4wL$zpj9EM84@3B#f1~wafuW6<9>* zkK$FPzGHF5;bKrc!Dj=qID3r^PQ+FQd%Wb6CN5618?#=zF2J=t#B zJ8Q%=w%=AiyHco$C9n40ot3D5ZeF2T$5eeHh*_>stvuWltnW+)S3lVVH97q_JJ8$+ zaMk>|#wkW_ar0p`a$Jp{()*{GS5O3)l1iddD$`xuezqKbFn%dh8-Bevi9Heq77K%ZBo1 z^oa~vHp*@`6id5X!p+Vs@a4XQT zDfeC!wjW?rxhM}QAS91A038eAzFQKf_GQ$Yi_Uw^Bz9k%fs30zW!0 z2$rnY5*y9#$JcA)?>Ar@_weibh~dPkx84x^b-DTHlzWU!r>6lW09qX~aOGl?atlCP)`^>PdX665`NO)^%51%WN zvwu}2>0`94P+9{r#GGVxbyRF5E3{R*Zz~c8b{}$x9{L=k(6rQsZPmvfah&U9T=1MJ zF%mB#IIaS|50l+DnbT0;|@j?^CLt3xOraqgO04S+nn^P9Blv!V zzoy!?-Zxq!H)~H zdP1n%Nr3QJB6h<&x@gxi(}Nzuc-HWq3l!Ck!jaxZJw+w52gAD+EQ?-=u=nagD}jG> z-cD%~U+w@^F1(C#J|VLg@{zI*q_Ui{*l$&W!=Uq#gZ-zyA=23 z4(b_f8M+Spw{qW~=zck;gS&-^g8E`*8qH3hxHDXfGNwqk_q@_Rhnb=Q@dc403c9FH z33^)yJG;D?^uw&zM8Z0WRir|gSG`uTmgL^o)GwUGlHi|(PMGA6RVDK2+iUWrNspTl zF&9@62s&|T3I_>}&23ZKr8gTPIoU4|!u~)X<bg zlhspjP5$?lA6sDYIylZk#Cy!fEm4+iNcyQHz`AW^5ANPTxYB`TQof6~rB2H90HOTw zu9)~P-`$;3+GJ-X(ta#ef8h7*_~42-rVq#A*g?nR3NULCsN&2eq<%EVtRv`rWAplz z!)7;;i{vw9as7@mkJ|S$he8dyWR05@>xB?zhY`8&h4@7e=TZ0*H@ul_T;C&WjA*Sn zKH2_|2{x3{)B)dx32}$|0y^J5z=am#YaKrgrV2pkUh|A^d;EHv_GVrUlm}b#bmF82 zd9rLQ`gM5NF$N&MYz;-Z2&?78U)Pd{3aqeEp7vA=5m>Kxte{1AVg?LqbWAFY`VzDj z)W7<1JQLe<%+h*O-BGf&d-93U43+9G&819(`JoI2=QrM$;gVlVA3nEc#T#{VcUkaH z5$kapr3MmoofqDGD(JXF zeOZr_sZxST58>_1rVVjbp`!G~(dRUAu{1Wfx(ut0|YG(V5mwx zua@DjMKO`@7ALI2Z--P+sr57SR#9^6u#6SzL{bRQa1*&Jm=vQxkzS!Yf|E>%4GbuG zY<@8?vs)CrmKPKW?GLbA*FpvipG(2+L_>)19oX*IK z0mdYFl7O2-Hj^%SJeq5#))y_SB=>T{Hwuh7vTKE>vrd27LPv(xB47 zO-*)uSiyK#ujzF7|_n?S=Be(4nsf%uG$vd+A^DAvKUN%#uc@9EN zWwN@M)Y&~5v?A=+3#rMi*2m|b^qX%?F)kZ3h@iGNAWr8mp7abh>|XS->B+l{irL;* zjSbTZWDNOQx~4h1Tzf&#(U-*)>IhiA_Ix8 zkNw2bRb=gPg85{zz6^y6U;h|TY)%Jm4qj)ZO)FelenzG%Ty74d*)rDI3f`#|67_#W zqANX`Ay-<*6ymsO^1m83Du7kmcGL|{=&lRCgkOEII28CM#cKHogJsi zoVVQ^lm&1gEDMg^d9TyZ95vSda3swZwotRa)Eg>BLAp#$u^cwxyd=8NtcS|kqieWmMDSAGc1x}2n$1oeI+*!OIw&D%Y14y(Q)2| zQk#3;un?TBQnobnsErR{Vxwxh;nYqQL2oc#F;tuz5S7&@R`cp_07C^0oCTEX}Mw zrKbVq1s{9}sm9rQjP?m?B z=7Kls{9I^cog+}%#%%<#i78J*NB>9%wT15kc~Vc;!JFEv12IulCidt@FO5ycS*vE>;YX`f zZ+}QFD{a4^Ug4bZh+d%8~czlZ_yV6D8tW#Q3Q>1=94>!2C=)1a;jvg*$DK;|W z9jX@&pMRs8OWRP0%-%N*iA*gm=|1=SP{KUL$?PR6ai5sfPYqT((%r?vlRs>k_%7oa zgN7sj!Lm4`E;7oJ1?H=1izF~-J*P!fy2VmJB2@Oc&Y}WUGA~=0*k(E40-K$lEEjrj zviv$%zAHJjWZg>Ejj(4ZW|!(JW1Pe_I$d6OI~6)1B>+UeBgs4u-@_SK&wpkeZIhd@ zswSS$|6+{@v3QR4l-Vg3nc{%V&0Hv4Cd t^ZyO=tYH2#%3tX7&qV)1pMRSj$^Q?8G*wa2{;ooPZj;aBEcIXSzW`ZE{qFz( literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.png b/documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.png new file mode 100644 index 0000000000000000000000000000000000000000..a7ecff483fe4fa6684458b07ee0063f522c497cb GIT binary patch literal 8512 zcma)ic|4Tg+yB^?EJ+e$iIOcO*|!;r$THa`yZYF&hU{a=gi2(|zTGIsUL*}7OO|Y5 zkg*#QvJA#DmYz|4p6~bj{GQ+E_xodB_uS_?=Q`K9-q&)@b?zrH18rtTZblFY#H@4U znh^*@g$98rOzFuDpmt0aH~GPE|Ax5_`FZ2lPpi{a?YPnJKGf;&-XPB49cd8g+=R|G zs7U~BCF?|Zz5>%V-=AIEY+tihK?y%;_wvy$!H$It7yWdkPQDI9o}u|#~Do?&d zd0gf)!_pfQJk(mb!TnO@8Y)&^3jsoJQ^RCGNY7G1s)fUf7h~A?LB*;RCi(1q0Ncd%R!ViN zEH?9%aHq-8lV9R`OCB_6PKo1A)7rY*DY5gRH-fdJbQ|80axA?d;oqNG_2fkWlEnEm zd3L2&a<2sdwQ+;-Ty5Z#tgwT6{@Z?o?{}b&zQ%_`I4M{gP?_ z(Vp^t3tTjuw3!7o)D59R_;n`{S*+l2Qp+}4T^1IachnA~GwJo@4UDXN>V9#WMC7nC zz-ln^dR*9LLn-t&2eb4p_hd3KRfL4ah|v1x7_uZpHO$%%I0=2`A!R$IohnQ-3zb{C zZ9+QkRuUyWkg>LT#}GCcYli$;{t+wjIh5IdR=vUz) z&u);2Is@73uP^kD1^C1~E1zYUEfV;Aq8TiIZAkcmJ9M;~5q&yjAe$Fnfe-w#RYI-m z(a!ZUPfp^F27x%k4O%)-@Wkt{Km6pEw;(*k`=dJsyjtCk**og21S7kVE3rZIl-IxM<^m2(@NKKXJ7Jq+o|u|HWM=}QW< z`|2OP*{$+MVDm3a4~=c2PI}Old!ImsL5b9|D$}1Q-p?G(z94~ee6JK0eW)F5c{PDw zw3tD0jBJ07vWD+>r@R)lV*DrO%{m*^v*XpRZ;=)yNQQ{XXE8^!Q?iyX^iSm2o{pE6_^t?pW4n7LcvyojoUGpdzijc1eOvj8JW_POsDxCX;*F8O3w$tYI`UA)zFA+p}O zCjgh%J9h5pOO}w)22_O6DwnbPY5udWg{|VA)aV?Pwbuonko$!)(DbB0udREGFOfZasymQT063b>Lq`jZ>mWPq{1u8y*=nzTQ1Q#uIg*&nw;#{u&E@yX@M= zAu+3lh`iumwsH2SLNk?JtxVYJO1Egf+15p7m(+uH)f>7W6rAkNUsSmb8bX)$5+``E zWwNwb&YWzJZ^HG&kkkj?DPVvB<@b5`QlM?%h z60I*Cyw>8sWVuNZY!ckeXF5oZTx6S~BwPGhLX!-duq6+MQjy;t?VWq)cXf_hU-ZQq z716+5_tMDn7akbCVeG~v0XW0{0tc_2)@Q*sDuxrAgq)OFxo=Zq2MW6sAHA-M&O~yY zP4Efqi+4YK>8=lx@sbpBK1mAP9B2) zr;0~-xVKV9KlPHl;Cz5@m5q5i%aqK&| zM5t<>Ax>Am^da|FP^$v1%QPPmE$rM}8RKSLq)mg?%tW%EO*F*Ok`-}n4+2*6tfyV_ zO%TwXY<0itdkRs-z^Vq(Z`8*OqGR3j7GjR6MPb;ePEk0!t48| zvG!^zUc#w#WpYbPR#R0@cP12;<#T5C>ejPM$EP|mK*HH`%R8oYJ>myn#lxrU6yJyjS~O*n5V-z!Y3U6BlC9li+@HQ04+m8c1c6Kzrq2;PixAwCnKr;k2=!*7MB zDMRdO5nyz=V9X}lXTw?WUTeIqYm~j)Iur*h2TLVCg>$nGE5m&DKIWFyvcIIBI?;$O zmg0<^@?}#6_&fz=sIabx5vP2n)~4s@cKQ8o$J5E)CNn7AJNXG?CZ8Q#JsI$t?_qim z9osi$_Vkja7N(%C>ody5UsFO)ptZ3Jb~@|1+%eXrU}_<&U*qB)`$#66L_c^%uoGRm zWj@`KEC2p{A|=pEEo+lXDO;V~aO_{U6k@@oI)!P)DG?PFdN|@_s;qFLTGUne8@1pi zW!{mLpVO%#mvVbcUzJl#-D3B0yhxo}cu+FmhF2U?N^5;~5@YQjRY)D-ZZr33kbxDu zPV?iIm7}e8R-6j1`4OGIXYyQ&3TzpSd@rBIxb#+$vG~|iyZfTF*TO{~{eNs1kFy8p zKfU~4W^-uBQ#cU)qb5qWN*o$uDnE%^IvlE1G~_Y79{lsA84WRTBH%8!nS;^2n3P`O z*pvd%C2V)O7*Aif_PkGLa|)jD?(OFf1FJ)igkz&0FKA)%v5f7ab#Y68k!PKt)C1&o+5g;x$Su-1{@jM|?sw!R6!b zrQk*%bcuC5rxM*Tp_MQrTUAx!G`F5Qy5n??21!k|=xRDO8Ai4ZfyX{_=#b-)Lo!8( z??vDRHV=>XDv_p}XRru?73q3MKbM(Z#k2QBz`z0fP)t|6T(!&BY~+<;#ACb_RrUU$ zL&79SEM0$qk$ms@@o|Ill&hGZ&^Cb$)vz~Q6~eA{@~EX2%2&G)YQ#4r{5IW&gzU0AxyP^Bu-o*He-;!+&9U1euN4*P59 z(hAn4Hr9stHnUMU&KNns-fmn?SV$OlHW=wzLksd#qhoyWHI}L?=#CTCRN(biLU>0#}SF%>UFBkz(otUAg^@fq17 z9*I6Wj^zKs`2S1<|9HAs6^=Dt{6rcv?dpW9d#R)j4w=ZP?FG%gAS3K-ytPwqgq#gn zXC)|e4D(-o{Y^M_@FwhL?l+msZ7AK&ox=N1&R%v(o#kk!i*9#&!Ro#0rO@5IyZz9A zoW1?LxX6U#+{g4Bh2Di?N4|^J2p*zp(iLMqWiWP&y}%)7wLi+(8ufzjXQ|g28FzjS z@N8w-?j5^3Kjh*_?Ct7%JbKsy5jvJUk-Z_h;iFbUWcnz4{!JoOXwN5vr!&HBD4>2M zY_@t^r;V0BoQ)2eB+&iIgQ`f~%c>W6K3qGsyCao$uten=IvZfz7Nu-C+tdXvSG8+i9+a|)l{a4W6fD-5mUn~bJq;}(u>Z5y|)A&Ag+i$o1ir!3wdKP#2=JK z74=$siv1GO^vG{n%MipAvZ!e zR-ON=3oM_dhjOUk9i^|#9mW|f3k8<&4=IEJ#(4se`^2Os5=cH|p2d2m#DB!zrR9I| zpW9P0dA#{VfF{+@%?J1s?d(-NtD=@ERD?6=dH^{VMl<;WL4Op_9pc6NDL05lHqGd? zB%85ZNiQe&oK4{AW`ZG4-zk6pOdKSppv6O;wN{!Ry>-_k>#al|YLye)?u)MvG)CbH zA}{`hVr_oxe2s9;R*`+%2NmWcxpVIXgVLT>UABfgHp5%(#Zp^eKPL= z!H?f&w0+(Pxj^GAxOs;3%V=aXL$h^T?n|gGVXGEoeCsX+Ypc{)?LWc4swFJfj4O?t zK?Qk-;m)RNG(E_CE8lc?0`=3(^}dOGH8s|)X)6uhYRxeGwDVaFJ4@Ug|K7}N7Hl#l z=`yk@%2$ab_=+XX2~^FOdVVWy-thBY>w?gJs3t1EwnzwQ)107d!S zNyE7)e*edxK-JQhJvV3c;|~tVVe-zX^MfhG?4u}*BDsoiFGDz1oLPIbM_Ojl)&9ce z>eMDWp?@zh{A0%W-=YbJ2Ty18+Fe1TBZni);N5+8hpXuPrM4*#33`aqnWeor3oUo% zt0(3^gs1mLbEBc&)`YnJCufrIHc#yG3eSfC2S#c^OB6{D-kBXRsnir@v-VdGT=?h} zvC#`oWj&fkr`HZDnZbAkq~`tZp`8(}d$MZHSv+oE2`Sgq?r zg!+}>yE{bt*Y=CPL2#L7I_cA1^i3?X3i_2fm|8DrQ(YP1pztlm6B@JeaR0uqRr163 zEQg}FHA#p&z1}-JrQUN*#BYz4PO}kmcFWv`Iu=Cj6c6TpS)l$Tl zMGx)7sfO}Mr-IfyE;6leORUom^j2h%Wscb^k7-4L+Q`T&?&a;W!L%1a+zCozia5q6vX;L2xOOK@l=! zCd9uROL%6Xbah6{!ji_E8a77R!n9NjHVhAXp&{0iHj!_%m0jK}YX$N(_AxHtw zdU@~CyWC&r&SaX7c4*xL*NX}iiaW+7=LaA^$cU|Nh;}}d#rka1<=@> z7u%SP+aAsKT4CV;YRQB(*+2?FW5t^zFpSZh{QjE(AE04I?)vYNt3V=3Kby{-0JMDZ zrw>1%tRha__2$@P@`FwUq)%NPm4jM`RF#v19<epSbjjC62-HsCnH-Jp8^FQk_jr=zMnU=ttG+_)Ij^Q7%c#^2oj|U_i-EF6WrEZBT zWc^sW)DScLdS!Df^jnYwEL8x&AUDJa;k zry_QYpWL$$4c=JkH&^)0yn)$7>`~n6Pvf_xYpRI=(&i~t$d8c)DDF&Ro?={@O7vJ< zXiZT28Df*)ha`F~kbc@uIEDDU)qzzM4HOMA01XM`wVuXCw=G8@DPf`I*2`;MA!~t$ zSq;g)w%EHMx{>O+1Wrvqakw0U0}XfA*;p8VlRb5-Pc~GmSC6~W`i~rpSbj`NH@Vo# z`b0gH*4LvsZsKzi^D8~w73a$3!Oenn^9;%)g*bJcF!vBU%;zulR-I8C8#1ss-iCR#U7-AjOwC}?0ar?go4P59yXN@mj8ozds#S(N7y26DWC^ATia4}_lr+W2%g}LJT@5+x`tIk z{;o4M5mAOi&cyX}B{73!w*=(1^Et57g3=J)i^p6$=mMD)f|Vne!wF5St~!@uLBkkB zObOGk?xuZF_iSo^!30a6S+DmvAUGyFtSs~OT)O9*lzZ%3GV^l&AJ!PqE3WFgM14q> z=x;#6F%3D5+1MCtcB$FJ2~VT`b`xzCYy$@+-?ib4++o5oNX5CW!w_&XTyp3<@-;`qr^m-lDN)enjxyJB=}b&0A8MgyAm0pT` z*qA+>nmV|h9I`j(^w8j_^~LaXm&;Gb`@@`oUq=#i4})&flYwRh8vyoDh!r8exMJZgS1Lp`GFW2g&D%fU6NM zRlnxZ9UU~^(D&r7=*2aZm(8CBj>t}qsW8O+RecI=Vo7j?SYP^$!JN>(Qxg8baU*KC z4nx=|r9p3#5eSnoA04pRkm&P3CKQ$Yce7#OiAJRrb6!LiptJtTE(ih!naDi6!@uu zcgJ>~v>%tf>lL1!`Jw5i3 z9fp%6`-91<=C>g4jeER(kPlNAKXCkaD{@xb+s~9A-E@I9jAVA~UgJ@7t{s%7`3bijw!mOUb=GiKUnroZ^NYlFcz~ISNxk(+62G zuTw4}LWe>ipTgR$-~V#6lRO)|KQ?9p5hGUeN84%mzEz4y(MLA(pChL)=ps6S3J(E3@xS-iqwuN*EQL_8>4fS&u)Sd zAiE%#3|=7+38&#lrQ=RQXwb~$@Cupp(OOVy8idOub5M*H58RzmRSjcZzgMsw{Ud2= zS%S~gS!V3WduXA;`)Z@*Fk_ z$fTMJP}TlCz*}Ff?L5uj6!aV)k$k~ej$?7D{M{FQ3hl4s!XO`*NDFnj`G<37q7J87 z>0>KN{Lsuor$CcUFqt5JJf*myWQj`SX(|{$gPg*PUB^A=gk}{3ilrR#;_oo#{^M%@ zT@7eKbl-B@7&p+x_vj~U=)BvRhgG>AnOS-+_r6pIW)hRgXb_RjEewI1ru_{y zr)jGG@U%hUY!43+?!VFgzc0Ash1s!jQ2o#E5x%R-cGNt5e}7(({PhD!=eohQat*ui F{{m>Ea;E?Q literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.zargo b/documentation/envers/src/main/docbook/en-US/images/EmployerEmployee.zargo new file mode 100644 index 0000000000000000000000000000000000000000..487368e8c7fc3ee29fbe425e2c1a35b0c30aff99 GIT binary patch literal 9814 zcmZ{KbyQqUkT32M+(SrkcXtaOTm}h*4DRj>!QCY|4DQaLfgwO}cXxLQ&hou|=j^xp z_I3Z!w{D+PUER0)*T1?|s*3Ok_%JAMbvIv|73N=s;O$w)*1^W!6X^7RTOg~6lexXC z+L(19JAUWiYL6k`A}Fztw6`iYSyW0ByBBGxD35Uzwd3@wpM1kGhnqqt<=Kw6r;U3e zg-;%@fi?O$vVvz76i94Ikouj0P9en_Xj>tF;O@b{$I1&kAHWN4?~m z=>!)|e?$4g*(zIaH(jDg4q?izOprS%kr~^M$cYB_N28`qidnl&&A)d zGs?iwft=UtoY#wIF)_cir`vQT#miZ#mldZ*-^ahPVnk~dQ>h0JH$VVNRlZK$iZsX1 zT`^ImI_g)hNF%=BWsM}|)x?G0b+joLvvq6fx7+>hIagvBk5s=FzpESAKLkrVC!D^D z`f+{jZ_}w8%x9+Txd`3*vfVr)IO25ig*qeNqA?3!>Sc|4;Me1eviuLvWic$i+u|pN zq~0%L$xKsHtH14K3|@e zT(%Ij$K8wN@5E>lJY4P2c`Z}fr(MxUVtw9T6A?TG69|hwynyXRkZQS{iR_7r2v}{F zng^EpyVx;8Tvds(&050iYyx?x3cfpL;_1?M30N!V=D+IX%=^jZj5_~)m?QW}xl{h- zrXSd_l48cbm5*{}#5Z)qmmsRtNxSqtg*mc?`qi&KW9OEZy_7;Tzk>0bpt=u<`G5{o zHG{UyS=m>qDxGhN(!W+$ShI?yNQ& z%ZE_EIFTs9H|=#JHq*V^ud2|*{wg@T!ZY^o0kfKK6Yrga4BLeCCp|AUFWDG~w%6#E z={sT4*jVkV)D%iYdm^`WoH5=#j)J5LSn&w?Azt;-AufD1|EdJI>cGE2OpN@|sq%(j z#(unJZ6$}feq}8oo*OfyfbxdQw0uXy+ze$_Ok7|sw=AaPL|H%9YC%dlTli3JcG|G!)jIGHK4Kvjlb&5n4Ak&0J|%fo`gn4h@zLN1CkkaOcYqt<8&@4r_F@ zY|9Iax4$h~RoLFR=@S4ZWv$CYDG}vPfNj)satSI#)Prse&eeHdM06GoO^@F`L+T0> zXupD^P)|f8)5{OmdPr-dX&IomPWhtO8tMETo^pom^?QZz zfx*8n=g7H<0HjUj@)EeOr>|FLkVT+Ua91(-n3bVT7SxNZy8DFiTL0;QZ*J-c6z(~>loINi9{b^@Lljy#FvzxehAy^fY*s)ER&sfS3{ssLW*H?KqDZnZ8`)<89tgnRe%Z(StVyVLgI2Yj=` z(Wic*rotTRe0_=a>xNu@3v{-ohM8PU7~9UE+!4DPqK`F;jK|-_;cZumCCC^(u>+p% zXX&{u$`#;pM^1?w99`1^l-Vs*k>)4L+DC@7v6q5KWtVVd&{6G!meSf=o^kAkLqLg+0`nrhak8Z}?sXev!H6oPIbXqeXbX zYkMkMfZh6Zdd(!cIZw1UNiT8lBbvPE<*`S}ZTUH8kW4m(f6(@V<-0wGT-m%`${GE4 zdz4Vc9w7fGDoQHTtay+gL{=m8vm;Rt*E=Gfb-Wrqf+9Z*Bxv~k@!*b$Ck^vYqzFYx0X-9jGXq=RlbC(6oBBP{ioU(q>bu`A|rOHGs5f8=uUjnaoP`q*!Rj_C=wu4Ic z+rfwrphI>tB74-6+aw0Q3622el2zK*r|Q@?*nnk}$($P|R_z)%lk$&7E!yaRcVDAD zuEtIHTzCb6lAW>`KQ_)dq!@@LmiM(#9<NfJq>fmE2vL16 zSN$zo(%N3@(k{>Ek1P2#(vFmd6+IDhF zo$o~sD5E9l7~V0g>^^=xs*5RfrU4u8c-G8{9KK@_GGMLXBy7IpIRhg7j;N8%vy{=g z%pUR$?u_BW(!oiY>Vu*v|{C>I?g2kVCfS${7Vu>}|A^kF(z zFu1)&HN!IPQ;=;@0HDzX=`K;PXB<+=$dJd?!)^035+ehN)f@3v_3iDUesa6{q6ukL z6fi`&hs-3)WJ+8aNdr<$fOY|Dj%suAxzn_AmNj=27mX7n0VSEEP=;Bq&!%hgt68S;wA(r@>6P&&-uL39-*lW3zhG3^)y|65-3n_7}=#!v^csLbW zA=>a1fTNAi%SQ0S(@8&qzqZF0+m>fvsgHijIGy1KIE~<)s|zkqv!BbL8j-nwl)%ha zYcZF9d?J}T=nNuWy0jVGlERX1+DrG~cO#1FJ2jYQ#APH(qzql*fKNwHCCHLKM_~05 zO!quXNny`ikQw3qD45ye%U^FD&G9C(>?yeLJD(6P%J|gjgb#Vh;$9vIjwgIFffOI{ zj_3(p$)dsu8&1!E2tML6Mew+U2DU2bGUb!)-&sYULGDxr>kwEEkx}|yl9^I| zo{|~a{|SFERAFM_qm!J(VK@SIa?Eb#>#E!2k}gXR9R%%(e?+$?2Go`(xGNb5qeInk zaf!aP&-X1%UwzF6=Ci#oi`CmW#izdx#-m@M@MSn7XonY;N^d{@)Ivke_TH*8x&?Y5 zZ?WA=2CT%yPDUIHNFteK=k6Rc?xgjdr&5;v<4-OqqOP zeWX9sZmTd&(d=4IdJ(_W^)xuMmipxYT`PJPa}-kST^qXNr^<>_IApDRnsl&KW* zBicvhgSE~){kfvFv?+L(H)v7bp~|5h{XH*Qe^|7nK^!JzPPb=#zJ!rsE5=Ihli!Qo z#0ULiD%K`sH^5uR!yCAm+E6-Ce0er`9FHek3dIyAnXB!9-tW-Qi|%tr#u;Yy=8+E# zwC_QgEv%M7`9@#0%*4Ig(7cu_)=@zqeuC;Y7SGM33|Ie>Bj?0jn%=$JTrlZL#np7) zkC=ktU`#bI$Xt-9Nkj(g^G|fL{9UN*o8*RG$-wCx0Ex07r|#j5TD1BEyH|s8!Ryw) ze(_z@2PFiU>sFyb49!!;QTe$)x{RUHg4ir;uXMfpXWnCpQ}vVYr(iObZ+Uz}4zgjZ z%}zwKgj0$WJGf+ic$dtr@-?y~ulZohUX!=1<<1K$pBZ`YZ@+5P9J{;n?)Y zYozfm(2%um9_JMQ4MD#C?xbht?=a9_`SXi^7fSsIt){kSupR|GF~NsIe`8IC-Mj!b zDRk(KEaUPcE+(;FA8|l@Fd&HrZj$NE)~L2exGG9h*iV-=*Z%^Fw;jNYI!5B&5oA|~6p5g*ljc@t%ls{zw=$ky{^0;6Ee7+ zr>t^^$eZ_Uc_DMPVOVh#z|l)|-%z;H2t3vB-9F7PyAUB~fP?699+ozTD4UjCGpA7l zoC{MhmaPi}NbU2le0)D+g7w+)jWieR)m^A)_Lw~2cd9yHEJwSvsY8lP6fRfFI4RmH zoe2|9ihX)L!p(-Bmj)&cCEia7$S2MyUX0i^zD5pH(%wH8Z14C$XS|Y!%+wwv>jbAN zjObqy#^$J7F>bDVaRGFLe4_uyyG&d&^b@|`6jSHiq3d0`D2h!l>Mil8r)POqq%!DK zRZI7Kw#IsYC3ZFA)Vx6c^7<#oB)CtN2vM_T0Ni7Er}~VK9t>a4RL$P+sQ2>1JHZ&Z ziaIrB*L~jx)iDm|%PNK9dP7kUt%cmRsu7fd@MDIoY(2=%r%uXNr<|oNis7Y0G9wIn zFr_eFhu>BT9Kzn+4r}2V2iB&i(WkrjhwT~~aF3yUoVCcVm2D**NyQG(`Q16*Ue25D z?l{p76>&R7A8B*tURyP-L`nbqAbFKNX|dWPb0rQ3%5K%=V>o_IAQ*XNiFhT@8VMh? z7lUNTh8}ewL0(#QB5L{E?Q32%UOJmI=xL`uW?K0Phur-6Nh(D^%$%9rY&C2Pn9_8v zvc|T;4TUa!k_5P>RQ-mMuOTL@#8=eurfd1wO;ugJ z#CdLuT)c-HXNs-rd%xyi$CwFG@-So02LYocae!?=$HtOg*OpVu)+6~9)%pyVGLst^ z)fFtU$l5tRd|v`!lW1~7!%)J`pP!Yn3n^GuxTQaBwOT`-l|s|e{aYthuCa0{4?`kU z_{-jRh4^KSMNiKTTPOLFJT8Z|Qi2_ZMpK-@I~t;Mzo_p|`Uk9k>w7NXZL*NG2ad$S zG72E2bJxn|ng40xDp;4##e;#N%FT43oMTF;oU#{duX67tyqh_Pzwp!@W**$z1)!v( zvx&0|L5v+3U41jb0dU)v$m4-nzk#dA7<2}-S6^{xT$S~HWlG&r#!2Z4Ga>pHW2gG zstWJ*!iZe4imcRUHtV?2-S9d>Aw(wvYIc8X* zYt(COb8k~Vio1TEWj|eIF`P-sP^he{T>uJil{8wB9p4m5u*7AT)h;46KTn_eo0G0( zjk>c>4+OCJ@pPct2Yeo}sXE#nG=nWikv1bv% zL9P&HN;wB}OsSsMvVtJY4>pO1TTkRXGN!%epw4$q;X_`olD==ZiXOxC@V9(=)PV>~ z^u*-A_`R=Uiak0?nqTUm#>k=77~}GM+=@$ZVv?*MMs#mYfViB5c#S{`H3&BasVPVQ zeBCIoV`+8Oo@!gL+kDJPd3%&O^E@kzHaW?J;k*me1HKd$ETmpl%A267CKT?Jf1+b0 zK&V+7%njKBwW+fIY5wY9zH!lGkmhrQUa95s8NF z5tCv1M!|lEGz1U%xh`ZZvRF*2m;6Njz z`iq7FD;TOU0yj$b#eAh@^Zrm1>{Yg7DO5t8u>6aY<1c}g7rv^M=CnkMHG$*}Z{48t zS~MC(=zJ4-#R<%g@fzI$FVkq%k&$6Gftk#_?uK~(tZTK+=a7h+CN3pk`6XCJs1+DU z%wnac`#yP2)_cSPNRK9zIRPhQB1VoTW|=4=#z4g5pt+G&e@lBbsERl17FvpG-6pQA zYg@;YD5Jcs0ofz}F)*l#>&Bl5l-Tk~eioSg1F@5Y(vgt%+TlN^gv|!hPw=@j=`m;EIAFn6 z$%vI^jI}s;%Vl-LW8VXmE`f3~S{IV1r>Ipo!RbgcDVL^bTsudO>Z$l)_0#UYy}+g< z>YW0JL|0V5q>VlIoIpiT&U}@yxm_l=n*!t1fWbNpxrD|^Yt^|6-W_c74lkECEPxRH zjgv#l6$baM^Smj==%QiuE=ZtLxVZ^yB&L-C|LGj8WzulZt13v2s$V1GZ!>>ZWD{n& zJWr{SFz9k!g`00cOG6HAcF~Z`JTuQb6k!Id(KQB@$g|Y9v@Qy777#Ws^PQQ?74qP$ zndd3W{g#@J%hs!?A_3!EI3x+MP+6%AVeBuxt+E-j*1%&lCc3Y2cYJ&mw~D2Jgd_WRC2HSLLXs}hbR3msXg96m4r3kYh+%Mvj_+cODRt!f_6tQI(i8#{mk?XeAL1c6 zG%$)z87cg`mxDb~Pjhull8QC+hsETLr7MQrX;`K&fC8RJ-FP(2j!^411K&_?;2v#N zyrsPQbyu`9#&Tb@vQR2lJ2Ym1$^6Is;W!6Nus($#ZJC%`m4h^mO1ac%ifXJafFhAm z2m+n&)BsDAn_dE>b4LN$ll6pFcXkyHtjMDk1lJtaGYILo<|0o}7AYkW=riBiulv1z z>|WQpz~Ps(r?pq)e*!-R0?E3~Brq`Ml5qbD{OtXYz}i27A1NCXXJ=_k6LTjMTaK?B ztPbY3Hal;DpA3Fd-?3`rXLg>2sFe@w#$VjOjL`mEDNX;bF|`m{TFF2Z2uugq7=XAA zDxWWy9C0K!KTc2pGz|_Ae)kIIxL{3gXzV?Nj`hnuA|!H0ec?klEo9^NxZLvfK(ixE zJ+5&fTEu=k$gh{XIn`n>w;PpiSmTK9zgB#G9#!<$vt~q>*v3ij14NXbsfEq&S2n42 zJ>}nh9hbi|r}UE8q|mY41?K%ytl!==PerI=-8lSu=I2S_Y57pZzvr)L-GOlGbil8O z%xt*!VCp;n9-~Get;iI5GCAYwdm%X_Mt6o{Pk4U=@Pr>J!7Az`$^$15A@cbyD0YPz30By1Wn5%Db&Xk7Ct@>~v8PeK=XEn9 zNur~p6BScEq9%@$zL zoGu@n5V#o7fM_AsQiXz>@^l-~ib@AF;-|aLNmpXuM&5u5XVnXY%rybBj3}eI#>6?RXQ9d`jU(>j$uaiilK}MA4FzwQ**;bS7~_hG zJ}<65M3Bw4rVFfi5284v^d4>xKG(wGDwxNUQ)wF>ivllsfsWI9MPS3Q(hy6yEaT2+T2Q z?AgVr8s<&8LrjGoWO5XTepNm{2lIU&|0(gF#h9#$%-$a>{?EDDNeyOk(=H$DjYIL3 zx5@RMN7aZBXtF+)uL-DQD{hce#2a7dAKt{ImzW(;=wY6rOyjN28YE!uHLD!`BZrl; zj5)4Syf`%id7k1|)vA`v3YV;%v+=$}Ud6!J61sj*8kfo{+o2^nbr}(2!8t=2H;YeS z#UW*&ULcz`voMZ$J)lSdd?dt02S}i!X5VtgA@5}}e_s?-LvSkpJa3((7t1~9)Z$cW zl~y`7ebmGcj+$XgP0#szK!Da=kCp;b>vQ{#DDsKBu(O<-DMtleRkw@9G``$|tdRSf zLhY30rF>1bRyvc56#=bPuHAHt?1N*+7Dhp)%lXus_wf4V%=G+y~K@diwM= zj7|Rf+cF@f;$PdYjzlMVm5 z+as=LiX>6GR5%*C-y^=3CFN#Mf{)(mG+0dJb6*n7xs8uu#az=oD>PQ<4(-2cS|qXa zmGUYhpsDYId1y$_|l54rZh=2wXMi{evuzY#V^ZVeDk9_2#ryLn!O8N;rxu-o9dKX#}db?RcTa$NkU6)`vAyrpPmG0?IZWb~(hsNth$ z^KDwYK1`A`IK`;S%fk4fncV~a`FvldLrTM235~VppPm;Q`Sk&R@$s*z8PGF=<6^lk z#3sE2&#EDplWqiqAhoFBu~zlD_lY2Mn;Q&5?geI9j(bgww24ogjsfM_Qwg}&ZIUxh zt_Tk&NZv}?tn(#%O}SXA;d-lxi%FFP9WH)VmL+?Q1^5q!g=b4;7C}3zQZJ0m$jxL` z4Lj@eUO)2=)-n6vZ}1<(lD)-JkefI7KP*pE2aSzaP`Z4_+I&Z={GA{293u6$ou84K z*X&iX(c3sfdZw&7xi5w}`KD|=Fk)=SL4QAf@6w&x?d zTni{33ai7VQ4iP2L&lS8d zl5;bffB7THL|#uh#eLgDF4AHk%+l}AnY90OmvDD3mHFWYd;X>$MNO76->=cvk%G~i z^324!k*_mCRMn`5)Y_b_t$0fpo9esZXehr|Nfnb@6&b(@6W z1s1Pvv}Pi2>KOFJZ`nxykBYZkqkn7oho=79!2hm6kL-UZt*VNM SNdJrj|5p3oT2GpPr2hbm9m3uK literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/full_cream.png b/documentation/envers/src/main/docbook/en-US/images/full_cream.png new file mode 100644 index 0000000000000000000000000000000000000000..4f174a0b05e2f938563e3db7031029171000f0b1 GIT binary patch literal 9359 zcmbt)cT^K!yEOp>g0zGtEl3xnhi)iB=v9hXk6E*3=FB-W&z#xMe)c{wW+uAyw4AhLWMuUE zdT?_xGQh&c7E42UaVA(dmiJ;ujxf}Pll2V2XmT%(fIfP*eiwVa|GVjQd#L?&GSKIy z>p$)#yB5vXMn)zG(TCr(L{4pgGmT#yd$vmQ-lg(k5PgUya!!ka?&9^Sy>_}I@!EYw zi`-Qaksq5XB4nQDX=UdAaFi5VmJ2c4WVP&`e~s5{sW0yOGu|4_E2FqgpW>m*_f$WhMDJtAmvOy(3UJ^@ zVoHSLv~{+b<-aid zgT|FVD(}=ASX^t(tRqc2Tg>bqOWb);psy%M0L{%Cg+L_*g-Q(a(7HIlU~!x-oe~`h z%_$J54@h!!RQJF$xnb+ZRt31hIdC$i!;@S|Y16pvm{QeWF55y4`hZN`;N%A@Mnx*$ z9(>ySelpOu(#O81KW(q}G`H&IdVz=_=~AqcIA5XpEZa1Q`|1j5-QuB>qjL`=@G2PqIo(%zI+0XgcBg zu?80REAVW%R{Ml7{(yYr#4<_JYRm`dmL{ERGgThYGu1y{=>LPlj1XSp134zw?D&8@TGLr$ow8S`HZQ)FT zrWzEcG!OP%9O`M^5~XN3c=s8d4DKBTq9NBk!Q@t)QYUUgaHUZ+3o<=g>BhYu&ju=2 zMkWhLgeH$v-uH>hV1T?iB2lH+_+UT@xxG|ioc)HwEpKO-5^;N?shXEQ#il7fdIto$EoOW5 zRKLe3gW;+0t)KhAU@EmNSgNti%)9~HLMd~OEU|}XlT+Gh)H~izWZwb5+8^{ zXXTWwt}Ks2_sQfc!11oEcFA!(ZS{?yfX9m%d3ccW5=nI06AUIT2|-@y;vYMDyrL{S znyaBbE`wjn%;FqWdRg>{-bRFy69)*L!lmZTGwRv!-A~><|2+H^wJqE0B1{k{4A(V6 zt&N9)lIS-CPbTkhU@9nHc^-7sdIY#h@=D#Pp)ONo1s2_A?h%wn{)LOCKK6jQe)N_hyZYvd z;kOWFY&OuBBigEmkj^0AfE#iGVlFS6#7WACb{7r5q#IqsN5F3i!+erlO{BW$b2l6i?g4!E(g{tfSdqM|9;J44GSgsG$Q zjTJw0Sm30f^GVw(<~;nIvZa0d`mye18sVOAe_ri8{-)g$=<#@VR1?MphUD7tw5nKh zAex#IX-P(JO-u(UG-nHrbTIZk#9U_6&M(W>e6r4pErM*d1s6G@iR*6Or*#)Udqdry zF?n&CsN%kr#*Cq5Yv1Au6$ym$3xcd);IXQY-T3Ih1!iX-u!d2wu`EE%1Md8L@^RSD zRU%i*K2o!pS2qcvSep7^iK+L9KbPGOWojC-%wwyaVYNpDyH5SSpR#Lu(SY;AbEeIQ z`CW3Ae~s~19{aFu{)IBKmi;=j!#G5wEVSbCx5KVSTXFn>2e%5AWG%tHSs)OrnB}#h zkAyCZa0}fuTsBE@sqW$e-|yvJ@H8$ZU@mU`jiPXKN4ZHC4e^TYWCb%Y2`w974jz&4 zQIOh%AY1F_JnuvF^yHjQSj{dn3&0pwXjq`)1@*ThC_n_pCK2$2RYCFj1tyS%2qIHb zVrOw-u=HlME{*~s1L)O&moVJ}MA|TPiwzZV_!fJ8!E6mF6hA~gYlqRRl*|l#|A9%T zx2FygL&ygs%M=*tHcU3$O_p`W^X=eK5p68N~v2vMFbYw}}z zKt}pB5o>Ls+T52nGp|JB>7=RW<^}~3@HQ@&d_#BwEdT<+!bg#KF?krdJ(PSIkQ5Lo zPdCG=Bt!^XSakO;LdBi!4|1OmUR~ya@k@ty>?mr7!ZqO8d}=@mysMs`QMgJLmueLq zkYniOU7IJ_Y|g(t^KClL!gaLNhCQNJa%II{+Ix#61uILOr(Gm{-_@~F>i~hZ-2cF3 z9#^G90{l;EoAPN{!2-eV?^tFu6?JXrm$7VHP#{j`@QaPIt$L zG07JcfoL~c;j7q+HGC7RDJ~LQGSs?E-kDDA9r4P1{E~$>Np-6ivVTuNdifz65n_hmDoB^-hBf#gDK)Z_tul-| z?BApsAe2)WBNGF`b$YI@pB5Ppz3clFmTSjbP}yt}h@3K7No#$+4CWK1!+nut2zot@ zqRwZxKtij4PisS%FbVB`ce-zZ9$?PTYVc|@puLzWrbMu6@F-2+NV|-xW-wB?u2%^M z9xm>t;T>;*+$y7c8`Eg2XM~dkyvgm4S!S_{qO%bx?P22Gy9OFA?V+fT?@d;C)mV1D zfIirz%A`kFMxqdCxn>#?{e~yf#$?&l{#zc3O6i87XbWJHR6e4kF_%Do00O*nVLusbDKylj(~~H;IGQwa1kVUA)q>U2`chxAMq3(3}@M$ zzkM%f>hvGwe}2oD(j{}z0+ioWK1Th4(uMLFE;iKcv&j{n8xAcbDK4$|Hu*`d^(c5u zUTB8(@rhDPhSAuNQSHXlqpFrJD{KmrR!$P(EqTp9Iq-i7ztFhF7MtkME~UrUpeFQwD{x(W_`A&=c3zypItA>neqllSAq!ZlrA zOWeWL+}lpn_m@g*5rmq9pZIVvfrmSaw8JAXDjxTH<~-eqU^{j z5Jxqa#*~$;K+HL6PK&vmU^f6@Oro0GS9Z{e*CSrNA8HaqxSejIGs=mX-&m+)VS# zY$|2h&Xa0q*?I2X82dIO%W?r|!v&L4vy&c*G#uO6s?(-ON>=brVJXA51S~O)b^hd= zpIbc#$W;zGv+vSbSAJ`|BP`!lbyDe`#e8zq2iMOXjBNRMTquv6OwR-+?Zsf$$bhQk z(AE1Y(z||W0$e5vMYEMgpgcxJXpN;91x~t$Nq8;PUhlTW%5#5Bc^~J>IqezzWo#Ae z?%f9ZbW#4)d@+h>G{8y@;`xfGE%*8+4k4n9G(q7Qfb&Kp(#fH4$F!L{J+}8Phgk<- zQJmH?UET{<*J%dZT*vdR_pw?;Jmq6}tkw&RLg>}2YW!97Ih3QXH?n^G9+@R;O3$XL z)hZBn7W`+;3vuT`P%1Ds+^M+w&5kl2{Xx`w z)5ZT~e7GUP%K47xlYe7QkslOq6l4kcF?aRu%Uq81-9KCI2%@rVe%f$65Lrw*?D)ZD zw*5}4n7<#sc^Cky?E)v>DO)Zz$5fkT%UVU1n$Qoi+{e3z zysmYNY@#{8$Hus8W3|G;&6K!0-=ftLSHF^1Y-B*dry$5Ft~lC$G?f2Wu6Idly|NHN zy*Z%aYgYgZ8E-ZN>xMXKO_T3w_Q34|hp}QixW=;4;u8m+-5%bwTNerD?e~us6@`E0hjn{J;AM|%X55tdS-@4ZkV1|(& zb6sDs&{TkY6u%FoTh)*MreHrLo_*`P-mAKEQ8gHwPZ2Z{&{>=S+aJMdVLZ^VTIp5X z1yvc7t%0YZDc#IOepi+HuTi{$7(pa=vRL{AD_tw`mjI zZV7ekZe+d5LR0c45#j~vZoWuXkmi4>pT{;R^s-w)LZL$XKH1@#xl6d3&Lw9DTf8}PC&@FL0gh(A)EKL*a35~|Hsc_py@_A zpNg6|iminllO&$olY|HN^QEfm;P3);g#6JBmBg5eI>4x{ken{wmBP&@bKB2ypB15e zGfxEsnuhydU}S>F2Pw+TD|IbeRfww zWTA&9GMryi2-U;!c9u2@L)(M=!ou<*9H6CQUoRe#K9-yAuwJuESS?Gq;UMq{j;Xh{ z?z1NfHTG8xl)y5fQ0?l4)0&E)q;x?Z>mGh7>woag?=37-_^jnx-bJ_`Mh*$rJ5K60reDc9SMf(@$$z>ZM^&jDvK4Qv z#TNNTR^r{Mh!4!Msc`9JD}`yR4Wt8lyW|3>a98* z;64D&pd&UJ79AE-&|sm7$^d+EnO^D>JK7y8Nosv3|I-$sfz~ykJA5Xund7;@M9u?4 zX+E^1(W_iol(|}_Nfs%S!&_sJAXe!vm*Zu{f4ee`3C%HDSOE_Q7+L~jjG=dl7Z?S< z#FHalOB4o5)HQ^^M}9}0+iy^cn~Pj6a?}xTy7E^H?bU>?QgUyMk^q?!!Gc@nMb8*f z@XRbP*jNQcJL(s}>SzG^ijE_hOu|C#V~UxKZh6((=cgs0yN>c;{Q(6`)9fBKd65Fr!Zeqiu0~{UX0TpE<$4`PDsMvB=A&3 zC{hh8DYfKxf7yJ~$X9P}B7mFw<~iXV;bc>^J3g`CYW)(CZ--nUkks|dudz}4*YR6- zo&)E^%H?YApZdl#*Eip*m+ELnMo6|_R?pA(8WKRBKp$geBuXT6q$eiF=V;; zQr8c^6(+`KkZHPS7)*qi49MGzZ*#*V%^7B{X+8qI*`rWUA5SglX^(AJB61g(pg_qR!ChHe09XK9!Y4un2Oce%SAnNT+wgLTyvp&0Jr~ zTCe)sE-zIYF?ndv(rRr>U1}v=(28hK7IdEUU+1K-8hKsGNGZ3Dee`ux(1j5(;!ySA zNY%;dAzzxuLG@b({-b8IpD=m6qekq23M=QRkMCNYHWsAj6@_exjOzsR^x({eTr_xS zjP&W`p-=P@aOd-Gh?W9Q(O$V2x0(pu9yAqD6a+G^qNH=X)m{W|V^=zyi>P~K-c=W4 z$V=0gq2hU~{j(e+wm)-39}*(}r@r4qv7-j&qHyu3-Y0XxG* zH{19@lY{r-C`W<)R=|XV0($DTAw)v@dzxozR#Op{K9l^*l6({m7noNX(aTn2FzIL0Z6OUck14!f!=#hTz(s1@%wXmFqi1=V@GM zn8yav<=gK9?21Eo6VekrpIsY=!nGUMp$n z(s1n0pqvG+7AXuhKN>4NBB}1^&>dq|NBdmKPbz}vYI>0#N3=2&(BSX3CzLLiA%pEu z4=$dOv{njO_YL4c)RvnG9X>DTflPP1`e@R8;8T_j%81c!O`g>Q)%=6p1kIn-{Mwlt zbqZyjzb10QfN4uTByV)O@yN1!WI$j{mrk=g*1$2`>OQ=U_M3qEXMm_w4UYh?) zDO@94#aK;5{7`7yTqyS%hv^9a{TP*LxaXd-0~irlnUnIZGYEMxK?y}#nZitUI+1w7 z)5w6^qR{(`qqWO`B|pOr9Iw-&s%W!n+jjj$#Yi%#pG>BjpcDfQXcy~;}GVu4eA-m(~#Yd zNQG_s505WLe;O!{uz|be^~d}dmQA_6$k{4;Y5i+m_}%9YXB&e;Wfq$DYU9Vx`S-VD z6SMx-7MW?v7dfNcEHFA{`?EZ;tic56J(O4&!g$AFB8 zV~*B2o+;QOJCW3SAT>=5TZSGT+kRT&-X)E%{9r`(sDCSzav@#YZtiPtVU+ew->G#; zBwDC!Wu5HSDs1Ov#oi-jh0Te6j5&FKqD}@|vBrD5`qSJt)I4Qrd~i0i=&QE1Z?Th{ zF!upZUemdIoUFe0lMJ?aL?65N`BpI1%wp#WY2ty`*0s-_s5Wj7yoi6+qUug@e)~Ps`)W*4mxMGn`3%`44hi3QUf-3IdYpLT_bh}+N)BN$Txe=p z@H4vf@+3um-GiR^ywkl;?b~hH``f1tk@rZz zC&+?!*QoKyAzk;RP85Fe6uHG)s;VZlyw81kYf#4T2F%3~m%aI+_h}78v*_p+ZalON zIy=w9W+ScZqA*?V+NknJcn@$HCe(bWcE)ug$@|=WW@=vKZ0A)83ZScPAtgt46kRUuRPk%Dr&u zEI;W)aduwS&nC?FxC0f9J9+rVC#%)^c=dRlUeqE{#elkVvAis%44EE#;C;Y|YI`s@ zOMg9bUh!1Q&(6rVmEA^KK7(g=*`z4u@)Yz=-lrdvF;ZbCZBj;mcD`7eNi7)q+5bIm(yGuxXJ&FPyDKX zmlwN_DZjwWtsfSdO4b;M8TZ{3`HLs-=ir*O?Kk}D{{On|Gor6Y!j>*%oFdE;`0fq4 z-7(jZSus!(i&go5f$x8L_9jgxr%6&R|Az5d=Z`P^8&STa!{n^4_zOAt->sE@$=Cne zm;2v`=M!|BKDnOu%5vCGQj&wD%Kp3Am|YN7lrTnvp|uG3r7QVW&=E;Em6V7)&M^;| z;#V68>i5f^14%1A&UTvO5|zr+^yJIrO9c8Fq;VdMt^vFdh=+s{IoqC93IgtN=GPWj zl8tjp^C&SFBEMrUATHk81y&t)->u2j<7-IO>PT<;3EXo7I8Y(euig4wq=Pn%OP2(Y z@in)2^D_YD5gVg1l_|r;alOAwgjZ^Vz7_ZWao>HDtG7zX*r$o{eMZGo_}KxhLW$=D z4kG%91Dpg@6rMJYZjE_kiGk5)1d3&`wNfk|wvD99W+=uKsf2);}c*3N=3)J9XR#E*6I zcr=?dg)N;@*a}U3ZWp5BRHBTCcsp5W@I39D>^QyrWAkJ3$O!|GjMY_sS$3?s-wGBO zV-%pmfn}6_Nq49>*+xMXp+QFXELoVM>NuWQS{0%DK}mjOw8l9l9fQFDem;}0GYGgn z*6uG807ZY670h5 + +]> + + + + + + + + + + + + + + + + + + + + + + +Application + + + +Database + + + +SessionFactory + + + + + +Session + + + + + +Transaction + + + + + + + +TransactionFactory + + + + + + + +ConnectionProvider + + + + + + + + + +JNDI + + + + + +JTA + + + + + +JDBC + + + + + + + + +Transient Objects + + + + + + + + + +Persistent + +Objects + + + diff --git a/documentation/envers/src/main/docbook/en-US/images/hibernate_logo_a.png b/documentation/envers/src/main/docbook/en-US/images/hibernate_logo_a.png new file mode 100644 index 0000000000000000000000000000000000000000..0a343c4bca60a2d585b3d9efe11c9a328b4c83cc GIT binary patch literal 31862 zcmeFZXH-;Mur=C%qJn^u1rZEL6hv|p1rY@al9i+&AgK{(l0=UJN){z20RfRDAUUe! zoO6?N&Kdeu<2m>H-uw6d-{Ek`XxqK_TB~Z-oU>~CL0M6jgous^fk2Qvd~i<%fjD;# zfx!RgEIxd)qw#bV{vb4vm%WF;;(mQ8OZfz!oO|`)i7f)bbq)6$@B26=7=d6yJiK>T z%`tir<8BeM6T`jBa!%Po`X=F^-|DFeN&H8n%dZ}Pp%?fnA9*fUB>t0}Gk3)OT$PUI zBg5jDO|zA2IXbtDIuN@eLGx8-qRM&O;uZ;!7-^L3?esAu(K!KI4 z^$+xqF=!F)x>YgCs-w&V8*8KhK0WpU5?@y-j^aLkAG2KEN{{85yC+hskPaZ$p{Qq7q zh`N~P?_YLE{qM#8ch3<28yb*f|C>&T|3wW1;(x&rf%xBof>Uq%9;tL5n<*U8i6~)*w=kLprL@}Q3Ip`kBRtM_M9;xjYjQFhTR8efA2@Z!{*TBixUxTn|m`U2$tR8+o+Z#~wGY@Eq83=`j| z&YhS@G+aAcFV`K+w}?G@JDseL6~q)9seYB>NYW|4eOvT0QpV?VJNNWLg@E|5q3gPK zbLHx4h>pw1hWuoCvK@bSH$18N_cW76-ij2TU)_fn~w>k-Z!HS!}wDb|a z@28YnVq+BNQqDw}aa@^R@!@m(@5#@NxX{<8XC(%Y+i2M5pK~BSXK@s{I9Ta-iOg`L z26LRYBer^OMZx~!%Mh^llt}-1OsR`4{cZ7ZWl+&*Vad!ND}3{YoIoeT>Sn~;@4C^s zyah(0a6Au{PX8p`M)NFv>_ot)m815R%;VWVa~@9NGwUyEtm+U<^~KHynG(5rs`>?X zjmgt?3-(KW%WwFViE^2bwyZ>U_%jBJjXL4p4KLMi#+hClT(M+g3%evrB~W=Uf25a5 z(g^PGRB5EBpardq?VK}j7rD-eI&Aj%Q26FJcZtM*aMAy?$0R*NRGHk;Ze!M!(kxR< zCc|I>s{h5xHD%-qDM^J0pJ)m3lNw{e5>{MA~z1`Vy|FxgLK!wI3qVXPEqS z%3pn(SS7*scs?p${nZe@u^REZ{-NT9~7rQE|gcyj`>tQ1Mj<;qB*Vo z0`Mf6=a!camUrBD%NP$8>7Y9(xYGqY_7i$O(ob#aw3~%EdRl74&_F%SUrf zKk%Z+QP;(Hs9lrqw^Z%=hb~h&x=s|p1=L)iaJ5Ilf%nh*im8*>c)Qx z-h2floSdqEG)uX`{3Da#3oF`iuA^f>04dv?tK-@f7vW8tM9AlReu?l39BnPYbo8O^6CTK;im*E1-fQG9U#q4i}KZOGOE!3v>d@2*j+ zy%KWmyf4qkrB>tDQYi?8+$=;M1cW#2n-n}tLdMam{?TmhHpk7-(+6t#sXMYnMIYMO zP!@ch84-lvM2oY3($bdiPPY%z(?#*C@4kHL;?%zJvFTGxu@+}HI6#`u_U(@A&op;dXdU`0>-01e zNWT77>k(e$%o$;vOnf9Jz@Z|X*{pNRcfhpksf+F*^|3;HXLc70up)`Yc*5rEi>%5AC z{@EA@*G#Rf`;Q;JIFKb&@>aw{R8=ucN=6$mWH0U}wcQQRDoEo;pJENT6It7EKJ=Fh zJ)+=&phi7FLz&Z0A!)u+B=wd;pg zhevRo?@vFANF5XAzmV(T?WO(H7rPuR({Mhv_yo$Rll;7D5?CW6xL)vz!RaYqF3$F` zo9z1l-<4l$U~%@%|N7D3lIX~s!bQYa@0l*irhx&nIMGfjPA+1AtyKY$XrV zbBNDZroi4L>y)>3?7#k?SL(p3x% zvRRaxrTig@<1DdF?-Z?_@AG0%d5CZ4;ds$-ydgU0Qc94D<(kDbCeKUR@I8Jy0gkm@ z^q?#XZam2UBw41L5!P|`9ML^$_wMA0uDato4$B!@;g!9G5#h(3_NPZ&G|JgM75rH~piv`7#`fb=zWbf3;C;w-Gsa z!bK0)DuNkGJ~J@J9ZkH6_w8R>gOWvlDzJ62YW|aw3lI9j^z4!uru?A4jcrum^IThB zdQ)X837Pmsh*e+6Dn9FFcZqi1y-KU@5vqQRSSH?1&-jfPH(x?YC)00fzI#088^!uN zaL)o@hhk+j4QcEmHjBHkU4mVh(O+V(N=RLtumcvSAT0b(P1a;jr#csQ-O-5vXGASlM?%RjWne4MpG%T2!<946(vh}$T=vCZJVwaZX zUQjtWoN=Y=kB#M9i_)2%4WpU+GUZ=IT6>_m7}n}a&pD0U_j&2!Jc0XyYrz*3JkEJyR|JuvtWczxuYLB-xk48ea!E9A&*7K}?c=Fk zava}wks1Y|*M#Ydtg!^yFfRIWFz1D72v(A_GA5otna>+Zdd5l5b~dHrJyscox;7{w zY=0F^g!pzLm!yBE;;2J2&gr#+tM06j;49`Z30(Q1l)QL2As8)j@M$K_)uMH|&04%0 zYTye_8eLm$!d3^pW+g90ytuJ}rtX|_3k!|YUCs!$6#BFa0K%3_)@1(8k?byTn5NR> zoA!BL0SE+DQgX4`%5^e#?4bL0w@IwtV^s!Ziwm4b{B=Y%jt0(@+l-zWabn9R>Hlb0 zD=j-pSW0nYk3CWSe}L@AtKw{;wT84?cuErc+kFfUT*R~D zZc*^9T(@$;{z9w70ZXey)VCGkkL}rC=OqT0W0*eJ@k=;4-Jw9rSo;|lyJp~h=Ei6- zzcjTZX1Kb)=Q;G~=QVf^!1T>HOETa!>^(irQRUdBQzW(^ZHXE1SmSj?@>%Ac6)9y{ zTG3PMo^5R5Rwpc;7fn={O;l*QI00o2ciDarfbAJb5jT1#$J)dKFr^wx4HeThc#8f8g zO>Pf7C_DT^3UtbYqHj@O4-?;=%JK_f4ru2=u;#&mFhPmwPj6_T%aHU1%1N!*uLzN>tkK7zh)MqK1 z9@i-p`dmWDWh58R7nzX0!`N&u2Td6VU2|r15<2G)XgWn(ZSO2{25mr<2E2Z>xuLn@^XG^U0zP3K^W2@MOoaOG$NfJj(%ARj zEjX6|fq9=$$VIQMUSaKIXQ|%&owlVo^V-T|f^Uw+**UmUJ=^CvODVW9J*WRJpwcDc zjp`>ufJuZ$1Mb3jN)BseUlkPWy5FQop)^W^8`Elo7uR1H&&DLis|MMF4l+q5=DGZH zJ+_9`M}yzOZ!CQQ9Fh96#0lwD2&DBSU=V8MEOCyaUG4qZ^6>$L_;<1!6ae>Kl!HBhPBQo>A-{ir zk_Ud1PlEbZc8fn0-pIKgNrKNb7_Er8Igy>7h)kgK^_zLKF(1JQc~%a}-K~TWk(3Vz zrY!5Qv+aqbJNvRXU65NpX( zdHHP@QPMMmpBV2o;#dVx=C%{c{N*<;WyN*G2*0XUY7AGIJ-Lm%&zc=_pHV+a$azgG z+8_;q$4Z3J5*D^utOBbeUUew;Q<=C#xDXgHStse{K~%s$gg6tVh*y&RX6%l0Vx%I- zq!WesPZvnvQqhPHGwFd@Dy1UZC^)*BKhz#~66iVTi(KL%Nnx?tE6SN5xB+&uDr(Pw z6#SWw>Ze5F2XO%m1}^n8OwK|obLpS8K^MJuFB>EwiCOt+7#D6tXb_qFv^d>tO3XY9 zJGXV@W9>8ZlpoCFJI~AHL_B(h;4qdbOk-t z7Cd7<bEadD55N-zIlpdb#{vqC)dY0!HoQAkZsd)!cKa3Jf*KCZdR6 z;r8b>y3?QP>58myw+!ac2KF6)#M8Qg(YnOC6QBKr<@HU8_o3d3zb^k}X~6v@tIbeE zxvCc*)gE0mWfJ~5QLk2~aPJ(Hv}UwYfG*&gkDcYTnK4uO(m!#f78X62xQ>Vr zHRI9G#GHs=CBe{_Ky~!%)w>LQ0t$wS8Q$!H7c+f?_l1&f{*e{Jx-)>K(?XEiwPCtI z8P2|=-niIM#9aMP4YRzJi*Id;opBQNjD$FXIFVjH^UavA=u-0zK%BDI|J0s6`8{Lg!u<0i7O-7tTI|7}HHxgODbQTKsju3YX1fvQq=fwb#Fi$wA;ftXAe<+fCOC@dlII~WbxBm5Ou}f}iaa{cieC5a&|p<-Y;d1(!xDh4llNh^e+cTr7&lZAc3QYYs@$ zU9vnylC#$yT-8h_=SNcar$0DX^~6v8By5~NF}7WJ`7yPf$KxHGf||U!5vhOk|BHt7 zfwHU)VPFizwt4Lr?~icQUm%PtUV?;!|y;tIhFhyDO$!oyFEG~x$m zsG<&PP?{b0YyV@ycbVUB#Aaxh%BRO$FLW5;iSq?r`l)e|sR(UY-vRQkIWa`y|7Im4 zV3#%WA-=HYWLwpv^h{o!Kbu%oFV#C3`mH@16d%sl{IUqpv|i6v-%+&n<_A-vA#dmD zusysRp(xHLqySX)}9)vWpKEK=$m|r-@zTydN!Skx`WA>644HJ}_uEB2?Uq#D8!Tqoo2a z8@MRaDQ8D#Xly#$t=|2`qT|?Y90M)gs?zfVv)NqFB<0ct|C;hPexHO$Gy1#K*Gx~= z=X_7=hefi9F|s^}aV4-7*EcahBf-@O@yb>$3b}*!7$A3&|MB>lf zF;(A`a+CoVl^H&t!_;e>S@Q({)-&1hfi1FIy40gl-Qf9`Q6bKKrI&vf+N(##aP)jjmq2!?Abyf`SkG-+R5 zD*Q_QNQ!Psxgg*Y1Hl6(jFuxfj>AZBY-FB6C2_bfejfNF*i0q7)ClU)7mF1oI6EO+ z=~S@kGuC^88Y%SJpI-z7IPun5e#kw3Qk?!BA{F0l{5M@*b>sPHA{#D*U_3o>)(IIQ zkKb6TCrg+DD(3ARj`s`?wq;oKwdl08t^nb^#}FL=KjRX;ioMnH1GC|RZ-;Q%`@zE9 zqV|^KVOqSkc~G7Y2v+k$MDTq<>b{SLEW-?Rq%qgn6t|~wcmSEZZ9q_IDQv^JY_OOu zRzg3oQR~7QBq?^)C!2rEuKe^ZJt*uTwc}NrctDeMx}Y96i4f569#ffR7&M8n;O#yt z&JMEKlaeD!wcJq%WV&8&ws_vRJ?!{5d{LZVPprU4a?REtn$P~NBmeT=^|tk= zLvbzx`9`@PNSJ(}!FT~H)ywJ=*_+{uZS(mF+|hKa52B+@L>7q392ks6K(UqzWkR+8 zBIkFl=O|1Q`fAkN2doZ4+#kgm&J@R{Sf2V@_Id>$GF0e(En-w-b2G*n2Qy z-st)M(@nBJj9!YrT*PmkMF{R_O6*%7F65B8?8*OK0jBH*&f#YwU0{994{n@KxIb9R!iehcK`>n*B9y~$nsU&K5 z)BfM!AX^!gu_Jie{Ht%_oT2vz?GJ_N{!bg?=>^0zj=+O2?uQ+ki4|5>jY&_^mb~zn zf-}i#f73#qyUdVl9H&HgNmPti_x)1gHB#qWPl`)f7cS9M&eBRs&DM-VSMBv7&EwCh z|A+j5&;pPNqKx;+hSo2xZ+&qP1|-u3;`EsY?0k^HBJ{QM+3<5o?Ml}` zAu-8H}8p6}rS{C@a_-nSLnL>Ta!R6j?Y@Fwa=;7zNa z8x8RuWPo|e?Y6@$byU7wsj6=VCS6eCn|ojwLRXwj+EUd8Ofc{f?*=G__-j)*EQGhp z+2|Uts#%!a($#?anm5b6(7@xt*Xdt-kkyz!|{~@Tp*#NGD&7EW2av_L+Ix64ETxMLr8V_SL2)w4Pw4Z6Za+J0jBCOhD);S)ZH_o~TAqZ9B_QNg@+=w6(I5wWW+{Eu# zo*QpH2oM9ENDl*~Q}P1Xh8_zP5{f*8O*q3x-n>4|)y6~z)TXe$6!aMYI*qgBsf=6)Uhj%aO1>{D~a6L-xQ zlcIMaA;5$mCdE_6gM@&vCiwFQ%t2<8aebb@1zOK(>lr!G0a$dE4qus|uWk==@}_0R z5j5kVtb#O=K64dittVg)t4($H=g%CuG)Yv}{%EJ>P+b2mB7U|;ZUM0GBwy6tL%!4x zAO6wi#8;rU^4|Rl3WU&$%S-X`cFx3An!>wsK>Xf}jl~Yz5=hff>^kSyZZC?jc7=(0 zd3_dfN=}2O@uG3>6Ch;6d0@d(&UJ5ACc-2EL>>6F|I>nauP)F@F(Xx7v&CFNW>McU z1wc{#WLFme1Xb*=1lV<9u11a>mtf^rkTNoJ3=Nj<&n&xjRpZ~@mUUM;=!t<=-Q9lx z&RNFRNGe%K&g(Z#Z9rSXX78}Ft@?+<_RtU{gTzhOvun`01f=v*fnCIW z_wv76oSlw3@AKTg*=m+DJEtlQTG-6sp}n%9URU$O4VC=*gR{44UnZAWTbKY?LF)2$Wn?hqeJ2S8J_C(7Sz9CXurqo5vGJOa*l-AkW%@Q|&%W><*iSm@-3KoMfKj$Fm$}-z)Zh_eS<&=#ghH+=s5ubRxb5D=1s*1a&3QOx7Pgf>j-SdX;y zN$Rj(FO%5EbThgNF(A)kCr?=OCNOMh!y$|;z#;`V^9haLT_R`>#)x*>tv}MlcPJa~ z{n_HvJNYeRq^+-%w~pd4>J_ow>qjppw7(UipQuMKAbU^E*Fa11yAkeY%)no`Oc^)R zZv6FRUNu^Iw*1n8-VpuxQwQi=7|SSZ0f{`Gq|iUlaO%A}v=o$9ig5iVo76s*jBlyO z`x~u5dM?v54$*8Zwq%^dvq%$nNXQN!p|GGQSd0D}Dw#sw(3J(hKv_Nadr;K-jW$*v zu!qC8@lM6lb9@Nx9gvd!_6j^4#@&qll7zJQx2sCvl?s?5D)B7_bN0Y?F04DFVvtWp zPkUu~PAu%u`2x-qFBf5M1_X+_;`kG1y95b?=@B2h!mVpOjJz4~ORM%fUGIwDMj@*Y z_*=v_M(tHv6{zz}ZpGQ-VCvk*-+87MYltc0wkY8MH|obj0tBita=(~BX=wzPt4x(y zBfA z-?3kSq|o@F_QS$Y+7L+6c!g(Lwv$N^3dWU&cSptbMG!m?X;1$1g47Cw>R0xc^3)v^ zJV}3F#uGF}NM3sKShZ~DBL>C1WjZfA++2-Rg17YrDw}i>_Un^(< z2(m~XBw0RrmVOYJMw>j9HV#1icWDAMab7y?Cy;-$1wq`%)H(h^AF;iv3I1+-$-9>d zA6AF-$^WKS;?W@D<*hEgnx5|_ZMf0WB$+Os4d97I<*sZMb_jzd&snjP3x; zGf_l0l{&btuC#XOt5(VLLsz2Xo1I}N+ZK$O(}#z zl>#zR{D9iybChmeAsi%hVx>*+cF*I`0)kgt(29uR-C!FU8*7m)Qb$x61*3h#ZH3JT zzvP1b3-V3Rb}2SL?f${@Kp~_VEr_XLIktrrB`Wj5z*YS9uU*jcFuqn0z}(n`{&kZC z0ft3bD~vJ#VTIW?d31ryx(qjf!Gd_zuf6msxfMIgcAz;vUJ~jqbW4#B$9s^=QFIt38`yfh<`X#& zooN2Q6L~y$m>w^iKgHeDc)~ma(j5mvychKCtT})K3h<#e+z#4%+jr=EbpJn49&h{VnbJB*7DZ6{DzI}f}g)IULAcYl?-43j&aU@Z<{$`9vIOF=vKa6Roz9JUvmnUvQ|d+9<->q_78lEhH~7i}6XOdA%J zLcqe>pUhBSBmQqd*MfkHfEDlDW zMh@ywVF)~#pO%f&pd#Cp3y|mwaxVcUpwvdpy>P8efL)i?-<@b<(|RxDo6S1(ttSPz zj6L+Hu|+WJ2!@ysg#S-Cv4&}XdbfQI7tP@H2ytvHwqI-k8wH#{aVZa5kTj9eEV9j) zRU(L{MzE6QYEwJEZWY^U!o!{+;_UcaJOnvH3FSk%tX_|{AIHAP;DJUHZg32!iQMKs zNEx}!hAQDow1efu`uqUczEl7dgnMQ%o@LdvB0o?;;?ZE3GM=#LIynYZ2lQqZ^ze_z zmvwpYO<#ykHPsfl)ry!8EaZsoh3$+mrW$HD`7_18$E%3nUB1 z!-!By#!Nk84@n*tTPzj>4}%62s6^V?8ftSWr?}=B@^m}M5_`Af3KA$aI5rovSah5s zzD$F2lRPXbVDm`;q@N7u7;JnPohW~z ztcykSCs3FZCsG5_5b7}mC+LYF_Tuboj_V(4f!TuHVUOKdSs?*;OYc|$8yJY4o9%=7 zJOs5da5@+~90S`9#-Yf~a6Ak8<%~z(?${yCA=L*zAzkiXnH|x|YR_Kh`A`hfq0A#P})-}4wD#NW|Bb0)#AGA=*z(dAO&!)7qZ&rzjoLw`8#jdsCZ$DoSzTn zzf?Fl1sf}ucLVJ~WDT8ZI4XbebV!5mLz5C~fW^Y_+>lm4kP3EvCvI0~%Lixuj*cAPI5-ZW zKh6*gys|PULSuUc@$Ck8#p||6g9q^t>MH;jIBXg@PN~2#%VpQe=hd`=1^j;aTBmsF-7%c zLS4sRzQ6FE@j#XMc}W2P2by(3-fjuhe$c#pH0tm=_b}K0`JxLBqt1HmpXEHXf8zB+~nK zSL}zmg#`(n!ESIA={FBeo`Dw(7=-PA-(f{)`2lLdYa7Q{O7=eh8KA&`&Ly%AKnp{` zF7HnIdX?~dTMQ%=$b!28Cfcm*4qV zJ*eg3t*0NH!)WpFXO-+g!i<1*jSl+RSM1ao>b@<4Q(#bzu3NcpH&nqiro&R7o~kaD z^bJJt3T(ug@=^((gmF@8vJ>rCaXb+Zlvg~g)ufgSlo-rV`Z_AJ-pa@l6vQmxA=SLH zB(UitS5(peg5B2)9?p}Aq`uWr3YbbJuqK5l>FSH##M#Vr1*eP3pwed16R=*yXnkaG zoR^1K)vceBKJ(BMJLSHA1f_Uo6nhkBHRY|lhwU#J8U4O;ptxC^ePbb-fNS63^R+~Y z`_w8y9p9>I_-Xp^eY$GMsW4sZB!k1iJATsR(W&hO_}w*_juNu2Zt@fS-sZ> zKep^JJogJ2u4tXnjvm}u#EbgE-rb`>-;+h}2jXAv^%OsuwzAlI(U3~|;8Alhzt?(taZ$5; ze{1Am$^8n$JEAV@*5rt}KUXDsuxC42^p|J*byT$(8Q!Ha3-j5VNNc-hUd^6B$!O2G zUS-&TFP4SX9x1*F#QhafR^N>y&~u@!MzY@C+oENH$OlsgQ>|{vQ<*KZl$@*M#I20N zuG54Pj%L_5x9A0TpXkXvO^CDBjJhtHCGpR>As;DQ)%c=0S*)|&_-2%Bz?Ha&7%`j8 z-H6=WH~pv~&+(yU7M3H?BV#+e^mSP(Q`_Cy?0S=AQL!48Sv`^UdG~&X7=t&BVbl6p zs{?tvFcpCjA$?KJ;IQvDG&3!6QBGpn69dRb!btsn3i3&AJh^<_wpkx0vfTgq zut@p7nOSaT_KS<+)C^zn{YkCNElmRyACIjUExsLe6GxsVrkt5(!5WV!xHf#HzU09- zXQt1OEVb;NVJSbXs@VM`aoF)kB!2|ceuZIvpOjH7f2H3_CIun)3>GZiT6Q7kAEK_d z9HeK|Lb6h+%kiSb=gFj;y_(=s(sK?Ho;HORi{5m^n5#24OQ*=cyq>KIt;&p{Xurrl zBuz#-@==>Q=AYBa$J28W?wrG2DW$s&=CT11et1m&M9m6`e+FY64;_w|!mzu&4&u@4 z!4|EZ&Pvg4yvWna_@7#LmzsiMlT@_BiiwvL-F61sFKRK>(o*>>hM14+_1&%|kwi$S#H+0rSuBQ6I+stKYj^++x#YTT=AsS@F!xSu~rvuekLym{}vsb3!um$$~j)*?% z5y{q0`_3r#r-ze1q`o~R#1~rsg6^q?w+>1WV)1+99%A<@rjMMCK@p?$h`rLVVxOb^ zV&On+N^Eh6QiU=u&EKea;(44pd?`&GGbMfez>_?ZmeCjUNg@wh89$?U_PnIb({ckN zlh)~3O3f(oy_|*5zhfj0$Tq5NKQQ$6IO!Xhgs8j^)&Fl6AQa{eeB$Y~rS^2}4P2bj zK0fQM$8+4b%-QdyJbUx@3|VY=QFj54>H%3(Q@L)iC?Y6)hd!saVpsc(CWUS_W2&-L ziM?W#_@dBW(=bKK$a#2xc>o6OFn`7D$|?B`7HGrD=e(|;rVq=~is-XW>h7WHoM$dt zBmW`?LEIDSPc{TO5tAS_Y1^Mc->~&7K~6n7DsJeYfY~V(qof!*X@_8X4&jCi;R4ja z1%^q2`?X)x;ABh08J*Vp{sxX+i3(drdQmPkn_vL@-e@y|xX7NKL|Zwf7^AFH5-!L?MA6x!UIJmNmj{|HuYHDJ;FgeHwAD zaVDokTw-lCK#lXf<6KDZ;SB~kqod+qebWa`{rwoF<#V__?{~5?j2A&xck2PXBwkm` zDo{MeOv%@~Zd~AhtUvPE(vZ8t6A0;q>V{fw9CsXUOA5QRs4m|n`^b= zeB4c5{sl%j8wO@q^SMR$AMD!Yq8Q$GMAD92DG}VN*3^q~F=oGwpknh(G+c>|)7#W~ zWNBHPe=juVhJ2U^{lL5}$p?l4O8l(LB{q8ob?peMhk~K+J}?aaahFqBcH6KeyDvLx z=3Kr;ljQmf@}O+#%$M{GeZgJliX-i@kzIz@%X@tY<%fW4hJoVbQO^OM!t|VO2@p^j z@A-tph(#r;>MTtK3s`_Z-ocgYkB!3P#jq7hdS7P zlDt!EgcB$iauDCM#bbvVg{zQ6XrbMQf9~W>&`9K#7V+bvO6;f^K$)xEm+`P=|7(S|+Kb$ob6@J0pkmDM(PV5TLM=8VX6L?t#UZq+n&}zjJF1H|;3kTT zg$=ZHjW6!-=WRX4>L)8{rJYr#E6$#@z+LK-*VMPRp`Vt2_Mwz2M@Nn9EMbek%03cb z>VZho+Z{ldQ^o%T=-aL7qS1G1K3(=%1E2_p^fwL3KTRt958U0#s|gL)6Ry|4UVCe@`ynNf`fUN=};fF+an~{q zKrgt>pV<-+Z!viP&N_XZ^KB%)=D|Q5_Q{F zbVc3@a_F(PxK5?%@7%bQr1CdDWc8hIBBiFH9{w=+ADpXyANfvxord(wKXWy~Kzj-- z_>lIl6{{Qc+RO8PknY^&tA`&2O~^%-+iY8%uTXo~Xud?Zm|oamaX zH`%T+{t}$NSXz*M!Pcom$p$rT=Q|PlGbLh52zC_RnJ+_Bkx>b5UZ|97oH4p0jHDx>*gTez$Ztgii&l9Jfk?#jE%B#5Mrk=_G?s@H!2q^DEkV7-JIfb%7Gp zi=+*UNw}^?)KZ9K$~}s6DVm5?XlFw-gcoJs9-|RT>9G>uls_rd6+^nEj%<^&kk9!X zgdR2p;;5a051lEA0bV}6BPGTbH!Mu&4_cyQFp%xA&wfy`ep+fobI00db*O|#h(~`X z|19$$2XhJsoVPuvlUH{hv*F0b%BMIVh#K&cBsO_mN>3#W-qLk(F;+Ad;nv6aHmEFn5ukQ#{LSZd8A*(V*cxZQZXR}WZjSuP66)B6^ zFGZhq*A~pfdYHdv3xP<9*Ig(Y%SQ|QYLTIOkZ5= zzYN5E?h`jX14sPaC!!Fd_=!`6RK?lPfYv_Mj!cBt`^Cc;FxyHAsy`&HQQ~3*+MkqG z{NcqGU(K`op;puB-ty1tfw7lJEI<9Vqx&~~1DhqQXa6NCYw@59`~yOQoWHZzxU3C1 zuar{7;D6DXs~KM!5WdK8l?o!f@L!T})ZEF7)$&tZdxL}01X@IcX4epHkRL9%-RIX< z+YPy{B;GJHTjl{QvT2 zeq=R%N!cXr|2Hb9t7M@eWdh9rf+| z?PLTVHPk&K3XyzS*|Xc8`o8Y;_3GO$6Wl&D+%hRzqd-<%TirNtrsOALnH~STQh>I8 z{)LWy4UhE_4TqQn)zrgbA54-1@1-DE<%_e`Sos8##uU^(Z!Hj(yvDzhIDH+*c9SMj z5>$2mKxjCoks&0J3VwkYU~o~tstrFktW$A_I19+8>;|=GYwrw;ST)nM%A|a$f;Rv- z15li|?t6QOPT97z87%Hkok_g@Do;#FjEZ4wfQxcwTg;gWo(`cih$9}yEiG_8IRNv4 zVhgknS((i)Qy8t{M~k$+0YTqz{8Qln z=AZ3snG+C2SKglfve*>8C2jVNnqp#5TRYN_7Y<8hj{b6Bz>i9P*;*C#(WK6z+$>qy zXQ`#mZck0lzskkEnLSc+lZ1@+W+K!P*Bz`5nur?qz3;8o&ESj2HZo0n|*Q6rT zy^D)7lFhCADX(B8SXotjq|E*XvfA4(0F!RZOUR+ zA+1J?bp7Np|D-JqZ}hfbM702@P4YV9AP1ga;0ry00WQVMX{sRF?!{+Fs5`tab9>>A zewSlyy<8ffV0PQJ1K#F|f=Ek*NJCz(a50<{-5gzApYFl2ldVlbli{KZG2_V$Q1Jks z1EEXP>i{0b)fs!cbRuCINB#IBQ?LONR9_4W*}VoX+s?-7?D}@1{h~P9cz<;-7keQl zL6o)T`@7}{grJOIsEW3Lc#zi=y?i{dy1kiYoI0p3+H)N_&T40)HXS*(l7Y}$;Am-v zKMjDy7TT#E4jjH6aXN0Z<-V8lrSyM}vn_BK8Tx&pt>eCt3Nx2}WL$(eIY67mY)yx` zL9G`09rIcg*^!DR$_W=Hk%#x!#*=0#ebKwKJXY&?4=S$98WP43H;0s_(l=CB?QWNd z3?!<)xEa?^&;Lgb2cXfh)bm443otR2meE|}^)SQNc4kCOf+6Ogce8i#P|+yPGT>`T zV{^Yd=2vt(cj}d7fc%3}9NJNFlF<4IL<^P%lW?n#6{CIjoY3(}Y?C^pvL|e7;)HE2 zx!H6$v<&$`o-XHIZ)X$VOiVP?>D)Z$psfCpx6?Zd7y_(GbhbtX$LMy;nv=HvWpslZ z{_ZpkV;cWbIw;zsiP3dJD08Lgdon4GsO>J^xz{cK2Z|H2RLmby2+SY;vOzyRA*-4Dgy<=2F$1 zAU7q!GQGKFw(>=l7idRqI#h`L8f`(Q)hkitZwOu2cM!4W<&I!)e25e`Rk<+g1;>Ii za7n-8_U&V?!A9kzquIRj1 ze0+zye0>1M_;HEBf6va))5o!ji2b2>7-nm4cgKP2%0!RdrbWv%eWI$%D5$@fSpL9N zgEBokoBGR@{%!stZ(u`B`%0}jK$j2Zqx}C0TE^FN-LsU;0^kS1i{6Dmg{)$Mb=sia z;~Hz2>~M6B{*sU4*f zh@KqL)!IvRX-`3QtdwnN0QvdZ32zaBvq*R4mQFORKzC=i=+R$KXGC*){}<5jr=;*d z9Dw=Zx+=nh(V}x(C)H7fZOOB}MnV(lx>PR)d!w;Q5+EzP>w%Y=rc>n7zN*aMNll;= zhDx{aBPB~3E9<-_x}8=*4#=r+RExd9@H`a`bIEyI5?=M)l^l(eqh^ke4(NsVqP-?(-7_JO#pd&2bVS!c|KT*939Qd-R<7(X; zK&br7zZNQ}?u54pPdw)xOL(hXOU8+j$gadzS;Roc{L853TTbA*I z|J^-sZd?G7T-J2Z7pNaNzD&<<6D$1Xem`@puF+YFaQ82OsJvWII)3S4^Bk2P?MG_G zk%bY$3Ex494}WpWj5h7B!H1}OBu=rd)|umy39;HWS4lFEw=u?NamHyapJID4eS|>MY2WDWVQCE&-KGr+u{W;=^NL{ z-FUMgi1a3*D(wHS)FTy)0MgA>mYttU2Px9W_f+6e6(M z`Nc!$f%Z4f(XkKw*#23ZD;7{*oA&L?U4AVgR-V(9ocQ-(r;m#2xl8e_1uK2_QMT=e z@w2`6JV8MGh+RU)uvRWW>dOUzmF!^b9nTcyz1mw$a6D-jnOQG-So0k=HC_&`Oumfk z*q|Z29s~O2Kds@vmAPUTGp5#2y@s#x`q)TI{)ODweI3JjdV7_W3qe{-yrL~T+v}Hk zuCP!sAWN9BO>*AZGx`p~OA5X>WM34Pn%f*DQ&mhxXAqJC-+`nu?VY6Ft=PZB=~+%m z0`RaB-;z6U3iYC&?t5qD%6}T`8yAQICTxMHHhn!YFL*t6EL!u8wT1R>cVGRY%XKTa z`Mvk?;GM0(#?^==x9s6*jtf0!CDFhWa3xI1)u=s@OUUUN%AcvOL=(%lNJGzmH$R52 zk=DHYQnb`nA9p%lQ?hZ8z_48Rz5GxK$6cG?ozGFjQCT00qWeuA@B4(ea^|a}=jlsx zE|Le=U-dduSbZkDH#pX4zmR{;yUe~_yS#)vnZ8Aptd_ZdTq|R|th3-DMJ2zu%BJyN z>&sJlFpnu(t6g&acaDE0{BZT+IgXi_i>eprtRv*dzAhgW)mul-w?98AR*7EvyPmXf z(@hT%r`Pdf-=eoWzC`ynMw&+hqVcd)zm&ctfcs}SH-Fnyfr@&G0yR+}J6yKtb!s(_ z*{Z9(NyaU&Vnt9=w}KXG+#%Z>P0F|YVbzPukCR1pkP5xITRBsXSY}=90@bi^*Q&M6 z2q_c#86EmH;~_nz8^%@zgd8t#l5}fGUmdXSePigGDdV^Zokp>4TJhJ!c)>q=EE+q$am;+KTq??L0*aQ7WO)15 zoA{SO<|LrC_9@6bj$(W_)j8ht+S7c>!3!(@DGp)|;5%eJ?Rgl&y;@nwX}w0L>?h<$ z#B>ORtje_R?H1MBNB_+z+N|SxlJ!S!>%Kk}W6oJ|e@GtrID_3~o_&9+69ViWKR(P* zQ2N{UYe$UTVwZ5jJdKw(RRz}HyRILT6ka2*@R;xrU}%&g-kv!jou^+>UTGVTGdtjc znLn_}5)kpvf;QxhF-AT2Hg_?CP~ry8J(}g@Zx)jQ?tl=7tZK2bvAqBAhTu&?4u!o$ zwP#GBd(P(ZJ#K8--yP_8*imwut;CNWqlNdA&e-^yGWYF-^RCGgdGfY&x3<5Udtc*5 zZrg72bau9WOQAsR!`a?*@q|7v-&v_B>s2~RLVdHZ2Qwxoz8V}9K_}Kya#Bd4 zlQO;mVC&VrF0o!THh+jEYt`0jUYKD8%FAsv@MD}B?NcQvSXZ%$7ru`MBHF!fZFl%{ zzIXA6_0`R(C+()mSX74yQXRf5sBPNd5TPZ}kmB$*7~Gyfluc@VIQ&LA<}`H{eJGk$NzL1Vy^8{-E&}Q1*?9 z>~6&f+z20k|4_<=q z1HmNRfF7lUf?suMi$eLg8PpGt8&fmhfKkH9tJm_dUKj;C< z0FhaFso`C>({3r{*AG-2c-{(sial@2dl5Un6WVgC<)eK|Z1a{Q*Zr5OwlKe!#ZUM$ zOE$k8>zGW84nAv5cS{W8jot)yXX&0n2YuP%cP)w8TL*5v^MAcWsPKcv#D^?A>Ts&J zHFI-n#w-^#0W0X#*%J)O8sUPLwA#9DeriYGu-VTZ9hKSi9`d({D7!!AUqc&-d++>r z_8VH7b>&7%o-;gG5WRTx0DE_}*~4{OS5bP~zpt2-nk(s)>D*Jj;`XFEeOdndwxn0* z9zq8-nYm+Xy|^!JmA;hl4lVHQ)`QM;>0NpGU;Oraezd-q=j zcX!?5-QF*$Q8Z>CE~W76Mc|!eK$GBQatpyfWoAot+*p*06(3UJmoBcdXL1V{e#o?J zqep%Ye>2`bPwB>UNW;q$otU2>nJSG9{x06FCvEr;v0-kJ@qoWgPikA4(sEJ0I;n2e z-W0cTZI)+S-Xo2y47*MXXg(K0@p_;sg?5Fuq8i@=>j-6MHVR)_UK&?o)C3=~m7T1m+5v z5JZfl zu_&*hhDMX@g2tiTf%K4exyM_kCVEqMXyKGz@W)pMXvhswgrzF>ty}ln>5<}}I zRNm?N=p2}mT(L~m@KJ=Wr{(mUGM}Bs)QXEh-*W6IQ3^Takn`H0K8A#Xq{!jBz@UN- zA;AfyMkWh%qA!|#?Z@mNs?J6XJ{uoaiy!H&8f%apRJBfR-spVH>~*=M;4OlHLfrY# z5l~{NaU6orX^I`8UBDt5MvD1m{UN%>fFo^GY4-DXhuyDLeXgiHyU280B~ZHubKK=@ z4on5Oj$_W<4@On(_!N$gMzO7Vk|(HZXxQ*^a4Z@Z5eNyjv;%e)PJ^7oV8ng&54~Ln z_Uz$dhVl9K3^6H%OX)jpCs2G;0?(f}+5C&s;RuZldu-?5kw7PtObGRU?m7OoWsPuS z^nv9>EQQhH1yK8F;5f!cTFQ03hT$iN-Eww-Ji_prUyeFK(Op}891=KEXiu)p?cxp) z3$#b|4#6Fn!_;=&vR(4NQAHk_a_1h#rgy3bgn*ZwTZbZ9D>?NWp0dSUnYH#X@2%n+@gZl?lm>zc@Lt!17sc`R-WyA~U6ALa{;6u9H+eId~buVZyHRu-bL| zBDetvO||u2O4p|Wi)Brk1Ut9xmjQ!3%f(1iVrw5n?4s|xWVifchSD+}v!5WETiq6u zjFYK4we|wX@->6gB3;wX!)GC%0WuW@IPPgX?}CT+jKrl9hqlx^n|5qVLf9^T75k8o zV)nk!H-a!}X7=S9lUe5=?lW<(Ahs}MlL>NvWS3u-HAYV3U*|}g_18A$=m)L-pvIr- zu(_l;{D_`t(%U4re~U>1-Jl`_I2?v8uECpE+nF?mC}jY6S3P zvz}w;^kqT9(?ol~=Q*Gp9#NFTCc$^?BifHs%4^fsMF`&0D_L-7d0K+dR`D!H4r7*c z=L->4j_W!-NwSkqS@Z9AP#VCRztv~SaSk`8{Ika`C-x!|`-HUOE~E3uOt-eqgWhF1 za?RE4{-YV-bB=BxmxNO5g${Z4%Lfn7ae^k&TUMxg-*|ng$F=2l#;z3sAuow>U`ou< z97YraUgopJ?j!XoW{S=s_gaT@5&Zq17- z$Q{x)R>kY+ET+WE6Q$C^FPlD2uH*~uMfb#G_NO9IoEnL1ty5oa0p#=?G)*v5r(kP> zdlf=;uO>QvJfXg;uqyDt1)Wuy`~B=mv*d@|-7ni?6=2ZSoPhz++Y!m~ChD zHDFQ6=BSr1x~01Vq-m;66V_LqdvEB~_7C3#KSbvWLX#i<<{`T*wH$+thfb!=&WGmi z>Rv{0j|tYFuCFOR!Z23u&5hzrKT>kvK+YPsEC9j@+lXEK=xK}yraI3B?%d!#>iuuJ!PYz8}ACQ|w(i;0dj#!>2duOQm&vTHngbE5hq$x2n?@j3Xu;ab2_FTR- z5vBQw)dXU%0Wb>KIE0lKRg&x3ej63*&unkG_b@Hp3jz1SR1{pgjm88mE5y zqb1~;Mlu^FTH?6o_#8*&Oz;XOlp8f|9s)7Vj;uHRHah(%|8z85#>^!Pp_9NFwSIY4+9*6{wC_y>n_b?#8LN5>+Syz+@T zmG`Z#qLhPLDA`=f0-6V_Kv6s{u5Kz(k+JN;>vea{)56=K?yurobKIwBJZ!RGQfBbf z-P0)?_7kN-cZnYZ-l}DI5pW`XGVKLiF>ietL)@4wkBhIp1Yqir`!MTT>P2^6Er#*@ zdSPEfG;Q^vT+Dkf1(y%)V2A}i1nrF>Y(9>XkEZvkY7O6v`|!*c3qCe>r}nqb3=j1K z;Xf3kvtPPA2X5G!OcLiBBq^Y=Q}oqAb{I-+9G%uly=MC<5TrzTqvs{)eYZNN$1csc z_EK6x8~lHe`Vp@~2xH3Wb&uXBh!Zl4#8rK{ zRTQINb{*>iwL_BPi{;ZY1`BmST&e_C&w!ybAyqFH@e@7+{%BoWB-h1d7$E?LvxbI8_&VPxSLC7%cVU_-X5P}1Ew0GQR}-nKC{9enxYzW2{-er1l|`J<3c;pp+uGtO!H_+k zSOn=VO-SD3=*n=>kWxAMd@Aho6babMnv~tjpFTdG4KPkHXkOlL_ui?=?CH<_lDz_J zdl59j;9%_L?UMMX`09CKur81a?lj3hxl`&bn~m&_nu?OHY{rSBpou}?`HH1J62*=U z?~14*ycXWwgc%==q&$1L#qi{yD!UdtQ#+|H$?EfS=SkJ>$$oAp5s?B`H1mzw({T44Rt#^zrJ!wEUUy+xM*}lzj2(YH)k1HFc zDSM%gu$FsybtzwpX5ah1Mo)VQg@C1Z!s?v9UFF|9 zv3>8Jc)>p&y<%HS=+$q*30}W-H_mc8Pnm~#({jFItd;CNEvTNE`k3cwRff{Jpzd1s zaoG3dRlkoqGtuW6MQ6AE>bno$Dw6B}T~bkiQQ*|`o&BWrC{y)mgGb@Z8z&hu_M?3L zMEdJrLEvVXGR(d6#N11y$#;AJwbx^1M=DJn8Yjn(BJ4~47%J}EktCbaIRJvQm|5{F zAN9c>7oFY&7A;JHz@lHchWL+)4n6}b{4KcB=PN8=m^H|+emRqe|NQx5Ol^xgqqG>4 zG{+}{K%YZ7=rkBXpxEJ;BU0kg^INFFX1YeZ>xs%(gC4{{6>(Ef{W-SOqbGRe#GjP6 zQuv9qy^h`}U&-dTl#WYw0KY3MPdf-~nrT3+WovI_T(@MLHdjDM6uMO~Sv&GMC%l?k zPBL#ccw(k8Ahku3hHb+dzF<3%f);_i=O8f1FK9d6;Djkeet3I`UUv9HgC6ta@_>+i zrZp+QF}A7UV^B1_?+RO8ElF6pD#ch-N`8lt>4iWZ+cJD$0q4?O>|wbC#ayRu9x+Cg z1@Mph1;Q12_*_-tP1GIo^S*25Zrt9*9~t{pNmN&+W+L;%fG0LN6BJK@j_LDNk<3ei z7*Q+LO_WIM9ex_tEg^@rIR2da4%2-l$vlnnlBc^!LwqsY(e&slXCatpgh03u_YYpt zj-RG}nz&O4SaM3BN~s0C2vFUS=wL>_xQXcg_=QLCehH<#PQ?%q=PtB8nK~-^-9gnD zn=q^z){t%F=9YR`@+rPK$SR8#1F}7Xx^WvxJH1Nqby@P^vg^_)*|gy4^Vn{46!ruG z8+WLs)$)$IP8K5hFK6pwI0RJz=yZ24dQQJjLta+<+6wPg_1s+)Rr| zTk}tJo=Z2s<*B&~z7_c3r|-;@XLN)5$J3%C%uHPwrBxLeljJETv#Wyo?A2on?Bxns z>+{+F6jUljY_bP%AjC1$M*Lhh;@%0&c&Zk1X$NMSnjV#bm5!IMhHE-mHsHc{@$GqN z+}?pV<$k>H`(Tw1_GF+VX$o2mRhZfnwG}R$+~h}b0%Z+OI&`u)kUw<62 z&rY50-qt+ruz&MX^XR=+ScxG*CAD4oBQc^uffWp}r! zFkK0S=w-lBnFM(56ok~=&5K&<-PlMtXm-*Kybn%=c!!|n z2o)e)pDyg$bs_T($x7w7Kyx5iV4)(vwYmuK`~Ls0}?^?(;q*XP@dsO%qoCug4bvvVHmdPkhd^v2k4VjgOugiz&gPkQD z`wVc^KNboazL!5-(-Kn)g`8|~JPPL#VA7iWmc;^8m9XH$ewr&2R*v+wVXe&$|CE&8 zvzR2~0Z)QXtYEywBVd*_HS6>8hrQUqN7Q zoNsCZbS z8v5v|ZrD{$yn-$*)8aYx4M{E(G$9_8Ui;%>O^LvlT;PqEgug|lqP;KBE5m7 z-R6)uZl7x6__hSNpuK9zb$Fo32{e~@cuCFpg0zF;1inXh{nMUBOuW0e$rdhdVZ7@- zr0gW{GzST$_|AP_G@4h)(5ayG{uWF&qG|n(3&!&h=7=Zs38)TdhwE|c?+Q}+rP)I_ z2rJJowEq#2>D~Lx0?i3>yLGIIsyuSxr5;`XG$oZ zu>a;@<)Da8>3RVh6TQ+ZHnK^O5vo)A3=J=AVcU36=k)94nL~KC3tZLBldH*AEe3h*;h1ki`b4G!eZ}K$xs1iQ03$lN_WDHb2ju*a@H%Bc0S^9q|Q9OzY4+Vv6P)T z(oP*NM+v)9$CT*(L6TV4x)>8L5REzxAe_+~RZ{~wsO{pAMt+phluE?sy{(`-r)!w< zbu;&^W#|qG6h=QH!IY^U?NM+ZA+uDAz%FVBchRTEe&pe;pVEFe^Nuj-x~fzHTa#{#kYGvL8?=Iu~F4m!`d+$iTH5DJNBUjJt_Wpi1gHE zU$6+_GbW;x+K6=X>>l=$R1WH;P49|q6O9(}v8I?jCwXLtv$M5*!4ju$7`1zMy>h1Z zv|*p5;;-AJeB|fYeqg@6k(9h$!#({1g&DY1o;rvHCzdic z-5J&LWY%=Ge52%$GX>gmd#PjOuwzH&1ho~8lBrC0|JOsz)Z0U}=}~GgK;6LqPR00P zSr2NGT3$%iby_!8ae$Ou;@JIU#9LW8J|ugBTIr4a^QZ%TMC>mAUz1c^bjvV29KE{+ zUr~XzOi@zN70-PVUz(#`e>nem9qgS%dvvA#?t%{CmH=ZxavV8X5}fU$I?hASf!b!j zq7Ea6U2JS6kB*+x(@X1fa1iy)#N=L|ZT5ta)>IzRq5{m|F-NV0D%`ol8l$}C6mnA& z*hYpaE^1eA%lERm96X+BGnC&v{NQ*QzV1|WFSTVw5?B+~T56L!shw=HLx0exE|I2u zCBTjP?=-D{zY<*W?^l15WTZO z^hc+2T&KTQ{pscOm#Hlp^Qhy~QY@y!@kGk>r>aHkryvfEd**xA|NnQx;lJ2-+1FkH QNpeyu3hH~~c{Cf|w{K!j1*J;NQ&IX2iJ_GmYaXMerRE`&Qk2wGQ>ccL5(Gg|vsO)2voEQ6 zDpm7TG^nbX8jI`q-n#3(x8CpGcYo{MKla*ZpS909`>b`&-k006M_Lc|$pE_%|?H(p*SDn|nyO+fFE5(DYN0zK8WKwoIx{~_8v?kfN2^m}^8 z<=@8w%C9780|4A|dYX6c2TZNcws=x3BYtdqLAhmnzYUqs-R{eTB+u8MVqiV%A$ zi%*_nyTG#hEP_9Q_n!kSdLEfKvye^3UeJ}=W0=g|$Hsmuj%QrypyMPIC1rg|e@)Ag zG(xA8d)?we%K7TV?-TZha;@#noKU5xD7K?j9nE&ybBDPbg2J>f@3pgD%8M3Z*JjnZ zjuVc%3(?}ufyF3%cgdg*J&~9=xc#arfHCyc4Lwl}ql-MTHBR94s&OW!zx`jn>JIGQ zk*(LiGyF%B{c8@Yjq5b9z89k)XsF}(U;iX~ohnXr~J>_keOdhDM(UC?pzZ9XV~T;Arv zVZDjmRjA(Y=1zsz)^JItxTpIuGT*PoZI%#T;w` z|CBd~sRQfjXOhrLaUNFJP`@T^VN~yhUbe<$3e)~Jnp?ugZKQZenBMXuB47J82sSS-?*;}GPewos6+U*2aNF3LQshBU zd(A#65g`{>#u-$!OMJo=w-Hx+jHw%YC3M;1kHW-+uWN!SwIzvd+V`gVq1 zgLgRYz6B|#`~5+n2D%@oZid7z;3W9x5)+17QN2V0tEs)NZmO6mcCd+u%y&hwwMZ{U zB8vOiTBZ$k7qJpDpBP>DjMqR4!`ELR-IzIT?yJu8f zSZkR`t7nYLr8-O~GG53FGF-_NGsC>eDnlcM0mt(X>t7KO6Bb?s4{FN^=k{1l`%=n% z=L3>kQkn27tVYkB_BHScGWmMl1QMFfr!!I$2Vw}vG}yE-o5mf~>e%8ZzU41LB!w7P z?gii6*#RiE(_)~9uV%^kApPP6;fY{8Y%m^X0Z z1w_P+TE zvOFjvy;4t|GkUu$gp(49fKvJRAbWF^8{~>nTQ$}xTU-vk>F$OZ94fvh6+hVUU*4=p zKD=pujB}k&V7t7)DkCUVi{4pbW8H!R5uIa0{wUIB?C+Z3MS&^A1hoh|rvw-afVFEv z=mMM-3;WpPflnS!Mv^fS{6!Tt%Mx=yb4*t*+hR1UO{ZEasn*zz?7uhffGazd7rRFP zXdl(UYg=SY?!U^ML(86f>~k8AQE zmHsPXoEOh(U-zbm6;!%&>=zX{DZ=lWmRDkXS_hvmGPXOrUN8_ga+8U;w&xsSb9(EH z?U43-Np`c*PTjZ?`&0Wg1GU9a%=%Tl)H+zzxt)t~XD2r-E+;Ntg5^nv=$}!ob0Ter z=&2(D0Yb2H^)<*YM0}1tYtBq%jOycR39d%0bm3z3UGTC@g>4Q&;^a<2ePi zM`JvHrYaX3ETlNt6ZwK+av*HxK(agb*)JGJ z3-gKiS>2}m9FNvL{-}R1dfr`j9xJI&YdOt5dwhdq=N=Y1S#6Z0pm&Yv{ke2za?-bZ z+V>OG;3C|$buNJo&NDbK&ozBnMVyG#&?Z;*U3;%I!tngFAC1wTK~D!AqZGd^4a^lF z$KF1gp^ird4fhf?+<2#oRKbv~^zrt6A!R7|^0Zi{%9z_DPhl zQ-V_{-RKY?QKd>-}2Ra%IKraXEDzW@M_i zw7(fGr@t{(2PpK<_#M*>u7pnI!c=mo;{d%uSgG#f(%1L)Li}8ZJ1NCJH38~|sZzkq z4^eV2do?z3A?m40=9ef}-g!Oi2%xdb_8(mo0ZD++p%rbxDtNpPl5=n@jUOgOF(1$S zl8t!j9Ur_*6QD*-Om1UAJkr(Ftqs1dmr7uf`}wq6>!^9J?K)WE{lM;u-snl21k|f~hxK~@@vQij0P$F%;=51;%wXGkW%?j@hSN-o7UW;NI zs?(H0or7-5^!_}Ljm!TAdsfMlB{`~q{GTObDo zfgiIMbLMy0**lec9y_e;hO_Lws_m3&*yhd=nmoXEzqlvsYwQR{@zn71Q#%F=iaPJ6 zz3fn?GBa+9?+L#mNawgp4gw&b*=%!NEFrFU#QXgEM!k9P@S}DTkpp!33bjo`zn&}n zP4T^0Z*BEfGh=9cx+w(Q|#qZi+A&w^yT2~o+H5LWYJPl35)ac0mGj)+p zRD=%Z&VgRYz{S?ND7$>1`C;iz;QSDk@bS_w36CkvAbUK%^6wv3+0i5nQH3vvz8=Zt z7#Lc18mYhW>mZw(MXrcLsdw`rHv8@=Q`BvjXE6g@nZ7X=jjE)kXP5G-mT9auM5Uz1 ztI?fvp;M;`e@PEV*pXFpC3LhiiK^p9CcN*9SLNw#y5F} zP1UXWOou$R%CI_YG*%5;gwFgSd`f}Q4a~`Xul#(|_C)%lW>aSEuen>c0!q(cJqhJo zs66=8V#l*HVWluFWBB?0|B2TB>i~O}`p2ihd~)_tTeJCM)tPiy{pJHal)aPQ{Exy( z{GX4TSC9VE8Z!C^&Q_PFh#cJrt=@c4=grgsy>wx@pY1lA-^t>VH~pWlg#UEiO3JOL zY*K&#ja`1mz5wGoiinoU*XnWcLq%!lad`H(Hi8Ig!#Zv!cNmXTw1B@UCnYdp&HogQ4oDZJ{;Kfk&VFu`O?9?FZ`3b`F$K675j@!H$D@I?AiE* zOctZjf>5s?i7*GMjWgE5Xi1()WVA5qgv9%Yb?!?!k5LO67V08cg? zv@3%HaR%_F`kEnI9X+BKNDuPXF!LGHA=z|LWf$J7P&phv*gpWT%{b4Zr4|%J=^NHs?{lfZ$P?ZJ3yY2O3Yf@9ijqJ_ji z8%KXp^X@-Hw@kl>N$PL*{UIC%@y%JOPgX;I8Fb`#b|vV{#_o5ggbluhGKu{l>zuG%ij6nYgBKH- zvH3DxQd}BRX$!+piZ7WEuesP%tAXqbdmEAoUrvnIbh@_q5hIa`>rtrwQ58~{{|t0U z7S%93x;OAj0Tp9+)0Qnl{Dkbc743l#bH1*V53XMnF%r8*ZueZG52gcvw~o3+H9qWY znSt%rU+4v@q{EjIRgR|WjB^g3u`fLIL~kz)cK10jl0{rJABJK?j{VEJ%njD@lgb%W zHA8N1fjQ8e)#F(m%QS#JSKIA=j)t}l*in)bCW1^z#(<{jTkd=V0SbhXyQUA;iP zey*lW_;3DA9EcV8+bZ=OInEV=4W6e)se?Tl4~g9JZgOOf(k_e!H)%T0Ix@%T^~Tf^ zmbcg3NKv}iVH7pyd{pkzRW@AE;XVbhzJIB)mZN0VQz2J@yIi1raQ!?>3O7H5>eT6s zbgBu@L_I+?)0JVaC^<4CoE!(ibBV)++CinfrdFYS9~wV|2`DXaJb-3|jdF{)T#dyc z3TI?FmF}N@v{q+$rVCG&ckr;G5)==@OEnKhRT_9-S8DM696&+jIj9ZuhlL1R=KBdb zIOnaZb>q-%Cg8bkYJQY3n+Y2m2g}n>4rH2aOl^ht0_s*DGgUS|lHa?aYGu2c0Yb&k z%Id*(0^GSlA9;Izml`gy`(Zez3tkD;K@IxNR=tZileaZtX6$X==9qPlA`?m!Z3AuW z-0tt2M*6+&JI!!dtH03{h$%I);M*vPIwP>hOKH*Cd-{^=DBL`=QHqfwFq=v}PDFJp&|>?EcM7N{P@@>jjrX<WQ|fgJTe{hodD-%r{VU$^KwM zNW1|nViQB5pMW;X7)mmwu5$lgYxzD)1o90W>PC^!GDtW$Z5!C)!w;F-X-oOh?A9&? zwYOk-;GRbcS01_V-k0kchAMhEK$*=QmZOot5DC|@2WJ~-!}-%b&U zW2j$$)%x0DZv{UjEF@ZO!_r)8C8jo@=;%X+3DfzMVQwQt=xQX)PK#*{_m7QP$EWFY ziOg|ZkV&zsw{qNIqY4`hcu$HnSZ-T)E9+yzF^7Us&62{WDwjqs8^I!jek$Ep9*aJ2 z27n^So+mwKwb$AwLcTPcB2;iVS_C#Q@asL^ODOI|+}oR!m>chfI+}SV&Z2HkmbTSd zt`1GH-CpG3)8hg`O{TTvx*Eqt1yFKEy^lL!4pHm*&V=5o#h9$e! zlzxU6ywk`S|Lef}l3zT=OL4>G`uG*~=At^?u@9){IIq8@%cSKi`oJEqAKJX@dP>Rd zvf-1>p*!4faP*x-6eTAyXHSpe%0p)$Tf;>jAx2mN@6Bdb3u}yOnVbO|hr32h>{%b< z5dwQ#WxR#|uJzu*TIc9?&%-A_e_KK;U96&rY!- zP13jwuaH|5Wub-UTbdh24l`ARdrQe(_!U`HmW)e-^I-&Q$jfcoyAVFuH2@iw8>@r< z^>8<&yiiHz0UU+*EnH$4F2BPdE1p^$h3Oka8Qx5ima@QRCz(IdCk zA$>>X*zQmX91;YAIUPbQ7yVWwWa%JpItVu!mK1@qm=A9i?eziIKHk_RB@R^#;~-an zT;fjd8cuT~8LPz04*^AsB<~(kBbjAG5UBpzA|H&B7*7KM1Ncp)xRPW6^L(}lWQ>FQ z0M0;V-useTDo$2Wdwf7^-#|VO#k>}#7+Dh@XxOS%aA%5|iY!v`+B}*eJQ|%i7>8!2 zG2F)B2+?Bm@WM~^%I?V_CZAV`{b#q@^Ne0_&%TDIFMf2rD^do&L8I2-Ok#*>ilufFJn}Cf50FpxTHL5p(t<~N!&*jCcXXQNDa7=bA7@U8D z{!bctQ$BlLy;nbF$W^T2Gq(MZ(%1g9)(O;lqJ<(R_7RgSoS731yCfoLqDqG)8&3e? zhr}d!x;_}c|=!dxWwSY;y>DU`ZHqIV#3e@L{-Pt^zTJmp0@CyMYY$xSSyTlhFZVRbM_%g#T zF!aL{HnI0{aeYm|#Z!s&uP2rND5&;xdSHKnl~&f}h>K4pfSwjovrOGS;@ + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + +Application + + + +Transient Objects + + + +Database + + + +SessionFactory + + + + + + + + + + + +Persistent + +Objects + + + +Session + + + + + + + +JDBC + + + + + + + +JNDI + + + + + + + +JTA + + diff --git a/documentation/envers/src/main/docbook/en-US/images/overview.png b/documentation/envers/src/main/docbook/en-US/images/overview.png new file mode 100644 index 0000000000000000000000000000000000000000..1593a9522d53861d64311797899aa580eb9a795e GIT binary patch literal 8433 zcmcI~XHb*f+O-u6f{z7I5O@#~6oV*DLK77bkkE;QCN&UxNsz9fq9S0Shd?BhP(pyv zLqJ7DIv5gaL^_1T2q6hlKhBwRX3mfAyzhCw?|pyl*|Yba``-68*UY-EwbuQ@3}hg1 zRP^YcJ$nQU@7}T4vuCf>?ua~mV0Q=Tmf*fS?Q=0UxU;8oK=W|+?&?UuUEAQ@`R?C` zeuuaA-!>5ey3l_K1&=J!W`6rPV2efx*5fZ=oWvkQ03Zl64ll{#`_@b#0!u)DVo zs9ccxua76ki%-)daQ=mLO4+H9njEE?x0d`RVjk;4PYK`jah6xk#&7?p@A_}9`d>d* zY>$Hk)^uqGepzy2(iyCcRM1jb3+~BV9#rLtC30GqStE(G>J8WeH|^6umP-xKt-2VY z?BiA#dh2B2s?q`!&w>R#j%ozN+~!0Iu|b&4E?dp{-(T*rV()Y>qPb(T(5F$gLkHku zjUf?+2|Ulz%rURJyjcFy;AG&FY<;WK;%3V%xMz1-8dDWJ(KeDb_Q5Yc1bD~B&UV1~ zAr#(IMGI2UTqN|$1Ou@e=MZrqwvdoeRfBhh-oObVfL~P=Ff>l2(mdf19E9~stb)$0 zMhp|^W|d#1SB9Aqar9r+{Nrw^?Hmo4#4v@BR_4h%zrUqDWboe~07Qh~!Fi3^k zSXNr*cXPt$YyrB{nQH9ZFOuu0Bi03l2fI)eeh2v-d1u$(fJ5r8IVik&#~Xkdhq<6; z$z?HqnFL+h3%d~OBBz>~Q855G;<=6@BMzTyFtws#^&&O4|`-=TKcvn7nH0Y<)!_Fd5*cXfn6 zDj}Ol1gEpBR3x+WTd&pi44{+hE9WYXtILaHCF=b-Wp59bX9ak1E|QEC0uA9mXDKbN zqWz2BwIffx0pOb-hkPpfO4AlCsJPfAGwLIG%42KcVVB%snr9d_)Gwfbp8)m5re!00 zM>L+^(!$de$z$q?3YOgNBbfYmeFFa7`o_JPkPh`x1A*cfyRgsXU(YU-n@+~0UAEb3#9)qe8z#ICG7F*oG{d@*kFn_0MN__N~6OyrQvk(U-;72eA_H z&@I|vtk%ba8uh=kP+UTjt(^w(g7_dr9FjuFachAi)TivbB5x%8_B@K|C>2#kPl&4mP2<^`a|ri<4>sNc5!P{sB0Iu>-MlhW zch_f!d{pwLoR?5Vtp{s~c4x1iz0;vBjo7Fs&DmiY{1Ux68@7FrX>0z(u+COFQDu)7 zmmXn>>kmJ@Fh?HbD=B&^gPZ|a1tt5(ov;(%b3DRqzo1tRE930(fE4R3bS@C{&F7Tw!%11()XWaVa#8BFaR>JIYK1 z)-jv4C*4YXhJ|FCo*hJtB5OjgZe*tpGcBp>HCcZ5>Tts0cO@pcXqBU)@G-B)_>R(t zAM__`I>8Ro^H&2CfllT(>xjOgTlaQCNm7Q%4PLD+5*~)&XS*>Nl zaql~r)JA4^EO6?m??OA;q;V!{*gw0!6tHOXns-({+0G{9gHYqm?*iIIYWy%)?kkii zK{zr@5LG76Kqkt|Y3i zTmSe&`|m;us6W1_I@H$R?u~S42Z-T`L+&aXEKiy`yRf=Vwt13g5tZi3WSt+AO<}g} zm%vi5GhVA+g_R^7sYWTDMx^eij$VKkCy~!3kmjn5avKsY6*5=fw=7+l?-BrByq8$Y z<}wDLr+v(WZsLFYp#sdBCeCZ5GV0p(kLUc79JdL+K4?yUM%q5?=hz#aI&CC~Mb230 zbp?_Q25oOR_bjW;7UzUEWCLCb+DXrMDxJ~EFnKFT?{KuhM3nA4E;uC^F0}t>n!JV^ z(Iltr2(0aqQ!uIOcI_}@;8biDzFEDqD6FQ$1ey2q$ovG2n+XmUj2U!L)(NlDVFrtA~3WHP6)YkNFu?V`{n?=~hj5d+cKYdEZ4927FUpPuG zD+U2^gUZh1m1FUn=CwXg3mN^T&i^) zZk;o&x2YX>MABwm(!Hy@6yhDUC;2;m)}CBiB?f-tloZqs=jo=OKr)v1qDICOv+T1sh)r;l=)RJWj8_)wXGva-p1aK}cfl^Hhe3~NZmW=K2#RU~Im zgin~Qx%;Q898L1`eedCPI<=;wRBq7#a60loDx}){H^^ewBDOYIbd79^t1zurxln%$gy`Smaa4 zTIMdZvixUBcTSU7Z{I58^{!rgV(Vgah%>*ra?k%(hRjsIea~tu|Q;WG@EhicF`kgU-hSi&M+no3hkp;z4Wb%gd5>Efp8-Wt2Uw2GQti$X=+o z>E;M~IajU^s*~b)?Z;i4_JQ2ctLpjYcAK%ehv|lz&ZQS8u=>Av%+ULB2Y(J8xtvpB zK5}AyX}2FBGx?hOob}+^(1J06`dcV*$AJg$DMugFsTg&B^$IQm?T_yIbKPOusHJG4 zHJmhMuMTeT{Uqk5@De>*t`-r32C}|B@h6G0%Y@m-7U0Q6v&&e{vmP>b!p41~|M>}b znX7q*Qb+~S{=D8t^QieHIbvUeX!Tho^iWiD=(wu&IMWtB=llUuma|AxZk=1T-Kl3% zp*vhu{^#dnk$pV-gmmW37Qi$3S|N*Qh>D_Au%*@RFBO(CXWT>AoADX(Z;uKVD^1{< zSrNjM6?@r{wviZM&j2+GyQa^xJ~x7 z7Ugh>2B1%Z=DU?I)7urR_T4n{>?>zn4LWubwm2RL{Rw|}%pX2B^T^rVzfJ-7e%{Jxbs*` z#cc718;Q<)u}U6qtQWv38o2#z!Tnj9`TWF-fPqOp`=V3C)YyGN!OMbszQBLp_|dH95c?5R&$?y$8Qmdm??*XIS)=6JPyT>EI@lL^SAQq)_OC zJ1F@ODHfmivHIJXDxiqz|Cz8Xjb`Zy9tD>hb1E^wFfp3hQaGZa z{aq)09NY6QNsj&*;As8Lvss^qgc6;v1Teiw0==Ml2I|)PoFTuAMP~LvqafLH(OsR; zNO-f`_X|Z1r*db9X9o%7f6xe8UQSNOzRZaITJ5!$x)bfJl3vPN{uPnrpTP025(_jk zey3K+Vfl(us;Lq)=a-31FnC^UP4n~FL!21f>tuX{@It0VaqdFKq5$gPddkF2v+4gH zFBGSB#VKlJ_+lVUx-+W_O3~AIgSnKcL*mLMDs~dzt}&wqaS)0f6bqc!P)Xicb?Z8w*9WNwA@IV%p5F1})VF&Dn?=*ZP1L7TBJTv(>OY?-+eyWW$~6uv_!ln?AiS2EJMUy2|_ zyn=W&x3sAEm=<%+0{KB76FFKDe$-e8g}bo@{|+RJ4r(n_e%8JH5^~Iaenu|}qAb52L$!4o z6f~~*T=xp5l8+rp6%-9&%y?Rz(0fXs2#=z37MGO-J$!%Z;`GG_OCD6h(_pHe$uc7` zpVE)5k6+Pfpx1poD%rv9NpEV$KfDVv=G3n=wa?&IDr(*x;P`Jn&gRmQD}9k8DHnLb3FNFt4~N~_KGX& zakLi+RPSZk=$X)JdaGt%gYdak(_S5SvyLzYe!8x~pnLNAxqxP#+!>wfU>Y3yeU44?UZF|-;QzrEaG&_vhF9r7b^dV|X)3<_(! z6{m;RTW8Yh$8&#&ZU@6b8eEq_kg+3gl|_?t`5K)b%i1{T#Ld5|(RchKT4Q{=D`|L7 z=g)xTLjq$~mgEWzp8&k>)ic#2_=lb0U8|-`+t1Ox7MSQM`yH#`YxyJR`_97qpYxi2 zt}`K8@o`CrMD0bgzL1c0Q%33~blX)8x5NBG{jm49DN2VGI*lm5E90JRHHL2%4W0Fj zB(={lsj`LTLsr2=jMKs;#ur?_A9hx=)u13*IqgiV*yy^GW;>lx04bL zhvbLGyMrUgv>fe%sVtPji9uVhcqR}RLZYdH=aVEiBdTuyUb1~9F6dSeuQ}!WlZ)n1 za*s-MZrdok^Ne1JrD_;P*qRDYO1Y974SLt#6-!~rk*~w2*CWZAEx2Z&nM(P{`55M1 zxTp%ii5=K#2-wE8TofA?v*;C^(!&FfZ=&*IwRdPwvnnTanJ>9ZHw-1~9eP8nVcZ_C z=Eo~n_+gUmi7$n>`hAs1wngrPlHn8*#Ej({J@hUbV25}C-LmNUlNQi}dsk|@_O`%S zYwG2dW&oYZMw{!r3BG{jsjz;z3fMfl*uoNb{5Dha&c}|ByjD1-yvu52$0v-SQD$~f zN(IO2*!rW=Qjr^@G~dIeDi|7_vDQCJf@mpErb=)e)qCzU*dycCSvBjyI$XR1?mJql zn=QG8+xZb?i(-?8_JTdg)BCp#;s020Z{AvXtzD&|-_E)U zkfRgsYw$65lkEanUoBQEF(uvN#Ci^3J&ct#!rLM$CE|p=btbpT<`Efx4Cdu6FWGZc z$N-4PK-(wk^mkZ|9W`=XFNtbN4Jcb(oA54``NH!c$(({rh8q(S4zyF%8zY;_wRvmS zJ9;GCSJP?7OzLh{?8L3i`d#Cf%fkjBdN{;`e&7{zf1EDo86%+I1yFl=3XOwYxd!v) z+(Ea41#GS+g1Fgj^l9<%(^n9RM9CV@_}I2}2CA3#y26Hkt039d8Piq7>Cs9AzzDGp zenYQ>y#dz#FSL6`q`97#XWRZ`5~Fvg?b&I-K%QQ58zpqh1p{M= zisD;jk)k#2sachuZ4Q<4?oo(Apy(?4Zj{4yphbzQvC{(Y-LqKg$T@AgMv23Q>rsk` zrj>xLH)4t1(wSDX20do2QwDZYYOMb}cucgkwj7{8;8&by9v8eqbQEdnU7evr7eE9r zLAt4sPzCgxWwu9KStup_;Htq0hpq(~un3N!W66}f-nV7j%S6YBYRC&+?|C;X%j-S5 zTVZw_;8bqZ*EIps?U$6XND(_|X>48|@?)Rv(msPtLh5}ON{Y$H?0~dNoziIn zHieBj#eM6yaelQ1eNQ$F)9+zhUZWQ4!0D0+zaGkBu%-n0n&}~eB`!CNUmGj_-JYzS zG-^+7_tJ8HSTI|^VbC6*1gdQcxW(k0iq%-&rkt9uM#B28bXR+w%b^oMxmWKk9}<=G zm`zZsu>0hrw41c0{E3vHpr^LVhb28A<61)hj&yuFn~dR_g#Fm|p{f;F+^)ncT5a9z z$-FU*{;oyFYe-2V7X@zcf8G@`|8EV=KRlyPDSVrDzS)b+W6%QXrF2c%=I)F6e+q8> z+kWYu*N2uhi2L6SBvGNi>9&6tP?WY_ezNtVgEjwyuIK;VzWOf$`B(ER;~N;0%S4Ph zDy5R&v*A>^V!3R$5s~HJnbC$&)ZxpWRBsC~s?&DPF;Nz<#n4B1m0T%6=8%<5w%dOh(1wOw&7Z?a} zh!v35`nST{4CV|Bmp0?(HFnv5{^;R}BQK zQa1r{C&n0xE*WKog5bqk{WxK98@V5csrM~$P@lrk&t)fcQG=jvgEj|5hn*bWq^{?b zQ7X+n_xG+w3mVgm__n@ID|c%)-d!D+!wg6xG|=D<4`QUlUK78Z{%4Li$V8X4=V(x# z-GF9#-jITCbEbeMToUY8r=`HFDcc%HPZf z5?uZU*tU12Y6l_!*`=qT7ccL_H5Xr?uo{O*OApE)j`^FuH=7XI#g4JxX_qfqo2H01O~^)G@ZJg< z-NJ~3h;gOT!#Z{<2gA1G!Gpgm5Ia8(#>~dpy*DJDPrrCD1fkVcn(gwkXtG{Z<{B`&I-@(tN=r{hGSwR`LyXv-7G*Y@r=BTBDdI4HBm#j&~%XJ41 g82lx}en;{u2mES3wfEcZ4+?t>^+0#ZZ#{_pKV3qQZU6uP literal 0 HcmV?d00001 diff --git a/documentation/envers/src/main/docbook/en-US/images/overview.svg b/documentation/envers/src/main/docbook/en-US/images/overview.svg new file mode 100644 index 0000000000..7ec1c26be7 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/images/overview.svg @@ -0,0 +1,250 @@ + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Application + + + +Persistent Objects + + + +Database + + + +HIBERNATE + + + + + + + + + + + + + + +hibernate. + +properties + + + +XML Mapping + + + diff --git a/documentation/envers/src/main/docbook/en-US/translators.xml b/documentation/envers/src/main/docbook/en-US/translators.xml new file mode 100644 index 0000000000..b327674048 --- /dev/null +++ b/documentation/envers/src/main/docbook/en-US/translators.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + kreimer@bbs.frc.utn.edu.ar + + + + + Vincent + Ricard + + + Sebastien + Cesbron + + + Michael + Courcy + + + Vincent + Giguère + + + Baptiste + Mathus + + + Emmanuel + Bernard + + + Anthony + Patricio + + + + + Alvaro + Netto + alvaronetto@cetip.com.br + + + Anderson + Braulio + andersonbraulio@gmail.com + + + Daniel Vieira + Costa + danielvc@gmail.com + + + Francisco + gamarra + francisco.gamarra@gmail.com + + + Gamarra + mauricio.gamarra@gmail.com + + + Luiz Carlos + Rodrigues + luizcarlos_rodrigues@yahoo.com.br + + + Marcel + Castelo + marcel.castelo@gmail.com + + + Paulo + César + paulocol@gmail.com + + + Pablo L. + de Miranda + pablolmiranda@gmail.com + + + Renato + Deggau + rdeggau@gmail.com + + + Rogério + Araújo + rgildoaraujo@yahoo.com.br + + + Wanderson + Siqueira + wandersonxs@gmail.com + + + + + Cao + Xiaogang + + RedSaga + + Translation Lead + caoxg@yahoo.com + + + diff --git a/documentation/envers/src/main/docbook/es-ES/Hibernate_Reference.po b/documentation/envers/src/main/docbook/es-ES/Hibernate_Reference.po new file mode 100644 index 0000000000..1fbe2a3eb4 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - Persistencia Relacional para Java Idiomático" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "Documentación de Referencia de Hibernate" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/es-ES/content/architecture.po b/documentation/envers/src/main/docbook/es-ES/content/architecture.po new file mode 100644 index 0000000000..477ea04077 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/architecture.po @@ -0,0 +1,549 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:21 +msgid "Architecture" +msgstr "Arquitectura" + +#: index.docbook:24 +msgid "Overview" +msgstr "Visión General" + +#: index.docbook:26 +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "Una visión a (muy) alto nivel de la arquitectura de Hibernate:" + +#: index.docbook:39 +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"Este diagrama muestra a Hibernate usando la base de datos y los datos de " +"configuración para proveer servicios de persistencia (y objetos " +"persistentes) a la aplicación." + +#: index.docbook:44 +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"Nos gustaría mostrar una vista más detallada de la " +"arquitectura de tiempo de ejecución. Desafortunadamente, Hibernate es " +"flexible y soporta diferentes enfoques. Mostraremos los dos extremos. En la " +"arquitectura \"sencilla\", es la aplicación la que provee su propias " +"conexiones JDBC y gestiona sus propias transacciones. Este enfoque usa un " +"mínimo subconjunto de la API de Hibernate:" + +#: index.docbook:61 +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"La arquitectura \"full cream\" abstrae a la aplicación de las APIs de " +"JDBC/JTA y deja que Hibernate se encargue de los detalles." + +#: index.docbook:75 +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "He aquí algunas definiciones de los objetos en los diagramas:" + +#: index.docbook:80 +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#: index.docbook:82 +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"Caché threadsafe (inmutable) de mapeos compilados para una sola base " +"de datos. Es una fábrica de Session y un cliente " +"de ConnectionProvider. Opcionalmente, puede mantener una " +"caché (de segundo nivel) de datos reusables entre transacciones, a un " +"nivel de proceso o de cluster." + +#: index.docbook:92 +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#: index.docbook:94 +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"Objeto mono-hebra, de corta vida que representa una conversación " +"entre la aplicación y el almacenamiento persistente. Envuelve una " +"conexión JDBC. Es una fábrica de Transaction. Mantiene una caché requerida (de primer nivel) de objetos " +"persistentes, usada mientras se navega el grafo de objetos o se recuperen " +"objetos por identificador." + +#: index.docbook:104 +msgid "Persistent objects and collections" +msgstr "Objetos y colecciones persistentes" + +#: index.docbook:106 +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"Objetos de corta vida, mono-hebra conteniendo estado persistente y " +"funciónalidad de negocio. Estos pueden ser JavaBeans/POJOs (Plain Old " +"Java Objects, o sea, cualquier objeto Java), la única cosa especial " +"en ellos es que estan asociados actualmente con una (y sólo una) " +"Session. Tan pronto como la Session " +"sea cerrada, serán separados y estarán libres para ser usados " +"en cualquier capa de aplicación. (por ejemplo, directamente como " +"objetos de transferencia de datos hacia y desde la capa de presentació" +"n)." + +#: index.docbook:117 +msgid "Transient and detached objects and collections" +msgstr "Objetos y colecciones transitorios y separados" + +#: index.docbook:119 +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"Instancias de clases persistentes que no estan acutualmente asociadas con " +"una Session. Pueden haber sido instanciadas por la " +"aplicación y (aún) no haber sido hechas persistentes, o pueden " +"haber sido instanciadas por una Session cerrada." + +#: index.docbook:128 +msgid "Transaction (org.hibernate.Transaction)" +msgstr "Transaction (org.hibernate.Transaction)" + +#: index.docbook:130 +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(Opcional) Un objeto de corta vida, mono-hebra, usado por la aplicació" +"n para especificar unidades atómicas de trabajo. Abstrae a la " +"aplicación de las subyacentes transacciones JDBC, JTA o CORBA. En " +"algunos casos, una Session puede extenderse sobre varias " +"Transactions. Sin embargo, la demarcación de la " +"transacción, ya sea usando la API subyacente o Transaction, nunca es opcional!" + +#: index.docbook:141 +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#: index.docbook:143 +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(Opcional) Una fábrica (y pool) de conexiones JDBC. Abstrae a la " +"aplicación del Datasource o " +"DriverManager subyacente. No se expone a la " +"aplicación, pero puede ser extendido/implementado por el " +"desarrollador." + +#: index.docbook:151 +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#: index.docbook:153 +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(Opcional) Una fábrica de instancias de Transaction. No se expone a la aplicación, pero puede ser extendido/" +"implementado por el desarrollador." + +#: index.docbook:160 +msgid "Extension Interfaces" +msgstr "Interfaces de Extensión" + +#: index.docbook:162 +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"Hibernate ofrece muchas interfaces de extensión opcional que puedes " +"implementar para modificar a medida el comportamiento de tu capa de " +"persistencia. Para más detalles, mira la documentación de la " +"API." + +#: index.docbook:171 +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"Dada una arquitectura \"sencilla\", la aplicación pasa por alto las " +"APIs de Transaction/TransactionFactory " +"y/o ConnectionProvider, para hablar directamente a JTA o " +"JDBC." + +#: index.docbook:179 +msgid "Instance states" +msgstr "Estados de instancia" + +#: index.docbook:180 +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"Una instancia de una clase persistente puede estar en uno de tres estados " +"diferentes, definidos respecto de su contexto de persistencia. El objeto Session de Hibernate es el contexto " +"de persistencia:" + +#: index.docbook:188 +msgid "transient" +msgstr "transitorio" + +#: index.docbook:190 +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "" +"La instancia no está y nunca estuvo asociada con un contexto de " +"persistencia. No tiene identidad persistente (valor de clave primaria)." + +#: index.docbook:198 +msgid "persistent" +msgstr "persistente" + +#: index.docbook:200 +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"La instancia está actualmente asociada con un contexto de " +"persistencia. Tiene una identidad persistente (valor de clave primaria) y, " +"quizás, una fila correspondiente en la base de datos. Para un " +"contexto de persistencia en particular, Hibernate garantiza que la identidad persistente es equivalente a la identidad Java " +"(localización en memoria del objeto)." + +#: index.docbook:212 +msgid "detached" +msgstr "separado" + +#: index.docbook:214 +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corrsponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"La instancia estuvo una vez asociada con un contexto de persistencia, pero " +"ese contexto fue cerrado, o la instancia fue serializada a otro proceso. " +"Tiene una identidad persistente y, quizás, una fila correspondiente " +"en la base de datos. Para las instancias separadas, Hibernate no establece " +"ninguna garantía sobre la relación entre identidad persistente " +"e identidad Java." + +#: index.docbook:229 +msgid "JMX Integration" +msgstr "Integración JMX" + +#: index.docbook:231 +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMX es el estándar J2EE para la gestión de componentes Java. " +"Hibernate puede ser gestionado por medio de un servicio estándar JMX. " +"Proveemos una implementación de MBean en la distribución, " +"org.hibernate.jmx.HibernateService." + +#: index.docbook:237 +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"Para ejemplo de cómo desplegar Hibernate como un servicio JMX en un " +"Servidor de Aplicaciones JBoss, por favor, mira la Guía del Usuario " +"de JBoss. En JBoss AS, tienes además estos beneficios si despliegas " +"usando JMX:" + +#: index.docbook:245 +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"Gestión de Sesión: El ciclo de vida de la " +"Session de Hibernate puede estar automáticamente " +"ligado al ámbito de una transacción JTA. Esto significa que ya " +"no tienes que abrir ni cerrar la Session manualmente, " +"esto pasa a ser trabajo de un interceptor EJB de JBoss. Además " +"tampoco tienes que preocuparte más de la demarcación de la " +"transacción (a menos que que quieras escribir una capa de persitencia " +"portable, por supuesto, usa la API de Transaction de " +"Hibernate para esto). Para acceder a una Session llama al " +"HibernateContext." + +#: index.docbook:257 +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"Despliegue de HAR: Usualmente despliegas el servicio " +"JMX de Hibernate usando un descriptor de despliegue de servicio de JBoss (en " +"un fichero EAR y/o SAR), que soporta todas las opciones de " +"configuración usuales de una SessionFactory de " +"Hibernate. Sin embargo, todavía tienes que nombrar todos tus ficheros " +"de mapeo en el descriptor de despliegue. Si decides usar el depliegue de HAR " +"opcional, JBoss detectará automáticamente todos los ficheros " +"de mapeo en tu fichero HAR." + +#: index.docbook:268 +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "" +"Para más información sobre estas opciones, consulta la " +"Guía de Usuario del JBoss AS." + +#: index.docbook:272 +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"Otra funcionalidad disponible como un servicio JMX son las estadí" +"sticas en tiempo de ejecución de Hibernate. Mira ." + +#: index.docbook:279 +msgid "JCA Support" +msgstr "Soporte JCA:" + +#: index.docbook:280 +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hiberate puede además ser configurado como un conector JCA. Por favor " +"mira el sitio web para más detalles. Por favor ten en cuenta que el " +"soporte de JCA de Hibernate está aún considerado experimental." + +#: index.docbook:287 +msgid "Contextual Sessions" +msgstr "UNTRANSLATED! Contextual Sessions" + +#: index.docbook:288 +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." + +#: index.docbook:297 +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." + +#: index.docbook:307 +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." + +#: index.docbook:314 +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." + +#: index.docbook:324 +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." + +#: index.docbook:332 +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." + +#: index.docbook:338 +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." + +#: index.docbook:347 +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programatic " +"transaction demarcation in plain JSE without JTA, you are adviced to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programatic " +"transaction demarcation in plain JSE without JTA, you are adviced to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." + +#: index.docbook:359 +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/association_mapping.po b/documentation/envers/src/main/docbook/es-ES/content/association_mapping.po new file mode 100644 index 0000000000..630b54d449 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/association_mapping.po @@ -0,0 +1,1127 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:6 +msgid "Association Mappings" +msgstr "Mapeos de Asociación" + +#: index.docbook:9 +msgid "Introduction" +msgstr "Introducción" + +#: index.docbook:11 +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"Los mapeos de asociación son frecuentemente las cosas mas difí" +"ciles de hacer correctamente. En esta sección iremos a través " +"de los casos canónicos uno a uno, comenzando con los mapeos " +"unidireccionales, y considerando luego los casos bidireccionales. Usaremos " +"Person y Address en todos los ejemplos." + +#: index.docbook:19 +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "" +"Clasificaremos las asociaciones por cuanto mapeen o no a una tabla de " +"unión interviniente, y por su multiplicidad." + +#: index.docbook:24 +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"Las claves foráneas que aceptan valores nulos (en adelante, " +"nullables) no son consideradas una buena práctica en el modelado " +"tradicional de datos, así que todos nuestros ejemplos usan claves " +"foráneas no nullables. Esto no es un requerimiento de Hibernate, y " +"todos los mapeos funcionarán si quitas las restricciones de " +"nulabilidad." + +#: index.docbook:34 +msgid "Unidirectional associations" +msgstr "Asociaciones Unidireccionales" + +#: index.docbook:37, index.docbook:108 +msgid "many to one" +msgstr "muchos a uno" + +#: index.docbook:39 +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "" +"Una asociación unidireccional muchos-a-uno es el " +"tipo más común de asociaciones unidireccionales." + +#: index.docbook:44 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:45, index.docbook:161 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:50, index.docbook:121, index.docbook:185, index.docbook:225 +msgid "one to one" +msgstr "uno a uno" + +#: index.docbook:52 +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"Una asociación unidireccional uno-a-uno en una clave " +"primaria es casi idéntica. La única diferencia es " +"la restricción de unicidad de la columna." + +#: index.docbook:57 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:58, index.docbook:193 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:60 +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"Usualmente, una asociación unidireccional uno-a-uno en una " +"clave primaria usa un generador de id especial. (Observa que " +"hemos invertido el sentido de la asociación en este ejemplo)." + +#: index.docbook:66 +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:67, index.docbook:201 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:72, index.docbook:94 +msgid "one to many" +msgstr "uno a muchos" + +#: index.docbook:74 +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"Una asociación unidireccional uno-a-muchos en una clave " +"foránea es un caso muy inusual, y realmente no está " +"recomendada." + +#: index.docbook:79 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:80 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:82 +msgid "We think it's better to use a join table for this kind of association." +msgstr "" +"Creemos que es mejor usar una tabla de unión para este tipo de " +"asociación." + +#: index.docbook:91 +msgid "Unidirectional associations with join tables" +msgstr "Asociaciones unidireccionales con tablas de unión" + +#: index.docbook:96 +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"Una asociación unidireccional uno-a-muchos en una tabla de " +"unión es más preferible. Observa que especificando " +"unique=\"true\", hemos cambiado la multiplicidad de " +"muchos-a-muchos a uno-a-muchos." + +#: index.docbook:102 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:103 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:110 +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"Una asociación unidireccional muchos-a-uno en una tabla de " +"unión es bastante común cuando la asociación " +"es opcional." + +#: index.docbook:115 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:116 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:123 +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Una asociación unidireccional uno-a-uno en una tabla de " +"unión es inusual en extremo, pero posible." + +#: index.docbook:128 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:129, index.docbook:233 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:134, index.docbook:238 +msgid "many to many" +msgstr "muchos a muchos" + +#: index.docbook:136 +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "" +"Finalmente, tenemos una asociación unidireccional muchos-a-" +"muchos" + +#: index.docbook:140 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:141, index.docbook:246 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:148 +msgid "Bidirectional associations" +msgstr "Asociaciones Bidireccionales" + +#: index.docbook:151, index.docbook:211 +msgid "one to many / many to one" +msgstr "uno a muchos / muchos a uno" + +#: index.docbook:153 +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"Una asociación bidireccional muchos-a-uno es el " +"tipo más común de asociación. (Esta es la relació" +"n estándar padre/hijo.)" + +#: index.docbook:159 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:163 +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"UNTRANSLATED! If you use a List (or other indexed " +"collection) you need to set the key column of the foreign " +"key to not null, and let Hibernate manage the association " +"from the collections side to maintain the index of each element (making the " +"other side virtually inverse by setting update=\"false\" " +"and insert=\"false\"):" + +#: index.docbook:171 +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ]]>" + +#: index.docbook:173 +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"UNTRANSLATED! It is important that you define not-null=\"true\" on the <key> element of the collection " +"mapping if the underlying foreign key column is NOT NULL. " +"Don't only declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." + +#: index.docbook:187 +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "" +"Una asociación bidireccional uno-a-uno en una clave " +"foránea es bastante común." + +#: index.docbook:192 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:195 +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "" +"Una asociación bidireccional uno-a-uno en una clave " +"primaria usa el generador de id especial." + +#: index.docbook:200 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:208 +msgid "Bidirectional associations with join tables" +msgstr "Asociaciones bidireccionales con tablas de unión" + +#: index.docbook:213 +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"Una asociación bidireccional uno-a-muchos en una tabla de " +"unión. Observa que el inverse=\"true\" " +"puede ir a cualquier lado de la asociación, en la colección, o " +"en la unión." + +#: index.docbook:219 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:220 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:227 +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Una asociación bidireccional uno-a-uno en una tabla de " +"unión es inusual en extremo, pero posible." + +#: index.docbook:232 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:240 +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "" +"Finalmente, tenemos una asociación bidireccional muchos-a-" +"muchos." + +#: index.docbook:244 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:253 +msgid "More complex association mappings" +msgstr "UNTRANSLATED! More complex association mappings" + +#: index.docbook:255 +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" + +#: index.docbook:264 +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is " +"null then 1 else 0 end\n" +" \n" +" \n" +" \n" +" ]]>" + +#: index.docbook:266 +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" + +#: index.docbook:271 +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" +"\n" +" \n" +" '1'\n" +" ]]>" + +#: index.docbook:273 +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" + +#: index.docbook:281 +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +" ]]>" + +#: index.docbook:283 +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/basic_mapping.po b/documentation/envers/src/main/docbook/es-ES/content/basic_mapping.po new file mode 100644 index 0000000000..7119309132 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/basic_mapping.po @@ -0,0 +1,5524 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Basic O/R Mapping" +msgstr "Mapeo O/R Básico" + +#: index.docbook:8 +msgid "Mapping declaration" +msgstr "Declaración de mapeo" + +#: index.docbook:10 +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"Los mapeos objeto/relacional se definen usualmente en un documento XML. El " +"documento de mapeo está diseñado para ser leíble y " +"editable a mano. El lenguaje de mapeo es Java-céntrico, o sea que los " +"mapeos se construyen alrededor de declaraciones de clases persistentes, no " +"declaraciones de tablas." + +#: index.docbook:17 +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"Observa que, incluso aunque muchos usuarios de Hibernate eligen escribir el " +"XML a mano, existe una cantidad de herramientas para generar el documento de " +"mapeo, incluyendo XDoclet, Middlegen y AndroMDA." + +#: index.docbook:23 +msgid "Lets kick off with an example mapping:" +msgstr "Comencemos por un mapeo de ejemplo:" + +#: index.docbook:27 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:29 +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"Discutiremos ahora el contenido del documento de mapeo. Describiremos " +"sólo los elementos y atributos que son usados por Hibernate en tiempo " +"de ejecución. El documento de mapeo contiene además algunos " +"atributos y elementos extra opcionales que afectan los esquemas de base de " +"datos exportados por la herramienta de exportación de esquemas. (Por " +"ejemplo, el atributo not-null.)" + +#: index.docbook:40 +msgid "Doctype" +msgstr "Doctype" + +#: index.docbook:42 +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"Todos los mapeos XML deben declarar el doctype mostrado. El DTD actual puede " +"ser encontrado en el URL mencionado arriba, en el directorio " +"hibernate-x.x.x/src/org/hibernate, o en " +"hibernate3.jar. Hibernate siempre buscará el DTD " +"primero en el classpath. Si experimentas búsquedas del DTD usando una " +"conexión de Internet, chequea tu declaración de DTD contra la " +"contenida en el classpath." + +#: index.docbook:52 +msgid "EntityResolver" +msgstr "UNTRANSLATED! EntityResolver" + +#: index.docbook:53 +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." + +#: index.docbook:61 +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." + +#: index.docbook:70 +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." + +#: index.docbook:79 +msgid "An example of utilizing user namespacing:" +msgstr "An example of utilizing user namespacing:" + +#: index.docbook:82 +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" +"\n" +" \n" +" ]>\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +" ]]>" + +#: index.docbook:83 +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." + +#: index.docbook:91 +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#: index.docbook:93 +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"Este elemento tiene muchos atributos opcionales. Los atributos " +"schema y catalog especifican que las " +"tablas a las que se refiere en el mapeo pertenecen al esquema y/o catá" +"logo mencionado(s). De especificarse, los nombres de tablas serán " +"cualificados por el nombre de esquema y catálogo dados. De omitirse, " +"los nombres de tablas no serán cualificados. El atributo " +"default-cascade especifica qué estilo de cascada " +"debe asumirse para las propiedades y colecciones que no especifican un " +"atributo cascade. El atributo auto-import nos permite usar nombres de clase sin cualificar en el lenguaje de " +"consulta, por defecto." + +#: index.docbook:114 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:117 +msgid "schema (optional): The name of a database schema." +msgstr "" +"schema (opcional): El nombre de un esquema de la base de " +"datos." + +#: index.docbook:122 +msgid "catalog (optional): The name of a database catalog." +msgstr "" +"catalog (opcional): El nombre de un catálogo de la " +"base de datos." + +#: index.docbook:127 +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (opcional - por defecto a none): Un estilo de cascada por defecto." + +#: index.docbook:133 +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (opcional - por defecto a " +"property): La estrategia que Hibernate debe usar para " +"acceder a todas las propiedades. Puede ser una implementación " +"personalizada de PropertyAccessor." + +#: index.docbook:140 +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (opcional - por defecto a true): El valor por defecto para los atributos lazy " +"de mapeos de clase y colleción no especificados." + +#: index.docbook:147 +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import (opcional - por defecto a true): Especifica si podemos usar nombres de clases no cualificados (de " +"clases en este mapeo) en el lenguaje de consulta." + +#: index.docbook:154 +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (opcional): Especifica un prefijo de paquete a " +"asumir para los nombres no cualificados de clase en el documento de mapeo." + +#: index.docbook:162 +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"Si tienes dos clases persistentes con el mismo nombre (sin cualificar), " +"debes establecer auto-import=\"false\". Hibernate " +"lanzará una excepción si intentas asignar dos clases al mismo " +"nombre \"importado\"." + +#: index.docbook:168 +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"Observa que el elemento hibernate-mapping te permite " +"anidar muchos mapeos <class> persistentes, como se " +"muestra arriba. Sin embargo, es una buena práctica (y se espera de " +"algunas herramientas) mapear sólo a una sola clase persistente (o a " +"una sola jerarquía de clases) en un fichero de mapeo y nombrarlo " +"después de la superclase persistente; por ejemplo, Cat.hbm." +"xml, Dog.hbm.xml, o, si se usa herencia, " +"Animal.hbm.xml." + +#: index.docbook:181 +msgid "class" +msgstr "class" + +#: index.docbook:183 +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "" +"Puedes declarar una clase persistente usando el elemento class:" + +#: index.docbook:211 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:214 +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (opcional): El nombre completamente cualificado de " +"la clase Java persistente (o interface). Si este atributo es omitido, se " +"asume que el mapeo es para una entidad non-POJO." + +#: index.docbook:221 +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (opcional - por defecto al nombre no cualificado de " +"la clase): El nombre de su tabla en base de datos." + +#: index.docbook:227 +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (opcional - por defecto al nombre de " +"la clase): Un valor que distingue subclases individuales, usado para el " +"comportamiento polimórfico. Los valores aceptables incluyen " +"null y not null." + +#: index.docbook:234 +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (opcional, por defecto a true): Especifica que las instancias de la clase (no) son mutables." + +#: index.docbook:240, index.docbook:2204 +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"schema (opcional): Sobreescribe el nombre de esquema " +"especificado por el elemento raíz <hibernate-mapping>." + +#: index.docbook:246, index.docbook:2210 +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"catalog (opcional): Sobreescribe el nombre de catá" +"logo especificado por el elemento raíz <hibernate-" +"mapping>." + +#: index.docbook:252 +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (opcional): Especifica una interface a usar para " +"proxies de inicialización perezosa. Puedes especificar el nombre " +"mismo de la clase." + +#: index.docbook:258 +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (opcional, por defecto a false): Especifica que el SQL UPDATE debe ser generado " +"en tiempo de ejecución y contener solamente aquellas columnas cuyo " +"valor haya cambiado." + +#: index.docbook:265 +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (opcional, por defecto a false): Especifica que el SQL INSERT debe ser generado " +"en tiempo de ejecución y contener solamente aquellas columnas cuyo " +"valores no son nulos." + +#: index.docbook:272 +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (opcional, por defecto a " +"false): Especifica que Hibernate nunca debe realizar un SQL UPDATE a menos que se " +"tenga certeza que un objeto haya sido modificado realmente. En ciertos " +"casos, (realmente, sólo cuando un objeto transitorio ha sido asociado " +"con una sesión nueva usando update()), esto " +"significa que Hibernate realizará una SQL SELECT " +"extra para determinar si un UPDATE es realmente requerido." + +#: index.docbook:282 +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"polymorphism (opcional, por defecto a implicit): Determina si se usa polimorfismo de consulta implícito o " +"explícito." + +#: index.docbook:288 +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (opcional) especifica una condición SQL " +"WHERE arbitraria paraa ser usada al recuperar objetos de " +"esta clase." + +#: index.docbook:294 +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (opcional): Especifica un " +"ClassPersister personalizado." + +#: index.docbook:299 +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (opcional, por defecto a 1) " +"especifica un \"tamaño de lote\" para traer instancias de esta clase " +"por identificador." + +#: index.docbook:305 +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock (opcional, por defecto a " +"version): Determina la estrategia optimista de bloqueo." + +#: index.docbook:311 +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (opcional): La recuperación perezosa puede " +"ser deshabilitada por completo estableciendo lazy=\"false\"." + +#: index.docbook:317 +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name (opcional): Hibernate3 permite que una clase " +"sea mapeada varias veces (potencialmente a tablas diferentes), y permite que " +"los mapeos de entidad sean representados por Maps o XML al nivel de Java. En " +"estos casos, debes proveer un nombre explícito arbitrario para la " +"entidad. Para más información, mira y ." + +#: index.docbook:327 +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (opcional): Una expresión SQL usada para " +"generar una restricción check multi-fila para la " +"generación automática de esquema." + +#: index.docbook:333 +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (opcional): Hibernate puede usar los llamados " +"ROWIDs en las bases de datos que los soporten. Por ejemplo, en Oracle, " +"Hibernate puede usar la columna extra rowid para " +"actualizaciones rápidas si estableces esta opción a " +"rowid. Un ROWID es un detalle de implementación y " +"representa la posición física de la tupla almacenada." + +#: index.docbook:341 +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (opcional): Mapea una entidad inmutable y de " +"sólo lectura a una subselect de base de datos. Es útil si " +"quieres tener una vista en vez de una tabla base, pero no tienes vistas. " +"Mira debajo para más información." + +#: index.docbook:348 +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (opcional): Usado para marcar superclases " +"abstractas en jerarquías <union-subclass>." + +#: index.docbook:356 +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"Es perfectamente aceptable que la clase persistente mencionada sea una " +"interface. Entonces declararías clases que implementan esa interface " +"usando el elemento <subclass>. Puedes persistir " +"cualquier clase interna estática. Debes " +"especificar el nombre de la clase usando la forma estándar. Por " +"ejemplo, eg.Foo$Bar." + +#: index.docbook:363 +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"Las clases inmutables, mutable=\"false\", no pueden ser " +"actualizadas o borradas por la aplicación. Esto permite a Hibernate " +"hacer ciertas optimizaciones menores de rendimiento." + +#: index.docbook:368 +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"El atributo opcional proxy habilita la " +"inicialización postergada de instancias persistentes de la clase. " +"Hibernate inicialmente retornará proxies CGLIB que implementan la " +"interface mencionada. El objeto persistente real será cargado cuando " +"se invoque un método del proxy. Mira \"Proxies para " +"Inicialización Postergada\" debajo." + +#: index.docbook:375 +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"Por polimorfismo implícito se entiende que las " +"instancias de la clase serán devueltas por una consulta que mencione " +"cualquier superclase, o interface implementada, o la clase misma; y que las " +"instancias de cualquier subclase de la clase serán devueltas por una " +"clase que mencione a la clase en sí. Por polimorfismo " +"explícito se entiende que instancias de la clase " +"serán devueltas sólo por consultas que mencionen explí" +"citamente la clase; y que las consultas que mencionen la clase " +"devolverán sólo instancias de subclases mapeadas dentro de " +"esta declaración <class> como una " +"<subclass> o <joined-subclass>. Para la mayoría de los propósitos el defecto, " +"polymorphism=\"implicit\", resulta apropiado. El " +"polimorfismo explícito es útil cuando dos clases diferentes " +"están mapeadas a la misma tabla (esto permite tener una clase " +"\"liviana\" que contenga un subconjunto de columnas de la tabla)." + +#: index.docbook:387 +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"El atributo persister te permite personalizar la " +"estrategia de persistencia para la clase. Puedes, por ejemplo, especificar " +"tu propia subclase de org.hibernate.persister.EntityPersister o incluso puedes proveer una implementación completamente " +"nueva de la interface org.hibernate.persister.ClassPersister que implemente la persistencia por medio, por ejemplo, de llamadas " +"a procedimientos almacenados, serialización a ficheros planos o LDAP. " +"Para un ejemplo simple (de persistencia a una Hashtable) " +"mira org.hibernate.test.CustomPersister." + +#: index.docbook:398 +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"Observa que los valores de dynamic-update y " +"dynamic-insert no son heredados por las subclases y por " +"lo tanto deben especificarse en los elementos <subclass> o <joined-subclass>. Estos ajustes pueden " +"incrementar el rendimiento en algunos casos, pero podrían mermarlo en " +"otros. Ten juicio en su uso." + +#: index.docbook:406 +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"Generalmente el uso de select-before-update " +"disminuirá el rendimiento. Es muy útil prevenir que se llame " +"innecesariamente a un disparador de actualización de base de datos al " +"volver a unir un grafo de instancias separadas a una Session." + +#: index.docbook:412 +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"Si habilitas dynamic-update, tendrás opción " +"de estrategias de bloqueo optimistas:" + +#: index.docbook:418 +msgid "version check the version/timestamp columns" +msgstr "" +"version chequea las columnas de versión/timestamp" + +#: index.docbook:423 +msgid "all check all columns" +msgstr "all chequea todas las columnas" + +#: index.docbook:428 +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "" +"dirty chequea las columnas modificadas, permitiendo " +"algunas actualizaciones concurrentes" + +#: index.docbook:433 +msgid "none do not use optimistic locking" +msgstr "none no usa bloqueo optimista" + +#: index.docbook:438 +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"Recomendamos muy fuertemente que uses columnas de " +"versión/timestamp para bloqueo optimista con Hibernate. Esta es la " +"estrategia óptima con respecto al rendimiento y es la única " +"estrategia que maneja correctamente las modificaciones hechas a las " +"instancias separadas. (por ejemplo, cuando se usa Session.merge())." + +#: index.docbook:445 +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"Para un mapeo de Hibernate, no hay diferencia entre una vista y una tabla " +"base. Como se supone esto es transparente a nivel de base de datos (observa " +"que algunos DBMS no soportan correctamente las vistas, especialmente con las " +"actualizaciones). A veces quieres usar una vista, pero no puedes crear una " +"en la base de datos (por ejemplo, con un esquema heredado). En este caso, " +"puedes mapear una entidad inmutable de sólo lectura a una " +"expresión de subconsulta SQL dada." + +#: index.docbook:453 +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:455 +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"Declara las tablas con las que sincronizar esta entidad, asegurando que el " +"auto-flush ocurre correctamente, y que las consultas contra la entidad " +"derivada no devuelven datos desactualizados. El <subselect> está disponible tanto como un atributo o como un elemento " +"anidado de mapeo." + +#: index.docbook:465 +msgid "id" +msgstr "id" + +#: index.docbook:467 +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"Las clases mapeadas deben declarar la columna de clave " +"primaria de la tabla de la base de datos. En la mayoría de los casos " +"tendrá también una propiedad estilo Javabeans que tenga el " +"identificador único de una instancia. El elemento <id>" +" define el mapeo de esa propiedad a la columna de clave primaria." + +#: index.docbook:482 +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +"]]>" + +#: index.docbook:485 +msgid "" +"name (optional): The name of the identifier property." +msgstr "" +"name (opcional): El nombre de la propiedad del " +"indentificador." + +#: index.docbook:490 +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "" +"type (opcional): Un nombre que indica el tipo Hibernate." + +#: index.docbook:495 +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "" +"column (opcional - por defecto al nombre de la " +"propiedad): El nombre de la columna de clave primaria." + +#: index.docbook:501 +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value (opcional - por defecto al valor \"sensible" +"\"): Una valor de la propiedad identificadora que indica que una instancia " +"está recién instanciada (sin salvar), distinguiéndola " +"de instancias separadas que fueran salvadas o cargadas en una sesión " +"previa." + +#: index.docbook:509, index.docbook:1017, index.docbook:1156, +#: index.docbook:1238, index.docbook:1345, index.docbook:1534, +#: index.docbook:1708, index.docbook:1878, index.docbook:2457 +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"access (opcional - por defecto a property): La estrategia que Hibernate debe usar para acceder al valor de la " +"propiedad." + +#: index.docbook:517 +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "" +"Si se omite el atributo name, se asume que la clase no " +"tiene propiedad identificadora." + +#: index.docbook:522 +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "" +"El atributo unsaved-value es importante! Si la propiedad " +"identificadora de tu clase no tiene por defecto el valor por defecto normal " +"de Java (null o cero), entonces debes especificar el valor por defecto real." + +#: index.docbook:526 +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"Hay una declaración <composite-id> " +"alternativa para permitir acceso a datos heredados con claves compuestas. " +"Desalentamos fuertemente su uso para cualquier otra cosa." + +#: index.docbook:532 +msgid "Generator" +msgstr "Generator" + +#: index.docbook:534 +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"El elemento hijo opcional <generator> nombra una " +"clase Java usada en generar identificadores únicos para instancias de " +"la clase persistente. De requerirse algún parámetro para " +"configurar o inicializar la instancia del generador, se pasa usando el " +"elemento <param>." + +#: index.docbook:541 +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" + +#: index.docbook:543 +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"Todos los generadores implementan la interface org.hibernate.id." +"IdentifierGenerator. Esta es una interface muy simple; algunas " +"aplicaciones pueden escoger proveer sus propias implementaciones " +"especializadas. Sin embargo, Hibernate provee un rango de implementaciones " +"prefabricadas. Hay nombres alias de atajo para los generadores prefabricados:" + +#: index.docbook:551 +msgid "increment" +msgstr "increment" + +#: index.docbook:553 +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"genera indentificadores de tipo long, short o int que sólo son únicos cuando " +"ningún otro proceso está insertando datos en la misma tabla. " +"No usar en un cluster." + +#: index.docbook:562 +msgid "identity" +msgstr "identity" + +#: index.docbook:564 +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"soporta columnas de identidad en DB2, MySQL, MS SQL Server, Sybase y " +"HypersonicSQL. El identificador devuelto es de tipo long, " +"short o int." + +#: index.docbook:572 +msgid "sequence" +msgstr "sequence" + +#: index.docbook:574 +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"usa una secuencia en DB2, PostgreSQL, Oracle, SAP DB, McKoi o un generador " +"en Interbase. El identificador devuelto es de tipo long, " +"short o int." + +#: index.docbook:582 +msgid "hilo" +msgstr "hilo" + +#: index.docbook:584 +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"usa un algoritmo alto/bajo para generar eficientemente identificadores de " +"tipo long, short o int, dada una tabla y columna como fuente de valores altos (por defecto " +"hibernate_unique_key y next_hi " +"respectivamente). El algoritmo alto/bajo genera identificadores que son " +"únicos sólo para una base de datos particular." + +#: index.docbook:594 +msgid "seqhilo" +msgstr "seqhilo" + +#: index.docbook:596 +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"usa un algoritmo alto/bajo para generar eficientemente identificadores de " +"tipo long, short o int, dada una secuencia de base de datos." + +#: index.docbook:604 +msgid "uuid" +msgstr "uuid" + +#: index.docbook:606 +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"usa un algoritmo UUID de 128 bits para generar identificadore de tipo " +"cadena, únicos en una ref (se usa la direccón IP). El UUID se " +"codifica como una cadena hexadecimal de 32 dígitos de largo." + +#: index.docbook:614 +msgid "guid" +msgstr "guid" + +#: index.docbook:616 +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "" +"usa una cadena GUID generada por base de datos en MS SQL Server y MySQL." + +#: index.docbook:622 +msgid "native" +msgstr "native" + +#: index.docbook:624 +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"selecciona identity, sequence o " +"hilo dependiendo de las capacidades de la base de datos " +"subyacente." + +#: index.docbook:632 +msgid "assigned" +msgstr "assigned" + +#: index.docbook:634 +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"deja a la aplicación asignar un identificador al objeto antes de que " +"se llame a save(). Esta es la estrategia por defecto si " +"no se especifica un elemento <generator>." + +#: index.docbook:642 +msgid "select" +msgstr "select" + +#: index.docbook:644 +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "" +"recupera una clave primaria asignada por un disparador de base de datos " +"seleccionando la fila por alguna clave única y recuperando el valor " +"de la clave primaria." + +#: index.docbook:651 +msgid "foreign" +msgstr "foreign" + +#: index.docbook:653 +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"usa el identificador de otro objeto asociado. Generalmente usado en " +"conjuncón a una asociacón de clave primaria <uno-a-" +"uno>" + +#: index.docbook:660 +msgid "sequence-identity" +msgstr "UNTRANSLATED! sequence-identity" + +#: index.docbook:662 +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." + +#: index.docbook:679 +msgid "Hi/lo algorithm" +msgstr "Algoritmo alto/bajo" + +#: index.docbook:680 +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"Los generadores hilo y seqhilo proveen " +"dos implementaciones alternativas del algoritmo alto/bajo, un enfoque " +"favorito en generación de identificadores. La primera " +"implementación requiere de una tabla \"especial\" de base de datos " +"para tener el siguiente valor \"alto\" disponible. La segunda usa una " +"secuencia del estilo de Oracle (donde se soporte)." + +#: index.docbook:687 +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" + +#: index.docbook:689 +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" + +#: index.docbook:691 +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"Desafortunadamente, no puedes usar hilo cuando le proveas " +"tu propia Connection a Hibernate. Cuando Hibernate " +"está usando un datasource del servidor de aplicaciones para obtener " +"conexiones alistadas con JTA, debes configurar correctamente el " +"hibernate.transaction.manager_lookup_class." + +#: index.docbook:700 +msgid "UUID algorithm" +msgstr "Algoritmo UUID" + +#: index.docbook:701 +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"El UUID contiene: la dirección IP, el instante de arranque de la JVM " +"(con una precisión de un cuarto de segundo), el tiempo de sistema y " +"un valor de contador (único en la JVM). No es posible obtener una " +"dirección MAC o una dirección de memoria desde código " +"Java, así que esto es lo mejor que podemos hacer sin usar JNI." + +#: index.docbook:710 +msgid "Identity columns and sequences" +msgstr "Columnas de identidad y secuencias" + +#: index.docbook:711 +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"Para las bases de datos que soportan columnas de identidad (DB2, MySQL, " +"Sybase, MS SQL), puedes usar generación de claves identity. Para las bases de datos que soportan secuencias (DB2, Oracle, " +"PostgreSQL, Interbase, McKoi, SAP DB) puedes usar la generación de " +"claves del estilo sequence. Ambas estrategias requieren " +"dos consultas SQL para insertar un nuevo objeto." + +#: index.docbook:719 +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" + +#: index.docbook:721 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +"]]>" + +#: index.docbook:723 +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"Para desarrollos multiplataforma, la estrategia native " +"eiligirá de entre las estrategias identity, " +"sequence y hilo, dependiendo de las " +"capacidades de la base de datos subyacentes." + +#: index.docbook:732 +msgid "Assigned identifiers" +msgstr "Identificadores asignados" + +#: index.docbook:733 +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"Si quieres que la aplicación asigne los identificadores (en " +"contraposición a que los genere Hibernate), puedes usar el generador " +"assigned. Este generador especial usará el valor " +"identificador ya asignado a la propiedad identificadora del objeto. Este " +"generador se usa cuandola clave primaria es una clave natural en vez de una " +"clave sustituta. Este es el comportamiento por defecto si no especificas un " +"elemento <generator>." + +#: index.docbook:742 +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"Elegir el generador assigned hace que Hibernate use " +"unsaved-value=\"undefined\", forzando a Hibernate a ir a " +"la base de datos para determinar si una instancia es transitoria o separada, " +"a menos que haya una propiedad de versión o timestamp, o que tu " +"definas Interceptor.isUnsaved()." + +#: index.docbook:752 +msgid "Primary keys assigned by triggers" +msgstr "Claves primarias asignadas por disparadores" + +#: index.docbook:753 +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "" +"Para esquemas heredados solamente (Hibernate no genera DDL con disparadores)." + +#: index.docbook:757 +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" + +#: index.docbook:759 +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"En el ejemplo de arriba, hay una propiedad ánica llamada " +"socialSecurityNumber definida por la clase, como una " +"clave natural, y una clave sustituta llamada person_id " +"cuyo valor es generado por un disparador." + +#: index.docbook:771 +msgid "Enhanced identifier generators" +msgstr "Enhanced identifier generators" + +#: index.docbook:773 +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#: index.docbook:781 +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" + +#: index.docbook:795 +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#: index.docbook:801 +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#: index.docbook:808 +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#: index.docbook:815 +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#: index.docbook:822 +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#: index.docbook:829 +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"optimizer (optional, defaults to none): See" + +#: index.docbook:836 +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" + +#: index.docbook:846 +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#: index.docbook:852 +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#: index.docbook:858 +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#: index.docbook:865 +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#: index.docbook:872 +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#: index.docbook:878 +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#: index.docbook:884 +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#: index.docbook:890 +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"optimizer (optional, defaults to ): See" + +#: index.docbook:900 +msgid "Identifier generator optimization" +msgstr "Identifier generator optimization" + +#: index.docbook:901 +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." + +#: index.docbook:909 +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#: index.docbook:915 +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#: index.docbook:924 +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#: index.docbook:937 +msgid "composite-id" +msgstr "composite-id" + +#: index.docbook:939 +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" + +#: index.docbook:941 +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"Para una tabla con clave compuesta, puedes mapear múltiples " +"propiedades de la clase como propiedades identificadoras. El elemento " +"<composite-id> acepta los mapeos de propiedad " +"<key-property> y los mapeos <key-many-" +"to-one> como elementos hijo." + +#: index.docbook:948 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:950 +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"Tu clase persistente debe sobreescribir equals" +"() y hashCode() para implementar igualdad de " +"identificador compuesto. Debe también implementar " +"Serializable." + +#: index.docbook:956 +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"Desafortunadamente, este enfoque de identificadores compuestos significa que " +"un objeto persistente es su propio identificador. No existe otra \"asa\" " +"conveniente más que el objeto mismo. Debes instanciar una instancia " +"de la clase misma y poblar sus propiedades identificadoras antes que puedas " +"load() el estado persistente asociado a una clave " +"compuesta. Describiremos un enfoque mucho más conveniente donde el " +"identificador compuesto está implementado como una clase separada en " +". Los atributos descriptos debajo " +"solamente se aplican a este enfoque alternativo:" + +#: index.docbook:965 +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." + +#: index.docbook:971 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" ]]>" + +#: index.docbook:973 +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." + +#: index.docbook:982 +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "" +"The following attributes are used to specify a mapped composite identifier:" + +#: index.docbook:988 +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." + +#: index.docbook:996 +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." + +#: index.docbook:1003 +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" + +#: index.docbook:1011 +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (opcional): Una propiedad de tipo componente que " +"tiene el identificador compuesto (ver siguiente sección)." + +#: index.docbook:1023 +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (opcional - por defecto al tipo de la propiedad " +"determinado por reflección): La clase del componente usado como " +"identificador compuesto (ver siguiente sección)." + +#: index.docbook:1030 +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." + +#: index.docbook:1038 +msgid "discriminator" +msgstr "discriminator" + +#: index.docbook:1040 +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"El elemento <discriminator> es requerido para la " +"persistencia polimórfica usando la estrategia de mapeo de tabla-por-" +"jerarquía-de-clases y declara una columna discriminadora de la tabla. " +"La columna discriminidora contiene valores de marca que le dicen a la capa " +"de persistencia qué subclase instanciar para una fila en particular. " +"Un conjunto restringido de tipos puede ser usado: string, " +"character, integer, byte, short, boolean, " +"yes_no, true_false." + +#: index.docbook:1058 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1061 +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column (opcional - por defecto a class) el nombre de la columna discriminadora." + +#: index.docbook:1067 +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (opcional - por defecto a string) " +"un nombre que indique el tipo Hibernate" + +#: index.docbook:1073 +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force (optconal - por defecto a false) " +"\"fuerza\" a Hibernate a especificar valores discriminadores permitidos " +"incluso cuando se recuperan todas las instancias de la clase raíz." + +#: index.docbook:1080 +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (opcional - por defecto a true) " +"establezca este a false si tu columna discriminadora es " +"también parte de un identificador mapeado compuesto. (Le dice a " +"Hibernate que no incluya la columna en los SQL INSERTs.)" + +#: index.docbook:1088 +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (opcional) una expresión SQL arbitraria " +"que es ejecutada cuando un tipo tenga que ser evaluado. Permite " +"dicriminación basada en el contenido." + +#: index.docbook:1096 +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"Los valores reales de la columna discriminadora están especificados " +"por el atributo discriminator-value de los elementos " +"<class> y <subclass>." + +#: index.docbook:1102 +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"El atributo force es (sólo) útil si la " +"tabla contiene filas con valores discriminadores \"extra\" que no está" +"n mapeados a la clase persistente. Generalmente este no es el caso." + +#: index.docbook:1108 +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"Usando el atributo formula puedes declarar una " +"expresión SQL arbitraria que será usada para evaluar el tipo " +"de una fila:" + +#: index.docbook:1113 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1118 +msgid "version (optional)" +msgstr "version (opcional)" + +#: index.docbook:1120 +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"El elemento <version> es opcional e indica que la " +"tabla contiene datos versionados. Esto es particularmente útil si " +"planeas usar transacciones largas (ver debajo)." + +#: index.docbook:1136 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1139 +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column (opcional - por defecto al nombre de la " +"propiedad): El nombre de la columna que tiene el número de " +"versión." + +#: index.docbook:1145 +msgid "" +"name: The name of a property of the persistent class." +msgstr "" +"name: El nombre de una propiedad de la clase persistente." + +#: index.docbook:1150 +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (opcional - por defecto a integer): El tipo del nú.mero de vesión." + +#: index.docbook:1162 +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (opcional - por defecto a " +"undefined): Un valor de la propiedad de versión " +"que indica que una instancia está recién instanciada (sin " +"guardar), distinguiéndola de instancias separadas que fueran " +"guardadas o cargadas en una sesión previa. (undefined especifica que debe usarse el valor de la propiedad identificadora.)" + +#: index.docbook:1171 +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"UNTRANSLATED! generated (optional - defaults to " +"never): Specifies that this version property value is " +"actually generated by the database. See the discussion of generated properties." + +#: index.docbook:1178 +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"UNTRANSLATED! insert (optional - defaults to " +"true): Specifies whether the version column should be " +"included in SQL insert statements. May be set to false if " +"and only if the database column is defined with a default value of " +"0." + +#: index.docbook:1188 +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"Los números de versión deben ser de tipo long, integer, short, " +"timestamp o calendar de Hibernate." + +#: index.docbook:1193 +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"Una propiedad de versión o timestamp nunca debe ser nula para una " +"instancia separada, de modo que Hibernate detectará cualquier " +"instancia con una versión o timestamp nulo como transitoria, sin " +"importar qué otras estrategias unsaved-value se " +"hayan especificado. Declarar una propiedad de versón o " +"timestamp nulable es una forma fácil de evitar cualquier problema con " +"la re-unión transitiva en Hibernate, especialmente útil para " +"que usa identificadores asignados o claves compuestas!" + +#: index.docbook:1204 +msgid "timestamp (optional)" +msgstr "timestamp (opcional)" + +#: index.docbook:1206 +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"El elemento opcional <timestamp> indica que la " +"tabla contiene datos con sellos de tiempo. Esto esta concebido como una " +"alternativa al versionado. Los timestamps (sellos de tiempo) son por su " +"naturaleza una implementación menos segura de bloqueo optimista. Sin " +"embrago, a veces la aplicación puede usar los timestamps en otras " +"formas." + +#: index.docbook:1222 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1225 +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "" +"column (opcional - por defecto al nombre de la " +"propiedad): El nombre de una columna que tiene el timestamp." + +#: index.docbook:1231 +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name: El nombre de una propiedad del estilo JavaBeans de " +"tipo Java Date o Timestamp de la clase " +"persistente." + +#: index.docbook:1244 +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (opcional - por defecto a null): Un valor de propiedad de versión que indica que una " +"instancia está recién instanciada (sin guardar), " +"distinguiéndola de instancias separadas que hayan sido guardadas o " +"cargadas en una sesión previa. (undefined " +"especifica que debe usarse el valor de la propiedad identificadora.)" + +#: index.docbook:1253 +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"UNTRANSLATED! source (optional - defaults to vm): From where should Hibernate retrieve the timestamp value? From " +"the database, or from the current JVM? Database-based timestamps incur an " +"overhead because Hibernate must hit the database in order to determine the " +"\"next value\", but will be safer for use in clustered environments. Note " +"also, that not all Dialects are known to support " +"retrieving of the database's current timestamp, while others might be unsafe " +"for usage in locking due to lack of precision (Oracle 8 for example)." + +#: index.docbook:1265 +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"UNTRANSLATED! generated (optional - defaults to " +"never): Specifies that this timestamp property value is " +"actually generated by the database. See the discussion of generated properties." + +#: index.docbook:1274 +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">." + +#: index.docbook:1284 +msgid "property" +msgstr "property" + +#: index.docbook:1286 +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"El elemento <property> declara una propiedad " +"persistente estilo JavaBean de la clase." + +#: index.docbook:1308 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1311 +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "" +"name: el nombre de la propiedad, con la letra inicial en " +"minúsculas." + +#: index.docbook:1317 +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column (opcional - por defecto al nombre de la " +"propiedad): el nombre de la columna de tabla de base de datos mapeada. Esto " +"puede también ser especificado con elemento(s) <column>" +" anidado(s)." + +#: index.docbook:1324 +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "" +"type (opcional): un nombre que indica el nobre Hibernate." + +#: index.docbook:1329 +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (opcional - por defecto a true) : especifica que las columnas mapeadas deben ser incluídas " +"en las sentencias SQL UPDATE y/o INSERT . Especificando ambas a false permite una " +"propiedad \"derivada\" cuyo valor es inicializado desde alguna otra " +"propiedad que mapee a la misma columna (o columnas) o por un disparador u " +"otra aplicación." + +#: index.docbook:1338 +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula (opcional): una expresión SQL que define " +"el valor para una propiedad computada. Las propiedades " +"computadas no tienen una columna mapeada propia." + +#: index.docbook:1351 +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (opcional - por defecto a false): " +"Especifica que esta propiedad debe ser traída perezosamente cuando la " +"variable de instancia sea accedida por primera vez (requiere " +"instrumentación en tiempo de compilación)." + +#: index.docbook:1358 +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (opcional): Habilita la generació DDL de " +"una restricción de unicidad para las columnas. Además, permite " +"que ésta sea un blanco objetivo de una property-ref." + +#: index.docbook:1365 +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (opcional): Habilita la generació DDL de " +"una restricción de nulabilidad para las columnas." + +#: index.docbook:1371 +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica que las actualizaciones a esta propiedad requieran o " +"no de la obtención de un bloqueo optimista. En otras palabras, " +"determina si debe ocurrir un incremento de versión cuando la " +"propiedad este sucia (desactualizada)." + +#: index.docbook:1379 +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"UNTRANSLATED! generated (optional - defaults to " +"never): Specifies that this property value is actually " +"generated by the database. See the discussion of generated properties." + +#: index.docbook:1388 +msgid "typename could be:" +msgstr "typename puede ser:" + +#: index.docbook:1394 +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"El nombre de un tipo básico Hibernate (por ejemplo, integer, " +"string, character, date, timestamp, float, binary, serializable, object, " +"blob)." + +#: index.docbook:1400 +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"El nombre de una clase Java de tipo básico (por ejemplo, " +"int, float, char, java.lang.String, java.util.Date, java.lang." +"Integer, java.sql.Clob)." + +#: index.docbook:1406 +msgid "The name of a serializable Java class." +msgstr "El nombre de una clase Java serializable." + +#: index.docbook:1411 +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"El nombre de un tipo personalizado (por ejemplo, com.illflow.type." +"MyCustomType)." + +#: index.docbook:1417 +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"Si no especificas un tipo, Hibernate usará reflección sobre la " +"propiedad mencionada para deducir el tipo Hibernate correcto. Hibernate " +"intentará interpretar el nombre de la clase de retorno del getter de " +"la propiedad usando las reglas 2, 3 y 4 en ese orden. Sin embargo, esto no " +"siempre suficiente. En ciertos casos, necesitarás aún el " +"atributo type. (Por ejemplo, para distinguir entre " +"Hibernate.DATE y Hibernate.TIMESTAMP, " +"o especificar un tipo personalizado.)" + +#: index.docbook:1427 +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"El atributo access te deja controlar cómo " +"Hibernate accederá a la propiedad en tiempo de ejecución. Por " +"defecto, Hibernate llamará al par de getter/setter de la propiedad. " +"Si especificas access=\"field\", Hibernate se " +"saltará el par get/set y accederá al campo directamente usando " +"reflección. Puedes especificar tu propia estrategia de acceso a la " +"propiedad mencionando una clase que implemente la interface org." +"hibernate.property.PropertyAccessor." + +#: index.docbook:1436 +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"Una aspecto especialmente poderoso son las propiedades derivadas. Estas " +"propiedades son por definición de sólo lectura, el valor de la " +"propiedad es computado en tiempo de carga. Tu declaras la computación " +"como una expresión SQL, y ésta se traduce a cláusula de " +"subconsulta SELECT en la consulta SQL que cargue una " +"instancia:" + +#: index.docbook:1443 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1445 +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"Observa que puedes referenciar la propia tabla de las entidades sin declarar " +"un alias o una columna particular (customerId en el " +"ejemplo dado). Observa además que puedes usar el elemento anidado de " +"mapeo <formula> si no te gusta usar el atributo." + +#: index.docbook:1455 +msgid "many-to-one" +msgstr "many-to-one" + +#: index.docbook:1457 +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"Una asociación ordinaria a otra clase persistente se declara usando " +"el elemento many-to-one. El modelo relacional es una " +"asociación muchos-a-uno: una clave foránea en una tabla " +"está referenciando la columna (o columnas) de la clave primaria de la " +"tabla objetivo." + +#: index.docbook:1485 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1488, index.docbook:1669, index.docbook:1855 +msgid "name: The name of the property." +msgstr "name: El nombre de la propiedad." + +#: index.docbook:1493, index.docbook:2284 +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"column (opcional): El nombre de la columna clave " +"foránea. También puede ser especificado por uno o varios " +"elementos anidados <column>." + +#: index.docbook:1500, index.docbook:1674 +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"class (opcional - por defecto al tipo de la propiedad " +"determinado por reflección): El nombre de la clase asociada." + +#: index.docbook:1506 +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (opcional): Especifica qué operaciones " +"deben ir en cascada desde el objeto padre al objeto asociado" + +#: index.docbook:1512, index.docbook:1695 +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"fetch (opcional - por defecto a 1select): Escoge entre recuperación outer-join o por selecció" +"n secuencial." + +#: index.docbook:1518 +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert (opcional - por defecto a true) especifica que las columnas mapeadas deben ser incluídas en " +"las sentencias SQL UPDATE y/o INSERT. " +"Establecer ambas a false permite una asociación " +"puramente \"derivada\" cuyo valor es inicializado desde alguna otra " +"propiedad que mapea a las misma columna (o columnas), o por un disparador, o " +"por otra aplicación." + +#: index.docbook:1527 +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref: (opcional) El nombre de la propiedad de la " +"clase asociada que está unida a la clave foránea. Si no se " +"especifica, se usa la clave primaria de la clase asociada." + +#: index.docbook:1540 +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique (opcional): Habilita la generación DDL de " +"una restricción de unicidad para la columna de clave foránea. " +"Además, permite que ésta sea el objetivo de una " +"property-ref. Esto hace efectivamente la multiplicidad de " +"la asociación uno a uno." + +#: index.docbook:1548 +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (opcional): Habilita la generación DDL de " +"una restricción de nulabilidad para las columnas de clave forá" +"nea." + +#: index.docbook:1554 +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica que las actualizaciones a esta propiedad requieran o " +"no la obtención del bloqueo optimista. En otras palabras, determina " +"si debe darse un incremento de versión cuando esta propiedad " +"esté desactualizada." + +#: index.docbook:1562 +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy (opcional - por defecto a proxy): " +"Por defecto, las asociaciones de punto único van con proxies. " +"lazy=\"true\" especifica que esta propiedad debe ser " +"traída perezosamente cuando la variable de instancia sea accedida por " +"primera vez (requiere instrumentación del bytecode en tiempo de " +"compilación). lazy=\"false\" especifica que la " +"asociación siempre será recuperada tempranamente." + +#: index.docbook:1572 +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (opcional - por defecto a exception): Especifica cómo deben manejarse las claves foráneas " +"que referencien filas inexistentes: ignore tratará " +"una fila perdida como una asociación nula." + +#: index.docbook:1579, index.docbook:1733 +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "" +"entity-name (opcional): El nombre de entidad de la clase " +"asociada." + +#: index.docbook:1585 +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (opcional): una expresión SQL que define " +"el valor para una clave foránea computada." + +#: index.docbook:1592 +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"Establecer el valor del atributo cascade a cualquier " +"valor significativo distinto de none propagará " +"ciertas operaciones al objeto asociado. Los valores significativos son los " +"nombres de las operaciones básicas de Hibernate, persist, " +"merge, delete, save-update, evict, replicate, lock, refresh, " +"así como los valores especiales delete-orphan y " +"all y combinaciones de operaciones separadas por coma, " +"por ejemplo, cascade=\"persist,merge,evict\" o " +"cascade=\"all,delete-orphan\". Para una explicació" +"n completa, ver ." + +#: index.docbook:1605 +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "" +"Una declaración típica muchos-a-uno se " +"parece a esto:" + +#: index.docbook:1609 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1611 +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"El atributo property-ref debe ser usado solamente para el " +"mapeo de datos heredados donde una clave foránea referencia una clave " +"única de la tabla asociada, distinta de la clave primaria. Este es un " +"modelo relacional feo. Por ejemplo, supón que la clase " +"Product tuviera un número único serial que " +"no es la clave primaria. (El atributo unique controla la " +"generación de DDL con la herramienta SchemaExport.)" + +#: index.docbook:1620 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1622 +msgid "Then the mapping for OrderItem might use:" +msgstr "" +"Entonces el mapeo para OrderItem debería usar:" + +#: index.docbook:1626 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1628 +msgid "This is certainly not encouraged, however." +msgstr "Sin embargo, esto no esta ciertamente alentado." + +#: index.docbook:1632 +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"Si la clave única referenciada abarca múltiples propiedades de " +"la entidad asociada, debes mapear las propiedades dentro de un elemento " +"<properties>." + +#: index.docbook:1637 +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "UNTRANSLATED!" + +#: index.docbook:1641 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1646 +msgid "one-to-one" +msgstr "one-to-one" + +#: index.docbook:1648 +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "" +"Una asociación uno-a-uno a otra clase persistente se declara usando " +"un elemento one-to-one." + +#: index.docbook:1666 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1680 +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (opcional) especifica qué operaciones " +"deben ir en cascada desde el objeto padre al objeto asociado." + +#: index.docbook:1686 +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"constrained (opcional) especifica que una " +"restricción de clave foránea de la tabla mapeada referencia a " +"la tabla de la clase asociada. Esta opción afecta el orden en que van " +"en cascada save() y delete(), y " +"determina cuándo la asociación pueden ser virtualizados por " +"proxies (es también usado por la herramienta de exportación de " +"esquemas)." + +#: index.docbook:1701 +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"property-ref: (opcional) El nombre de una propiedad de la " +"clase asociada que esté unida a la clave primaria de esta clase. Si " +"no se especifica, se usa la clave primaria de la clase asociada." + +#: index.docbook:1714 +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"formula (opcional): Casi todas las asociaciones uno-a-uno " +"mapean a la clave primaria de la entidad propietaria. En el raro caso en que " +"este no sea el caso, puedes especificar alguna otra columna, o columnas, o " +"expresión para unir usando una fórmula SQL. (Para un ejemplo " +"ver org.hibernate.test.onetooneformula)." + +#: index.docbook:1722 +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"lazy (opcional - por defecto a proxy): " +"Por defecto, las asociaciones de punto único van con proxies. " +"lazy=\"true\" especifica que esta propiedad debe ser " +"traída perezosamente cuando la variable de instancia sea accedida por " +"primera vez (requiere instrumentación del bytecode en tiempo de " +"compilación). lazy=\"false\" especifica que la " +"asociación siempre será recuperada tempranamente. " +"Observa que si constrained=\"false\", la " +"aplicación de proxies es imposible e Hibernate traerá temprano " +"la asociación!" + +#: index.docbook:1740 +msgid "There are two varieties of one-to-one association:" +msgstr "Hay dos variedades de asociaciones uno-a-uno:" + +#: index.docbook:1744 +msgid "primary key associations" +msgstr "asociaciones de clave primaria" + +#: index.docbook:1747 +msgid "unique foreign key associations" +msgstr "asociaciones de clave foráneas única" + +#: index.docbook:1752 +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"Las asociaciones de clave primaria no necesitan una columna de tabla extra; " +"si dos filas están relacionadas por la asociación entonces las " +"dos filas de tablas comparten el mismo valor de clave primaria. Por lo " +"tanto, si quieres que dos objetos estén relacionados por una " +"asociación de clave primaria, debes asegurarte que se les asigne el " +"mismo valor de identificador!" + +#: index.docbook:1759 +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"Para una asociación de clave primaria, añade los siguientes " +"mapeos a Employee y Person, " +"respectivamente." + +#: index.docbook:1764 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:1765 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1767 +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"Ahora debemos asegurarnos que las claves primarias de las filas relacionadas " +"en las tablas PERSON y EMPLOYEE sean iguales. Usamos una estrategia especial " +"de generación de identificador de Hibernate llamada foreign:" + +#: index.docbook:1773 +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:1775 +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"A una instancia recién salvada de Person se le " +"asigna entonces el mismo valor de clave primaria con que la instancia " +"Employee referida por la propiedad employee de esta Person." + +#: index.docbook:1781 +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"Alternativamente, una clave foránea con una restricción de " +"unicidad, desde Employee a Person, " +"puede ser expresada como:" + +#: index.docbook:1786 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1788 +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "" +"Y esta asociación puede hacerse bidireccional agregando lo siguiente " +"al mapeo de Person :" + +#: index.docbook:1793 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:1798 +msgid "natural-id" +msgstr "natural-id" + +#: index.docbook:1800 +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" + +#: index.docbook:1802 +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"Aunque recomendamos el uso de claves delegadas como claves primarias, " +"todavía debes intentar identificar claves naturales para todas las " +"entidades. Una clave natural es una propiedad o combinación de " +"propiedades que es única y no nula. Si además es inmutable, " +"mejor aún. Mapea las propiedades de la clave natural dentro del " +"elemento <natural-id>. Hibernate generará " +"las restricciones de clave única y nulabilidad necesarias, y tu mapeo " +"será más auto-documentado." + +#: index.docbook:1811 +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"Recomendamos fuertemente que implementes equals() y " +"hashCode() para comparar las propiedades de clave natural " +"de la entidad." + +#: index.docbook:1816 +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "" +"Este mapeo no está concebido para usar con entidades con claves " +"primarias naturales." + +#: index.docbook:1822 +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "" +"mutable (opcional, por defecto a false): Por defecto, se asume que las propiedades de identificadores " +"naturales son inmutables (constantes)." + +#: index.docbook:1832 +msgid "component, dynamic-component" +msgstr "component, dynamic-component" + +#: index.docbook:1834 +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "" +"El elemento <component> mapea propiedades de un " +"objeto hijo a columnas de la tabla de la clase padre. Los componentes pueden " +"a su vez declarar sus propias propiedades, componentes o colecciones. Ver " +"debajo \"Componentes\"." + +#: index.docbook:1852 +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" ........\n" +"]]>" + +#: index.docbook:1860 +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"class (opcional - por defecto al tipo de la propiedad " +"determinado por reflección): El nombre de la clase del componente " +"(hijo)." + +#: index.docbook:1866, index.docbook:1955 +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"insert: Aparecen las columnas mapeadas en " +"INSERTs SQL?" + +#: index.docbook:1872, index.docbook:1961 +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"update: Aparecen las columnas mapeadas en " +"UPDATEs SQL?" + +#: index.docbook:1884 +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (opcional - por defecto a false): " +"Especifica que este componente debe ser recuperado perezosamente cuando la " +"variable de instancia sea accedida por primera vez (requiere " +"instrumentación de bytecode en tiempo de compilación)." + +#: index.docbook:1891 +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica si las actualizaciones de este componente requieren o " +"no la adquisición de un bloqueo optimista. En otras palabras, " +"determina si debe ocurrir un incremento de versión cuando esta " +"propiedad está desactualizada." + +#: index.docbook:1899, index.docbook:1975 +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"unique (opcional - por defecto a false): Especifica que existe una restricción de unicidad sobre " +"todas las columnas mapeadas del componente." + +#: index.docbook:1908 +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"Las etiquetas hijas <property> mapean propiedades " +"de la clase hija columnas de la tabla." + +#: index.docbook:1913 +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"El elemento <component> permite un subelemento " +"<parent> que mapea una propiedad de la clase del " +"componente como una referencia de regreso a la entidad contenedora." + +#: index.docbook:1919 +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "" +"El elemento <dynamic-component> permite que un " +"Map sea mapeado como un componente, donde los nombres de " +"las propiedades se corresponden a las claves del mapa, ver ." + +#: index.docbook:1928 +msgid "properties" +msgstr "properties" + +#: index.docbook:1930 +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"El elemento <properties> permite la definició" +"n de un grupo de propiedades lógico con nombre de una clase. El uso " +"más importante de la contrucción es que permite que una " +"combinación de propiedades sea objetivo de una property-ref. Es también una forma conveniente de definir una " +"restricción de unicidad multicolumna." + +#: index.docbook:1946 +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" ........\n" +"]]>" + +#: index.docbook:1949 +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"name: El nombre lógico del agrupamiento - " +"no un nombre de propiedad real." + +#: index.docbook:1967 +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica si las actualizaciones de estas propiedades requieren " +"o no de la adquisición de un bloqueo optimista. En otras palabras, " +"determina si debe ocurrir un incremento de versión cuando estas " +"propiedades están desactualizadas." + +#: index.docbook:1984 +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "" +"Por ejemplo, si tenemos el siguiente mapeo de <properties>:" + +#: index.docbook:1988 +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:1990 +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"Entonces puede que tengamos alguna asociación de datos heredados que " +"se refiera a esta clave única de la tabla de Person, en vez de la clave primaria:" + +#: index.docbook:1995 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:1997 +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "" +"No recomendamos el uso de este tipo de cosas fuera del contexto del mapeo de " +"datos heredados." + +#: index.docbook:2005 +msgid "subclass" +msgstr "subclass" + +#: index.docbook:2007 +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "" +"Finalmente, la persistencia polimórfica requiere la declaració" +"n de la clase persistente raíz. Para la estrategia de mapeo tabla-por-" +"jerarquía-de-clases, se usa la declaración de <" +"subclass>." + +#: index.docbook:2020 +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" + +#: index.docbook:2023, index.docbook:2081, index.docbook:2144 +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "" +"name: El nombre de clase cualificado completamente de la " +"subclase." + +#: index.docbook:2028 +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"discriminator-value (opcional - por defecto al nombre de " +"la clase): Un valor que distingue a subclases individuales." + +#: index.docbook:2034, index.docbook:2091, index.docbook:2154 +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"proxy (opcional): Especifica una clase o interface a usar " +"para proxies de inicialización perezosa." + +#: index.docbook:2040, index.docbook:2097, index.docbook:2160 +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"lazy (opcional, por defecto a true): " +"Establecer lazy=\"false\" deshabilita el uso de " +"recuperación perezosa." + +#: index.docbook:2048 +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"UNTRANSLATED! Each subclass should declare its own persistent properties and " +"subclasses. <version> and <id> properties are assumed to be inherited from the root class. Each " +"subclass in a heirarchy must define a unique discriminator-value. If none is specified, the fully qualified Java class name is used." + +#: index.docbook:2056, index.docbook:2114, index.docbook:2172 +msgid "" +"For information about inheritance mappings, see ." +msgstr "" +"Para información acerca de mapeos de herencia, ver ." + +#: index.docbook:2063 +msgid "joined-subclass" +msgstr "joined-subclass" + +#: index.docbook:2065 +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"Alternativamente, cada subclase puede ser mapeada a su propia tabla " +"(estrategia de mapeo tabla-por-subclase). El estado heredado se recupera " +"uniendo con la tabla de la superclase. Usamos el elemento <" +"joined-subclass>." + +#: index.docbook:2078 +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" + +#: index.docbook:2086, index.docbook:2149 +msgid "table: The name of the subclass table." +msgstr "table: El nombre de tabla de la subclase." + +#: index.docbook:2105 +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"No se requiere de una columna discriminadora para esta estrategia de mapeo. " +"Cada subclase debe, sin embargo, declarar una columna de tabla que tenga el " +"identificador del objeto usando el elemento <key>. " +"El mapeo del comienzo del capítulo debería ser reescrito como:" + +#: index.docbook:2112 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:2121 +msgid "union-subclass" +msgstr "union-subclass" + +#: index.docbook:2123 +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"Una tercera opción es mapear sólo las clases concretas de una " +"jerarquía de clases a tablas, (la estrategia tabla-por-clase-" +"concreta) donde cada tabla define todo el estado persistente de la clase, " +"incluyendo el estado heredado. En Hibernate, no es absolutamente necesario " +"mapear dichas jerarquías de herencia. Puedes simplemente mapear cada " +"clase con una declaración <class> separada. " +"Sin embargo, si deseas usar asociaciones polimórficas (por ejemplo, " +"una asociación a la superclase de tu jerarquía), debes usar el " +"mapeo <union-subclass>." + +#: index.docbook:2141 +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" + +#: index.docbook:2168 +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "" +"No se requiere columna o columna clave discriminadora para esta estrategia " +"de mapeo." + +#: index.docbook:2179 +msgid "join" +msgstr "join" + +#: index.docbook:2181 +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"Usando el elemento <join>, es posible mapear " +"propiedades de una clase a varias tablas." + +#: index.docbook:2195 +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:2199 +msgid "table: The name of the joined table." +msgstr "table: El nombre de la clase unida." + +#: index.docbook:2216 +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch (opcional - por defecto a join): " +"Si se establece a join, por defecto, Hibernate " +"usará una unión interior (inner join) para recuperar un " +"<join> definido por una clase o sus superclases y " +"una unión externa (outer join) para un <join> definido por una subclase. Si se establece a select, entonces Hibernate usará una select secuencial para un " +"<join> definido en una subclase, que será " +"publicada sólo si una fila resulta representar una instancia de la " +"subclase. Las uniones interiores todavía serán usados para " +"recuperar un <join> definido por la clase y sus " +"superclases." + +#: index.docbook:2229 +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (opcional - por defecto a false): De habilitarse, Hibernate no intentará insertar o " +"actualizar las propiedades definidas por esta unión." + +#: index.docbook:2236 +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optional (opcional - por defecto a false): De habilitarse, Hibernate insertará una fila sólo " +"si las propiedades definidas por esta unión son no nulas y siempre " +"usará una unión externa para recuperar las propiedades." + +#: index.docbook:2245 +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"Por ejemplo, la información domiciliaria de una persona puede ser " +"mapeada a una tabla separada (preservando a la vez la semántica de " +"tipo de valor para todas las propiedades):" + +#: index.docbook:2250 +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" + +#: index.docbook:2252 +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"Esta funcionalidad es a menudo solamente útil para modelos de datos " +"heredados; recomendamos menos tablas que clases un modelo de dominio " +"más granularizado. Sin embargo, es útil para cambiar entre " +"estrategias de mapeo de herencias en una misma jerarquía, como se " +"explica luego." + +#: index.docbook:2262 +msgid "key" +msgstr "key" + +#: index.docbook:2264 +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"Hasta ahora hemos visto el elemento <key> pocas " +"veces. Aparece en cualquier sitio en que el elemento padre de mapeo defina " +"una unión a una nueva tabla, y define la clave foránea en la " +"tabla unida, que referencia la clave primaria de la tabla original." + +#: index.docbook:2280 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:2291 +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (opcional, por defecto a noaction): Especifica si la restricción de clave foránea tiene " +"el borrado en cascada habilitado a nivel de base de datos." + +#: index.docbook:2298 +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (opcional): Especifica que la clave " +"foránea referencia columnas que no son del la clave primaria de la " +"tabla original. (Provisto para datos heredados.)" + +#: index.docbook:2305 +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (opcional): Especifica que las columnas de la " +"clave foránea son no nulables (esto está implicado si la clave " +"foránea es también parte de la clave primaria)." + +#: index.docbook:2312 +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (opcional): Especifica que la clave foránea " +"nunca debe ser actualizada (esto está implicado si la clave " +"foránea es también parte de la clave primaria)." + +#: index.docbook:2319 +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (opcional): Especifica que la clave foránea " +"debe tener una restricción de unicidad (esto está implicado si " +"la clave foránea es también la clave primaria)." + +#: index.docbook:2327 +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"Recomendamos que, para los sistemas en donde el rendimiento sea importante, " +"todas las claves deben ser definidas on-delete=\"cascade\", e Hibernate usará una restricción ON " +"CASCADE DELETE a nivel de base de datos, en vez de muchas " +"sentencias DELETE individuales. Ten en cuenta que esta " +"funcionalidad se salta la habitual estrategia de bloqueo optimista de " +"Hibernate para datos versionados." + +#: index.docbook:2335 +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"Los atributos not-null y update son " +"útiles al mapear una asociación uno a muchos unidireccional. " +"Si mapeas una uno a muchos unidireccional a una clave foránea no " +"nulable, debes declarar la columna clave usando " +"<key not-null=\"true\">." + +#: index.docbook:2345 +msgid "column and formula elements" +msgstr "los elementos column y formula" + +#: index.docbook:2346 +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"Cualquier elemento de mapeo que acepte un atributo column " +"aceptará alternativamente un subelemento <column>. De forma similar, <formula> es una " +"alternativa al atributo formula." + +#: index.docbook:2352 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:2354 +msgid "SQL expression]]>" +msgstr "expresión SQL]]>" + +#: index.docbook:2356 +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"Los atributos column y formula pueden " +"incluso ser combinados dentro del mismo mapeo de propiedad o asociació" +"n para expresar, por ejemplo, condiciones de unión exóticas." + +#: index.docbook:2362 +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"]]>" +msgstr "" +"\n" +" \n" +" 'MAILING'\n" +"]]>" + +#: index.docbook:2367 +msgid "import" +msgstr "import" + +#: index.docbook:2369 +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"Supón que tu aplicación tiene dos clases persistentes con el " +"mismo nombre, y no quieres especificar el nombre completamenta cualificado " +"(paquete) en las consultas Hibernate. Las clases pueden ser \"importadas\" " +"explícitamente, en vez de confiar en auto-import=\"true\". Puedes incluso importar clases e interfaces que no estén " +"mapeadas explícitamente." + +#: index.docbook:2376 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:2383 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:2386 +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "" +"class: El nombre de clase completamente cualificado de " +"cualquier clase Java." + +#: index.docbook:2391 +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename (opcional - por defecto al nombre de clase sin " +"cualificar): Un nombre que será usado en el leguaje de consulta." + +#: index.docbook:2402 +msgid "any" +msgstr "any" + +#: index.docbook:2404 +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"Hay un tipo más de mapeo de propiedad. El elemento de mapeo " +"<any> define una asociacián polimó" +"rfica a clases desde múltiples tablas. Este tipo de mapeo siempre " +"requiere más de una columna. La primera columna contiene el tipo de " +"la entidad asociada. Las columnas restantes contienen el identificador. Es " +"imposible especificar una restricción de clave foránea para " +"este tipo de asociación, por lo que esto ciertamente no está " +"concebido como la forma habitual de mapear asociaciones (polimó" +"rficas). Sólo debes usar esto en casos muy especiales (por ejemplo, " +"trazas de auditoréa, datos de sesión de usuario, etc)." + +#: index.docbook:2414 +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"El atributo meta-type permite a la aplicación " +"especificar un tipo personalizado que mapee columnas de base de datos a " +"clases persistentes que tengan propiedades identificadoras del tipo " +"especificado por id-type. Debes especificar el mapeo de " +"valores del meta-type a nombres de clase." + +#: index.docbook:2421 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:2432 +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" + +#: index.docbook:2435 +msgid "name: the property name." +msgstr "name: el nombre de la propiedad." + +#: index.docbook:2440 +msgid "id-type: the identifier type." +msgstr "id-type: el tipo del identificador." + +#: index.docbook:2445 +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type (opcional - por defecto a string): Cualquier tipo que sea permitido para un mapeo de discriminador." + +#: index.docbook:2451 +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade (opcional- por defecto a none): el estilo de cascada." + +#: index.docbook:2463 +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica si las actualizaciones de esta propiedad requieren o " +"no de la adquisición del bloqueo optimista. En otras palabras, " +"determina si debe ocurrir un incremento de versión cuando esta " +"propiedad está desactualizada." + +#: index.docbook:2478 +msgid "Hibernate Types" +msgstr "Tipos de Hibernate" + +#: index.docbook:2481 +msgid "Entities and values" +msgstr "Entidades y Valores" + +#: index.docbook:2483 +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"Para entender el comportamiento de varios objetos a nivel de lenguaje Java " +"con respecto al servicio de persistencia, necesitamos clasificarlos en dos " +"grupos:" + +#: index.docbook:2488 +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +"Una entidad existe independientemente de cualquier " +"otros objetos que referencien a la entidad. Contrasta esto con el model " +"habitual de Java donde un objeto desreferenciado es recolectado como basura. " +"Las entidades deben ser salvadas y borradas explícitamente (excepto " +"que las grabaciones y borrados puedan ser tratados en cascada desde una entidad padre a sus hijos). Esto es diferente al modelo " +"de persistencia de objetos por alcance - y se corresponde más de " +"cerca a cómo los objetos de aplicación son usados " +"habitualmente en grandes sistemas. Las entidades soportan referencias " +"circulares y compartidas, que tambié pueden ser versionadas." + +#: index.docbook:2499 +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"El estado persistente de una entidad consiste en referencias a otras " +"entidades e instancias de tipo valor. Los valores son " +"primitivos, colecciones (no lo que está dentro de la colecció" +"n), componentes y ciertos objetos inmutables. A diferencia de las entidades, " +"los valores (en particular las colecciones y los componentes) son hechos persitentes y borrados por alcance. Como los objetos valor " +"(y primitivos) son persistidos y borrados junto a sus entidades " +"contenedoras, no pueden ser versionados independientemente. Los valores no " +"tienen identidad independiente, por los que no pueden ser compartidos por " +"dos entidades o colleciones." + +#: index.docbook:2510 +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"Hasta ahora, hemos estado usando el término \"clase persistente\" " +"para referirnos a entidades. Continuaremos haciéndolo. Hablando " +"estrictamente, sin embargo, no todas la clases con estado persistente " +"definidas por el usuario son entidades. Un componente " +"es una clase definida por el usuario con semántica de valor. Una " +"propiedad Java de tipo java.lang.String también " +"tiene semántica de valor. Dada esta definición, podemos decir " +"que todos los tipo (clases) provistos por el JDK tienen una semántica " +"de tipo valor en Java, mientras que los tipos definidos por el usuario " +"pueden ser mapeados con semántica de tipo valor o de entidad. La " +"desición corre por cuenta del desarrollador de la aplicación. " +"Un buen consejo para una clase entidad en un modelo de dominio son las " +"referencias compartidas a una sola instancia de esa clase, mientras que la " +"composición o agregación usualmente se traducen a un tipo de " +"valor." + +#: index.docbook:2524 +msgid "We'll revisit both concepts throughout the documentation." +msgstr "" +"Volveremos a visitar ambos conceptos a lo largo de la documentación." + +#: index.docbook:2528 +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"EL desafío es mapear el sistema de tipos de Java (y la " +"definición de entidades y tipos de valor de los desarrolladores) al " +"sistema de tipos de SQL/base de datos. EL puente entre ambos sistemas es " +"provisto por Hibernate: para las entidades usamos <class>, <subclass>, etc. Para los tipos de valor " +"usamos <property>, <component>, etc, usualmente con un atributo type. El valor " +"de este atributo es el nombre de un tipo de mapeo de " +"Hibernate. Hibernate provee de fábrica muchos mapeos (para tipos de " +"valores del JDK estándar). Puedes escribir tus propios mapeos de " +"tipo, así como implementar tus estrategias de conversión " +"personalizadas, como veremos luego." + +#: index.docbook:2541 +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" +"Todos los tipos prefabricados de Hibernate soportan semántica de " +"nulos excepto las colecciones." + +#: index.docbook:2548 +msgid "Basic value types" +msgstr "Tipos de valores básicos" + +#: index.docbook:2550 +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "" +"Los tipos de mapeo básicos prefabricados pueden " +"ser categorizado a grandes rasgos en:" + +#: index.docbook:2555 +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#: index.docbook:2558 +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"Mapeos de tipos primitivos de Java o clases de envoltura a la tipos de " +"columna SQL (especícifica del vendedor). boolean, yes_no y true_false son codificaciones alternativas a " +"boolean de Java o java.lang.Boolean." + +#: index.docbook:2567 +msgid "string" +msgstr "string" + +#: index.docbook:2569 +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"Un mapeo del tipo java.lang.String a VARCHAR (u Oracle VAARCHAR2)." + +#: index.docbook:2576 +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#: index.docbook:2578 +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"Mapeos de tipo desde java.util.Date y sus subclases a " +"tipos SQL DATE, TIME y " +"TIMESTAMP (o equivalente)." + +#: index.docbook:2586 +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#: index.docbook:2588 +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"Mapeos de tipo desde java.util.Date y sus subclases a " +"tipos SQL TIMESTAMP y DATE (o " +"equivalente)." + +#: index.docbook:2596 +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#: index.docbook:2598 +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"Mapeos de tipo desde java.math.BigDecimal y java." +"math.BigInteger a NUMERIC (o NUMBER de Oracle)." + +#: index.docbook:2606 +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#: index.docbook:2608 +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"Mapeos de tipo desde java.util.Locale, java.util." +"TimeZone y java.util.Currency a " +"VARCHAR (o VARCHAR2 de Oracle). Las " +"instancias de Locale y Currency son " +"mapeadas a sus códigos ISO. Las instancias de TimeZone son mapeadas a sus ID." + +#: index.docbook:2620 +msgid "class" +msgstr "class" + +#: index.docbook:2622 +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"Un mapeo de tipo java.lang.Class a VARCHAR (o VARCHAR2 de Oracle). Una Class es mapeara a su nombre completamente cualificado." + +#: index.docbook:2630 +msgid "binary" +msgstr "binary" + +#: index.docbook:2632 +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "Mapea arreglos de bytes a un tipo binario SQL apropiado." + +#: index.docbook:2638 +msgid "text" +msgstr "text" + +#: index.docbook:2640 +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"Mapea cadenas largas Java al tipo SQL CLOB o " +"TEXT." + +#: index.docbook:2647 +msgid "serializable" +msgstr "serializable" + +#: index.docbook:2649 +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"Mapea tipos serializables Java a un tipo binario SQL apropiado. Puedes " +"además indicar el tipo serializable de Hibernate " +"con el nombre de una clase o interface serializable Java que no sea por " +"defecto un tipo básico." + +#: index.docbook:2658 +msgid "clob, blob" +msgstr "clob, blob" + +#: index.docbook:2660 +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"Mapeos de tipo para las clases JDBC java.sql.Clob y " +"java.sql.Blob. Estos tipos pueden ser inconvenientes para " +"algunas aplicaciones, pues el objeto blob o clob no puede ser reusado fuera " +"de una transacción (Además, el soporte del driver suele ser " +"malo e inconsistente)." + +#: index.docbook:2670 +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"UNTRANSLATED! imm_date, imm_time, imm_timestamp, imm_calendar, " +"imm_calendar_date, imm_serializable, imm_binary" + +#: index.docbook:2674 +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." + +#: index.docbook:2689 +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"Los identificadores únicos de entidades y collecciones pueden ser de " +"cualquier tipo básico excepto binary, " +"blob y clob. (Los identificadores " +"compuestos están también permitidos, ver debajo.)" + +#: index.docbook:2695 +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"Los tipos de valor básicos tienen sus constantes Type correspondientes definidas en org.hibernate.Hibernate. Por ejemplo, Hibernate.STRING representa el " +"tipo string." + +#: index.docbook:2704 +msgid "Custom value types" +msgstr "Tipos de valor personalizados" + +#: index.docbook:2706 +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"Es relativamente fácil para los desarrolladores crear sus propios " +"tipos de valor. Por ejemplo, podrías querer persistir propiedades del " +"tipo java.lang.BigInteger a columnas VARCHAR. Hibernate no provee un tipo de fábrica para esto. Pero los " +"tipos personalizados no están limitados a mapear una propiedad (o " +"elemento de colección) a una sola columna de tabla. Así, por " +"ejemplo, podrías tener una propiedad Java getName()/setName() de tipo java.lang.String que fuera persistida a las columnas FIRST_NAME, " +"INITIAL, SURNAME." + +#: index.docbook:2717 +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"Para implementar un tipo personalizado, implementa bien org." +"hibernate.UserType o org.hibernate.CompositeUserType y declara las propiedades usando el nombre de clase completamente " +"cualificado del tipo. Revisa org.hibernate.test.DoubleStringType para ver qué tipo de cosas son posibles." + +#: index.docbook:2725 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:2727 +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"Observa el uso de etiquetas <column> para mapear " +"una propiedad a múltiples columnas." + +#: index.docbook:2732 +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"Las interfaces CompositeUserType, " +"EnhancedUserType, UserCollectionType, " +"y UserVersionType proveen soporte a usos más " +"especializados." + +#: index.docbook:2738 +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"Puedes incluso proveer de parámetros a un UserType " +"en el fichero de mapeo. Para hacer esto, tu UserType debe " +"implementar la interface org.hibernate.usertype.ParameterizedType. Para proveer de parámetros a tu tipo personalizado, puedes " +"usar el elemento <type> en tus ficheros de mapeo." + +#: index.docbook:2746 +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" 0\n" +" \n" +"]]>" + +#: index.docbook:2748 +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"Ahora el UserType puede recuperar el valor del pará" +"metro llamado default del objeto Properties que se le pasa." + +#: index.docbook:2753 +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"Si usas cierto UserType muy frecuentemente, puede ser " +"útil definir un nombre corto para é. Puedes hacer esto usando " +"el elemento <typedef>. Los typedefs asignan un " +"nombre a un tipo personalizado, y pueden también contener una lista " +"de valores por defecto de parámetros si el tipo fuese parametrizado." + +#: index.docbook:2760 +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" +"\n" +" 0\n" +"]]>" + +#: index.docbook:2762 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:2764 +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "" +"también es posible sobrescribir los parámetros provistos en un " +"typedef sobre una base caso por caso usando parámetros de tipo en el " +"mapeo de la propiedad." + +#: index.docbook:2769 +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"Aunque el rico espectro de tipos prefabricados y soporte de componentes de " +"Hibernate significa que raramente necesites usar un " +"tipo personalizado; sin embargo se considera una buena forma usar tipos " +"personalizados para clases (no-entidades) que aparezcan frecuentemente en tu " +"aplicación. Por ejemplo, una clase MonetaryAmount " +"es una buena candidata para un CompositeUserType, incluso " +"cuando puede ser facilmente mapeada como un componente. Un motivo para esto " +"es la abstracción. Con un tipo personalizado, tus documentos de mapeo " +"estará impermeabilizados contra posibles cambios futuros en la forma " +"de representar valores monetarios." + +#: index.docbook:2785 +msgid "Mapping a class more than once" +msgstr "Mapeando una clase más de una vez" + +#: index.docbook:2786 +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"Es posible proveer más de un mapeo para una clase persistente en " +"particular. En este caso debes especificar un nombre de entidad para desambiguar entr las instancias de las dos entidades " +"mapeadas. (Por defectom, el nombre de la entidad es el mismo que el nombre " +"de la clase.) Hibernate te deja especificar el nombre de entidad al trabajar " +"con objetos persistentes, al escribir consultas, o al mapear asociaciones a " +"la entidad mencionada." + +#: index.docbook:2794 +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:2796 +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"Observa cómo las asociaciones ahora se especifican usando " +"entity-name en vez de class." + +#: index.docbook:2804 +msgid "SQL quoted identifiers" +msgstr "identificadores SQL encomillados" + +#: index.docbook:2805 +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"Puedes forzar a Hibernate a encomillar un identificador en el SQL generado " +"encerrando el nombre de tabla o columna entre backticks en el documento de " +"mapeo. Hibernate usará el estilo de encomillado para el " +"Dialect SQL (usualmente comillas dobles, excepto " +"corchetes para SQL Server y backsticks para MySQL)." + +#: index.docbook:2812 +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:2818 +msgid "Metadata alternatives" +msgstr "Alternativas de metadatos" + +#: index.docbook:2820 +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XML no es para todos, asá que hay algunas formas alternativas de " +"definir metadatos de mapeo O/R en Hibernate." + +#: index.docbook:2825 +msgid "Using XDoclet markup" +msgstr "Usando marcado de XDoclet" + +#: index.docbook:2827 +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"Muchos usuarios de Hibernate prefieren embeber la información de " +"mapeo directamente en el código fuente usando las @hibernate." +"etiquetas XDoclet. No cubriremos este enfoque en este documento, " +"pues estrictamente es considerado parte de XDoclet. Sin embargo, " +"incluímos el siguiente ejemplo de la clase Cat con " +"mapeos XDoclet." + +#: index.docbook:2834 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:2836 +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "" +"Para más ejemplos de XDoclet e Hibernate ver en el sitio web de " +"Hibernate." + +#: index.docbook:2843 +msgid "Using JDK 5.0 Annotations" +msgstr "Usando anotaciones JDK 5.0" + +#: index.docbook:2845 +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"El JDK 5.0 introdujo anotaciones del estilo XDoclet a nivel del lenguaje, " +"con chequeo seguro de tipos en tiempo de compilación. Este mecanismo " +"es más potente y que las anotaciones XDoclet, y mejor soportado por " +"herramientas e IDEs. IntelliJ IDEA, por ejemplo, soporta auto-" +"compleción y resaltado de sintaxis de anotaciones JDK 5.0. La nueva " +"revisión de la especificación de EJB (JSR-220) usa anotaciones " +"JDK 5.0 como el mecanismo primario de metadatos para beans de entidad. " +"Hibernate3 implementa el EntityManager del JSR-220 (la " +"API de persistencia), y el soporte para metadatos de mapeo está " +"disponible vía el paquete Hibernate Annotations, " +"como una descarga por separado. Tanto metadatos de EJB3 (JSR-220) como de " +"Hibernate3 están soportados." + +#: index.docbook:2856 +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "" +"Este es un ejemplo de una clase POJO anotada como un bean de entidad EJB:" + +#: index.docbook:2860 +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" + +#: index.docbook:2862 +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"Ten en cuenta que el soporte a anotaciones JDK 5.0 (y JSR-220) es " +"todavía un trabajo en progreso y no completado. Por favor, para " +"más detalles refiérete al modulo de Anotaciones de Hibernate." + +#: index.docbook:2871 +msgid "Generated Properties" +msgstr "UNTRANSLATED! Generated Properties" + +#: index.docbook:2872 +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." + +#: index.docbook:2881 +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." + +#: index.docbook:2888 +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "" +"never (the default) - means that the given property value " +"is not generated within the database." + +#: index.docbook:2892 +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." + +#: index.docbook:2900 +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "" +"always - states that the property value is generated both " +"on insert and on update." + +#: index.docbook:2907 +msgid "Auxiliary Database Objects" +msgstr "UNTRANSLATED! Auxiliary Database Objects" + +#: index.docbook:2908 +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." + +#: index.docbook:2917 +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" + +#: index.docbook:2921 +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +" ]]>" + +#: index.docbook:2922 +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." + +#: index.docbook:2927 +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" ]]>" + +#: index.docbook:2928 +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." + +#: index.docbook:2932 +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ]]>" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/batch.po b/documentation/envers/src/main/docbook/es-ES/content/batch.po new file mode 100644 index 0000000000..1d8d0133ad --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/batch.po @@ -0,0 +1,617 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Batch processing" +msgstr "Procesamiento por lotes" + +#: index.docbook:7 +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"Un enfoque ingenuo para insertar 100.000 filas en la base de datos usando " +"Hibernate podría verse así:" + +#: index.docbook:12 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:14 +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"Esto podría caer sobre una OutOfMemoryException en algún " +"sitio cerca de la fila 50.000. Esto es porque Hibernate tiene en caché todas " +"las instancias de Customer recién instanciadas en el " +"caché de nivel de sesión." + +#: index.docbook:20 +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"En este capítulo te mostraremos cómo evitar este problema. Primero, sin " +"embargo, si estás haciendo procesamiento por lotes (batch processing), es " +"absolutamente crítico que habilites el uso de loteo JDBC, si pretendes " +"lograr un rendimiento razonable. Establece el tamaño de lote JDBC a un " +"número razonable (digamos 10-50):" + +#: index.docbook:27 +msgid "" +msgstr "" + +#: index.docbook:29 +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"UNTRANSLATED! Note that Hibernate disables insert batching at the JDBC level " +"transparently if you use an identiy identifier generator." + +#: index.docbook:34 +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "" +"Podrías además querer hacer este tipo de trabajo en un proceso donde la " +"interacción con el caché de segundo nivel esté completamente deshabilitado:" + +#: index.docbook:39 +msgid "" +msgstr "" + +#: index.docbook:41 +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"UNTRANSLATED! However, this is not absolutely necessary, since we can " +"explicitly set the CacheMode to disable interaction with " +"the second-level cache." + +#: index.docbook:47 +msgid "Batch inserts" +msgstr "Inserciones en lote" + +#: index.docbook:49 +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"Al hacer persistentes objetos nuevos, debes limpiar con flush() y llamar a clear() en la sesión regularmente, " +"para controlar el tamaño del caché de primer nivel." + +#: index.docbook:55 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:60 +msgid "Batch updates" +msgstr "Actualizaciones en lote" + +#: index.docbook:62 +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"Para recuperar y actualizar datos se aplican las mismas ideas. " +"Adicionalmente, necesitas usar scroll() para sacar " +"ventaja de los cursores del lado del servidor en consultas que devuelvan " +"muchas filas de datos." + +#: index.docbook:68 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:73 +msgid "The StatelessSession interface" +msgstr "UNTRANSLATED! The StatelessSession interface" + +#: index.docbook:74 +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." + +#: index.docbook:89 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:91 +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." + +#: index.docbook:97 +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." + +#: index.docbook:110 +msgid "DML-style operations" +msgstr "update/delete en masa" + +#: index.docbook:112 +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" +"Como ya se ha discutido, el mapeo objeto/relacional automático y " +"transparente se refiere al manejo de estado de objetos. Esto implica que el " +"estado del objeto está disponible en memoria, por lo tanto actualizar o " +"borrar (usando UPDATE y DELETE de SQL) " +"datos directamente en la base de datos no afectará el estado en memoria. Sin " +"embargo, Hibernate provee métodos para la ejecución de sentencias del estilo " +"de UPDATE y DELETE de SQL que se " +"realizan a través del Lenguaje de Consulta de Hibernate (Hibernate Query " +"Language o HQL)." + +#: index.docbook:122 +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"La pseudo-sintáxis para sentencias UPDATE y " +"DELETE es: ( UPDATE | DELETE ) FROM? ClassName " +"(WHERE WHERE_CONDITIONS)?. Algunos puntos a tener en cuenta:" + +#: index.docbook:130 +msgid "In the from-clause, the FROM keyword is optional" +msgstr "En la cláusula-from, la palabra clave FROM es opcional" + +#: index.docbook:135 +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." + +#: index.docbook:143 +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." + +#: index.docbook:150 +msgid "The where-clause is also optional." +msgstr "La cláusula-where es también opcional." + +#: index.docbook:156 +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"Como un ejemplo, para ejecutar un UPDATE HQL, usa el " +"método Query.executeUpdate()(the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" + +#: index.docbook:162 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:164 +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." + +#: index.docbook:174 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:176 +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." + +#: index.docbook:181 +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"Para ejecutar un DELETE HQL, usa el mismo método " +"Query.executeUpdate():" + +#: index.docbook:186 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:188 +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"El valor int devuelto por el método Query." +"executeUpdate() indica el número de entidades afectadas por la " +"operación. Considera que esto puede o no correlacionarse al número de filas " +"afectadas en la base de datos. Una operación masiva HQL podría resultar en " +"que se ejecuten múltiples sentencias de SQL reales, para joined-subclass, " +"por ejemplo. El número devuelto indica el número de entidades reales " +"afectadas por la sentencia. Volviendo al ejemplo de joined-subclass, un " +"borrado contra una de las subclases puede resultar realmente en borrados " +"contra no sólo la tabla a la que está mapeada esa subclase, sino también la " +"tabla \"raíz\" y potencialmente tablas de joined-subclass más debajo en la " +"jerarquía de herencia." + +#: index.docbook:199 +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"Ten en cuenta que existen actualmente unas pocas limitaciones con las " +"operaciones HQL masivas, que serán atendidas en lanzamientos futuros; " +"consulta la hoja de ruta de JIRA para más detalles." + +#: index.docbook:207 +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" + +#: index.docbook:210 +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" + +#: index.docbook:220 +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "" + +#: index.docbook:232 +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" + +#: index.docbook:247 +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" + +#: index.docbook:257 +msgid "An example HQL INSERT statement execution:" +msgstr "" + +#: index.docbook:261 +msgid "" +"" +msgstr "" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/best_practices.po b/documentation/envers/src/main/docbook/es-ES/content/best_practices.po new file mode 100644 index 0000000000..398dac4dc6 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/best_practices.po @@ -0,0 +1,394 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Best Practices" +msgstr "Mejores Prácticas" + +#: index.docbook:9 +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"Escribe clase finamente granularizadas y mapealas usando <" +"component>." + +#: index.docbook:11 +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"Usa una clase Dirección para encapsular " +"calle, distrito, estado, código postal. Esto alienta la " +"reutilización de código y simplifica el refactoring." + +#: index.docbook:19 +msgid "Declare identifier properties on persistent classes." +msgstr "Declara las propiedades identificadoras en clases persistentes." + +#: index.docbook:21 +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"Hibernate hace opcionales las propiedades identificadoras. Existen todo tipo " +"de razones por las que debes usarlas. Recomendamos que los identificadores " +"sean 'sintéticos' (generados, sin ningún significado de " +"negocio)." + +#: index.docbook:29 +msgid "Identify natural keys." +msgstr "Identifica las claves naturales." + +#: index.docbook:31 +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"Identifica las claves naturales de todas las entidades, y mapealas usando " +"<natural-id>. Implementa equals() y hashCode() para comparar las propiedades que " +"componen la clave natural." + +#: index.docbook:39 +msgid "Place each class mapping in its own file." +msgstr "Coloca cada mapeo de clase en su propio fichero." + +#: index.docbook:41 +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"No uses un solo documento monolítico de mapeo. Mapea com.eg." +"Foo en el fichero com/eg/Foo.hbm.xml. Esto " +"tiene sentido particularmente en un ambiente de equipo." + +#: index.docbook:49 +msgid "Load mappings as resources." +msgstr "Carga los mapeos como recursos." + +#: index.docbook:51 +msgid "Deploy the mappings along with the classes they map." +msgstr "Despliega los mapeos junto a las clases que mapean." + +#: index.docbook:57 +msgid "Consider externalising query strings." +msgstr "Considera externalizar las cadenas de consulta." + +#: index.docbook:59 +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"Esta es una buena práctica si tus consultas llaman a funciones SQL " +"que no son del estándar ANSI. Externalizar las cadenas de consulta a " +"ficheros de mapeo hará la aplicación más portable." + +#: index.docbook:67 +msgid "Use bind variables." +msgstr "Usa variables de ligado." + +#: index.docbook:69 +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"Igual que en JDBC, siempre remplaza valores no constantes con \"?\". ¡" +"Nunca uses manipulación de cadenas para ligar un valor no constante " +"en una consulta! Incluso mejor, considera usar parámetros con nombre " +"en las consultas." + +#: index.docbook:77 +msgid "Don't manage your own JDBC connections." +msgstr "No manejes tus propias conexiones JDBC." + +#: index.docbook:79 +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"Hibernate deja a la aplicación administre las conexiones JDBC. Este " +"enfoque debe considerarse como último recurso. Si no puedes usar los " +"provedores de conexión prefabricados, considera prover tu propia " +"implementación de org.hibernate.connection." +"ConnectionProvider." + +#: index.docbook:87 +msgid "Consider using a custom type." +msgstr "Considera usar un tipo personalizado." + +#: index.docbook:89 +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"Supón que tienes un tipo Java, digamos de alguna biblioteca, que " +"necesita hacerse persistente pero no provee los métodos de acceso " +"necesarios para mapearlo como un componente. Debes considerar implementar " +"org.hibernate.UserType. Este enfoque libera al có" +"digo de aplicación de implementar transformaciones a / desde un tipo " +"Hibernate." + +#: index.docbook:98 +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "Usa JDBC codificado a mano en cuellos de botella." + +#: index.docbook:100 +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"En áreas del sistema de rendimiento crítico, algunos tipos de " +"operaciones podrían beneficiarse del JDBC directo. Pero por favor, " +"espero hasta que sepas que algo es un cuello de " +"botella. Y no asumas que el JDBC directo es necesariamente más " +"rápido. Si necesitas usar JDBC directo, podría ser valioso " +"abrir una Session de Hibernate y usar esa conexión " +"JDBC. De esta forma puedes usar aún la misma estrategia de " +"transacción y el mismo proveedor de conexiones subyacente." + +#: index.docbook:110 +msgid "Understand Session flushing." +msgstr "Comprende la limpieza (flushing) de Session." + +#: index.docbook:112 +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"De vez en cuando la sesión sincroniza su estado persistente con la " +"base de datos. El rendimiento se verá afectado si este proceso ocurre " +"demasiado frecuentemente. A veces puedes minimizar limpieza innecesaria " +"deshabilitando la limpieza automática o incluso cambiando el orden de " +"las consultas u otras operaciones en una transacción en particular." + +#: index.docbook:121 +msgid "In a three tiered architecture, consider using detached objects." +msgstr "" +"En una aplicación en tres gradas, considera usar objetos separados." + +#: index.docbook:123 +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"Al usar una arquitectura de servlet / sesión, puedes pasar objetos " +"persistentes en el bean de sesión hacia y desde la capa de servlet / " +"JSP. Usa una sesión nueva para atender el servicio de cada " +"petición. Usa Session.merge() o Session." +"saveOrUpdate() para sincronizar los objetos con la base de datos." + +#: index.docbook:132 +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "" +"En una arquitectura en dos gradas, considera usar contexto de persistencia " +"largos." + +#: index.docbook:134 +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"Las transacciones de base de datos tienen que ser tan cortas como sea " +"posible. Sin embargo, frecuentemente es necesario implementar " +"transacciones de aplicación ejecutándose " +"en largo, una sola unidad de trabajo desde el punto de vista de un usuario. " +"Una transacción de aplicación puede abarcar muchos ciclos " +"petición/respuesta del cliente. Es común usar objetos " +"separados para implementar transacciones de aplicación. Una " +"alternativa, extremadamente apropiada en arquitecturas en dos gradas, es " +"mantener un solo contacto de persistencia abierto (sesión) para todo " +"el ciclo de vida de la transacción de aplicación y simplemente " +"desconectar de la conexión JDBC al final de cada petición, y " +"reconectar al comienzo de la petición subsecuente. Nunca compartas " +"una única sesión a través de más de una " +"transacción de aplicación, o estarás trabajando con " +"datos añejos." + +#: index.docbook:148 +msgid "Don't treat exceptions as recoverable." +msgstr "No trates la excepciones como recuperables." + +#: index.docbook:150 +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"Esto es más una práctica necesaria que una \"mejor\" prá" +"ctica. Cuando ocurra una excepción, deshaz (rollback) la " +"Transaction y cierra la Session. Si no " +"lo haces, Hibernate no puede garantizar que el estado en memoria representa " +"con exactitud el estado persistente. Como un caso especial de esto, no uses " +"Session.load() para determinar si una instancia con el " +"identificador dado existe en la base de datos. En cambio, usa " +"Session.get() o una consulta." + +#: index.docbook:160 +msgid "Prefer lazy fetching for associations." +msgstr "Prefiere la recuperación perezosa para las asociaciones." + +#: index.docbook:162 +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"Usa escasamente la recuperación temprana. Usa proxies y colecciones " +"perezosas para la mayoría de asociaciones a clases probablemente no " +"estén mantenidas en el caché de segundo nivel. Para las " +"asociaciones a clases en caché, donde hay una probabilidad de acceso " +"a caché extremadamente alta, deshabilita explícitamente la " +"recuperación temprana usando lazy=\"false\". " +"Cuando sea apropiada la recuperación por unión (join fetching) " +"para un caso de uso en particular, usa una consulta con un left " +"join fetch." + +#: index.docbook:172 +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"Usa el patrón sesión abierta en vista, o " +"una fase de ensamblado disciplinada para evitar " +"problemas con datos no recuperados." + +#: index.docbook:177 +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernate liberal al desarrollador de escribir Objetos de " +"Transferencia de Datos (Data Transfer Objects) (DTO). En una " +"arquitectura tradicional de EJB, los DTOs tienen un propósito doble: " +"primero, atacan el problema que los beans de entidad no son serializables. " +"Segundo, definen implícitamente una fase de ensamblado cuando se " +"recuperan y se forman (marshalling) todos los datos a usar por la vista en " +"los DTOs antes de devolver el control a la grada de presentación. " +"Hibernate elimina el primer propósito. Sin embargo, aún " +"necesitas una fase de ensamblado (piensa en tus métodos de negocio " +"como si tuviesen un contrato estricto con la grada de presentación " +"sobre qué datos están disponibles en los objetos separados) a " +"menos que estés preparado para tener el contexto de persistencia (la " +"sesión) abierto a través del proceso de renderización " +"de la vista. ¡Esta no es una limitación de Hibernate! Es un " +"requerimiento fundamental de acceso seguro a datos transaccionales." + +#: index.docbook:191 +msgid "Consider abstracting your business logic from Hibernate." +msgstr "Considera abstraer tu lógica de negocio de Hibernate" + +#: index.docbook:193 +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"Oculta el código de acceso a datos (Hibernate) detrás de una " +"interface. Combina los patrones DAO y " +"Sesión de Hebra Local. Incluso puedes tener " +"algunas clases hechas persistentes por JDBC escrito a mano, asociadas a " +"Hibernate por medio de un UserType. (Este consejo " +"está pensado para aplicaciones \"suficientemente grandes\"; ¡" +"no es apropiado para una aplicación con cinco tablas!)" + +#: index.docbook:203 +msgid "Don't use exotic association mappings." +msgstr "No uses mapeos de asociación exóticos." + +#: index.docbook:205 +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"Son raros los casos de uso de asociaciones reales muchos-a-muchos. La mayor " +"parte del tiempo necesitas información adicional almacenada en una " +"\"tabla de enlace\". En este caso, es mucho mejor usar dos asociaciones uno-" +"a-muchos a una clase de enlace intermedia. De hecho, pensamos que la " +"mayoría de asociaciones son uno-a-muchos y muchos-a-uno, debes ser " +"cuidadoso al usr cualquier otro estilo de asociación y preguntarte si " +"es realmente necesario." + +#: index.docbook:215 +msgid "Prefer bidirectional associations." +msgstr "Prefiere las asociaciones bidireccionales." + +#: index.docbook:217 +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"Las asociaciones unidireccionales son más difíciles de " +"consultar. En una aplicación grande, casi todas las asociaciones " +"deben ser navegables en ambas direcciones en consultas." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/collection_mapping.po b/documentation/envers/src/main/docbook/es-ES/content/collection_mapping.po new file mode 100644 index 0000000000..46fe146118 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/collection_mapping.po @@ -0,0 +1,1997 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Collection Mapping" +msgstr "Mapeo de Colecciones" + +#: index.docbook:8 +msgid "Persistent collections" +msgstr "Colecciones persistentes" + +#: index.docbook:10 +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"Hibernate requiere que los campos valuados en colección persistentes " +"sean declarados como un tipo de interface, por ejemplo:" + +#: index.docbook:15 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:17 +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"La interface real podría ser java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap o ... lo que te guste! (Donde \"lo " +"que te guste\" significa que tendrás que escribir una " +"implementación de org.hibernate.usertype.UserCollectionType.)" + +#: index.docbook:26 +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"Nota cómo hemos inicializado la variable de instancia de " +"HashSet. Esta es la mejor forma de inicializar " +"propiedades valuadas en colección de instancias recién " +"instanciadas (no persistentes). Cuando haces persistente la instancia - " +"llamando a persist(), por ejemplo - Hibernate realmente " +"remplazará el HashSet con una instancia de una " +"implementación de Set propia de Hibernate. Observa " +"errores como este:" + +#: index.docbook:36 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:38 +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"Las colecciones persistentes inyectadas por Hibernate se comportan como " +"HashMap, HashSet, TreeMap, TreeSet o ArrayList, " +"dependiendo del tipo de interface." + +#: index.docbook:45 +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"Las instancias de colecciones tienen el comportamiento usual de tipos de " +"valor. Son automáticamente persistidas al ser referenciadas por un " +"objeto persistente y automáticamente borradas al desreferenciarse. Si " +"una colección es pasada de un objeto persistente a otro, sus " +"elementos serían movidos de una tabla a otra. Dos entidades pueden no " +"compartir una referencia a la misma instancia de colección. Debido al " +"modelo relacional subyacente, las propiedades valuadas en colección " +"no soportan la semántica de valor nulo. Hibernate no distingue entre " +"una referencia de colección nula y una colección vacía." + +#: index.docbook:56 +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"No debes tener que preocuparte demasiado por esto. Usa las colecciones " +"persistentes de la misma forma en que usas colecciones de Java ordinarias. " +"Sólo asegúrate que entiendes la semántica de las " +"asociaciones bidireccionales (discutida luego)." + +#: index.docbook:65 +msgid "Collection mappings" +msgstr "Mapeos de colección" + +#: index.docbook:67 +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"El elemento de mapeo de Hibernate usado para mapear una colección " +"depende del tipo de la interface. Por ejemplom un elemento <" +"set> se usa para mapear propiedades de tipo Set." + +#: index.docbook:73 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:75 +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"Aparte de <set>, existen además los " +"elementos de mapeo <list>, <map>, <bag>, <array> y " +"<primitive-array>. El elemento <map>" +" es representativo:" + +#: index.docbook:100 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:103 +msgid "name the collection property name" +msgstr "name el nombre de la propiedad de colección" + +#: index.docbook:108 +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (opcional - por defecto al nombre de la propiedad) " +"el nombre de la tabla de coleciión (no usado para asociaciones uno-a-" +"muchos)" + +#: index.docbook:114 +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (opcional) el nombre de un esquema de tablas para " +"sobrescribir el esquema declarado en el elemento raíz" + +#: index.docbook:120 +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (opcional - por defecto a true) " +"puede ser usado para deshabilitar la recuperación perezosa y " +"especificar que la asociación es siempre recuperada tempranamente (no " +"disponible para arrays)" + +#: index.docbook:129 +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (opcional - por defecto a false) marca esta colección como el extremo \"inverso\" de una " +"asociación bidireccional." + +#: index.docbook:135 +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (opcional - por defecto a none) habilita operaciones en cascada a entidades hijas" + +#: index.docbook:141 +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort (opcional) especifica una colección con " +"ordenamiento natural, o una clase comparadora dada" + +#: index.docbook:147 +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (opcional, sólo JDK1.4) especifica una " +"columna de tabla (o columnas) que definen el orden de iteración del " +"Map, Set o bag, junto a un " +"asc o desc opcional." + +#: index.docbook:154 +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (opcional) especifica una condición " +"WHERE de SQL arbitrario para ser usada al recuperar o " +"quitar la colección (útil si la colección debe contener " +"sólo un subconjunto de los datos disponibles)" + +#: index.docbook:161 +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch (opcional, por defecto a select) " +"Elige entre recuperación por unión externa (outer-join), " +"recuperar por selección secuencial, y recuperación por " +"subselección secuencial." + +#: index.docbook:168 +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (opcional, por defecto a 1) " +"especifica un \"tamaño de lote\" para la recuperar perezosamente " +"instancias de esta colección." + +#: index.docbook:174 +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access (opcional - por defecto a property): La estrategia que debe usar Hibernate para acceder al valor de la " +"propiedad." + +#: index.docbook:180 +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"optimistic-lock (opcional - por defecto a true): Especifica que los cambios de estado de la colección " +"resultan en incrementos de versión de la entidad dueña. (Para " +"asociaciones uno a muchos, frecuentemente es razonable deshabilitar esta " +"opción.)" + +#: index.docbook:188 +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." + +#: index.docbook:198 +msgid "Collection foreign keys" +msgstr "Claves foráneas de collección" + +#: index.docbook:200 +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"Las instancias de colección se distinguen en la base de datos por la " +"clave foránea de la entidad que posee la colección. Se hace " +"referencia a esta clave foránea como la columna clave de " +"colección (o columnas) de la tabla de colección. La " +"columna clave de la colección es mapeada por el elemento <" +"key>." + +#: index.docbook:208 +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"Puede haber una restricción de nulabilidad sobre la columna de clave " +"foránea. Para la mayoría de colecciones, esto está " +"implicado. Para asociaciones unidireccionales uno a muchos, la columna de " +"clave foránea es nulable por defecto, de modo que podrías " +"necesitar especificar not-null=\"true\"." + +#: index.docbook:215 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:217 +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "" +"La restricción de clave foránea puede usar ON DELETE " +"CASCADE." + +#: index.docbook:221 +msgid "]]>" +msgstr "" +"]]>" + +#: index.docbook:223 +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "" +"Mira el capítulo anterior por una definición completa del " +"elemento <key>." + +#: index.docbook:231 +msgid "Collection elements" +msgstr "Elementos de collección" + +#: index.docbook:233 +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"Las colecciones pueden contener casi cualquier tipo de Hibernate, incluyendo " +"todos los tipos básicos, componentes, y por supuesto, referencias a " +"otras entidades. Esta es una distinción importante: un objeto en una " +"colección puede ser manejado con una semántica de \"valor" +"\" (su ciclo de vida depende completamente del propietario de la " +"colección) o podría ser una referencia a otra entidad, con su " +"propio ciclo de vida. En el último caso, sólo el estado del " +"\"enlace\" entre los dos objetos se considera mantenido por la " +"colección." + +#: index.docbook:242 +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"Se hace referencia al tipo contenido como el tipo de elemento de " +"la colección. Los elementos de colección son " +"mapeados por <element> o <composite-" +"element>, o en el caso de referencias de entidades, con " +"<one-to-many> o <many-to-many>. Las dos primeras mapean elementos con semántica de valor, " +"los dos siguientes son usados para mapear asociaciones de entidades." + +#: index.docbook:254 +msgid "Indexed collections" +msgstr "Colecciones indexadas" + +#: index.docbook:256 +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"Todos los mapeos de colección, excepto aquellos con semántica " +"de set o bag, necesitan una columna índice en la " +"tabla de colección, una columna que mapea a un índice de " +"array, o índice de List, o clave de Map. El índice de un Map puede ser de " +"cualquier tipo básico, mapeado con <map-key>, o puede ser una referencia de entidad, mapeada con <" +"map-key-many-to-many>, o puede ser un tipo compuesto, mapeado " +"con <composite-map-key>. El índice de un " +"array o lista es siempre de tipo integer y se mapea " +"usando el elemento <list-index>. La columna mapeada " +"contiene enteros secuenciales (numerados desde cero, por defecto)." + +#: index.docbook:267 +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" +" ]]> column_name (requerido): El " +"nombre de la columna que tiene los valores índice de la " +"colección. " +"base (opcional, por defecto a 0): El " +"valor de la columna índice que corresponde al primer elemento de la " +"lista o array. " +" ]]> column (opcional): El nombre de la " +"columna que tiene los valores índice de la colección. " +" formula " +"(opcional): Una fórmula SQL usada para evaluar la clave del mapa. type (requerido): el tipo de las claves del mapa. " +"]]> " +" column (opcional): El nombre de la columna clave " +"foránea para los valores índice de la colección. " +"formula (opcional): Una fórmula SQL usada para " +"evaluar la clave foránea de la clave del mapa. " +" class " +"(requerido): La clase de entidad usada como clave del mapa. " + +#: index.docbook:348 +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"Si tu tabla no tiene una columna índice, y deseas aún usar " +"List como tipo de propiedad, debes mapear la propiedad " +"como un <bag> de Hibernate. Un bag (bolsa) no " +"retiene su orden al ser recuperado de la base de datos, pero puede ser " +"ordenado o clasificado opcionalmente." + +#: index.docbook:357 +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"Hay absolutamente un rango de mapeos que pueden ser generados para " +"colecciones, cubriendo muchos modelos relacionales comunes. Te sugerimos que " +"experimentes con la herramienta de generación de esquemas para " +"obtener una idea de cómo varias declaraciones de mapeo se traducen a " +"tablas de base de datos." + +#: index.docbook:364 +msgid "Collections of values and many-to-many associations" +msgstr "Colecciones de valores y asociaciones muchos-a-muchos" + +#: index.docbook:366 +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "" +"Cualquier colección de valores o asociación muchos a muchos " +"requiere una tabla de colección dedicada con una " +"columna o columnas de clave foránea, columna de elemento de " +"colección o columnas y posiblemente una columna o columnas " +"índice." + +#: index.docbook:373 +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "" +"Para una colección de valores, usamos la etiqueta <" +"element>." + +#: index.docbook:375 +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" +" " +" ]]> " +"column (opcional): El nombre de la columna que tiene los " +"valores de los elementos de la colección. formula (opcional): Una " +"fórmula SQL usada para evaluar el elemento. " +" type (requerido): " +"El tipo del elemento de colección. " +" Una asociación muchos-a-muchos se especifica usando el elemento <many-to-many>. " +" " +"]]> " +" column (opcional): El nombre de la columna de " +"clave foránea del elemento. formula (opcional): Una fó" +"rmula SQL opcional usada para evaluar el valor de clave foránea del " +"elemento. " +"class (requerido): El nombre de la clase asociada. fetch (opcional - por defecto a join): habilita la " +"recuperación por unión externa o selección secuencial " +"para esta asociación. Este es un caso especial; para una " +"recuperación completamente temprana (en un solo SELECT) de una entidad y sus relaciones muchos-a-muchos a otras entidades, " +"deberías habilitar la recuperación join no " +"sólo de la colección misma, sino también con este " +"atributo en el elemento anidado <many-to-many>. unique (opcional): Habilita la generación DDL de una " +"restricción de unicidad para la columna clave foránea. Esto " +"hace la multiplicidad de la asociación efectivamente uno a muchos. not-" +"found (opcional - por defecto a exception): " +"Especifica cómo serán manejadas las claves foráneas que " +"referencian filas perdidas: ignore tratará una " +"fila perdida como una asociación nula. entity-name (opcional): " +"El nombre de entidad de la clase asociada, como una alternativa a " +"class. UNTRANSLATED! property-ref: (optional) The " +"name of a property of the associated class that is joined to this foreign " +"key. If not specified, the primary key of the associated class is used. " + +#: index.docbook:480 +msgid "Some examples, first, a set of strings:" +msgstr "Algunos ejemplos, primero, un conjunto de cadenas:" + +#: index.docbook:484 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:486 +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"Un bag conteniendo enteros (con un orden de iteración determinado por " +"el atributo order-by):" + +#: index.docbook:491 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:493 +msgid "An array of entities - in this case, a many to many association:" +msgstr "" +"Un array de entidades - en este caso, una asociación muchos a muchos:" + +#: index.docbook:497 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:499 +msgid "A map from string indices to dates:" +msgstr "Un mapa de índices de cadenas a fechas:" + +#: index.docbook:503 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:505 +msgid "A list of components (discussed in the next chapter):" +msgstr "" +"Una lista de componentes (discutidos en el próximo capítulo):" + +#: index.docbook:509 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:514 +msgid "One-to-many associations" +msgstr "Asociaciones uno-a-muchos" + +#: index.docbook:516 +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "" +"Una asociación uno a muchos enlaza las tablas de " +"dos clases por medio de una clave foránea, sin intervención de " +"tabla de colección alguna. Este mapeo pierde cierta semántica " +"de colecciones Java normales:" + +#: index.docbook:524 +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "" +"Una instancia de la clase entidad contenida no puede pertenecer a más " +"de una instancia de la colección." + +#: index.docbook:530 +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"Una instancia de la clase entidad contenida no puede aparecer en más " +"de un valor del índice de colección." + +#: index.docbook:537 +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "" +"Una asociación de Product a Part requiere la existencia de una columna clave foránea y " +"posiblemente una columna índice a la tabla Part. " +"Una etiqueta <one-to-many> indica que ésta " +"es una asociación uno a muchos." + +#: index.docbook:550 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:553 +msgid "class (required): The name of the associated class." +msgstr "class (requerido): El nombre de la clase asociada." + +#: index.docbook:558 +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (opcional - por defecto a exception): Especifica cómo serán manejados los identificadores " +"en caché que referencien filas perdidas: ignore " +"tratará una fila perdida como una asociación nula." + +#: index.docbook:565 +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"entity-name (opcional): El nombre de entidad de la clase " +"asociada, como una alternativa a class." + +#: index.docbook:573 +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"Observa que el elemento <one-to-many> no necesita " +"declarar ninguna columna. Ni es necesario especificar el nombre de " +"table en ningún sitio." + +#: index.docbook:579 +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"Nota muy importante: Si la columna clave foránea " +"de una asociación <one-to-many> es declarada " +"NOT NULL, debes declarar el mapeo de <key>" +" not-null=\"true\" o usar una " +"asociación bidireccional con el mapeo de colección " +"marcado inverse=\"true\". Ver la discusión sobre " +"asociaciones bidireccionales más adelante en este capítulo." + +#: index.docbook:588 +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"Este ejemplo muestra un mapa de entidades Part por nombre " +"(donde partName es una propiedad persistente de " +"Part). Observa el uso de un índice basado en " +"fórmula." + +#: index.docbook:594 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:600 +msgid "Advanced collection mappings" +msgstr "Mapeos de colección avanzados" + +#: index.docbook:603 +msgid "Sorted collections" +msgstr "Colecciones ordenadas" + +#: index.docbook:605 +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernate soporta colecciones implementando java.util.SortedMap y java.util.SortedSet. Debes especificar un " +"comparador en el fichero de mapeo:" + +#: index.docbook:610 +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:612 +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"Los valores permitidos del atributo sort son " +"unsorted, natural y el nombre de una " +"clase que implemente java.util.Comparator." + +#: index.docbook:618 +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"Las colecciones ordenadas realmente se comportan como java.util." +"TreeSet o java.util.TreeMap." + +#: index.docbook:623 +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"Si quieres que la misma base de datos ordene los elementos de colecció" +"n usa el atributo order-by de los mapeos set, bag o map. Esta " +"solución está disponible sólo bajo el JDK 1.4 o " +"superior (está implementado usando LinkedHashSet o " +"LinkedHashMap). Esto realiza la ordenación en la " +"consulta SQL, no en memoria." + +#: index.docbook:632 +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:634 +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"Observa que el valor del atributo order-by es una " +"ordenación SQL, no una ordenación HQL!" + +#: index.docbook:639 +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"Las asociaciones pueden incluso ser ordenadas por algún criterio " +"arbitrario en tiempo de ejecución usando un filter() de colección." + +#: index.docbook:644 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:649 +msgid "Bidirectional associations" +msgstr "Asociaciones bidireccionales" + +#: index.docbook:651 +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"Una asociación bidireccional permite la " +"nevegación desde ambos \"extremos\" de la asociación. Son " +"soportados dos tipos de asociación bidireccional:" + +#: index.docbook:658 +msgid "one-to-many" +msgstr "uno-a-muchos" + +#: index.docbook:660 +msgid "set or bag valued at one end, single-valued at the other" +msgstr "set o bag valorados en un extremo, monovaluados al otro" + +#: index.docbook:666 +msgid "many-to-many" +msgstr "muchos-a-muchos" + +#: index.docbook:668 +msgid "set or bag valued at both ends" +msgstr "set o bag valorados a ambos extremos" + +#: index.docbook:677 +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"Puedes especificar una asociación bidireccional muchos-a-muchos " +"simplemente mapeando dos asociaciones muchos-a-muchos a la misma tabla de " +"base de datos y declarando un extremo como inverse " +"(cuál de ellos es tu elección, pero no puede ser una " +"colección indexada)." + +#: index.docbook:684 +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"He aquí un ejemplo de una asociación bidireccional muchos-a-" +"muchos; cada categoría puede tener muchos ítems y cada í" +"tem puede estar en muchas categorías:" + +#: index.docbook:689 +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:691 +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"Los cambios hechos sólo al extremo inverso de la asociación " +"no son persistidos. Esto significa que Hibernate tiene " +"dos representaciones en memoria para cada asociación bidireccional, " +"una enlaza de A a B y otra enlaza de B a A. Esto es más fácil " +"de entender si piensas en el modelo de objetos de Java y cómo creamos " +"una relación muchos-a-muchos en Java:" + +#: index.docbook:699 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:701 +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "" +"El lado no-inverso se usa para salvar la representación en memoria a " +"la base de datos." + +#: index.docbook:705 +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"Puedes definir una asociación bidireccional uno-a-muchos mapeando una " +"asociación uno-a-muchos a la misma columna (o columnas) de tabla como " +"una asociación muchos-a-uno y declarando el extremo multivaluado " +"inverse=\"true\"." + +#: index.docbook:711 +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" + +#: index.docbook:713 +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"Mapear un extremo de una asociación con inverse=\"true\" no afecta la operación de cascadas; éstos son " +"conceptos ortogonales!" + +#: index.docbook:721 +msgid "Bidirectional associations with indexed collections" +msgstr "Asociaciones bidireccionales con colecciones indexadas" + +#: index.docbook:722 +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"Requiere especial consideración una asociación bidireccional " +"donde un extremo esté representado como una <list> o <map>. Si hay una propiedad de la clase " +"hija que mapee a la columna índice, no hay problema, podemos seguir " +"usando inverse=\"true\" en el mapeo de la colecció" +"n:" + +#: index.docbook:729 +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" + +#: index.docbook:731 +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"Pero, si no existe tal proiedad en la clase hija, no podemos pensar en la " +"asociación como verdaderamente bidireccional (hay información " +"en un extremo de la asociación que no está disponible en el " +"otro extremo). En este caso, no podemos mapear la colección con " +"inverse=\"true\". En cambio, podríamos usar el " +"siguiente mapeo:" + +#: index.docbook:738 +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" + +#: index.docbook:740 +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"Nota que, en este mapeo, el extremo de la asociación valuado en " +"colección es responsable de las actualizaciones a la clave forá" +"nea." + +#: index.docbook:748 +msgid "Ternary associations" +msgstr "Asociaciones ternarias" + +#: index.docbook:750 +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"Hay tres enfoques posibles para mapear una asociación ternaria. Una " +"es usar un Map con una asociación como su í" +"ndice:" + +#: index.docbook:755 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:757 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:759 +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"Un segundo enfoque es simplemente remodelar la asociación como una " +"clase de entidad. Este es el enfoque que usamos más comunmente." + +#: index.docbook:764 +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "" +"Una alternativa final es usar elementos compuestos, que discutiremos " +"más adelante." + +#: index.docbook:771 +msgid "Using an <idbag>" +msgstr "Usando un <idbag>" + +#: index.docbook:773 +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"Si has adoptado completamente nuestra visión de que las claves " +"compuestas son una cosa mala y que las entidades deben tener identificadores " +"sitéticos (claves delegadas), entonces podrías encontrar un " +"poco raro que todas las asociaciones muchos a muchos y las colecciones de " +"valores que hemos mostrado hasta ahora mapeen a tablas con claves " +"compuestas! Ahora, este punto es discutible; una tabla de pura " +"asociación no parece beneficiarse demasiado de una clave delegada " +"(aunque sí podría una colección de " +"valores compuestos). Sin embargo, Hibernate provee una funcionalidad que te " +"permite mapear asociaciones muchos a muchos y colecciones de valores a una " +"tabla con una clave delegada." + +#: index.docbook:784 +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"El elemento <idbag> te permite mapear una " +"List (o Collection) con semá" +"ntica de bag." + +#: index.docbook:789 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:791 +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"Como puedes ver, un <idbag> tiene un generador de " +"id sintético, igual que una clase de entidad! Una clave delegada " +"diferente se asigna a cada fila de la colección. Hibernate no provee " +"ningún mecanismo para descubrir el valor de clave delegada de una " +"fila en particular, sin embargo." + +#: index.docbook:798 +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"Observa que el rendimiento de actualización de un <" +"idbag> es mucho mejor que el de un " +"<bag> regular! Hibernate puede localizar filas " +"individuales eficientemente y actualizarlas o borrarlas individualmente, " +"igual que si fuese una lista, mapa o conjunto." + +#: index.docbook:805 +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"En la implementación actual, la estrategia de generación de " +"identificador native no está soportada para " +"identificadores de colecciones <idbag>." + +#: index.docbook:829 +msgid "Collection examples" +msgstr "Ejemplos de colección" + +#: index.docbook:831 +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "" +"Las secciones previas son bastantes confusas. Así que miremos un " +"ejemplo. Esta clase:" + +#: index.docbook:836 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:838 +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"tiene una colección de instancias de Child. Si " +"cada hijo tiene como mucho un padre, el mapeo más natural es una " +"asociación uno-a-muchos:" + +#: index.docbook:844 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:846 +msgid "This maps to the following table definitions:" +msgstr "Esto mapea a las siguientes definiciones de tablas:" + +#: index.docbook:850 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:852 +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"Si el padre es requerido, usa una asociación " +"bidireccional uno-a-muchos:" + +#: index.docbook:857 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:859 +msgid "Notice the NOT NULL constraint:" +msgstr "Observa la restricción NOT NULL:" + +#: index.docbook:863 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:865 +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"Alternativamente, si absolutamente insistes que esta asociación debe " +"ser unidireccional, puedes declarar la restricción NOT NULL en el mapeo de <key>:" + +#: index.docbook:871 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:873 +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "" +"En la otra mano, si un hijo pudiera tener múltiples padres, " +"sería apropiada una asociación muchos-a-muchos:" + +#: index.docbook:878 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:880 +msgid "Table definitions:" +msgstr "Definiciones de tabla:" + +#: index.docbook:884 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:886 +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"Para más ejemplos y un paseo completo a través del mapeo de " +"relaciones padre/hijo, ver ." + +#: index.docbook:891 +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "" +"Son posibles mapeos de asociación aún más complejos. " +"Catalogaremos todas las posibilidades en el próximo capítulo." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/component_mapping.po b/documentation/envers/src/main/docbook/es-ES/content/component_mapping.po new file mode 100644 index 0000000000..ae80327df3 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/component_mapping.po @@ -0,0 +1,753 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Component Mapping" +msgstr "Mapeo de Componentes" + +#: index.docbook:7 +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"La noción de un componente es reusada en muchos " +"contextos diferentes, para propósitos diferentes, a través de " +"Hibernate." + +#: index.docbook:13 +msgid "Dependent objects" +msgstr "Objetos dependientes" + +#: index.docbook:15 +msgid "" +"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 "" +"Un componente es un objeto contenido que es persistido como un tipo de " +"valor, no una referencia de entidad. El término \"componente\" hace " +"referencia a la noción orientada a objetos de composición (no " +"a componentes a nivel de arquitectura). Por ejemplo, podrías modelar " +"una persona como:" + +#: index.docbook:21 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:23 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:25 +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"Ahora Name puede ser persistido como un componente de " +"Person. Observa que Name define " +"métodos getter y setter para sus propiedades persistentes, pero no " +"necesita declarar ninguna interface ni propiedades identificadoras." + +#: index.docbook:32 +msgid "Our Hibernate mapping would look like:" +msgstr "Nuestro mapeo de Hibernate se vería así:" + +#: index.docbook:36 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:38 +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"La tabla person tendría las columnas pid, " +"birthday, initial, first y last." + +#: index.docbook:46 +msgid "" +"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 ad hoc. 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 "" +"Como todos los tipos de valor, los componentes no soportan referencias " +"compartidas. En otras palabras, dos personas pueden tener el mismo nombre, " +"pero los dos objetos persona contendrían dos objetos nombre " +"independientes, sólo \"iguales\" en valor. La semántica de " +"valor nulo de un componente es ad hoc. Cuando se " +"recargue el objeto contenedor, Hibernate asumirá que si todas las " +"columnas del componente son nulas, el componente entero es nulo. Esto debe " +"estar bien para la mayoría de propósitos." + +#: index.docbook:55 +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"Las propiedades de un componentes pueden ser de cualquier tipo de Hibernate " +"(colecciones, muchos-a-uno, asociaciones, otros componentes, etc). Los " +"componentes anidados no deben ser considerados un uso " +"exótico. Hibernate está concebido para soportar un modelo de " +"objetos granularizado en fino." + +#: index.docbook:62 +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"El elemento <component> permite un subelemento " +"<parent> que mapee una propiedad de la clase del " +"componente como una referencia de regreso a la entidad contenedora." + +#: index.docbook:68 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:84 +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"Nota: si defines un Set de elementos compuestos, es muy " +"importante implementar equals() y hashCode() correctamente." + +#: index.docbook:90 +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 "" +"Los elementos compuestos pueden contener componentes pero no colecciones. Si " +"tu elemento compuesto contiene a su vez componentes, usa la etiqueta " +"<nested-composite-element>. Este es un caso " +"bastante exótico - una colección de componentes que a su vez " +"tienen componentes. A esta altura debes estar preguntándote si una " +"asociación uno-a-muchos es más apropiada. Intenta remodelar el " +"elemento compuesto como una entidad - pero observa que aunque el modelo Java " +"es el mismo, el modelo relacional y la semántica de persistencia " +"siguen siendo ligeramente diferentes." + +#: index.docbook:102 +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"Por favor observa que un mapeo de elemento compuesto no soporta propiedades " +"nulables si estás usando un <set>. Hibernate " +"tiene que usar cada columna para identificar un registro al borrar objetos " +"(no hay una columna clave primaria separada en la tabla del elemento " +"compuesto), lo que es imposible con valores nulos. Tienes que, o bien usar " +"sólo propiedades no nulas en un elemento compuesto o elegir un " +"<list>, <map>, " +"<bag> o <idbag>." + +#: index.docbook:113 +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"Un caso especial de un elemento compuesto es un elemento compuesto con un " +"elemento anidado <many-to-one>. Un mapeo como este " +"te permite mapear columnas extra de una tabla de asociación muchos-a-" +"muchos a la clase del elemento compuesto. La siguiente es una " +"asociación muchos-a-muchos de Order a " +"Item donde purchaseDate, " +"price y quantity son propiedades de la " +"asociación:" + +#: index.docbook:123 +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:125 +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"Por supuesto, no puede haber una referencia a la compra del otro lado para " +"la navegación bidireccional de la asociación. Recuerda que los " +"componentes son tipos de valor no permiten referencias compartidas. Una sola " +"Purchase puede estar en el conjunto de una " +"Order, pero no puede ser referenciada por el " +"Item al mismo tiempo." + +#: index.docbook:133 +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "Incluso son posibles las asociaciones ternarias (o cuaternarias, etc):" + +#: index.docbook:135 +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:137 +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "" +"Los elementos compuestos pueden aparecer en consultas usando la misma " +"sintáxis que las asociaciones a otras entidades." + +#: index.docbook:145 +msgid "Components as Map indices" +msgstr "Componentes como índices de Map" + +#: index.docbook:147 +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"El elemento <composite-map-key> te permite mapear " +"una clase componente como la clave de un Map. Asegú" +"rate que sobrescribes hashCode() y equals() correctamente en la clase componente." + +#: index.docbook:156 +msgid "Components as composite identifiers" +msgstr "Componentes como identificadores compuestos" + +#: index.docbook:158 +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"Puedes usar un componente como un identidicador de una clase entidad. Tu " +"clase componente debe satisfacer ciertos requerimientos:" + +#: index.docbook:165 +msgid "It must implement java.io.Serializable." +msgstr "Debe implementar java.io.Serializable." + +#: index.docbook:170 +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"Debe re-implementar equals() y hashCode(), consistentemente con la noción de base de datos de igualdad " +"de clave compuesta." + +#: index.docbook:179 +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"Nota: en Hibernat3, el segundo requerimiento no es absolutamente un " +"requerimiento rígido de Hibernate. Pero de todas formas, házlo." + +#: index.docbook:183 +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"No puedes usar un IdentifierGenerator para generar claves " +"compuestas. La aplicación debe, en cambio, asignar sus propios " +"identificadores." + +#: index.docbook:188 +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"Usa la etiqueta <composite-id> (con elementos " +"anidados <key-property>) en lugar de la usual " +"declaración <id>. Por ejemplo, la clase " +"OrderLine tiene una clave primaria que depende de la " +"clave primaria (compuesta) de Order." + +#: index.docbook:196 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" + +#: index.docbook:198 +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"Ahora, cualquier clave foránea que referencie la tabla de " +"OrderLine es también compuesta. Debes declarar " +"esto en tus mapeos de otras clases. Una asociación a " +"OrderLine sería mapeado así:" + +#: index.docbook:204 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:206 +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(Nota que la etiqueta <column> es una alternativa " +"al atributo column en cualquier sitio.)" + +#: index.docbook:211 +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"Una asociación muchos-a-muchos a " +"OrderLine también usa la clave foránea " +"compuesta:" + +#: index.docbook:216 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:218 +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"La colección de OrderLines en Order usaría:" + +#: index.docbook:223 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:225 +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "" +"(El elemento <one-to-many>, como es usual, no " +"declara columnas.)" + +#: index.docbook:229 +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "" +"Si OrderLine posee una colección por sí " +"misma, tiene también una clave foránea compuesta." + +#: index.docbook:234 +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" + +#: index.docbook:239 +msgid "Dynamic components" +msgstr "Componentes dinámicos" + +#: index.docbook:241 +msgid "You may even map a property of type Map:" +msgstr "Puedes incluso mapear una propiedad de tipo Map:" + +#: index.docbook:245 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:247 +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"La semántica de un mapeo <dynamic-component> " +"es ídentica a la de <component>. La ventaja " +"de este tipo de mapeos es la habilidad para determinar las propiedades " +"reales del bean en tiempo de despliegue, sólo con editar el documento " +"de mapeo. La manipulación del documento de mapeo en tiempo de " +"ejecución es también posible, usando un analizador DOM. " +"Incluso mejor, puedes acceder (y cambiar) el metamodelo de tiempo de " +"configuración de Hibernate por medio del objeto " +"Configuration." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/configuration.po b/documentation/envers/src/main/docbook/es-ES/content/configuration.po new file mode 100644 index 0000000000..3f5571b4bd --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/configuration.po @@ -0,0 +1,2593 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Configuration" +msgstr "Configuración" + +#: index.docbook:7 +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"Debido a que Hibernate está diseñado para operar en muchos " +"entornos diferentes, hay un gran número de parámetros de " +"configuración. Afortunadamente, la mayoría tiene valores por " +"defecto sensibles e Hibernate se distribuye con un fichero " +"hibernate.properties de ejemplo en etc/ que muestra las diversas opciones. Tan sólo pon el fichero " +"de ejemplo en tu classpath y personalízalo." + +#: index.docbook:16 +msgid "Programmatic configuration" +msgstr "Configuración programática" + +#: index.docbook:18 +msgid "" +"An instance of org.hibernate.cfg.Configuration " +"represents an entire set of mappings of an application's Java types to an " +"SQL database. The org.hibernate.cfg.Configuration is " +"used to build an (immutable) org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files." +msgstr "" +"Una instancia de org.hibernate.cfg.Configuration " +"representa un conjunto entero de mapeos de los tipos Java de una " +"aplicación a una base de datos SQL. La Configuration es usada para construir una SessionFactory " +"(inmutable). Los mapeos se compilan de varios ficheros de mapeo XML." + +#: index.docbook:25 +msgid "" +"You may obtain a org.hibernate.cfg.Configuration " +"instance by instantiating it directly and specifying XML mapping documents. " +"If the mapping files are in the classpath, use addResource():" +msgstr "" +"Puedes obtener una instancia de Configuration " +"instanciándola directamente y especificando documentos de mapeo XML. " +"Si los ficheros de mapeo están en el classpath, usa " +"addResource():" + +#: index.docbook:31 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:33 +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"Una forma alternativa (a veces mejor) es especificar la clase mapeada, y " +"dejar que Hibernate encuentre el documento de mapeo por ti:" + +#: index.docbook:38 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:40 +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"Entonces Hibernate buscará ficheros de mapeo llamados /org/" +"hibernate/auction/Item.hbm.xml y /org/hibernate/auction/" +"Bid.hbm.xml en el classpath. Este enfoque elimina cualquier nombre " +"de fichero en el código." + +#: index.docbook:46 +msgid "" +"A org.hibernate.cfg.Configuration also allows you to " +"specify configuration properties:" +msgstr "" +"Una Configuration también te permite especificar " +"propiedades de configuración:" + +#: index.docbook:51 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:53 +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "" +"Esta no es la única forma de pasar propiedades de configuració" +"n a Hibernate. La diversas opciones incluyen:" + +#: index.docbook:60 +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"Pasar una instancia de java.util.Properties a " +"Configuration.setProperties()." + +#: index.docbook:66 +msgid "" +"Place a file named hibernate.properties in a root " +"directory of the classpath." +msgstr "" +"Colocar hibernate.properties en un directorio raíz " +"del classpath." + +#: index.docbook:71 +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"Establecer propiedades System usando java -" +"Dproperty=value." + +#: index.docbook:76 +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"Incluir elementos <property> en hibernate." +"cfg.xml (discutido luego)." + +#: index.docbook:83 +msgid "" +"hibernate.properties is the easiest approach if you " +"want to get started quickly." +msgstr "" +"hibernate.properties es el enfoque más fá" +"cil si quieres comenzar rápido." + +#: index.docbook:87 +msgid "" +"The org.hibernate.cfg.Configuration is intended as a " +"startup-time object, to be discarded once a SessionFactory is created." +msgstr "" +"La Configuration está concebida como un objeto de " +"tiempo de arranque, para ser descartado una vez que una " +"SessionFactory es creada." + +#: index.docbook:95 +msgid "Obtaining a SessionFactory" +msgstr "Obteniendo una SessionFactory" + +#: index.docbook:97 +msgid "" +"When all mappings have been parsed by the org.hibernate.cfg." +"Configuration, the application must obtain a factory for " +"org.hibernate.Session instances. This factory " +"is intended to be shared by all application threads:" +msgstr "" +"Cuando todos los mapeos han sido parseados por la Configuration, la aplicación debe obtener una fábrica de instancias " +"de Session. Esta fábrica está concebida " +"para ser compartida por todas las hebras de aplicación:" + +#: index.docbook:103 +msgid "" +msgstr "" + +#: index.docbook:105 +msgid "" +"Hibernate does allow your application to instantiate more than one " +"org.hibernate.SessionFactory. This is useful " +"if you are using more than one database." +msgstr "" +"Hibernate permite que tu aplicación instancie más de una " +"SessionFactory. Esto es útil si estás " +"usando más de una base de datos." + +#: index.docbook:114 +msgid "JDBC connections" +msgstr "Conexiones JDBC" + +#: index.docbook:116 +msgid "" +"Usually, you want to have the org.hibernate.SessionFactory create and pool JDBC connections for you. If you take this " +"approach, opening a org.hibernate.Session is " +"as simple as:" +msgstr "" +"Usualmente, quieres que la SessionFactory cree y almacene " +"en pool conexiones JDBC para ti. Si adoptas este enfoque, abrir una " +"Session es tan simple como:" + +#: index.docbook:122 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:124 +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"En cuanto hagas algo que requiera acceso a la base de datos, se " +"obtendrá una conexión JDBC del pool." + +#: index.docbook:129 +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now " +"describe the most important settings for JDBC connection configuration." +msgstr "" +"Para que esto funcione, necesitamos pasar algunas propiedades de " +"conexión JDBC a Hibernate. Todos los nombres de propiedades y su " +"semántica están definidas en la clase org.hibernate." +"cfg.Environment. Describiremos ahora las configuraciones má" +"s importantes para la conexión JDBC." + +#: index.docbook:135 +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"Hibernate obtendrá (y tendrá en pool) conexiones usando " +"java.sql.DriverManager si configuras las siguientes " +"propiedades:" + +#: index.docbook:141 +msgid "Hibernate JDBC Properties" +msgstr "Propiedades JDBC de Hibernate" + +#: index.docbook:147, index.docbook:233, index.docbook:329, index.docbook:524, +#: index.docbook:719, index.docbook:826, index.docbook:914 +msgid "Property name" +msgstr "Nombre de propiedad" + +#: index.docbook:148, index.docbook:234, index.docbook:330, index.docbook:525, +#: index.docbook:720, index.docbook:827, index.docbook:915 +msgid "Purpose" +msgstr "Propósito" + +#: index.docbook:154 +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#: index.docbook:157 +msgid "JDBC driver class" +msgstr "clase del driver jdbc" + +#: index.docbook:162 +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#: index.docbook:165 +msgid "JDBC URL" +msgstr "URL de jdbc" + +#: index.docbook:170, index.docbook:264 +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#: index.docbook:173 +msgid "database user" +msgstr "usuario de base de datos" + +#: index.docbook:178, index.docbook:272 +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#: index.docbook:181 +msgid "database user password" +msgstr "contraseña del usuario de base de datos" + +#: index.docbook:186 +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#: index.docbook:189 +msgid "maximum number of pooled connections" +msgstr "número máximo de conexiones manejadas por pooling" + +#: index.docbook:196 +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property " +"with connection pool specific settings. This will turn off Hibernate's " +"internal pool. For example, you might like to use C3P0." +msgstr "" +"El algoritmo de pooling de conexiones propio de Hibernate es sin embargo " +"algo rudimentario. Está concebido para ayudarte a comenzar y " +"no está concebido para usar en un sistema de " +"producción ni siquiera para pruebas de rendimiento. Debes " +"usar un pool de terceros para un mejor rendimiento y estabilidad. Só" +"lo remplaza la propiedad hibernate.connection.pool_size " +"con configuraciones específicas del pool de conexiones. Esto " +"desactivará el pool interno de Hibernate. Por ejemplo, podrías " +"querer usar C3P0." + +#: index.docbook:206 +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"org.hibernate.connection.C3P0ConnectionProvider for " +"connection pooling if you set hibernate.c3p0.* " +"properties. If you'd like to use Proxool refer to the packaged " +"hibernate.properties and the Hibernate web site for " +"more information." +msgstr "" +"C3P0 es un pool de conexiones JDBC de código abierto distribuido " +"junto a Hibernate en el directorio lib. Hibernate " +"usará su C3P0ConnectionProvider para pooling de " +"conexiones si estableces propiedades hibernate.c3p0.*. Si " +"quieres usar Proxool refiérete al hibernate.properties empaquetado y al sitio web de Hibernate para más " +"información." + +#: index.docbook:214 +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "" +"Aquí hay un fichero hibernate.properties de " +"ejemplo para C3P0:" + +#: index.docbook:218 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:220 +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"javax.sql.Datasource registered in JNDI. " +"You'll need to set at least one of the following properties:" +msgstr "" +"Para su uso en un servidor de aplicaciones, casi siempre debes configurar " +"Hibernate para que obtenga conexiones de un Datasource " +"del servidor de aplicaciones registrado en JNDI. Necesitarás " +"establecer al menos una de las siguientes propiedades:" + +#: index.docbook:227 +msgid "Hibernate Datasource Properties" +msgstr "Propiedades de Datasource de Hibernate" + +#: index.docbook:240 +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#: index.docbook:243 +msgid "datasource JNDI name" +msgstr "nombre del datasource JNDI" + +#: index.docbook:248 +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#: index.docbook:250 +msgid "URL of the JNDI provider (optional)" +msgstr "URL del provedor JNDI (optional)" + +#: index.docbook:256 +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#: index.docbook:258 +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" +"clase de la InitialContextFactory de JNDI (opcional)" + +#: index.docbook:266 +msgid "database user (optional)" +msgstr "usuario de base de datos (opcional)" + +#: index.docbook:274 +msgid "database user password (optional)" +msgstr "" +"contraseña del usuario de base de datos " +"(opcional)" + +#: index.docbook:282 +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"He aquí un fichero hibernate.properties de ejemplo " +"para un un datasource JNDI provisto por un servidor de aplicaciones." + +#: index.docbook:287 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:289 +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"Las conexiones JDBC obtenidas de un datasource JNDI participarán " +"automáticamente en las transacciones del servidor de aplicaciones " +"manejadas por contenedor." + +#: index.docbook:294 +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the connection property name. " +"For example, you may specify a charSet connection " +"property using hibernate.connection.charSet." +msgstr "" +"Pueden darse propiedades de conexión arbitrarias anteponiendo " +"\"hibernate.connnection\" al nombre de propiedad. Por " +"ejemplo, puedes especificar un charSet usando " +"hibernate.connection.charSet." + +#: index.docbook:300 +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider, and specifying your custom " +"implementation via the hibernate.connection.provider_class property." +msgstr "" +"Puedes definir tu propia estrategia de plugin para obtener conexiones JDBC " +"implementando la interface org.hibernate.connection." +"ConnectionProvider. Puedes seleccionar una implementación " +"personalizada estableciendo hibernate.connection.provider_class." + +#: index.docbook:309 +msgid "Optional configuration properties" +msgstr "Parámetros de configuración opcionales" + +#: index.docbook:311 +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"Hay un número de otras propiedades que controlan el comportamiento de " +"Hibernate en tiempo de ejecución. Todas son opcionales y tienen " +"valores por defecto razonables." + +#: index.docbook:316 +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"Advertencia: algunas de estas propiedades son de \"nivel-de-sistema" +"\" solamente.. Las propiedades a nivel de sistema sólo " +"pueden ser establecidas por medio de java -Dproperty=value o hibernate.properties. No " +"pueden establecerse por medio de las otras técnicas arriba descritas." + +#: index.docbook:323 +msgid "Hibernate Configuration Properties" +msgstr "Propiedades de Configuración de Hibernate" + +#: index.docbook:336 +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#: index.docbook:338 +msgid "" +"The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular " +"relational database." +msgstr "" +"El nombre de clase de un Dialect de Hibernate que permite " +"a Hibernate generar SQL optimizado para una base de datos relacional en " +"particular." + +#: index.docbook:341 +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"ej. full.classname.of.Dialect" + +#: index.docbook:345 +msgid "" +"In most cases Hibernate will actually be able to chose the correct " +"org.hibernate.dialect.Dialect implementation to use " +"based on the JDBC metadata returned by the JDBC driver." +msgstr "" +"UNTRANSLATED! In most cases Hibernate will actually be able to chose the " +"correct org.hibernate.dialect.Dialect implementation " +"to use based on the JDBC metadata returned by the JDBC " +"driver." + +#: index.docbook:354 +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#: index.docbook:356 +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"Escribe todas las sentencias SQL a la consola. This is an alternative to " +"setting the log category org.hibernate.SQL to " +"debug." + +#: index.docbook:360, index.docbook:372, index.docbook:466, index.docbook:479, +#: index.docbook:492, index.docbook:505, index.docbook:559, index.docbook:586, +#: index.docbook:599, index.docbook:654, index.docbook:882, index.docbook:897, +#: index.docbook:987 +msgid "" +"eg. true | " +"false" +msgstr "" +"eg. true | " +"false" + +#: index.docbook:368 +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#: index.docbook:370 +msgid "Pretty print the SQL in the log and console." +msgstr "Pretty print the SQL in the log and console." + +#: index.docbook:380 +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#: index.docbook:382 +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"Cualifica, en el SQL generado, los nombres de tabla sin cualificar con el " +"esquema/tablespace dado." + +#: index.docbook:385 +msgid "eg. SCHEMA_NAME" +msgstr "" +"ej. SCHEMA_NAME" + +#: index.docbook:393 +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#: index.docbook:395 +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" +"Cualifica, en el SQL generado, los nombres de tabla sin cualificar con el " +"catálogo dado." + +#: index.docbook:398 +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"ej. CATALOG_NAME" + +#: index.docbook:406 +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#: index.docbook:408 +msgid "" +"The org.hibernate.SessionFactory will be " +"automatically bound to this name in JNDI after it has been created." +msgstr "" +"La SessionFactory será ligada a este nombre en " +"JNDI automáticamente después de ser creada." + +#: index.docbook:411, index.docbook:853 +msgid "" +"eg. jndi/composite/name" +msgstr "" +"ej. jndi/composite/name" + +#: index.docbook:419 +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#: index.docbook:421 +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"Establece una \"profundidad\" máxima del árbol de " +"recuperación por outer join para asociaciones de un extremo solo (uno-" +"a-uno, muchos-a-uno). Un 0 deshabilita la " +"recuperación por outer join por defecto." + +#: index.docbook:425 +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"ej. valores recomendados entre " +"0 y 3" + +#: index.docbook:434 +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#: index.docbook:436 +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "" +"Establece un tamaño por defecto para la recuperación en lote " +"de asociaciones de Hibernate." + +#: index.docbook:438 +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"ej. valores recomendados 4, 8, 16" + +#: index.docbook:447 +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#: index.docbook:449 +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +"Establece un modo por defecto de representación de entidades para " +"todas las sesiones abiertas por esta SessionFactory" + +#: index.docbook:452 +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"dynamic-map, dom4j, pojo" + +#: index.docbook:460 +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#: index.docbook:462 +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"Fuerza a Hibernate a ordenar las actualizaciones SQL por el valor de la " +"clave primaria de los items a actualizar. Esto resultará en menos " +"bloqueos muertos de transacción en sistemas altamente concurrentes." + +#: index.docbook:474 +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#: index.docbook:476 +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" +"De habilitarse, Hibernate colectará estadísticas útiles " +"para la afinación de rendimiento." + +#: index.docbook:487 +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#: index.docbook:489 +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"De habilitarse, las propiedades identificadoras generadas serán " +"reseteadas a valores por defecto cuando los objetos sean borrados." + +#: index.docbook:500 +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#: index.docbook:502 +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"De activarse, Hibernate generará comentarios dentro del SQL, para una " +"más fácil depuración, por defecto a false." + +#: index.docbook:516 +msgid "Hibernate JDBC and Connection Properties" +msgstr "Propiedades de JDBC y Conexiones de Hibernate" + +#: index.docbook:531 +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#: index.docbook:533 +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "" +"Un valor distinto de cero que determina el tamaño de " +"recuperación de JDBC (llama a Statement.setFetchSize())." + +#: index.docbook:540 +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#: index.docbook:542 +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" +"Un valor distinto de cero habilita el uso de actualizaciones en lote de " +"JDBC2 por Hibernate." + +#: index.docbook:544 +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"ej. valores recomendados entre " +"5 y 30" + +#: index.docbook:552 +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#: index.docbook:554 +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"Establece esta propiedad a true si tu driver JDBC " +"devuelve cuentas correctas de filas desde executeBatch() " +"(usualmente es seguro activar esta opción). Hibernate usará " +"DML en lote para versionar automáticamente los datos. Por defecto a " +"false." + +#: index.docbook:567 +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#: index.docbook:569 +msgid "" +"Select a custom org.hibernate.jdbc.Batcher. " +"Most applications will not need this configuration property." +msgstr "" +"Selecciona un Batcher personalizado. La mayoría de " +"las aplicaciones no necesitarán esta propiedad de configuració" +"n." + +#: index.docbook:572 +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"ej. classname.of." +"BatcherFactory" + +#: index.docbook:580 +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#: index.docbook:582 +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"Habilita el uso de resultados scrollables de JDBC2 por Hibernate. Esta " +"propiedad sólo es necesaria cuando se usan conexiones JDBC provistas " +"por el usuario, en caso contrario Hibernate usa los metadatos de " +"conexión." + +#: index.docbook:594 +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#: index.docbook:596 +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC. *system-level " +"property*" +msgstr "" +"Usa flujos (streams) al escribir/leer tipos binary o " +"serializable a/desde JDBC (propiedad a nivel de sistema)." + +#: index.docbook:607 +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#: index.docbook:609 +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"Habilita el uso de PreparedStatement.getGeneratedKeys() " +"de JDBC3 para traer claves generadas nativamente después de insertar. " +"Requiere un driver JDBC3+ y un JRE1.4+. Establécela a false si tu " +"driver tiene problemas con los generadores de identificador de Hibernate. " +"Por defecto, se intenta determinar las capacidades del driver usando los " +"metadatos de conexión." + +#: index.docbook:615, index.docbook:745, index.docbook:757, index.docbook:771, +#: index.docbook:809 +msgid "eg. true|false" +msgstr "ej. true|false" + +#: index.docbook:623 +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#: index.docbook:625 +msgid "" +"The classname of a custom org.hibernate.connection." +"ConnectionProvider which provides JDBC connections to " +"Hibernate." +msgstr "" +"EL nombre de clase de un ConnectionProvider personalizado " +"que provea conexiones JDBC a Hibernate." + +#: index.docbook:628 +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"ej. classname.of." +"ConnectionProvider" + +#: index.docbook:636 +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#: index.docbook:638 +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most " +"databases do not support all isolation levels and some define additional, " +"non-standard isolations." +msgstr "" +"Establece el nivel de aislamiento de transacción JDBC. Comprueba " +"java.sql.Connection para valores significativos pero " +"observa que la mayoría de las bases de datos no soportan todos los " +"niveles de aislamiento." + +#: index.docbook:642 +msgid "eg. 1, 2, 4, 8" +msgstr "eg. 1, 2, 4, 8" + +#: index.docbook:650 +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#: index.docbook:652 +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"Habilita compromiso automático (autocommit) para las conexiones JDBC " +"en pool (no recomendado)." + +#: index.docbook:662 +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#: index.docbook:664 +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"Especifica cuándo Hibernate debe liberar las conexiones JDBC. Por " +"defecto, una conexión JDBC es retenida hasta que la sesión es " +"cerrada explícitamente o desconectada. Para un datasource JTA del " +"servidor de aplicaciones, debes usar after_statement para " +"liberar agresivamente las conexiones después de cada llamada JDBC. " +"Para una conexión no JTA, frecuentemente tiene sentido liberar la " +"conexión al final de cada transacción, usando " +"after_transaction. auto eligirá " +"after_statement para las estrategias JTA o CMT de " +"transacción y after_transaction para la estrategia " +"JDBC de transacción." + +#: index.docbook:675 +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"ej. on_close (por " +"defecto)| after_transaction | after_statement | auto" + +#: index.docbook:680 +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" + +#: index.docbook:691 +msgid "" +"hibernate.connection.<propertyName>" +msgstr "hibernate.connection.<propertyName>" + +#: index.docbook:694 +msgid "" +"Pass the JDBC property <propertyName> to " +"DriverManager.getConnection()." +msgstr "" +"Pasa la propiedad JDBC propertyName a " +"DriverManager.getConnection()." + +#: index.docbook:700 +msgid "" +"hibernate.jndi.<propertyName>" +msgstr "hibernate.jndi.<propertyName>" + +#: index.docbook:703 +msgid "" +"Pass the property <propertyName> to the JNDI " +"InitialContextFactory." +msgstr "" +"Pasa la propiedad propertyName a " +"InitialContextFactory de JNDI." + +#: index.docbook:713 +msgid "Hibernate Cache Properties" +msgstr "Propiedades de Caché de Hibernate" + +#: index.docbook:726 +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#: index.docbook:728 +msgid "The classname of a custom CacheProvider." +msgstr "" +"El nombre de clase de un CacheProvider personalizado." + +#: index.docbook:730 +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"ej. classname.of." +"CacheProvider" + +#: index.docbook:738 +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#: index.docbook:740 +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"Optimiza la operación del caché de segundo nivel para " +"minimizar escrituras, al costo de lecturas más frecuentes. Esto es " +"más útil para cachés en cluster y, en Hibernate3, " +"está habilitado por defecto para implementaciones de caché en " +"cluster." + +#: index.docbook:753 +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#: index.docbook:755 +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "" +"Habilita el caché de lectura, consultas individuales todavía " +"tienen que ponerse cachables." + +#: index.docbook:765 +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#: index.docbook:767 +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"Puede ser usado para deshabilitar completamente el caché de segundo " +"nivel, que está habilitado por defecto para clases que especifican un " +"mapeo <cache>." + +#: index.docbook:779 +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#: index.docbook:781 +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"El nombre de clase de una interface QueryCache " +"personalizada, por defecto al StandardQueryCache " +"prefabricado." + +#: index.docbook:784 +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"ej. classname.of.QueryCache" + +#: index.docbook:792 +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#: index.docbook:794 +msgid "A prefix to use for second-level cache region names." +msgstr "" +"Un prefijo a usar para los nombres de región del caché de " +"segundo nivel." + +#: index.docbook:796 +msgid "eg. prefix" +msgstr "ej. prefix" + +#: index.docbook:804 +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#: index.docbook:806 +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "" +"Fuerza a Hibernate a almacenar los datos en el caché de segundo nivel " +"en un formato más amigable al humano." + +#: index.docbook:820 +msgid "Hibernate Transaction Properties" +msgstr "Propiedades de Transacción de Hibernate" + +#: index.docbook:833 +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#: index.docbook:835 +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"El nombre de clase de un TransactionFactory a usar con la " +"API de Transaction de Hibernate (por defectoa " +"JDBCTransactionFactory)." + +#: index.docbook:839 +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"ej. classname.of." +"TransactionFactory" + +#: index.docbook:847 +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#: index.docbook:849 +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"Un nombre JNDI usado por JTATransactionFactory para " +"obtener la UserTransaction JTA del servidor de " +"aplicaciones." + +#: index.docbook:861 +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#: index.docbook:863 +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +"El nombre de clase de un TransactionManagerLookup " +"requerido cuando el chaché a nivel de JVM está habilitado o " +"cuando se usa un generador alto/bajo en un entorno JTA." + +#: index.docbook:867 +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"ej. classname.of." +"TransactionManagerLookup" + +#: index.docbook:875 +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#: index.docbook:877 +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"De habilitarse, la sesión se limpiará (flushed) automá" +"ticamente durante la fase previa a la compleción de la " +"transacción. (Muy útil cuando se usa Hibernate con CMT)." + +#: index.docbook:890 +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#: index.docbook:892 +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"De habilitarse, la sesión será cerrada automáticamente " +"durante la fase posterior a la compleción de la transacción. " +"(Muy útil cuando se usa Hibernate con CMT)." + +#: index.docbook:908 +msgid "Miscellaneous Properties" +msgstr "Propiedades Misceláneas" + +#: index.docbook:921 +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#: index.docbook:923 +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." + +#: index.docbook:928 +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"eg. jta | " +"thread | managed | custom." +"Class" + +#: index.docbook:937 +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#: index.docbook:939 +msgid "Chooses the HQL parser implementation." +msgstr "Elige la implementación de parser HQL." + +#: index.docbook:941 +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"ej. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#: index.docbook:950 +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#: index.docbook:952 +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"Mapeos de símbolos en consultas Hibernate a símbolos SQL. (los " +"símbolos puedem ser nombres de función o literales, por " +"ejemplo)." + +#: index.docbook:955 +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"ej. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" + +#: index.docbook:963 +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#: index.docbook:965 +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +"Exporta automáticamente DDL de esquema cuando al crear la " +"SessionFactory. Con create-drop, el " +"esquema de base de datos será desechado cuando la " +"SessionFactory se cierre explícitamente." + +#: index.docbook:971 +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"ej. update | " +"create | create-drop" + +#: index.docbook:980 +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#: index.docbook:982 +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"Habilita el uso de CGLIB en vez de refleccón en tiempo de " +"ejecución (propiedad a nivel de sistema). La reflección a " +"veces puede ser útil ante la aparición de problemas. Observa " +"que Hibernate siempre requiere CGLIB incluso si desactivas el optimizador. " +"No puedes establecer esta propiedad en hibernate.cfg.xml." + +#: index.docbook:998 +msgid "SQL Dialects" +msgstr "SQL Dialects" + +#: index.docbook:1000 +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." + +#: index.docbook:1008 +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Dialectos SQL de Hibernate(hibernate.dialect)" + +#: index.docbook:1016 +msgid "RDBMS" +msgstr "RDBMS" + +#: index.docbook:1017 +msgid "Dialect" +msgstr "Dialecto" + +#: index.docbook:1022 +msgid "DB2" +msgstr "DB2" + +#: index.docbook:1022 +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#: index.docbook:1025 +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#: index.docbook:1025 +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#: index.docbook:1028 +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#: index.docbook:1028 +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#: index.docbook:1031 +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#: index.docbook:1031 +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#: index.docbook:1034 +msgid "MySQL" +msgstr "MySQL" + +#: index.docbook:1034 +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#: index.docbook:1037 +msgid "MySQL with InnoDB" +msgstr "MySQL con InnoDB" + +#: index.docbook:1037 +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#: index.docbook:1040 +msgid "MySQL with MyISAM" +msgstr "MySQL con MyISAM" + +#: index.docbook:1040 +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#: index.docbook:1043 +msgid "Oracle (any version)" +msgstr "Oracle (cualquier versión)" + +#: index.docbook:1043 +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#: index.docbook:1046 +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#: index.docbook:1046 +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#: index.docbook:1049 +msgid "Sybase" +msgstr "Sybase" + +#: index.docbook:1049 +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#: index.docbook:1052 +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#: index.docbook:1052 +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#: index.docbook:1055 +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#: index.docbook:1055 +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#: index.docbook:1058 +msgid "SAP DB" +msgstr "SAP DB" + +#: index.docbook:1058 +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#: index.docbook:1061 +msgid "Informix" +msgstr "Informix" + +#: index.docbook:1061 +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#: index.docbook:1064 +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#: index.docbook:1064 +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#: index.docbook:1067 +msgid "Ingres" +msgstr "Ingres" + +#: index.docbook:1067 +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#: index.docbook:1070 +msgid "Progress" +msgstr "Progress" + +#: index.docbook:1070 +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#: index.docbook:1073 +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#: index.docbook:1073 +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#: index.docbook:1076 +msgid "Interbase" +msgstr "Interbase" + +#: index.docbook:1076 +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#: index.docbook:1079 +msgid "Pointbase" +msgstr "Pointbase" + +#: index.docbook:1079 +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#: index.docbook:1082 +msgid "FrontBase" +msgstr "FrontBase" + +#: index.docbook:1082 +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#: index.docbook:1085 +msgid "Firebird" +msgstr "Firebird" + +#: index.docbook:1085 +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#: index.docbook:1094 +msgid "Outer Join Fetching" +msgstr "Recuperación por Unión Externa (Outer Join Fetching)" + +#: index.docbook:1096 +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"Si tu base de datos soporta uniones externas del estilo ANSI, Oracle o " +"Sybase, la recuperación por unión externa " +"aumentará frecuentemente el rendimiento limitando el número de " +"llamadas a la base de datos (al costo de más trabajo posiblemente " +"realizado por la base de datos misma). La recuperación por unió" +"n externa permite que un grafo completo de objetos conectados por " +"asociaciones muchos-a-uno, uno-a-muchos, muchos-a-muchos y uno-a-uno sea " +"traído en una sola SELECT SQL." + +#: index.docbook:1105 +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"La recuperación por unión externa puede ser deshabilitada " +"globalmente estableciendo la propiedad " +"hibernate.max_fetch_depth a 0. Un " +"valor de 1 o mayor habilita la recuperación por " +"unión externa para asociaciones uno-a-uno y muchos-a-uno que hayan " +"sido mapeadas con fetch=\"join\"." + +#: index.docbook:1113 +msgid "See for more information." +msgstr "" +"Ver para más " +"información." + +#: index.docbook:1120 +msgid "Binary Streams" +msgstr "Flujos Binarios" + +#: index.docbook:1122 +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"Oracle limita el tamaño de arrays de byte que " +"puedan ser pasados a/desde su driver JDBC. Si deseas usar instancias grandes " +"de tipo binary o serializable, debes " +"habilitar hibernate.jdbc.use_streams_for_binary. " +"Esta es una propiedad a nivel de sistema solamente." + +#: index.docbook:1133 +msgid "Second-level and query cache" +msgstr "Caché de segundo nivel y de lectura" + +#: index.docbook:1135 +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"Las propiedades prefijadas por hibernate.cache te " +"permiten usar un sistema de caché de segundo nivel en el á" +"mbito de un proceso o cluster con Hibernate. Ver para más detalles." + +#: index.docbook:1145 +msgid "Query Language Substitution" +msgstr "Sustitución de Lenguaje de Consulta" + +#: index.docbook:1147 +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"Puedes definir nuevos símbolos de consulta de Hibernate usando " +"hibernate.query.substitutions. Por ejemplo:" + +#: index.docbook:1152 +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions true=1, false=0" + +#: index.docbook:1154 +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"causaría que los símbolos true y " +"false sean traducidos a literales enteros en el SQL " +"generado." + +#: index.docbook:1159 +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#: index.docbook:1161 +msgid "would allow you to rename the SQL LOWER function." +msgstr "" +"te permitiría renombrar la función LOWER de " +"SQL." + +#: index.docbook:1168 +msgid "Hibernate statistics" +msgstr "Hibernate statistics" + +#: index.docbook:1170 +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"Si habilitas hibernate.generate_statistics, Hibernate " +"expondrá un número de métricas que son útiles al " +"afinar un sistema en ejecución vía SessionFactory." +"getStatistics(). Hibernate puede incluso ser configurado para " +"exponer estas estadísticas vía JMX. Lee el Javadoc de las " +"interfaces en org.hibernate.stats para más " +"información." + +#: index.docbook:1182 +msgid "Logging" +msgstr "Registros de mensajes (Logging)" + +#: index.docbook:1184 +msgid "Hibernate logs various events using Apache commons-logging." +msgstr "Hibernate registra varios eventos usando commons-logging de Apache." + +#: index.docbook:1188 +msgid "" +"The commons-logging service will direct output to either Apache Log4j (if " +"you include log4j.jar in your classpath) or JDK1.4 " +"logging (if running under JDK1.4 or above). You may download Log4j from " +"http://jakarta.apache.org. To use Log4j you will need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" +"El servicio de commons-logging saldrá directamente ya sea a Log4J (si " +"incluyes log4j.jar in your classpath) o JDK1.4 logging " +"(al ejecutar bajo JDK1.4 o superior). Puedes descargar Log4J desde " +"http://logging.apache.org. Para usar Log4J " +"necesitarás colocar un fichero log4j.properties en " +"tu classpath. Un fichero de propiedades de ejemplo se distribuye con " +"Hibernate en el directorio src/." + +#: index.docbook:1198 +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"Recomendamos fuertemente que te familiarices con los registros de mensajes " +"de Hibernate. Se ha puesto un gran trabajo en hacer los registros de " +"Hibernate tan detallados como se puede, sin hacerlos ilegibles. Es un " +"dispositivo esencial en la resolución de problemas. Las " +"categorías de registro más interesantes son las siguientes:" + +#: index.docbook:1207 +msgid "Hibernate Log Categories" +msgstr "Categorías de Registro de Hibernate" + +#: index.docbook:1213 +msgid "Category" +msgstr "Categoría" + +#: index.docbook:1214 +msgid "Function" +msgstr "Función" + +#: index.docbook:1219 +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#: index.docbook:1220 +msgid "Log all SQL DML statements as they are executed" +msgstr "Registra todas las sentencias DML de SQL a medida que se ejecutan" + +#: index.docbook:1223 +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#: index.docbook:1224 +msgid "Log all JDBC parameters" +msgstr "Registra todos los parámetros JDBC" + +#: index.docbook:1227 +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#: index.docbook:1228 +msgid "Log all SQL DDL statements as they are executed" +msgstr "Registra todas las sentencias DDL de SQL a medida que se ejecutan" + +#: index.docbook:1231 +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#: index.docbook:1232 +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "" +"Registra el estado de todas las entidades (máximo de 20 entidades) " +"asociadas con la sesión en tiempo de limpieza (flush)" + +#: index.docbook:1238 +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#: index.docbook:1239 +msgid "Log all second-level cache activity" +msgstr "Registra toda la actividad del caché de segundo nivel" + +#: index.docbook:1242 +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#: index.docbook:1243 +msgid "Log transaction related activity" +msgstr "Registra la actividad relacionada con la transacción" + +#: index.docbook:1246 +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#: index.docbook:1247 +msgid "Log all JDBC resource acquisition" +msgstr "Registra toda adquisición de recursos JDBC" + +#: index.docbook:1250 +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.ast" + +#: index.docbook:1251 +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "" +"Regista los ASTs de HQL y SQL, así como otra información sobre " +"análisis de consultas." + +#: index.docbook:1256 +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#: index.docbook:1257 +msgid "Log all JAAS authorization requests" +msgstr "Registra todas las peticiones de autorización JAAS" + +#: index.docbook:1260 +msgid "org.hibernate" +msgstr "org.hibernate" + +#: index.docbook:1261 +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "" +"Registra todo (mucha información, pero muy útil para la " +"resolución de problemas)" + +#: index.docbook:1270 +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"Al desarrollar aplicacinoes con Hibernate, casi siempre debes trabajar con " +"debug habilitado para la categoría org." +"hibernate.SQL o, alternativamente, la propiedad hibernate." +"show_sql habilitada." + +#: index.docbook:1280 +msgid "Implementing a NamingStrategy" +msgstr "Implementando una NamingStrategy" + +#: index.docbook:1282 +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"La interface org.hibernate.cfg.NamingStrategy te permite " +"especificar un \"estándar de nombrado\" para objetos de la base de " +"datos y elementos de esquema." + +#: index.docbook:1287 +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"Puedes proveer reglas para generar automáticamente identificadores de " +"base de datos a partir de identificadores JDBC o para procesar nombres " +"\"lógicos\" de columnas y tablas dados en el fichero de mapeo en " +"nombres \"físicos\" de columnas y tablas. Esta funcionalidad ayuda a " +"reducir la verborragia del documento de mapeo, eliminando ruido repetitivo " +"(prefijos TBL_, por ejemplo). La estrategia por defecto " +"usada por Hibernate mínima en absoluto." + +#: index.docbook:1296 +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"Puedes especificar una estrategia diferente llamando a " +"Configuration.setNamingStrategy() antes de agregar los " +"mapeos:" + +#: index.docbook:1301 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1303 +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"org.hibernate.cfg.ImprovedNamingStrategy es una " +"estrategia prefabricada que puede ser un punto de partida útil para " +"algunas aplicaciones." + +#: index.docbook:1311 +msgid "XML configuration file" +msgstr "Fichero de configuración XML" + +#: index.docbook:1313 +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"Un enfoque alternativo de configuración es especificar una " +"configuración completa en un fichero llamado hibernate.cfg." +"xml. Este fichero puede ser usado como un remplazo del fichero " +"hibernate.properties o, si ambos están presentes, " +"para sobrescribir propiedades." + +#: index.docbook:1320 +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"El fichero de configuración XML se espera por defecto en la raí" +"z o tu CLASSPATH. He aquí un ejemplo:" + +#: index.docbook:1325 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" + +#: index.docbook:1327 +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"Como puedes ver, la ventaja de este enfoque es la externalización de " +"los nombres de los fichero de mapeo a configuración. El " +"hibernate.cfg.xml es también más " +"conveniente una vez que hayas afinado el caché de Hibernate. Observa " +"que elección tuya usar ya sea hibernate.properties " +"o hibernate.cfg.xml, ambos son equivalentes, excepto por " +"los beneficios de usar la sintaxis XML arriba mencionados." + +#: index.docbook:1336 +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "Con la configuración XML, arrancar Hibernate es tan simple como" + +#: index.docbook:1340 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1342 +msgid "You can pick a different XML configuration file using" +msgstr "Puedes tomar un fichero XML diferente usando" + +#: index.docbook:1346 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1351 +msgid "J2EE Application Server integration" +msgstr "Integració con Servidores de Aplicaciones J2EE" + +#: index.docbook:1353 +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "" +"Hibernate tiene los siguientes puntos de integración con la " +"infraestructura J2EE:" + +#: index.docbook:1359 +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"Datasources manejados por contenedor: Hibernate puede " +"usar conexiones JDBC manejadas por el contenedor y provistas a través " +"de JNDI. Usualmente, un TransactionManager compatible con " +"JTA y un ResourceManager cuidan del manejo de " +"transacciones (CMT), esp. manejo de transacciones distribuídas a " +"través de varios datasources. Puedes también, por supuesto, " +"demarcar los límites de las transacciones programáticamente " +"(BMT) o podrías querer usar para esto la API opcional de " +"Transaction de Hibernate para mantener tu código " +"portable." + +#: index.docbook:1374 +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"Ligamento Automático JNDI: Hibernate puede ligar " +"sus SessionFactory a JNDI después del arranque." + +#: index.docbook:1383 +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"Ligamento de Sesión JTA: La Session de Hibernate puede ser ligada automáticamente al á" +"mbito de transacciones JTA si usas EJBs. Simplemente busca la " +"SessionFactory de JNDI y obtén la " +"Session actual. Deja que Hibernate cuide de limpiar y " +"cerrar la Session cuando se complete tu transacció" +"n JTA. La demarcación de transacción es declarativa, en " +"descriptores de despliegue de EJB." + +#: index.docbook:1396 +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"Despliegue JMX: Si tienes un servidor de aplicaciones " +"capaz de JMX (por ejemplo, JBoss AS), puedes optar por desplegar Hibernate " +"como un MBean manejado. Esto te ahorra el código de una línea " +"de arranque para construir tu SessionFactory desde una " +"Configuration. El contenedor arrancará tu " +"HibernateService, e idealmente también " +"cuidará de las dependencias entre servicios (El datasource debe estar " +"disponible antes que arranque Hibernate, etc)." + +#: index.docbook:1407 +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"Dependiendo de tu entorno, podrías tener que establecer la " +"opción de configuración hibernate.connection." +"aggressive_release a true si tu servidor de aplicaciones muestra " +"excepciones \"connection containment\"." + +#: index.docbook:1414 +msgid "Transaction strategy configuration" +msgstr "Configuración de la estrategia de transacción" + +#: index.docbook:1416 +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"La API de Session de Hibernate es independiente de " +"cualquier demarcación de transacción en tu arquitectura. Si " +"dejas que Hibernate use JDBC directamente, a través de un pool de " +"conexiones. puedes comenzar y acabar tus transacciones llamando la API de " +"JDBC. Si ejecutas en un servidor de aplicaciones J2EE, podréas querer " +"usar transacciones manejadas por bean y llamar la API de JTA y " +"UserTransaction cuando sea necesario." + +#: index.docbook:1424 +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"Para mantener tu código portable entre estos dos (y otros) entornos " +"recomendamos la API de Transaction de Hibernate, que " +"envuelve y oculta el sistema subyacente. Tienes que especificar una clase " +"fábrica para las instancias de Transaction " +"estableciendo la propiedad de configuración hibernate." +"transaction.factory_class de Hibernate." + +#: index.docbook:1431 +msgid "There are three standard (built-in) choices:" +msgstr "Hay tres elecciones estándar (prefabricadas):" + +#: index.docbook:1437 +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "org.hibernate.transaction.JDBCTransactionFactory" + +#: index.docbook:1439 +msgid "delegates to database (JDBC) transactions (default)" +msgstr "delega a transacciones de base de datos (JDBC) (por defecto)" + +#: index.docbook:1443 +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#: index.docbook:1445 +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"delega a transacciones manejadas por contenedor si una transacción " +"existente estó por debajo en este contexto (ej. método de un " +"bean de sesión EJB), en otro caso una nueva transacción es " +"comenzada y se usan transacciones manejadas por bean." + +#: index.docbook:1453 +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#: index.docbook:1455 +msgid "delegates to container-managed JTA transactions" +msgstr "delega a transacciones JTA manejadas por contenedor" + +#: index.docbook:1460 +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "" +"Puedes definir también tus propias estrategias de transacción " +"(para un servicio de transacción CORBA, por ejemplo)." + +#: index.docbook:1465 +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Algunas funcionalidades en Hibernate (ej, el caché de segundo nivel, " +"ligamento automático de JTA y Session, etc.) requieren acceso al " +"TransactionManager de JTA en un entorno manejado. En un " +"servidor de aplicaciones tienes que especificar cómo Hibernate debe " +"obtener una referencia al TransactionManager, pues J2EE " +"no estandariza un solo mecanismo:" + +#: index.docbook:1473 +msgid "JTA TransactionManagers" +msgstr "TransactionManagers de JTA" + +#: index.docbook:1479 +msgid "Transaction Factory" +msgstr "Transaction Factory" + +#: index.docbook:1480 +msgid "Application Server" +msgstr "Servidor de Aplicaciones" + +#: index.docbook:1485 +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#: index.docbook:1486 +msgid "JBoss" +msgstr "JBoss" + +#: index.docbook:1489 +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#: index.docbook:1490 +msgid "Weblogic" +msgstr "Weblogic" + +#: index.docbook:1493 +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#: index.docbook:1494 +msgid "WebSphere" +msgstr "WebSphere" + +#: index.docbook:1497 +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#: index.docbook:1498 +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#: index.docbook:1501 +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#: index.docbook:1502 +msgid "Orion" +msgstr "Orion" + +#: index.docbook:1505 +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#: index.docbook:1506 +msgid "Resin" +msgstr "Resin" + +#: index.docbook:1509 +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#: index.docbook:1510 +msgid "JOTM" +msgstr "JOTM" + +#: index.docbook:1513 +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#: index.docbook:1514 +msgid "JOnAS" +msgstr "JOnAS" + +#: index.docbook:1517 +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#: index.docbook:1518 +msgid "JRun4" +msgstr "JRun4" + +#: index.docbook:1521 +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#: index.docbook:1522 +msgid "Borland ES" +msgstr "Borland ES" + +#: index.docbook:1531 +msgid "JNDI-bound SessionFactory" +msgstr "SessionFactory ligada a JNDI" + +#: index.docbook:1533 +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"Una SessionFactory de Hibernate ligada a JNDI puede " +"simplificar la obtención de la fábrica y la creación de " +"nuevas Sessions. Observa que esto no está " +"relacionado a un Datasource ligado a JNDI, simplemente " +"ambos usan el mismo registro!" + +#: index.docbook:1540 +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"Si deseas tener la SessionFactory ligada a un espacio de " +"nombres de JNDI, especifica un nombre (ej. java:hibernate/" +"SessionFactory) usando la propiedad hibernate." +"session_factory_name. Si esta propiedad es omitida, la " +"SessionFactory no será ligada a JNDI (Esto es " +"especialmente útil en entornos con una implementació JNDI de " +"sólo lectura por defecto, ej. Tomcat.)" + +#: index.docbook:1548 +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"Al ligar la SessionFactory a JNDI, Hibernate usará " +"los valores de hibernate.jndi.url, hibernate." +"jndi.class para instanciar un contexto inicial. Si étos no " +"se especifican, se usará el InitialContext por " +"defecto." + +#: index.docbook:1555 +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"Hibernate colocará automáticamente la SessionFactory en JNDI después que llames a cfg.buildSessionFactory" +"(). Esto significa que tendrás al menos esta llamada en " +"algún código de arranque (o clase de utilidad) en tu " +"aplicación, a menos qie uses el despliegue JMX con el " +"HibernateService (discutido luego)." + +#: index.docbook:1562 +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"UNTRANSLATED! If you use a JNDI SessionFactory, an EJB or " +"any other class may obtain the SessionFactory using a " +"JNDI lookup." + +#: index.docbook:1567 +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"Si usas una SessionFactory de JNDI, un EJB o cualquier " +"otra clase puede obtener la SessionFactory usando una " +"búsqueda JNDI. Observa que esta configuración no es necesaria " +"si usas la clase de ayuda HibernateUtil introducida en el " +"capítulo uno, que actúa como un registro Singleton. Sin " +"embargo, HibernateUtil es más común en un " +"entorno no manejado." + +#: index.docbook:1579 +msgid "Current Session context management with JTA" +msgstr "Ligado automático de JTA y Session" + +#: index.docbook:1581 +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"UNTRANSLATED! The easiest way to handle Sessions and " +"transactions is Hibernates automatic \"current\" Session " +"management. See the discussion of current sessions. Using the \"jta\" " +"session context, if there is no Hibernate Session " +"associated with the current JTA transaction, one will be started and " +"associated with that JTA transaction the first time you call " +"sessionFactory.getCurrentSession(). The Sessions retrieved via getCurrentSession() in " +"\"jta\" context will be set to automatically flush before the " +"transaction completes, close after the transaction completes, and " +"aggressively release JDBC connections after each statement. This allows the " +"Sessions to be managed by the life cycle of the JTA " +"transaction to which it is associated, keeping user code clean of such " +"management concerns. Your code can either use JTA programmatically through " +"UserTransaction, or (recommended for portable code) use " +"the Hibernate Transaction API to set transaction " +"boundaries. If you run in an EJB container, declarative transaction " +"demarcation with CMT is preferred." + +#: index.docbook:1604 +msgid "JMX deployment" +msgstr "Despliegue JMX" + +#: index.docbook:1606 +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"La línea cfg.buildSessionFactory() todavía " +"tiene que ser ejecutada en algun sitio para obtener una " +"SessionFactory en JNDI. Puedes hacer esto bien en un " +"bloque inicializador static (como aquel en " +"HibernateUtil) o bien despliegas Hibernate como un " +"servicio manejado." + +#: index.docbook:1614 +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"Hibernate se distribuye con org.hibernate.jmx.HibernateService para despliegue en un servidor de aplicaciones con capacidades JMX, " +"como JBoss AS. El despliegue y la configuracón reales son " +"específicos del vendedor. He aquí un jboss-service." +"xml de ejemplo para JBoss 4.0.x:" + +#: index.docbook:1621 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" + +#: index.docbook:1623 +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"Este fichero es desplegado en un directorio llamado META-INF y empaquetado en un fichero JAR con la extensión ." +"sar (fichero de servicio). También necesitas empaquetar " +"Hibernate, sus bibliotecas de terceros requeridas, tus clases persistentes " +"compiladas, así como tus ficheros de mapeo en el mismo fichero. Tus " +"beans de empresa (usualmente beans de sesión) pueden ser mantenidos " +"en su propio fichero JAR, pero debes incluir este fichero EJB JAR en el " +"fichero de servicio principal para obtener una unidad desplegable (en " +"caliente). Consulta la documentación de JBoss AS para más " +"información sobre el servicio JMX y despliegue de EJB." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/events.po b/documentation/envers/src/main/docbook/es-ES/content/events.po new file mode 100644 index 0000000000..0a8229fe4f --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/events.po @@ -0,0 +1,538 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Interceptors and events" +msgstr "Interceptores y eventos" + +#: index.docbook:7 +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"Frecuentemente es útil para la aplicación reaccionar a ciertos " +"eventos que ocurran dentro de Hibernate. Esto permite la implementació" +"n de ciertos tipos de funcionalidade genérica, y extensión de " +"la funcionalidad de Hibernate." + +#: index.docbook:14 +msgid "Interceptors" +msgstr "Interceptores" + +#: index.docbook:16 +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"La interface Interceptor provee callbacks desde la " +"sesión a la aplicación permitiendo a ésta última " +"inspeccionar y/o manipular las propiedades de un objeto persistente antes " +"que sea salvado, actualizado, borrado o cargado. Un uso posible de esto es " +"seguir la pista de información de auditoría. Por ejemplo, el " +"siguiente Interceptor establece automáticamente el " +"createTimestamp cuando un Auditable es " +"creado y actualiza la propiedad lastUpdateTimestamp " +"cuando un Auditable es acutalizado." + +#: index.docbook:27 +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"UNTRANSLATED! You may either implement Interceptor " +"directly or (better) extend EmptyInterceptor." + +#: index.docbook:32 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:34 +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"UNTRANSLATED! Interceptors come in two flavors: Session-" +"scoped and SessionFactory-scoped." + +#: index.docbook:39 +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"UNTRANSLATED! A Session-scoped interceptor is specified " +"when a session is opened using one of the overloaded SessionFactory." +"openSession() methods accepting an Interceptor." + +#: index.docbook:45 +msgid "" +msgstr "" +"" + +#: index.docbook:47 +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"UNTRANSLATED! A SessionFactory-scoped interceptor is " +"registered with the Configuration object prior to " +"building the SessionFactory. In this case, the supplied " +"interceptor will be applied to all sessions opened from that " +"SessionFactory; this is true unless a session is opened " +"explicitly specifying the interceptor to use. SessionFactory-scoped interceptors must be thread safe, taking care to not store " +"session-specific state since multiple sessions will use this interceptor " +"(potentially) concurrently." + +#: index.docbook:56 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:61 +msgid "Event system" +msgstr "Sistema de eventos" + +#: index.docbook:63 +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"Si tienes que reaccionar a eventos particulares en tu capa de persistencia, " +"puedes también la arquitectura de eventos de " +"Hibernate3. El sistema de eventos puede ser usado en adición o como " +"un remplazo a los interceptores." + +#: index.docbook:69 +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"Esencialmente todos los métodos de la interface Session se correlacionan con un evento. Tienes un LoadEvent, un FlushEvent, etc (consulta el DTD del fichero " +"de configuración XML o el paquete org.hibernate.event para la lista completa de tipos de evento definidos). Cuando se " +"hace una petición de uno de estos métodos, la " +"Session de Hibernate genera un evento apropiado y se lo " +"pasa al oyente (listener) de eventos configurado para ese tipo. De fá" +"brica, estos oyentes implementan el mismo procesamiento en los que siempre " +"resultan aquellos métodos. Sin embargo, eres libre de implementar una " +"personalización de una de las interfaces oyentes (es decir, el " +"LoadEvent es procesado por la implementación " +"registrada de la interface LoadEventListener), en cuyo " +"caso su implementación sería responsable de procesar cualquier " +"petición load() hecha a la Session." + +#: index.docbook:84 +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"Los oyentes deben ser considerados efectivamente singletons; quiere decir, " +"que son compartidos entre las peticiones, y por lo tanto no guardan " +"ningún estado en variables de instancia." + +#: index.docbook:89 +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"Un oyente personalizado debe implementar la interface apropiada para el " +"evento que quiere procesar y/o extender una de las clases base de " +"conveniencia (o incluso los oyentes de eventos por defecto usados por " +"Hibernate de fábrica al ser éstos declarados non-final para " +"este propósito). Los oyentes personalizados pueden ser registrados " +"programáticamente a través del objeto Configuration, o especificados en el XML de configuración de Hibernate (la " +"declaración declarativa a través del fichero de propiedades no " +"está soportada). He aquí un ejemplo de un oyente personalizado " +"de eventos load:" + +#: index.docbook:99 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:101 +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "" +"Necesitas además una entrada de configuración dicié" +"ndole a Hibernate que use el oyente en vez del oyente por defecto:" + +#: index.docbook:106 +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" + +#: index.docbook:108 +msgid "Instead, you may register it programmatically:" +msgstr "En cambio, puedes registrarlo programáticamente:" + +#: index.docbook:112 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:114 +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"Los oyentes registrados declarativamente no pueden compartir instancias. Si " +"el mismo nombre de clase es usado en múltiples elementos <" +"listener/>, cada referencia resultará en una instancia " +"separada de esa clase. Si necesitas la capacidad de compartir instancias de " +"oyentes entre tipos de oyente debes usar el enfoque de registración " +"programática." + +#: index.docbook:122 +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"¿Por qué implementar una interface y definir el tipo " +"espcífico durante la configuración? Bueno, una " +"implementación de oyente podría implementar múltiples " +"interfaces de oyente de eventos. Teniendo el tipo definido adicionalmente " +"durante la registración lo hace más fácil para activar " +"o desactivar oyentes personalizados durante la configuración." + +#: index.docbook:132 +msgid "Hibernate declarative security" +msgstr "Seguridad declarativa de Hibernate" + +#: index.docbook:133 +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"Usualmente, la seguridad declarativa en aplicaciones Hibernate es manejada " +"en una capa de fachada de sesión. Ahora, Hibernate3 permite que " +"ciertas acciones sean permitidas vía JACC, y autorizadas vía " +"JAAS. Esta en una funcionalidad opcional construída encima de la " +"arquitectura de eventos." + +#: index.docbook:139 +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"Primero, debes configurar los oyentes de eventos apropiados, para habilitar " +"el uso de autorización JAAS." + +#: index.docbook:144 +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"]]>" + +#: index.docbook:146 +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"UNTRANSLATED! Note that <listener type=\"...\" class=\"...\"/>" +" is just a shorthand for <event type=\"...\"><" +"listener class=\"...\"/></event> when there is exactly " +"one listener for a particular event type." + +#: index.docbook:152 +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"Seguido, aún en hibernate.cfg.xml, liga los " +"permisos a roles:" + +#: index.docbook:156 +msgid "" +"\n" +"]]>" +msgstr "" +"\n" +"]]>" + +#: index.docbook:158 +msgid "The role names are the roles understood by your JACC provider." +msgstr "Los nombres de role son los roles entendidos por tu proveedor de JACC." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/example_mappings.po b/documentation/envers/src/main/docbook/es-ES/content/example_mappings.po new file mode 100644 index 0000000000..31319a915b --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/example_mappings.po @@ -0,0 +1,1251 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:20 +msgid "Example: Various Mappings" +msgstr "Ejemplo: Varios Mapeos" + +#: index.docbook:22 +msgid "This chapters shows off some more complex association mappings." +msgstr "" +"Este capítulo muestra mapeos de asociaciones más complejos." + +#: index.docbook:27 +msgid "Employer/Employee" +msgstr "Empleador/Empleado" + +#: index.docbook:29 +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"El siguiente modelo de la relación entre Employer " +"y Employee usa una clase de entidad real " +"(Employment) para representar la asociación. Esto " +"se ha hecho esto porque podría haber más de un período " +"de empleo para los mismos dos participantes. Se usan componentes para " +"modelar valores monetarios y nombres de empleado." + +#: index.docbook:46 +msgid "Heres a possible mapping document:" +msgstr "He aquí un documento de mapeo posible:" + +#: index.docbook:50 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:52 +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "" +"Y he aquí el esquema de tablas generado por SchemaExport." + +#: index.docbook:56 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:61 +msgid "Author/Work" +msgstr "Autor/Obra" + +#: index.docbook:63 +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"Considera el siguiente modelo de las relaciones entre Work, Author y Person. " +"Representamos la relación entre Work y " +"Author como una asociación muchos-a-muchos. " +"Elegimos representar la relación entre Author y " +"Person como una asociación uno-a-uno. Otra " +"posibilidad hubiese sido que Author extendiera " +"Person." + +#: index.docbook:81 +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "" +"El siguiente documento de mapeo representa estas relaciones correctamente:" + +#: index.docbook:85 +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:87 +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"Hay cuatro tablas en este mapeo. works, authors y persons tienen los datos de obra, autor y " +"persona respectivamente. author_work es una tabla de " +"asociación enlazando autores a obras. He aquí el esquema de " +"tablas, tal como fue generado por SchemaExport." + +#: index.docbook:95 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:100 +msgid "Customer/Order/Product" +msgstr "Cliente/Orden/Producto" + +#: index.docbook:102 +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"Ahora considera un modelo de las relaciones entre Customer, Order y LineItem y " +"Product. Hay una asociación uno-a-muchos entre " +"Customer y Order, pero, ¿" +"cómo deberíamos representar Order / " +"LineItem / Product? He elegido mapear " +"LineItem como una clase de asociación " +"representando la asociación muchos-a-muchos entre Order y Product. En Hibernate, esto se llama un " +"elemento compuesto." + +#: index.docbook:122 +msgid "The mapping document:" +msgstr "El documento de mapeo:" + +#: index.docbook:126 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:128 +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers, orders, " +"line_items y products tienen los datos " +"de cliente, orden, ítem de línea de orden y producto " +"respectivamente. Además line_items actúa " +"como una tabla de asociación enlazando órdenes con productos." + +#: index.docbook:135 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:140 +msgid "Miscellaneous example mappings" +msgstr "Mapeos misceláneos de ejemplo" + +#: index.docbook:142 +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"Todos estos ejemplos están tomados de la batería de pruebas de " +"Hibernate. Encontrarás muchos otros mapeos de ejemplo útiles " +"allí. Mira en la carpeta test de la " +"distribución de Hibernate." + +#: index.docbook:148 +msgid "TODO: put words around this stuff" +msgstr "POR HACER: poner palabras alrededor de este material" + +#: index.docbook:151 +msgid "\"Typed\" one-to-one association" +msgstr "Asociación uno-a-uno \"Tipificada\"" + +#: index.docbook:152 +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:156 +msgid "Composite key example" +msgstr "Ejemplo de clave compuesta" + +#: index.docbook:157 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:161 +msgid "Many-to-many with shared composite key attribute" +msgstr "Muchos-a-muchos con atributo de clave compuesta compartido" + +#: index.docbook:162 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:166 +msgid "Content based discrimination" +msgstr "Discriminación basada en contenido" + +#: index.docbook:167 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:171 +msgid "Associations on alternate keys" +msgstr "Asociaciones sobre claves alternativas" + +#: index.docbook:172 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/example_parentchild.po b/documentation/envers/src/main/docbook/es-ES/content/example_parentchild.po new file mode 100644 index 0000000000..42f2de6a14 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/example_parentchild.po @@ -0,0 +1,586 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Example: Parent/Child" +msgstr "Ejemplo: Padre/Hijo" + +#: index.docbook:7 +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"Una de las primerísimas cosas que los usuarios nuevos intentan hacer " +"con Hibernate es modelar una relación de tipo padre / hijo. Para esto " +"hay dos enfoques diferentes. Por varias razones, el enfoque más " +"conveniente, especialmente para usuarios nuevos, es modelar tanto " +"Parent como Child como clases de " +"entidad con una asociación <one-to-many> " +"desde Parent a Child. (El enfoque " +"alternativo es declarar el Child como un <" +"composite-element>.) Ahora, resulta que la semántica por " +"defecto de una asociación uno a muchos (en Hibernate) es mucho menos " +"cercana a la semántica usual de una relación padre / hijo que " +"aquellas de un mapeo de elementos compuestos. Explicaremos cómo usar " +"una asociación uno a muchos bidireccional con tratamiento " +"en cascada para modelar una relación padre / hijo " +"eficiente y elegantemente. ¡No es para nada difícil!" + +#: index.docbook:21 +msgid "A note about collections" +msgstr "Una nota sobre las colecciones" + +#: index.docbook:23 +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Se considera que las colecciones de Hibernate son una parte lógica de " +"la entidad que las posee; nunca de las entidades contenidas. ¡Esta es " +"una distinción crucial! Esto tiene las siguientes consecuencias:" + +#: index.docbook:30 +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "" +"Cuando se quita / añade un objeto desde / a una colección, se " +"incrementa el número de versión del dueño de la " +"colección." + +#: index.docbook:36 +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"Si un objeto que fue quitado de una colección es una instancia de un " +"tipo de valor (por ejemplo, un elemento compuesto), ese objeta cesará " +"de ser persistente y su estado será completamente quitado de la base " +"de datos. Asimismo, añadir una instancia de tipo de valor a la " +"colección causará que su estado sea inmediatamente persistente." + +#: index.docbook:44 +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"Por otro lado, si se quita una entidad de una colección (una " +"asociación uno-a-muchos o muchos-a-muchos), no será borrado, " +"por defecto. Este comportamiento es completamente consistente. ¡Un " +"cambio en el estado interno de otra entidad no hace desaparecer la entidad " +"asociada! Asimismo, añadir una entidad a una colección no " +"causa que la entidad se vuelva persistente, por defecto." + +#: index.docbook:54 +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"En cambio, el comportamiento por defecto es que al añadir una entidad " +"a una colección se crea meramente un enlace entre las dos entidades, " +"mientras que al quitarla se quita el enlace. Esto es muy apropiado para " +"todos los tipos de casos. Donde no es para nada apropiado es en el caso de " +"una relación padre / hijo. donde la vida del hijo está ligada " +"al ciclo de vida del padre." + +#: index.docbook:64 +msgid "Bidirectional one-to-many" +msgstr "Uno-a-muchos bidirectional" + +#: index.docbook:66 +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "" +"Supón que empezamos con una asociación simple <one-" +"to-many> desde Parent a Child." + +#: index.docbook:71 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:73 +msgid "If we were to execute the following code" +msgstr "Si ejecutásemos el siguiente código" + +#: index.docbook:77 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:79 +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernate publicaría dos sentencias SQL:" + +#: index.docbook:85 +msgid "" +"an INSERT to create the record for c" +msgstr "" +"un INSERT para crear el registro de c" + +#: index.docbook:88 +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"un UPDATE para crear el enlace desde p " +"a c" + +#: index.docbook:95 +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"Esto no es sólo ineficiente, sino que además viola cualquier " +"restricción NOT NULL en la columna " +"parent_id. Podemos reparar la violación de " +"restricción de nulabilidad especificando not-null=\"true\" en el mapeo de la colección:" + +#: index.docbook:101 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:103 +msgid "However, this is not the recommended solution." +msgstr "Sin embargo, esta no es la solución recomendada." + +#: index.docbook:106 +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"El caso subyacente de este comportamiento es que el enlace (la clave " +"foránea parent_id) de p a " +"c no es considerado parte del estado del objeto " +"Child y por lo tanto no es creada en el INSERT. De modo que la solución es hacer el enlace parte del mapeo " +"del Child." + +#: index.docbook:113 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:115 +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(Necesitamos además añadir la propiedad parent a la clase Child.)" + +#: index.docbook:119 +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"Ahora que la entidad Child está gestionando el " +"estado del enlace, le decimos a la colección que no actualice el " +"enlace. Usamos el atributo inverse." + +#: index.docbook:124 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:126 +msgid "The following code would be used to add a new Child" +msgstr "" +"El siguiente código podría ser usado para añadir un " +"nuevo Child" + +#: index.docbook:130 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:132 +msgid "And now, only one SQL INSERT would be issued!" +msgstr "" +"Y ahora, ¡Sólo se publicaría un INSERT de SQL!" + +#: index.docbook:136 +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"Para ajustar un poco más las cosas, podríamos crear un " +"método addChild() en Parent." + +#: index.docbook:141 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:143 +msgid "Now, the code to add a Child looks like" +msgstr "" +"Ahora, el código para añadir un Child se ve " +"así" + +#: index.docbook:147 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:152 +msgid "Cascading life cycle" +msgstr "Ciclo de vida en cascada" + +#: index.docbook:154 +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"La llamada explícita a save() es aún " +"molesta. Apuntaremos a esto usando tratamientos en cascada." + +#: index.docbook:159 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:161 +msgid "This simplifies the code above to" +msgstr "Esto simplifica el código anterior a" + +#: index.docbook:165 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:167 +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"Similarmente, no necesitamos iterar los hijos al salvar o borrar un " +"Parent. Lo siguiente quita p y todos " +"sus hijos de la base de datos." + +#: index.docbook:172 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:174 +msgid "However, this code" +msgstr "Sin embargo, este código" + +#: index.docbook:178 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:180 +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"no quitará c de la base de datos; sólo " +"quitará el enlace a p (y causará una " +"violación a una restricción NOT NULL). " +"Necesitas borrar el hijo explícitamente llamando a delete()." + +#: index.docbook:186 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:188 +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"Ahora, en nuestro caso, un Child no puede existir " +"realmente sin su padre. De modo que si quitamos un Child " +"de la colección, realmente queremos que sea borrado. Para esto, " +"debemos usar cascade=\"all-delete-orphan\"." + +#: index.docbook:194 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:196 +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"Nota: aunque el mapeo de la colección especifique inverse=" +"\"true\", el tratamiento en cascada se procesa aún al " +"iterar los elementos de colección. De modo que si requieres que un " +"objeto sea salvado, borrado o actualizado en cascada, debes añadirlo " +"a la colección. No es suficiente con simplemente llamar a " +"setParent()." + +#: index.docbook:206 +msgid "Cascades and unsaved-value" +msgstr "Tratamiento en cascada y unsaved-value" + +#: index.docbook:208 +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"Supón que hemos cargado un Parent en una " +"Session, hemos hecho algunos cambios en una acción " +"de UI y deseamos hacer persistentes estos cambios en una nueva sesión " +"llamando a update(). El Parent " +"contendrá una colección de hijos y, ya que está " +"habilitado el tratamiento en cascada, Hibernate necesita saber qué " +"hijos están recién instanciados y cuáles representan " +"filas existentes en la base de datos. Asumamos que tanto Parent como Child tienen propiedades identificadoras " +"generadas de tipo Long. Hibernate usará el " +"identificador y el valor de la propiedad de versión/timestamp para " +"determinar cuáles de los hijos son nuevos. (Ver .) En Hibernate3, no es más " +"necesario especificar un unsaved-value explí" +"citamente." + +#: index.docbook:220 +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"The following code will update parent and child and insert newChild." + +#: index.docbook:225 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:227 +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"Bueno, todo eso está muy bien para el caso de un identificador " +"generado, pero ¿qué de los identificadores asignados y de los " +"identificadores compuestos? Esto es más difícil, ya que " +"Hibernate no puede usar la propiedad identificadora para distinguir entre un " +"objeto recién instanciado (con un identificador asignado por el " +"usuario) y un objeto cargado en una sesión previa. En este caso, " +"Hibernate bien usará la propiedad de versión o timestamp, o " +"bien consultará realmente el caché de segundo nivel, o bien, " +"en el peor de los casos, la base de datos, para ver si existe la fila." + +#: index.docbook:260 +msgid "Conclusion" +msgstr "Conclusión" + +#: index.docbook:262 +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"Hay que resumir un poco aquí y podría parecer confuso a la " +"primera vez. Sin embargo, en la práctica, todo funciona muy " +"agradablemente. La mayoría de las aplicaciones de Hibernate usan el " +"patrón padre / hijo en muchos sitios." + +#: index.docbook:267 +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"Hemos mencionado una alternativa en el primer párrafo. Ninguno de los " +"temas anteriores existe en el caso de los mapeos <composite-" +"element>, que tienen exactamente la semántica de una " +"relación padre / hijo. Desafortunadamente, hay dos grandes " +"limitaciones para las clases de elementos compuestos: los elementos " +"compuestos no pueden poseer sus propias colecciones, y no deben ser el hijo " +"de cualquier otra entidad que no sea su padre único." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/example_weblog.po b/documentation/envers/src/main/docbook/es-ES/content/example_weblog.po new file mode 100644 index 0000000000..348374d106 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/example_weblog.po @@ -0,0 +1,852 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Example: Weblog Application" +msgstr "Ejemplo: Aplicación de Weblog" + +#: index.docbook:8 +msgid "Persistent Classes" +msgstr "Clases Persistentes" + +#: index.docbook:10 +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"Las clases persistentes representan un weblog, y un ítem enviado a un " +"weblog. Van a ser modelados como una relación padre/hijo estñ" +"ndar, pero usaremos un bag ordenado, en vez de un conjunto (set)." + +#: index.docbook:16 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:18 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:23 +msgid "Hibernate Mappings" +msgstr "Mapeos de Hibernate" + +#: index.docbook:25 +msgid "The XML mappings should now be quite straightforward." +msgstr "Los mapeos XML ahora deben ser absolutamente directos." + +#: index.docbook:29 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" + +#: index.docbook:31 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" + +#: index.docbook:36 +msgid "Hibernate Code" +msgstr "Código Hibernate" + +#: index.docbook:38 +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "" +"La siguiente clase demuestra algunos de los tipos de cosas que podemos haces " +"con estas clases, usando Hibernate." + +#: index.docbook:43 +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/filters.po b/documentation/envers/src/main/docbook/es-ES/content/filters.po new file mode 100644 index 0000000000..de3c50ca57 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/filters.po @@ -0,0 +1,303 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Filtering data" +msgstr "Filtrando datos" + +#: index.docbook:7 +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"Hibernate3 provee un nuevo enfoque innovador para manejar datos con reglas " +"de \"visibilidad\". Un filtro de Hibernate es un filtro " +"global, con nombre y parametrizado que puede ser habilitado o deshabilitado " +"para una sesión de Hibernate en particular." + +#: index.docbook:14 +msgid "Hibernate filters" +msgstr "Filtros de Hibernate" + +#: index.docbook:16 +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"Hibernate3 añade la habilidad de predefinir criterios de filtros y unir esos " +"filtros tanto a nivel de una clase como de una colección. Un criterio de " +"filtro es la habilidad de definir una cláusula de restricción muy similar al " +"atributo existente \"where\" disponible en el elemento class y varios " +"elementos de colección. Excepto en que estos filtros pueden ser " +"parametrizados. La aplicación puede tomar la decisión en tiempo de ejecución " +"de qué filtros deben estar habilitados y cuáles deben ser sus parámetros. " +"Los filtros pueden ser usados como vistas de base de datos, pero " +"parametrizados dentro de la aplicación." + +#: index.docbook:26 +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"Para usar los filtros, éstos deben primero ser definidos y luego unidos a " +"los elementos de mapeo apropiados. Para definir un filtro, usa el elemento " +"<filter-def/> dentro de un elemento <" +"hibernate-mapping/>:" + +#: index.docbook:32 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +"]]>" + +#: index.docbook:34 +msgid "Then, this filter can be attached to a class:" +msgstr "Entonces este filtro puede ser unido a una clase:" + +#: index.docbook:38 +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:40 +msgid "or, to a collection:" +msgstr "o a una colección:" + +#: index.docbook:44 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +"]]>" + +#: index.docbook:46 +msgid "or, even to both (or multiples of each) at the same time." +msgstr "o incluso a ambos (o muchos de cada uno) al mismo tiempo." + +#: index.docbook:50 +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enabledFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Los métodos en Session son: enableFilter(String " +"filterName), getEnabledFilter(String filterName), y disableFilter(String filterName). Por " +"defecto, los filtros no están habilitados para una " +"sesión dada; deben ser habilitados explícitamente por medio del uso del " +"método Session.enableFilter(), que devuelve una instancia " +"de la interface Filter. Usando el filtro simple definido " +"arriba, esto se vería así:" + +#: index.docbook:59 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:61 +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"Nota que los métodos en la interface org.hibernate.Filter permiten el " +"encadenamiento de métodos común en gran parte de Hibernate." + +#: index.docbook:65 +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "" +"Un ejemplo completo, usando datos temporales con un patrón efectivo de " +"fechas de registro:" + +#: index.docbook:69 +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:71 +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"Entonces, en orden de asegurar que siempre tendrás de vuelta registros " +"actualmente efectivos, simplemente habilita el filtro en la sesión previo a " +"recuperar los datos de empleados:" + +#: index.docbook:76 +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" + +#: index.docbook:78 +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"En el HQL de arriba, aunque sólo hemos mencionado explícitamente una " +"restricción de salario en los resultados, debido al filtro habilitado la " +"consulta sólo devolverá empleados actualmente activos que tengan un salario " +"mayor que un millón de dólares." + +#: index.docbook:84 +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"Nota: si planeas usar filtros con unión externa (outer joining) (bien a " +"través de HQL, o bien de recuperación de carga) sé cuidadoso en la dirección " +"de expresión de la condición. Lo más seguro es establecer esto para unión " +"externa izquierda (left outer joining). En general, coloca el primer " +"parámetro seguido del nombre(s) de columna(s) después del operador." + +#: index.docbook:91 +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "" + +#: index.docbook:98 +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#: index.docbook:100 +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/es-ES/content/inheritance_mapping.po new file mode 100644 index 0000000000..7777f50aba --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/inheritance_mapping.po @@ -0,0 +1,844 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Inheritance Mapping" +msgstr "Mapeo de Herencia" + +#: index.docbook:8 +msgid "The Three Strategies" +msgstr "Las Tres Estrategias" + +#: index.docbook:10 +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "" +"Hibernate soporta las tres estrategias básicas de mapeo de herencia:" + +#: index.docbook:16 +msgid "table per class hierarchy" +msgstr "tabla por jerarquía de clases" + +#: index.docbook:21 +msgid "table per subclass" +msgstr "tabla por subclase" + +#: index.docbook:26 +msgid "table per concrete class" +msgstr "tabla por clase concreta" + +#: index.docbook:32 +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "" +"En adición, Hibernate soporta un cuarto, ligeramente diferente tipo " +"de polimorfismo:" + +#: index.docbook:39 +msgid "implicit polymorphism" +msgstr "polimorfismo implícito" + +#: index.docbook:45 +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"UNTRANSLATED! It is possible to define subclass, " +"union-subclass, and joined-subclass " +"mappings in separate mapping documents, directly beneath hibernate-" +"mapping. This allows you to extend a class hierachy just by adding " +"a new mapping file. You must specify an extends attribute " +"in the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." + +#: index.docbook:59 +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"\n" +" \n" +" \n" +" \n" +" ]]>" + +#: index.docbook:70 +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" +"Es posible usar estrategias de mapeo diferentes para diferentes " +"ramificaciones de la misma jerarquía de herencia, y entonces usar " +"polimorfismo implícito para conseguir polimorfismo a través de " +"toda la jerarquía. Sin embargo, Hibernate no soporta la mezcla de " +"mapeos <subclass>, y <joined-" +"subclass> y <union-subclass> bajo el " +"mismo elemento <class> raíz. Es posible " +"mezclar juntas las estrategias de tabla por jerarquía y tabla por " +"subclase, bajo el mismo elemento <class>, " +"combinando los elementos <subclass> y <" +"join> (ver debajo)." + +#: index.docbook:74 +msgid "Table per class hierarchy" +msgstr "Tabla por jerarquía de clases" + +#: index.docbook:76 +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"Supón que tenemos una interface Payment, con los " +"implementadores CreditCardPayment, CashPayment, ChequePayment. El mapeo de tabla por " +"jerarquía se vería así:" + +#: index.docbook:83 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:85 +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"Se requiere exactamente una tabla. Hay una gran limitación de esta " +"estrategia de mapeo: las columnas declaradas por las subclases, como " +"CCTYPE, no pueden tener restricciones NOT NULL." + +#: index.docbook:94 +msgid "Table per subclass" +msgstr "Tabla por subclase" + +#: index.docbook:96 +msgid "A table per subclass mapping would look like:" +msgstr "Un mapeo de tabla por sublclase se vería así:" + +#: index.docbook:100 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:102 +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 "" +"Se requieren cuatro tablas. Las tres tablas de subclase tienen asociaciones " +"de clave primaria a la tabla de superclase (de modo que en el modelo " +"relacional es realmente una asociación uno-a-uno)." + +#: index.docbook:111 +msgid "Table per subclass, using a discriminator" +msgstr "Tabla por subclase, usando un discriminador" + +#: index.docbook:113 +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"Observa que la implementación de Hibernate de tabla por subclase no " +"requiere ninguna columna discriminadora. Otros mapeadores objeto/relacional " +"usan una implementación diferente de tabla por subclase que requiere " +"una columna discriminadora de tipo en la tabla de superclase. Este enfoque " +"es mucho más difícil de implementar pero discutiblemente " +"más correcto desde un punto de vista relacional. Si quisieras usar " +"una columna discriminadora con la estrategia de tabla por subclase, puedes " +"combinar el uso de <subclass> y <" +"join>, como sigue:" + +#: index.docbook:125 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" + +#: index.docbook:127 +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"la declaración opcional fetch=\"select\" dice a " +"Hibernate que no recupere los datos de la subclase ChequePayment usando una unión externa (outer join) al consultar la " +"superclase." + +#: index.docbook:136 +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "Mezclando tabla por jerarquía de clases con tabla por subclase" + +#: index.docbook:138 +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"Puedes incluso mezclar las estrategias de tabla po jerarquía y tabla " +"por subclase usando este enfoque:" + +#: index.docbook:143 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:145 +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"Para cualquiera de estas estrategias de mapeo, una asociación " +"polimórfica a la clase raíz Payment es " +"mapeada usando <many-to-one>." + +#: index.docbook:151 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:156 +msgid "Table per concrete class" +msgstr "Tabla por clase concreta" + +#: index.docbook:158 +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"Podríamos ir de dos maneras a la estrategia de mapeo de tabla por " +"clase concreta. La primera es usar <union-subclass>." + +#: index.docbook:163 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:165 +msgid "" +"Three tables are involved for the subclasses. Each table defines columns for " +"all properties of the class, including inherited properties." +msgstr "" +"Están implicadas tres tablas. Cada tabla define columnas para todas " +"las propiedades de la clase, inccluyendo las propiedades heredadas." + +#: index.docbook:170 +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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"La limitación de este enfoque es que si una propiedad es mapeada en " +"la superclase, el nombre de columna debe ser el mismo en todas las tablas de " +"subclase. (Podríamos relajar esto en un lanzamiento futuro de " +"Hibernate.) La estrategia de generador de indentidad no está " +"permitida en la herencia de unión de subclase, de hecho la semilla de " +"clave primaria tiene que ser compartida a través de todas las " +"subclases unidas de una jerarquía." + +#: index.docbook:179 +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"UNTRANSLATED! If your superclass is abstract, map it with abstract=" +"\"true\". Of course, if it is not abstract, an additional table " +"(defaults to PAYMENT in the example above) is needed to " +"hold instances of the superclass." + +#: index.docbook:189 +msgid "Table per concrete class, using implicit polymorphism" +msgstr "Tabla por clase concreta, usando polimorfismo implícito" + +#: index.docbook:191 +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "Un enfoque alternativo es hacer uso de polimorfismo implícito:" + +#: index.docbook:195 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:197 +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"Nota que en ningún sitio mencionamos la interface Payment explícitamente. Nota además que las propiedades de " +"Payment son mapeadas en cada una de las subclases. Si " +"quieres evitar duplicación, considera usar entidades XML. (por " +"ejemplo, [ <!ENTITY allproperties SYSTEM \"allproperties.xml" +"\"> ] en la declaración DOCTYPE y " +"&allproperties; en el mapeo)." + +#: index.docbook:207 +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"La desventaja de este enfoque es que Hibernate no genera UNIONs de SQL al realizar consultas polimórficas." + +#: index.docbook:212 +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"Para esta estrategia de mapeo, una asociación polimórfica a " +"Payment es mapeada generalmente usando <" +"any>." + +#: index.docbook:217 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:222 +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "Mezclando polimorfismo implícito con otros mapeos de herencia" + +#: index.docbook:224 +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"Hay una cosa más por notar acerca de este mapeo. Ya que las subclases " +"se mapean cada una en su propio elemento <class> (y " +"ya que Payment es sólo una interface), cada una de " +"las subclases podría ser parte de otra jerarquía de herencia! " +"(Y todavía puedes seguir usando consultas polimórficas contra " +"la interface Payment.)" + +#: index.docbook:232 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:234 +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"Una vez más, no mencionamos a Payment explí" +"citamente. Si ejecutamos una consulta contra la interface Payment - por ejemplo, from Payment - Hibernate devuelve " +"automáticamente instancias de CreditCardPayment (y " +"sus subclases, ya que ellas también implementan Payment), CashPayment y ChequePayment " +"pero no instancias de NonelectronicTransaction." + +#: index.docbook:249 +msgid "Limitations" +msgstr "Limitaciones" + +#: index.docbook:251 +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"Existen ciertas limitaciones al enfoque de \"polimorfismo implícito\" " +"en la estrategia de mapeo de tabla por clase concreta. Existen limitaciones " +"algo menos restrictivas a los mapeos <union-subclass>." + +#: index.docbook:258 +msgid "" +"The following table shows the limitations of table per concrete-class " +"mappings, and of implicit polymorphism, in Hibernate." +msgstr "" +"La siguiente tabla muestra las limitaciones de mapeos de tabla por clase " +"concreta, y de polmorfismo implícito, en Hibernate." + +#: index.docbook:264 +msgid "Features of inheritance mappings" +msgstr "Funcionalidades de mapeo de herencia" + +#: index.docbook:276 +msgid "Inheritance strategy" +msgstr "Estrategia de herencia" + +#: index.docbook:277 +msgid "Polymorphic many-to-one" +msgstr "muchos-a-uno polimórfica" + +#: index.docbook:278 +msgid "Polymorphic one-to-one" +msgstr "uno-a-uno polimórfica" + +#: index.docbook:279 +msgid "Polymorphic one-to-many" +msgstr "uno-a-muchos polimórfica" + +#: index.docbook:280 +msgid "Polymorphic many-to-many" +msgstr "mushos-a-muchos polimórfica" + +#: index.docbook:281 +msgid "Polymorphic load()/get()" +msgstr "load()/get() polimórficos" + +#: index.docbook:282 +msgid "Polymorphic queries" +msgstr "Consultas polimórficas" + +#: index.docbook:283 +msgid "Polymorphic joins" +msgstr "Uniones polimórficas" + +#: index.docbook:284 +msgid "Outer join fetching" +msgstr "Recuperación por unión externa (outer join)" + +#: index.docbook:289 +msgid "table per class-hierarchy" +msgstr "tabla por jerarquía de clases" + +#: index.docbook:290, index.docbook:301, index.docbook:312 +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#: index.docbook:291, index.docbook:302, index.docbook:313 +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#: index.docbook:292, index.docbook:303 +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#: index.docbook:293, index.docbook:304, index.docbook:315 +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#: index.docbook:294, index.docbook:305, index.docbook:316 +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#: index.docbook:295, index.docbook:306, index.docbook:317, index.docbook:328 +msgid "from Payment p" +msgstr "from Payment p" + +#: index.docbook:296, index.docbook:307, index.docbook:318 +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#: index.docbook:297, index.docbook:308, index.docbook:319 +msgid "supported" +msgstr "soportada" + +#: index.docbook:300 +msgid "table per subclass" +msgstr "tabla por subclase" + +#: index.docbook:311 +msgid "table per concrete-class (union-subclass)" +msgstr "tabla por clase concreta (union-subclass)" + +#: index.docbook:314 +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" +"<one-to-many> (para inverse=\"true\" solamente)" + +#: index.docbook:322 +msgid "table per concrete class (implicit polymorphism)" +msgstr "tabla por clase concreta (polimorfismo implícito)" + +#: index.docbook:323 +msgid "<any>" +msgstr "<any>" + +#: index.docbook:324, index.docbook:325, index.docbook:329, index.docbook:330 +msgid "not supported" +msgstr "no soportada" + +#: index.docbook:326 +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#: index.docbook:327 +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/performance.po b/documentation/envers/src/main/docbook/es-ES/content/performance.po new file mode 100644 index 0000000000..e76d859b20 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/performance.po @@ -0,0 +1,2387 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Improving performance" +msgstr "Mejorando el rendimiento" + +#: index.docbook:8 +msgid "Fetching strategies" +msgstr "Estrategias de recuperación" + +#: index.docbook:10 +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"Una estrategia de recuperación es la estrategia " +"que usará Hibernate para recuperar los objetos asociados cuando la " +"aplicación necesite navegar la asociación. Las estrategias de " +"recuperación pueden ser declaradas en los metadatos de mapeo O/R, o " +"sobrescritas por una consulta HQL o Criteria en " +"particular." + +#: index.docbook:17 +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3 define las siguientes estrategias de recuperación:" + +#: index.docbook:23 +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"Recuperación por unión (join fetching) - " +"Hibernate recupera la instancia asociada o colección en la misma " +"SELECT, usando una OUTER JOIN." + +#: index.docbook:30 +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"Recuperación por selección (select fetching) - se usa una segunda SELECT para recuperar la " +"entidad asociada o colección. A menos que deshabilites explí" +"citamente la recuperación perezosa especificando lazy=\"false" +"\", la segunda selección sólo será ejecutada " +"cuando realmente accedas a la asociación." + +#: index.docbook:39 +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"Recuperación por subselección (subselect fetching) - se usa una segunda SELECT para recuperar las " +"colecciones asociadas de todas las entidades recuperadas en una consulta o " +"recuperación previa. A menos que deshabilites explícitamente " +"la recuperación perezosa especificando lazy=\"false\", esta segunda selección sólo será ejecutada " +"cuando realmente accedas a la asociación." + +#: index.docbook:48 +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"Recuperación en lote - una estrategia de " +"optimización para la recuperación por selección - " +"Hibernate recupera un lote de instancias de entidad o colecciones en una " +"sola SELECT, especificando una lista de claves primarias " +"o de claves foráneas." + +#: index.docbook:57 +msgid "Hibernate also distinguishes between:" +msgstr "Hibernate también distingue entre:" + +#: index.docbook:63 +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"Recuperación inmediata - una asociación, " +"colección o atributo es recuperado inmediatamente, cuando el " +"dueño es cargado." + +#: index.docbook:69 +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"Recuperación perezosa de colecciones - se " +"recupera una colección cuando la aplicación invoca una " +"operación sobre la colección. (Esto es por defecto para las " +"colecciones.)" + +#: index.docbook:76 +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" + +#: index.docbook:84 +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." + +#: index.docbook:91 +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"Recuperación por proxy - se recupera una " +"asociación monovaluada cuando se invoca un método que no sea " +"el getter del identificador sobre el objeto asociado." + +#: index.docbook:101 +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"Recuperación perezosa de atributos - se recupera " +"un atributo o una asociación monovaluada cuando se accede a la " +"variable de instancia (requiere instrumentación del bytecode en " +"tiempo de ejecución). Este enfoque es raramente necesario." + +#: index.docbook:110 +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"Aquí tenemos dos nociones ortogonales: cuándo se recupera la aplicación, y cómo es recuperada (qué SQL es usado). ¡No las confundas! " +"Usamos fetch para afinar el rendimiento. Podemos usar " +"lazy para definir un contrato sobre qué datos " +"están siempre disponibles en cualquier instancia separada de una " +"clase en particular." + +#: index.docbook:119 +msgid "Working with lazy associations" +msgstr "Trabajando con asociaciones perezosas" + +#: index.docbook:121 +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"Por defecto, Hibernate3 usa una recuperación perezosa por " +"selección para colecciones y una recuperación por proxy " +"perezosa para asociaciones monovaluadas. Estas políticas por defecto " +"tienen sentido para casi todas las asociaciones en casi todas las " +"aplicaciones." + +#: index.docbook:127 +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"Nota: si estableces hibernate." +"default_batch_fetch_size, Hibernate usará la " +"optimización de recuperación en lotes para recuperación " +"perezosa (esta optimización también puede ser habilitada a un " +"nivel más granularizado)." + +#: index.docbook:134 +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"Sin embargo, la recuperación perezosa plantea un problema del que " +"tienes que estar al tanto. Acceder a una asociación perezosa fuera " +"del contexto de una sesión de Hibernate abierta resultará en " +"una excepción. Por ejemplo:" + +#: index.docbook:140 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:142 +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"Ya que la colección de permisos no fue inicializada cuando se " +"cerró la Session, la colección no " +"será capaz de cargar su estado. Hibernate no soporta la " +"inicialización perezosa de objetos separados. La " +"solución es mover el código que lee de la colección a " +"justo antes que la transacción sea comprometida." + +#: index.docbook:150 +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"Alternativamente, podríamos usar una colección no perezosa o " +"asociación, especificando lazy=\"false\" para el " +"mapeo de asociación. Sin embargo, está pensado que la " +"inicialización perezosa sea usada para casi todas las colecciones y " +"asociaciones. ¡Si defines demasiadas asociaciones no perezosas en tu " +"modelo de objetos, Hibernate terminará necesitando recuperar la base " +"de datos entera en cada transacción!" + +#: index.docbook:159 +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"Por otro lado, frecuentemente necesitamos elegir la recuperación por " +"unión (que es no perezosa por naturaleza) en vez de la " +"recuperación por selección en una transacción en " +"particular. Veremos ahora cómo personalizar la estrategia de " +"recuperación. En Hibernate3, los mecanismos para elegir una " +"estrategia de recuperación son idénticas a las de las " +"asociaciones monovaluadas y colecciones." + +#: index.docbook:170 +msgid "Tuning fetch strategies" +msgstr "Afinando las estrategias de recuperación" + +#: index.docbook:172 +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"La recuperación por selección (la preestablecida) es " +"extremadamente vulnerable a problemas de selección N+1, de modo " +"querríamos habilitar la recuperación por unión (join " +"fetching) en el documento de mapeo:" + +#: index.docbook:177 +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" +"\n" +" \n" +" \n" +"" + +#: index.docbook:179 +msgid "]]>" +msgstr "" +"]]>" + +#: index.docbook:181 +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"La estrategia de recuperación definida en el documento de mapeo " +"afecta a:" + +#: index.docbook:187 +msgid "retrieval via get() or load()" +msgstr "" +"las recuperaciones vía get() o load()" + +#: index.docbook:192 +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "" +"las recuperaciones que ocurren implícitamente cuando se navega una " +"asociación (recuperación perezosa)" + +#: index.docbook:197 +msgid "Criteria queries" +msgstr "las consultas de Criteria" + +#: index.docbook:202 +msgid "HQL queries if subselect fetching is used" +msgstr "HQL queries if subselect fetching is used" + +#: index.docbook:208 +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." + +#: index.docbook:214 +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"Usualmente, no usamos el documento de mapeo para personalizar la " +"recuperación. En cambio, mantenemos el comportamiento por defecto, y " +"lo sobrescribimos para una transacción en particular, usando " +"left join fetch en HQL. Esto le dice a Hibernate que " +"recupere la asociación tempranamente en la primera selección, " +"usando una unión externa. En la API de consulta de Criteria, usarías setFetchMode(FetchMode.JOIN)." + +#: index.docbook:223 +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"Si acaso lo deseases, podrías cambiar la estrategia de " +"recuperación usada por get() or load(); simplemente usa una consulta Criteria, por " +"ejemplo:" + +#: index.docbook:229 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:231 +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(Esto es el equivalente de Hibernate de lo que otras soluciones ORM llaman " +"un \"plan de recuperación\".)" + +#: index.docbook:235 +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "" +"Una forma completamente diferente de evitar problemas con selecciones N+1 es " +"usar el caché de segundo nivel." + +#: index.docbook:243 +msgid "Single-ended association proxies" +msgstr "Proxies de asociaciones de un solo extremo" + +#: index.docbook:245 +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"La recuperación perezosa de colecciones está implementada " +"usando la implementación de colecciones persistentes propia de " +"Hibernate. Sin embargo, se necesita un mecanismo diferente para un " +"comportamiento perezoso en las asociaciones de un solo extremo. La entidad " +"objetivo de la asociación debe ser tratada con proxies. Hibernate " +"implementa proxies de inicialización perezosa para objetos " +"persistentes usando mejora del bytecode en tiempo de ejecución (por " +"medio de la excelente biblioteca CGLIB)." + +#: index.docbook:253 +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"Por defecto, Hibernate3 genera proxies (en el arranque) para todas las " +"clases persistentes y los usa para habilitar la recuperación perezosa " +"de asociaciones muchos-a-uno y uno-a-uno." + +#: index.docbook:259 +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"El fichero de mapeo puede declarar una interface a usar como interface de " +"proxy para esa clase, con el atributo proxy. Por defecto, " +"Hibernate usa una subclase de la clase. Nota que la clase tratada " +"con proxies debe implementar un constructor por defecto con al menos " +"visibilidad de paquete. ¡Recomendamos este constructor para todas las " +"clases persistentes!" + +#: index.docbook:266 +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "" +"Hay algunos puntos a tener en cuenta al extender este enfoque a clases " +"polimórficas, por ejemplo." + +#: index.docbook:271 +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" + +#: index.docbook:273 +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"Primero, las instancias de Cat nunca serán objeto " +"de un cast a DomesticCat, incluso aunque la instancia " +"subyacente sea instancia de DomesticCat:" + +#: index.docbook:279 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:281 +msgid "Secondly, it is possible to break proxy ==." +msgstr "" +"Segundo, es posible romper con el operador == de un proxy." + +#: index.docbook:285 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:287 +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"Sin embargo, la situación no en absoluta tan mala como parece. Aunque " +"tenemos ahora dos referencias a objetos proxy diferentes, la instancia " +"subyacente será aún el mismo objeto:" + +#: index.docbook:292 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:294 +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "" +"Tercero, no debes usar un proxy CGLIB para una clase final o una clase con algún método final." + +#: index.docbook:299 +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"Finalmente, si tu objeto persistente adquiere cualquier recurso bajo " +"instanciación (por ejemplo, en inicializadores o constructores por " +"defecto), entonces esos recursos serán adquiridos también por " +"el proxy. La clase del proxy es una subclase real de la clase persistente." + +#: index.docbook:305 +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"Estos problemas se deben a limitaciones fundamentales en el modelo de " +"herencia única de Java. Si deseas evitar estos problemas cada una de " +"tus clases persistentes deben implementar una interface que declare sus " +"métodos de negocio. Debes especificar estas interfaces en el fichero " +"de mapeo. Por ejemplo:" + +#: index.docbook:311 +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" + +#: index.docbook:313 +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"donde CatImpl implementa la interface Cat y DomesticCatImpl implementa la interface " +"DomesticCat. Entonces load() o " +"iterate() pueden devolver instancias de Cat y DomesticCat. (Nota que list() usualmente no devuelve proxies.)" + +#: index.docbook:321 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:323 +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"Las relaciones también son inicializadas perezosamente. Esto " +"significa que debes declarar cualquier propiedad como de tipo Cat, no CatImpl." + +#: index.docbook:328 +msgid "" +"Certain operations do not require proxy initialization" +msgstr "" +"Ciertas operaciones no requieren inicialización " +"de proxies." + +#: index.docbook:334 +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals(), si la clase persistente no sobrescribe " +"equals()" + +#: index.docbook:340 +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode(), si la clase persistente no sobrescribe " +"hashCode()" + +#: index.docbook:346 +msgid "The identifier getter method" +msgstr "El método getter del identificador" + +#: index.docbook:352 +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"Hibernate detectará las clase persistentes que sobrescriban " +"equals() o hashCode()." + +#: index.docbook:357 +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"UNTRANSLATED!!! By choosing lazy=\"no-proxy\" instead of " +"the default lazy=\"proxy\", we can avoid the problems " +"associated with typecasting. However, we will require buildtime bytecode " +"instrumentation, and all operations will result in immediate proxy " +"initialization." + +#: index.docbook:367 +msgid "Initializing collections and proxies" +msgstr "Inicializando colecciones y proxies" + +#: index.docbook:369 +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"Una LazyInitializationException será lanzada por " +"Hibernate si una colección o proxy sin inicializar es accedido fuera " +"del ámbito de la Session, es decir, cuando la " +"entidad que posee la colección o que tiene la referencia al proxy " +"esté en el estado separada." + +#: index.docbook:375 +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"A veces necesitamos asegurarnos que un proxy o colección esté " +"inicializado antes de cerrar la Session. Por supuesto, " +"siempre podemos forzar la inicialización llamando a cat." +"getSex() o cat.getKittens().size(), por " +"ejemplo. Pero esto es confuso a lectores del código y no es " +"conveniente para código genérico." + +#: index.docbook:382 +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"Los métodos estáticos Hibernate.initialize() y Hibernate.isInitialized() proveen a la " +"aplicación de una forma conveniente de trabajar con colecciones o " +"proxies inicializados perezosamente. Hibernate.initialize(cat) forzará la inicialización de un proxy, cat, en tanto su Session esté todavía " +"abierta. Hibernate.initialize( cat.getKittens() ) tiene " +"un efecto similar para la colección de gatitos." + +#: index.docbook:391 +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"Otra opción es mantener la Session abierta hasta " +"que todas las colecciones y proxies necesarios hayan sido cargados. En " +"algunas arquitecturas de aplicación, particularmente en aquellas " +"donde el código que accede a los datos usando Hibernate, y el " +"código que los usa están en capas de aplicación " +"diferentes o procesos físicos diferentes, puede ser un problema " +"asegurar que la Session esté abierta cuando se " +"inicializa una colección. Existen dos formas básicas de tratar " +"este tema:" + +#: index.docbook:402 +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"En una aplicación basada web, puede usarse un filtro de servlets para " +"cerrar la Session sólo bien al final de una " +"petición de usuario, una vez que el rendering de la vista esté " +"completa (el patrón Sesión Abierta en Vista (Open " +"Session in View)). Por supuesto, estos sitios requieren una " +"fuerte demanda de corrección del manejo de excepciones de tu " +"infraestructura de aplicación. Es de una importancia vital que la " +"Session esté cerrada y la transacción " +"terminada antes de volver al usuario, incluso cuando ocurra una " +"excepción durante el rendering de la página. Para este " +"enfoque, el filtro de servlet tiene que ser capaz de accceder la " +"Session. Recomendamos que se use una variable " +"ThreadLocal para tener la Session " +"actual (ver el capítulo 1, , para una implementación de ejemplo)." + +#: index.docbook:415 +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"En una aplciación con una grada de negocios separada, la ló" +"gica de negocio debe \"preparar\" todas las colecciones que se vayan a " +"necesitar por la grada web antes de volver. Esto significa que la grada de " +"negocios debe cargar todos los datos y devolver a la grada de " +"presentación web todos los datos que se requieran para un caso de uso " +"en particular ya inicializados. Usualmente, la aplicación llama a " +"Hibernate.initialize() para cada colección que se " +"necesitará en la grada web (esta llamada debe ocurrir antes que la " +"sesión sea cerrada) o recupera la colección tempranamente " +"usando una consulta de Hibernate con una cláusula FETCH o una FetchMode.JOIN en Criteria. Esto es usualmente más fácil si adoptas el " +"patrón Comando en vez de un Fachada de " +"Sesión." + +#: index.docbook:430 +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"Puedes también adjuntar un objeto cargado previamente a una nueva " +"Session con merge() o lock() antes de acceder a colecciones no inicializadas (u otros proxies). " +"¡No, Hibernate no, y ciertamente no debe hacer " +"esto automáticamente, ya que introduciría semánticas de " +"transacción ad hoc!" + +#: index.docbook:440 +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"A veces no quieres inicializar una colección grande, pero necesitas " +"aún alguna informacion sobre ella (como su tamaño) o un " +"subconjunto de los datos." + +#: index.docbook:445 +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "" +"Puedes usar un filtro de colecciones para obtener el tamaño de una " +"colección sin inicializarla:" + +#: index.docbook:449 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:451 +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"El método createFilter() se usa también " +"para recuperar eficientemente subconjuntos de una colección sin " +"necesidad de inicializar toda la colección:" + +#: index.docbook:456 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:461 +msgid "Using batch fetching" +msgstr "Usando recuperación en lotes" + +#: index.docbook:463 +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"Hibernate puede hacer un uso eficiente de la recuperación en lotes, " +"esto es, Hibernate puede cargar muchos proxies sin inicializar si se accede " +"a un proxy (o colecciones). La recuperación en lotes es una " +"optimización de la estrategia de recuperación por " +"selección perezosa. Hay dos formas en que puedes afinar la " +"recuperación en lotes: a nivel de la clase o de la colección." + +#: index.docbook:469 +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"La recuperación en lotes para clases/entidades es más fá" +"cil de entender. Imagina que tienes la siguiente situación en tiempo " +"de ejecución: Tienes 25 instancias de Cat cargadas " +"en una Session, cada Cat tiene una " +"referencia a su owner, una Person. La " +"clase Person está mapeada con un proxy, " +"lazy=\"true\". Si ahora iteras a través de todos " +"los gatos y llamas a getOwner() para cada uno, Hibernate " +"por defecto ejecutará 25 sentencias SELECT para " +"traer los dueños tratados con proxies. Puedes afinar este " +"comportamiento especificando un batch-size en el mapeo de " +"Person:" + +#: index.docbook:479 +msgid "...]]>" +msgstr "...]]>" + +#: index.docbook:481 +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" +"Hibernate ahora ejecutará sólo tres consultas, el patró" +"n es 10, 10, 5." + +#: index.docbook:485 +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Sesssion, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"También puedes habilitar la recuperación en lotes para " +"colecciones. Por ejemplo, si cada Person tiene una " +"colección perezosa de Cats, y hay 10 personas " +"actualmente cargadas en la Session, iterar a travé" +"s de las 10 personas generará 10 SELECTs, una para " +"cada llamada a getCats(). Si habilitas la " +"recuperación en lotes para la colección de cats en el mapeo de Person, Hibernate puede recuperar " +"por adelantado las colecciones:" + +#: index.docbook:494 +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:496 +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"Con un batch-size de 3, Hibernate cargará 3, 3, 3, " +"1 colecciones en cuatro SELECTs. Una vez más, el " +"valor del atributo depende del número esperado de colecciones sin " +"inicializar en una Session en particular." + +#: index.docbook:502 +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"La recuperación de coleccione en lotes es particularmente útil " +"si tienes un árbol anidado de ítems, es decir, el tí" +"pico patrón de cuenta de materiales. (Aunque un conjunto " +"anidado o una ruta materializada podrí" +"a ser una mejor opción para árboles que sean de lectura en la " +"mayoría de los casos.)" + +#: index.docbook:511 +msgid "Using subselect fetching" +msgstr "Usando recuperación por subselección" + +#: index.docbook:513 +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"Si una colección perezosa o proxy monovaluado tiene que ser " +"recuperado, Hibernate los carga a todos, volviendo a ejecutar la consulta " +"original en una subselección. Esto funciona de la misma forma que la " +"recuperación en lotes, sin carga fragmentaria." + +#: index.docbook:524 +msgid "Using lazy property fetching" +msgstr "Usando recuperación perezosa de propiedades" + +#: index.docbook:526 +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"Hibernate3 soporta la recuperación perezosa de propiedades " +"individuales. Esta técnica de optimización es también " +"conocida como grupos de recuperación (fetch groups). Por favor, nota que éste es mayormente un aspecto de " +"marketing, ya que en la práctica, optimizar lecturas de filas es " +"mucho más importante que la optimización de lectura de " +"columnas. Sin embargo, cargar sólo algunas propiedades de una clase " +"podría ser útil en casos extremos, cuando tablas heredadas " +"tienen cientos de columnas y el modelo de datos no puede ser mejorado." + +#: index.docbook:535 +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"Para habilitar la carga perezosa de propiedades, establece el atributo " +"lazy en tus mapeos de propiedades:" + +#: index.docbook:540 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:542 +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"¡La carga perezosa de propiedades requiere la instrumentación " +"del bytecode en tiempo de construcción! Si tus clases persistentes no " +"son mejoradas, Hibernate ignorará silenciosamente la " +"configuración perezosa de propiedades y caerá en " +"recuperación inmediata." + +#: index.docbook:548 +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "" +"Para la instrumentación del bytecode, usa la siguiente tarea Ant:" + +#: index.docbook:552 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:554 +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a prefered solution." +msgstr "" +"Una forma diferente (¿mejor?) de evitar lecturas innecesarias de " +"columnas, al menos para transacciones de sólo lectura es usar las " +"funcionalidades de proyección de consultas HQL o Criteria. Esto evita " +"la necesidad de procesar el bytecode en tiempo de construcción y " +"ciertamente es una solución preferida." + +#: index.docbook:561 +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"Puedes forzar la usual recuperación temprana de propiedades usando " +"fetch all properties en HQL." + +#: index.docbook:571 +msgid "The Second Level Cache" +msgstr "El Caché de Segundo Nivel" + +#: index.docbook:573 +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"Una Session de Hibernate es una caché de datos " +"persistentes a nivel de transacción. Es posible configurar un cluster " +"o caché a nivel de JVM (a nivel de SessionFactory) " +"sobre una base de clase-a-clase o colección-a-colección. " +"Puedes incluso enchufar una caché en cluster. Sé cuidadoso. " +"Las cachés nunca están al tanto de los cambios hechos por otra " +"aplicación al almacén persistente (aunque pueden ser " +"configurados para expirar regularmente los datos en caché)." + +#: index.docbook:581 +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"Por defecto, Hibernate usa EHCache para caching a nivel de JVM. (El soporte " +"a JCS ahora está despreciado y será quitado en una futura " +"versión de Hibernate.) Puedes elegir una implementación " +"diferente estableciendo el nombre de una clase que implemente org." +"hibernate.cache.CacheProvider usando la propiedad " +"hibernate.cache.provider_class." + +#: index.docbook:592 +msgid "Cache Providers" +msgstr "Proveedores de Caché" + +#: index.docbook:601, index.docbook:774 +msgid "Cache" +msgstr "Caché" + +#: index.docbook:602 +msgid "Provider class" +msgstr "clase del Provedor" + +#: index.docbook:603 +msgid "Type" +msgstr "Tipo" + +#: index.docbook:604 +msgid "Cluster Safe" +msgstr "Cluster Seguro" + +#: index.docbook:605 +msgid "Query Cache Supported" +msgstr "Caché de Consultas Soportado" + +#: index.docbook:610, index.docbook:783 +msgid "Hashtable (not intended for production use)" +msgstr "Hashtable (no pensado para uso en producción)" + +#: index.docbook:611 +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#: index.docbook:612 +msgid "memory" +msgstr "memoria" + +#: index.docbook:614, index.docbook:621, index.docbook:628, index.docbook:784, +#: index.docbook:785, index.docbook:786, index.docbook:791, index.docbook:792, +#: index.docbook:793, index.docbook:798, index.docbook:799, index.docbook:800, +#: index.docbook:805, index.docbook:806, index.docbook:812, index.docbook:815 +msgid "yes" +msgstr "si" + +#: index.docbook:617, index.docbook:790 +msgid "EHCache" +msgstr "EHCache" + +#: index.docbook:618 +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#: index.docbook:619, index.docbook:626 +msgid "memory, disk" +msgstr "memoria, disco" + +#: index.docbook:624, index.docbook:797 +msgid "OSCache" +msgstr "OSCache" + +#: index.docbook:625 +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#: index.docbook:631, index.docbook:804 +msgid "SwarmCache" +msgstr "SwarmCache" + +#: index.docbook:632 +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#: index.docbook:633 +msgid "clustered (ip multicast)" +msgstr "clusterizado (ip multicast)" + +#: index.docbook:634 +msgid "yes (clustered invalidation)" +msgstr "sí (invalidación en cluster)" + +#: index.docbook:638, index.docbook:811 +msgid "JBoss TreeCache" +msgstr "TreeCache de JBoss" + +#: index.docbook:639 +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#: index.docbook:640 +msgid "clustered (ip multicast), transactional" +msgstr "clusterizado (ip multicast), transaccional" + +#: index.docbook:641 +msgid "yes (replication)" +msgstr "sí (replicación)" + +#: index.docbook:642 +msgid "yes (clock sync req.)" +msgstr "sí (requiere sincronización de reloj)" + +#: index.docbook:649 +msgid "Cache mappings" +msgstr "Mapeos de caché" + +#: index.docbook:651 +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "" +"El elemento <cache> de una mapeo de clase o " +"colección tiene la siguiente forma:" + +#: index.docbook:662 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:665 +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage especifica la estrategia de caching: " +"transactional, read-write, " +"nonstrict-read-write o read-only" + +#: index.docbook:674 +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" + +#: index.docbook:681 +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" + +#: index.docbook:691 +msgid "" +"Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"Alternativamente (¿preferiblemente?), puedes especificar los " +"elementos <class-cache> y <collection-" +"cache> en hibernate.cfg.xml." + +#: index.docbook:696 +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"El atributo usage especifica una estrategia de " +"concurrencia al caché." + +#: index.docbook:703 +msgid "Strategy: read only" +msgstr "Estrategia: sólo lectura (read only)" + +#: index.docbook:705 +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"Si tu aplicación necesita leer pero nunca modificar las instancias de " +"una clase persistente, puede usarse un caché read-only. Esta es la mejor y más simple estrategia. Es incluso " +"perfectamente segura de usar en un cluster." + +#: index.docbook:711 +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" +"\n" +" \n" +" ....\n" +"]]>" + +#: index.docbook:717 +msgid "Strategy: read/write" +msgstr "Estrategia: lectura/escritura (read/write)" + +#: index.docbook:719 +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"Si la aplicación necesita actualizar datos, un caché " +"read-write podría ser apropiado. Esta estrategia " +"de caché nunca debe ser usada si se requiere nivel de aislamiento " +"serializable de transacciones. Si el caché es usado en un entorno " +"JTA, debes especificar la propiedad hibernate.transaction." +"manager_lookup_class, mencionando una estrategia para obtener el " +"TransactionManager de JTA. En otros entornos, debes " +"asegurarte que la transacción esté completada cuando se llame " +"a Session.close() o Session.disconnect(). Si deseas usar esta estrategia en un cluster, debes asegurarte que " +"la implementación de caché subyacente soporta bloqueos. Los " +"provedores de caché internos predeterminados no " +"no lo soportan." + +#: index.docbook:730 +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" + +#: index.docbook:735 +msgid "Strategy: nonstrict read/write" +msgstr "Estrategia: lectura/escritura no estricta (nonstrict read/write)" + +#: index.docbook:737 +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"Si la aplicación necesita sólo ocasionalmente actualizar datos " +"(es decir, es extremadamente inprobable que dos transacciones intenten " +"actualizar el mismo ítem simultáneamente) y no se requiere de " +"un aislamiento de transacciones estricto, un caché nonstrict-" +"read-write podría ser apropiado. Si se usa el caché " +"en un entorno JTA, debes especificar hibernate.transaction." +"manager_lookup_class. En otros entornos, debes asegurarte que la " +"transacción se haya completado cuando se llame a Session." +"close() o Session.disconnect()." + +#: index.docbook:749 +msgid "Strategy: transactional" +msgstr "Estrategia: transaccional" + +#: index.docbook:751 +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"La estrategia de caché transactional brinda " +"soporte a provedores de cachés completamente transaccionales como " +"TreeCache de JBoss. Un caché así, puede sólo ser usado " +"en un entorno JTA y debes especificar hibernate.transaction." +"manager_lookup_class." + +#: index.docbook:759 +msgid "" +"None of the cache providers support all of the cache concurrency strategies. " +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"Ninguno de los provedores de caché soporta todas las estrategias de " +"concurrencia al caché. La siguiente tabla muestra qué " +"provedores son compatibles con qué estrategias de concurrencia." + +#: index.docbook:765 +msgid "Cache Concurrency Strategy Support" +msgstr "Soporte a Estrategia de Concurrencia a Caché" + +#: index.docbook:775 +msgid "read-only" +msgstr "read-only" + +#: index.docbook:776 +msgid "nonstrict-read-write" +msgstr "nonstrict-read-write" + +#: index.docbook:777 +msgid "read-write" +msgstr "read-write" + +#: index.docbook:778 +msgid "transactional" +msgstr "transactional" + +#: index.docbook:824 +msgid "Managing the caches" +msgstr "Gestionando los cachés" + +#: index.docbook:826 +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"Siempre que pases un objeto a save(), update() o saveOrUpdate() y siempre que recuperes un " +"objeto usando load(), get(), " +"list(), iterate() o scroll(), ese objeto es agregado al caché interno de la " +"Session." + +#: index.docbook:833 +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"Cuando subsecuentemente se llame a flush(), el estado de " +"ese objeto será sincronizado con la base de datos. Si no quieres que " +"ocurra esta sincronización o si estás procesando un nú" +"mero enorme de objetos y necesitas gestionar la memoria eficientemente, " +"puede usarse el método evict() para quitar el " +"objeto y sus colecciones del caché de primer nivel." + +#: index.docbook:841 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:843 +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"La Session también provee un método " +"contains() para determinar si una instancia pertenece al " +"caché de la sesión." + +#: index.docbook:848 +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"Para desahuciar (evict) todos los objetos del caché de sesión, " +"llama a Session.clear()." + +#: index.docbook:852 +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"Para el caché de segundo nivel, hay métodos definidos en " +"SessionFactory para desahuciar el estado en caché " +"de una instancia, clase entera, instancia de colección o rol enter de " +"colección." + +#: index.docbook:858 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:860 +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"El CacheMode controla cómo una sesión en " +"particular interactúa con el caché de segundo nivel." + +#: index.docbook:867 +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "" +"CacheMode.NORMAL - lee ítems desde y escribe " +"ítems hacia el caché de segundo nivel" + +#: index.docbook:872 +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - lee ítems del caché de " +"segundo nivel, pero no escribe al caché de segundo nivel excepto al " +"actualizar datos" + +#: index.docbook:878 +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - escribe ítems al caché de " +"segundo nivel, pero no lee del caché de segundo nivel" + +#: index.docbook:884 +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - escribe ítems al caché " +"de segundo nivel, pero no lee del caché de segundo nivel, saltá" +"ndose el efecto de hibernate.cache.use_minimal_puts, " +"forzando un refresco del caché de segundo nivel para todos los " +"ítems leídos de la base de datos" + +#: index.docbook:892 +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"Para navegar por los contenidos de una región de caché de " +"segundo nivel o de consultas, usa la API de Statistics:" + +#: index.docbook:897 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:899 +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"Necesitarás habilitar las estadísticas y, opcionalmente, " +"forzar a Hibernate para que guarde las entradas del caché en un " +"formato más entendible por humanos:" + +#: index.docbook:904 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:909 +msgid "The Query Cache" +msgstr "El Caché de Consultas" + +#: index.docbook:911 +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"Los conjuntos resultado de consultas también pueden tratarse en " +"caché. Esto sólo es útil para consultas que se ejecutan " +"frecuentemente con los mismos parámetros. Para usar el caché " +"de consultas primero debes habilitarlo:" + +#: index.docbook:916 +msgid "" +msgstr "" + +#: index.docbook:918 +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"Esta configuración causa la creación de dos nuevas regiones de " +"caché - una teniendo en caché conjuntos resultado de consulta " +"(org.hibernate.cache.StandardQueryCache), el otro " +"teniendo timestamps de las actualizaciones más recientes a tablas " +"consultables (org.hibernate.cache.UpdateTimestampsCache). " +"Nota que el caché de consultas no pone en caché el estado de " +"las entidades reales en el conjunto resultado; sólo tiene en " +"caché valores indentificadores y resultados de tipo de valor. De modo " +"que el caché de consultas siempre debe ser usado en conjunción " +"con el caché de segundo nivel." + +#: index.docbook:928 +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"La mayoría de consultas no se benefician del tratamiento en " +"caché, de modo que por defecto las consultas no son tratadas en " +"caché. Para habilitar el tratamiento en caché, llama a " +"Query.setCacheable(true). Esta llamada permite a la " +"consulta buscar resultados existentes en caché o agregar sus " +"resultados al caché cuando se ejecuta." + +#: index.docbook:935 +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"Si requieres un control finamente granularizado sobre las políticas " +"de expiración del caché de consultas, puedes especificar una " +"región de caché con nombre para una consulta en particular " +"llamando a Query.setCacheRegion()." + +#: index.docbook:941 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:943 +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"Si la consulta debe forzar un refresco de si región del caché " +"de consultas, debes llamar a Query.setCacheMode(CacheMode.REFRESH). Esto es particularmente útil en casos donde los datos " +"subyacentes pueden haber sido actualizados por medio de un proceso separado " +"(es decir, no modificados a través de Hibernate) y permite a la " +"aplicación refrescar selectivamente conjuntos resultado de consultas " +"en particular. Esto es una alternativa más eficient al " +"desahuciamiento de una región del caché de consultas ví" +"a SessionFactory.evictQueries()." + +#: index.docbook:955 +msgid "Understanding Collection performance" +msgstr "Entendiendo el rendimiento de Colecciones" + +#: index.docbook:957 +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"Ya hemos llevado un buen tiempo hablando sobre colecciones. En esta " +"sección resaltaremos un par de temas más sobre cómo las " +"colecciones se comportan en tiempo de ejecución." + +#: index.docbook:964 +msgid "Taxonomy" +msgstr "Taxonomia" + +#: index.docbook:966 +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernate define tres tipos básicos de colecciones:" + +#: index.docbook:970 +msgid "collections of values" +msgstr "colecciones de valores" + +#: index.docbook:973 +msgid "one to many associations" +msgstr "asociaciones uno a muchos" + +#: index.docbook:976 +msgid "many to many associations" +msgstr "asociaciones muchos a muchos" + +#: index.docbook:980 +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"Esta clasificación distingue las varias tablas y relaciones de clave " +"foránea pero no nos dice absolutamente todo lo que necesitamos saber " +"sobre el modelo relacional. Para entender completamente la estructura " +"relacional y las características de rendimiento, debemos considerar " +"la estructura de la clave primaria que es usada por Hibernate para " +"actualizar o borrar filas de colección. Esto sugiere la siguiente " +"clasificación:" + +#: index.docbook:991 +msgid "indexed collections" +msgstr "colecciones indexadas" + +#: index.docbook:994 +msgid "sets" +msgstr "conjuntos (sets)" + +#: index.docbook:997 +msgid "bags" +msgstr "bolsas (bags)" + +#: index.docbook:1001 +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"Todas las colecciones indexadas (mapas, listas, arrays) tienen una clave " +"primaria consistente de las columnas <key> y " +"<index>. En este caso las actualizaciones de " +"colecciones son usualmente extremadamente eficientes. La clave primaria " +"puede ser indexada fácilmente y una fila en particular puede ser " +"localizada cuando Hibernate intenta actualizarla o borrarla." + +#: index.docbook:1009 +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"Los conjuntos (sets) tienen una clave primaria consistente en <" +"key> y columnas de elemento. Esto puede ser menos eficiente " +"para algunos tipos de elemento de colección, particularmente " +"elementos compuestos o texto largo, o campos binarios. La base de datos " +"puede no ser capaz de indexar una clave primaria compleja eficientemente. " +"Por otra parte, para asociaciones uno a muchos o muchos a muchos, " +"particularmente en el caso de identificadores sintéticos, es probable " +"que sólo sea tan eficiente. (Nota al márgen: si quieres que " +"SchemaExport realmente cree la clave primaria de un " +"<set> por ti, debes declarar todas las columnas " +"como not-null=\"true\".)" + +#: index.docbook:1020 +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"Los mapeos de <idbag> definen una clave delegada, " +"de modo que siempre resulten eficientes de actualizar. De hecho, son el " +"mejor caso." + +#: index.docbook:1025 +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"Los bags son el peor caso. Ya que un bag permite valores de elementos " +"duplicados y no tiene ninguna columna índice, no puede definirse " +"ninguna clave primaria. Hibernate no tiene forma de distinguir entre filas " +"duplicadas. Hibernate resuelve este problema quitando completamente (en un " +"solo DELETE) y recreando la colección siempre que " +"cambia. Esto podría ser muy ineficiente." + +#: index.docbook:1033 +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"Nota que para una asociación uno-a-muchos, la \"clave primaria\" " +"puede no ser la clave primaria física de la tabla de base de datos; " +"pero incluso en este caso, la clasificación anterior es útil " +"todavía. (Aún refleja cómo Hibernate \"localiza\" filas " +"individuales de la colección.)" + +#: index.docbook:1043 +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "" +"Las listas, mapas, idbags y conjuntos son las colecciones más " +"eficientes de actualizar" + +#: index.docbook:1045 +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"Desde la discusión anterior, debe quedar claro que las colecciones " +"indexadas y (usualmente) los conjuntos permiten la operación má" +"s eficiente en términos de añadir, quitar y actualizar " +"elementos." + +#: index.docbook:1051 +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"Hay, discutiblemente, una ventaja más que las colecciones indexadas " +"tienen sobre otros conjuntos para las asociaciones muchos a muchos o " +"colecciones de valores. Debido a la estructura de un Set, " +"Hibernate ni siquiera actualiza una fila con UPDATE " +"cuando se \"cambia\" un elemento. Los cambios a un Set " +"siempre funcionan por medio de INSERT y DELETE (de filas individuales). Una vez más, esta " +"consideración no se aplica a las asociaciones uno a muchos." + +#: index.docbook:1060 +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"Después de observar que los arrays no pueden ser perezosos, " +"podríamos concluir que las listas, mapas e idbags son los tipos " +"más eficientes de colecciones (no inversas), con los conjuntos (sets) " +"no muy por detrás. Se espera que los sets sean el tipo más " +"común de colección en las aplicaciones de Hibernate. Esto es " +"debido a que la semántica de los sets es la más natural en el " +"modelo relacional." + +#: index.docbook:1068 +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"Sin embargo, en modelos de dominio de Hibernate bien dieñados, " +"usualmente vemos que la mayoría de las colecciones son de hecho " +"asociaciones uno-a-muchos con inverse=\"true\". Para " +"estas asociaciones, la actualización es manejada por el extremo " +"muchos-a-uno de la asociación, y las consideraciones de este tipo " +"sobre el rendimiento de actualización de colecciones simplemente no " +"se aplican." + +#: index.docbook:1078 +msgid "Bags and lists are the most efficient inverse collections" +msgstr "" +"Los Bags y las listas son las colecciones inversas más eficientes" + +#: index.docbook:1080 +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"Justo antes que tires a la zanja los bags para siempre, hay un caso en " +"particular en el que los bags son muchos más eficientes que los " +"conjuntos. Para una colección con inverse=\"true\" " +"(el idioma estándar de relaciones uno-a-muchos bidireccionales, por " +"ejemplo) ¡podemos añadir elementos a un bag o lista sin " +"necesidad de inicializar (fetch) los elementos del bag! Esto se debe a que " +"Collection.add() o Collection.addAll() " +"siempre deben devolver true para un bag o List (no como " +"un Set). Esto puede hacer el siguiente código " +"común mucho más rápido." + +#: index.docbook:1090 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1095 +msgid "One shot delete" +msgstr "Borrado de un solo tiro" + +#: index.docbook:1097 +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"Ocasionalmente, borrar los elementos de una colección uno a uno puede " +"ser extremadamente ineficiente. Hibernate no es completamente estú" +"pido, de modo que sabe no hacer eso, en el caso de una colección " +"nueva-vacía (si has llamado a list.clear(), por " +"ejemplo). En este caso, Hibernate publicará una sola DELETE, ¡y listo!" + +#: index.docbook:1104 +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"Supón que añadimos un solo elemento a una colección de " +"tamaño veinte y luego quitamos dos elementos. Hibernate " +"publicará una sentencia INSERT y dos sentencias " +"DELETE (a menos que la colección sea un bag). Esto " +"es ciertamente deseable." + +#: index.docbook:1110 +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"Sin embargo, supón que quitamos dieciocho elementos, dejando dos y " +"luego añadimos tres nuevos elementos. Hay dos formas posibles de " +"proceder" + +#: index.docbook:1117 +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "borrar dieciocho filas una a una y luego insertar tres filas" + +#: index.docbook:1120 +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "" +"quitar toda la colección (en un solo DELETE de " +"SQL) e insertar todos los cinco elementos actuales (uno a uno)" + +#: index.docbook:1125 +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernate no es lo suficientemente inteligente para saber que la segunda " +"opción es probablemente más rápida en este caso. (Y que " +"sería probablemente indeseable para Hibernate ser tan inteligente; " +"este comportamiento podría confundir a disparadores de base de datos, " +"etc.)" + +#: index.docbook:1131 +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"Afortunadamente, puedes forzar este comportamiento (es decir, la segunda " +"estrategia) en cualquier momento descartando (es decir, desreferenciando) la " +"colección original y devolviendo una colección nuevamente " +"instanciada con todos los elementos actuales. Esto puede ser muy útil " +"y potente de vez en cuando." + +#: index.docbook:1137 +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"Por supuesto, el borrado-de-un-solo-tiro no se aplica a colecciones mapeadas " +"inverse=\"true\"." + +#: index.docbook:1146 +msgid "Monitoring performance" +msgstr "Monitoreando el rendimiento" + +#: index.docbook:1148 +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"La optimización no es de mucho uso sin el monitoreo y el acceso a " +"números de rendimiento. Hibernate provee un rango completo de figuras " +"sobre sus operaciones internas. Las estadísticas en Hibernate " +"están disponibles por SessionFactory." + +#: index.docbook:1155 +msgid "Monitoring a SessionFactory" +msgstr "Monitoreando una SessionFactory" + +#: index.docbook:1157 +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"Puedes acceder a las métricas de SessionFactory de " +"dos formas. Tu primera opción es llamar a sessionFactory." +"getStatistics() y leer o mostrar por pantalla la " +"Statistics por ti mismo." + +#: index.docbook:1163 +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"Hibernate puede también usar JMX para publicar las métricas si " +"habilitas el MBean StatisticsService. Puede habilitar un " +"solo MBean para todas tus SessionFactory o una por " +"fábrica. Mira el siguiente código para ejemplos de " +"configuración minimalistas:" + +#: index.docbook:1170 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1173 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1175 +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"POR HACER: Esto no tiene sentido: En el primer caso, recuperamos y usamos el " +"MBean directamente. En el segundo, debemos proporcionar el nombre JNDI en el " +"que se guarda la fábrica de sesiones antes de usarlo. Usa " +"hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")" + +#: index.docbook:1180 +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"Puedes (des)activar el monitoreo de una SessionFactory" + +#: index.docbook:1185 +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"en tiempo de configuración, establece hibernate." +"generate_statistics a false" + +#: index.docbook:1192 +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"en tiempo de ejecución: sf.getStatistics()." +"setStatisticsEnabled(true) o hibernateStatsBean." +"setStatisticsEnabled(true)" + +#: index.docbook:1199 +msgid "" +"Statistics can be reset programatically using the clear() " +"method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"Las estadísticas pueden ser reajustadas programáticamente " +"usando el método clear(). Puede enviarse un " +"resumen a un logger (nivel info) usando el método logSummary" +"()." + +#: index.docbook:1208 +msgid "Metrics" +msgstr "Métricas" + +#: index.docbook:1210 +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"Hibernate provee un número de métricas, desde informació" +"n muy básica a la especializada sólo relevante en ciertos " +"escenarios. Todos los contadores disponibles se describen en la API de la " +"interface Statistics, en tres categorías:" + +#: index.docbook:1217 +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"Métricas relacionadas al uso general de Session " +"usage, tales como número de sesiones abiertas, conexiones JDBC " +"recuperadas, etc," + +#: index.docbook:1223 +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "" +"Métricas relacionadas a las entidades, colecciones, consultas, y " +"cachés como un todo. (también conocidas como métricas " +"globales)." + +#: index.docbook:1229 +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "" +"Métricas detalladas relacionadas a una entidad, colección, " +"consulta o región de caché en particular." + +#: index.docbook:1236 +msgid "" +"For exampl,e you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"Por ejemplo, puedes comprobar el acceso, pérdida, y radio de " +"colocación de entidades, colecciones y consultas en el caché, " +"y el tiempo promedio que necesita una consulta. Ten en cuenta que el " +"número de milisegundos está sujeto a aproximación en " +"Java. Hibernate está pegado a la precisión de la JVM, en " +"algunas plataformas esto podría incuso ser tener sólo una " +"exactitud de 10 segundos." + +#: index.docbook:1243 +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"Se usan getters simples para acceder a las métricas globales (es " +"decir, no pegadas a una entidad, colección, región de " +"caché, etc, en particular). Puedes acceder a las métricas de " +"una entidad, colección, región de caché en particular a " +"través de su nombre, y a través de su representación " +"HQL o SQL para las consultas. Por favor refiérete al Javadoc de la " +"API de Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, y QueryStatistics para más información. El siguiente código " +"muestra un ejemplo sencillo:" + +#: index.docbook:1253 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1255 +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"Para trabajar sobre todas las entidades, colecciones, consultas y regiones " +"de cachés, puedes recuperar la lista de nombres de entidades, " +"colecciones, consultas y regiones de cachés con los siguientes " +"métodos: getQueries(), getEntityNames(), getCollectionRoleNames(), y " +"getSecondLevelCacheRegionNames()." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/persistent_classes.po b/documentation/envers/src/main/docbook/es-ES/content/persistent_classes.po new file mode 100644 index 0000000000..72defdba7f --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/persistent_classes.po @@ -0,0 +1,993 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Persistent Classes" +msgstr "Clases Persistentes" + +#: index.docbook:7 +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"Clases presistentes son clases en una aplicación que implementan las " +"entidades del problema de negocio (por ejemplo, Customer y Order en una " +"aplicación de comercio electrónico). No todas las instancias " +"de una clase persistente se considera que estén en el estado " +"persistente, una instancia puede en cambio ser transitoria o estar separada." + +#: index.docbook:14 +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"Hibernate funciona mejor si las clases siguen algunas simples reglas, " +"también conocidas como el modelo de programación de Viejas " +"Clases Java Planas (Plain Old Java Object o POJO). Sin embargo, ninguna de " +"estas reglas son requerimientos rígidos. En cambio, Hibernate3 asume " +"muy poco acerca de la naturaleza de tus objetos persistentes. Puedes " +"expresar un modelo de dominio en otras formas: usando árboles de " +"instancias de Map, por ejemplo." + +#: index.docbook:23 +msgid "A simple POJO example" +msgstr "Un ejemplo simple de POJO" + +#: index.docbook:25 +msgid "Most Java applications require a persistent class representing felines." +msgstr "" +"La mayoría de aplicaciones Java requieren una clase representando " +"felinos." + +#: index.docbook:29 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:31 +msgid "There are four main rules to follow here:" +msgstr "Aquí hay cuatro reglas principales a seguir:" + +#: index.docbook:37 +msgid "Implement a no-argument constructor" +msgstr "Implementa un constructor sin argumentos" + +#: index.docbook:39 +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat tiene un contructor sin argumentos. Todas las clases " +"persistentes deben tener un constructor por defecto (que puede no ser " +"público) de modo que Hibernate pueda instanciarlas usando " +"Constructor.newInstance(). Recomendamos fuertemente tener " +"un constructor por defecto con al menos visibilidad de package para la generación de proxies en tiempo de ejecución " +"en Hibernate." + +#: index.docbook:49 +msgid "Provide an identifier property (optional)" +msgstr "Provee una propiedad identificadora (opcional)" + +#: index.docbook:51 +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Cat tiene una propiedad llamada id. " +"Esta propiedad mapea a la columna clave primaria de la tabla de base de " +"datos. La propiedad podría llamarse cualquierCosa, y su tipo " +"podría haber sido cualquier tipo primitivo, cualquier tipo de " +"\"envoltura\" primitivo, java.lang.String o java." +"util.Date. (Si tu tabla de base de datos heredada tiene claves " +"compuestas, puedes incluso usar una clase definida por el usuario con " +"propiedades de estos tipos, ver la sección sobre identificadores " +"compuestos luego.)" + +#: index.docbook:60 +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"La propiedad identificadora es estrictamente opcional. Puedes olvidarla y " +"dejar que Hibernate siga internamente la pista de los identificadores del " +"objeto. Sin embargo, no recomendamos esto." + +#: index.docbook:65 +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "" +"De hecho, alguna funcionalidad está disponible sólo para " +"clases que declaran una propiedad identificadora:" + +#: index.docbook:72 +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"Reasociación transitiva de objetos separados (actualizaciones o " +"fusiones en cascada) - ver" + +#: index.docbook:79 +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#: index.docbook:84 +msgid "Session.merge()" +msgstr "Session.merge()" + +#: index.docbook:89 +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"Recomendamos que declares propiedades identificadoras nombradas-" +"consistentemente en clases persistentes. Mas aún, recomendamos que " +"uses un tipo nulable (es decir, no primitivo)." + +#: index.docbook:96 +msgid "Prefer non-final classes (optional)" +msgstr "Prefiere las clases no finales (opcional)" + +#: index.docbook:97 +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"Un aspecto central de Hibernate, proxies, depende de " +"que las clases persistentes sean ya no finales, o sean ya la " +"implementación de una interface que declare todos los métodos " +"públicos." + +#: index.docbook:102 +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"Puedes persistir con Hibernate clases final que no " +"implementen una interface, pero no serás capaz de usar proxies para " +"recuperación perezosa de asociaciones, lo que limitará tus " +"opciones para afinar el rendimiento." + +#: index.docbook:107 +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"Debes también evitar declarar métodos public final en clases non-final. Si quieres usar una clase con un método " +"public final, debes deshabilitar explícitamente el " +"uso de proxies estableciendo lazy=\"false\"." + +#: index.docbook:115 +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "" +"Declara métodos de acceso y modificación para los campos " +"persistentes (opcional)" + +#: index.docbook:117 +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat declara métodos de acceso para todos sus " +"campos persistente. Muchas otras herramientas ORM persisten directamente " +"variables de instancia. Creemos que es mejor proveer una indirección " +"entre el esquema relacional y las estructuras internas de la clase. Por " +"defecto, Hibernate persiste propiedades del estilo JavaBeans, y reconoce " +"nombres de método de la forma getFoo, " +"isFoo y setFoo. Puedes cambiar a " +"acceso directo a campos para propiedades en particular, de ser necesario." + +#: index.docbook:127 +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"Las propiedades no necesitan ser declaradas pú" +"blicas. Hibernate puede persistir una propiedad con un par get / set " +"protected o private." + +#: index.docbook:138 +msgid "Implementing inheritance" +msgstr "Implementando herencia" + +#: index.docbook:140 +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"Una subclase puede a su vez observar la primera y segunda regla. Hereda su " +"propiedad identificadora de la superclase, Cat." + +#: index.docbook:145 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:149 +msgid "" +"Implementing equals() and hashCode()" +msgstr "" +"Implementando equals() y hashCode()" + +#: index.docbook:151 +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"Tienes que sobrescribir los métodos equals() y " +"hashCode() si :" + +#: index.docbook:157 +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"piensas poner instancias de clases persistentes en un Set " +"(la forma recomendada de representar asociaciones multivaluadas) " +"y" + +#: index.docbook:164 +msgid "intend to use reattachment of detached instances" +msgstr "piensas usar reasociación de instancias separadas." + +#: index.docbook:170 +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernate garantiza la equivalencia de identidad persistente (fila de base " +"de datos) y identidad Java sólo dentro del ámbito de una " +"sesión en particular. De modo que en el momento que mezclamos " +"instancias recuperadas en sesiones diferentes, debemos implementar " +"equals() y hashCode() si deseamos " +"tener una semántica significativa de Sets." + +#: index.docbook:178 +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"La forma más obvia es implementar equals()/" +"hashCode() comparando el valor identificador de ambos " +"objetos. Si el valor es el mismo, ambos deben ser la misma fila de base de " +"datos, por lo tanto son iguales (si ambos son agregados a un Set, sólo tendremos un elemento en el Set). " +"Desafortunadamente, no podemos usar este enfoque con identificadores " +"generados! Hibernate sólo asignará valores identificadores a " +"objetos que son persistentes, una instancia recién creada no " +"tendrá ningún valor identificador! Además, si una " +"instancia no está salvada y está actualmente en un " +"Set, salvarla asignará un valor identificador al " +"objeto. Si equals() and hashCode() " +"están basados en el valor identificador, el código hash " +"podría cambiar, rompiendo el contrato de Set. Ver " +"el sitio web de Hibernate para una discusión completa de este " +"problema. Observa que esto no es una incidencia de Hibernate, sino la " +"semántica normal de Java de identidad de objeto e igualdad." + +#: index.docbook:192 +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"Recomendamos implementar equals() y hashCode() usando igualdad de clave de negocio (Business key " +"equality). Igualdad de clave de negocio significa que el mé" +"todo equals() compara sólo las propiedades que " +"forman la clave de negocio, una clave que podría identificar nuestra " +"instancia en el mundo real (una clave candidata natural):" + +#: index.docbook:200 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:202 +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"Nota que una clave de negocio no tiene que ser tan sólida como una " +"clave primaria candidata de base de datos (ver ). Las propiedades inmutables o únicas son " +"usualmente buenas candidatas para una clave de negocio." + +#: index.docbook:212 +msgid "Dynamic models" +msgstr "Modelos dinámicos" + +#: index.docbook:215 +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "" +"Ten en cuenta que las siguientes funcionalidades están consideradas " +"actualmente experimentales y pueden cambiar en el futuro cercano." + +#: index.docbook:219 +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"Las entidades persistentes no necesariamente tienen que estar representadas " +"como clases POJO o como objetos JavaBean en tiempo de ejecución. " +"Hibernate soporta además modelos dinámicos (usando " +"Maps de Maps en tiempo de " +"ejecución) y la representación de entidades como á" +"rboles de DOM4J. Con este enfoque no escribes clases persistentes, só" +"lo ficheros de mapeo." + +#: index.docbook:227 +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"Por defecto, Hibernate funciona en modo POJO normal. Puedes establecer una " +"representación de entidad por defecto para una " +"SessionFactory en particular usando la opción de " +"configuración default_entity_mode (ver )." + +#: index.docbook:234 +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"Los siguientes ejemplos demuestran la representación usando " +"Maps. Primero, en el fichero de mapeo, tiene que " +"declararse un entity-name en vez de (o como agregado a) " +"un nombre de clase:" + +#: index.docbook:240 +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:242 +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"Ten en cuenta que aunque las asociaciones se declaran usando nombres de " +"clase objetivo, el tipo objetivo de una asociación puede ser " +"además una entidad dinámica en vez de un POJO." + +#: index.docbook:249 +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"Después de establecer el modo de entidad por defecto a " +"dynamic-map para la SessionFactory, " +"podemos trabajar en tiempo de ejecución con Maps " +"de Maps:" + +#: index.docbook:255 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:257 +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"Las ventajas de un mapeo dinámico es rápido tiempo de ciclo de " +"prototipado sin la necesidad de implementación de clases de entidad. " +"Sin embargo, pierdes chequeo de tipos en tiempo de compilación y muy " +"probablemente tratarás con muchas excepciones en tiempo de " +"ejecución. Gracias al mapeo de Hibernate, el esquema de base de datos " +"puede estar facilmente sano y normalizado, permitiendo agregar una " +"implementación apropiada del modelo de dominio más tarde." + +#: index.docbook:265 +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "" +"Los modos de representación de entidad pueden ser establecidos por " +"Session:" + +#: index.docbook:270 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:273 +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"Por favor, ten en cuenta que la llamada a getSession() " +"usando un EntityMode está en la API de " +"Session, no en la de SessionFactory. " +"De esta forma, la nueva Session comparte la conexió" +"n JDBC, transacción y otra información de contexto. Esto " +"significa que no tienes que llamar a flush() ni a " +"close() en la Session secundaria, y " +"tembién dejar el manejo de la transacción y de la " +"conexión a la unidad de trabajo primaria." + +#: index.docbook:283 +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "" +"Puede encontrarse más información sobre las capacidades de " +"representación XML en ." + +#: index.docbook:291 +msgid "Tuplizers" +msgstr "UNTRANSLATED!!! Tuplizers" + +#: index.docbook:293 +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." + +#: index.docbook:308 +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" + +#: index.docbook:317 +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity." +"DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in " +"our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +" \n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our " +"custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +" }]]>" + +#: index.docbook:322 +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "" +"PORHACER: Documentar el framework de extensiones del usuario en los paquetes " +"de propiedad y proxies." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/preface.po b/documentation/envers/src/main/docbook/es-ES/content/preface.po new file mode 100644 index 0000000000..b6cc0f7766 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/preface.po @@ -0,0 +1,177 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:21 +msgid "Preface" +msgstr "Prefacio" + +#: index.docbook:23 +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"Trabajar con software orientado a objetos y una base de datos relacional " +"puede ser incómodo y consumir tiempo en los entornos de empresa de " +"hoy. Hibernate es una herramienta de mapeo objeto/relacional para entornos " +"Java. El término mapeo objeto/relacional (MOR) hace referencia a la " +"técnica de mapear una representación de datos desde un modelo " +"de objetos a un modelo de datos relacional con un esquema basado en SQL." + +#: index.docbook:31 +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"Hibernate no sólo se encarga de mapear de clases Java a tablas de " +"base de datos (y de tipos de datos de Java a tipos de datos SQL), sino que " +"también provee facilidades de consulta y recuperación de datos " +"y puede reducir significativamente el tiempo de desarrollo que de otra forma " +"se gasta en el manejo de los datos en SQL y JDBC." + +#: index.docbook:38 +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"La meta de Hibernate es relevar al desarrollador del 95 por ciento de las " +"tareas comunes relacionadas a la programación de la persistencia de " +"los datos. Hibernate puede no ser la mejor solución para aplicaciones " +"que usan solamente procedimientos almacenados para implementar la ló" +"gica de negocio en la base de datos, es mas útil con modelos de " +"dominio orientados a objetos y lógica de negocio en middle-tier " +"basada en Java. Sin embargo, Hibernate ciertamente puede ayudarte a quitar o " +"encapsular código SQL específico de vendedor y ayudará " +"con la tarea común de traducción de resultados desde una " +"representación tabular a un grafo de objetos." + +#: index.docbook:48 +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"Si eres nuevo en Hibernate y lo del Mapeo Objeto/Relacional o incluso en " +"Java, sigue por favor estos pasos:" + +#: index.docbook:55 +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +"Lee para un tutorial de 30 minutos, usando " +"Tomcat." + +#: index.docbook:63 +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "" +"Lee para entender los entornos en los que " +"puede ser usado Hibernate." + +#: index.docbook:69 +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"Dale una mirada al directorio eg/ en la distribució" +"n de Hibernate, contiene una aplicación independiente simple. Copia " +"tu driver JDBC al directorio lib/ y edita etc/" +"hibernate.properties, especificando los valores correctos para tu " +"base de datos. Desde línea de comandos en el directorio de la " +"distribución, tipea ant eg (usando Ant), o bajo " +"Windows, tipea build eg." + +#: index.docbook:80 +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "" +"Usa esta documentación de referencia como tu fuente de " +"información primaria. Ten en consideración leer Java " +"Persistence with Hibernate (http://www.manning.com/bauer2) si " +"necesitas mas ayuda con el diseño de aplicaciones o si prefieres un " +"tutorial paso a paso. Visita también http://caveatemptor.hibernate." +"org y descarga la aplicación de ejemplo para Java Persistence with " +"Hibernate." + +#: index.docbook:90 +msgid "FAQs are answered on the Hibernate website." +msgstr "Los FAQs son respondidos en el sitio web de Hibernate." + +#: index.docbook:95 +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "" +"En el sitio web de Hibernate hay enlaces a demos de terceros, ejemplos y " +"tutoriales." + +#: index.docbook:101 +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"El Area de Comunidad en el sitio web de Hibernate es una buena fuente de " +"patrones de diseño y varias soluciones de integración (Tomcat, " +"JBoss, Struts, EJB, etc.)." + +#: index.docbook:109 +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"Si tienes preguntas, usa el foro de usuarios enlazado en el sitio web de " +"Hibernate. También proveemos un sistema de seguimiento JIRA para " +"reportes de defectos y peticiones de nuevas características. Si estas " +"interesado en el desarrollo de Hibernate, únete a la lista de correo " +"de desarrolladores. Si estas interesado en traducir esta documentació" +"n a tu lenguaje, contáctanos en la lista de correo de desarrolladores." + +#: index.docbook:117 +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"A través de JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/) hay disponibilidad de soporte comercial de desarrollo, " +"soporte de producción y entrenamiento en Hibernate. Hibernate es un " +"proyecto de la suite de productos de código abierto JBoss " +"Professional." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/query_criteria.po b/documentation/envers/src/main/docbook/es-ES/content/query_criteria.po new file mode 100644 index 0000000000..1682ca9043 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/query_criteria.po @@ -0,0 +1,840 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Criteria Queries" +msgstr "Consultas por Criterios" + +#: index.docbook:7 +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "" +"Acompaña a Hibernate una API de consultas por criterios intuitiva y " +"extensible." + +#: index.docbook:12 +msgid "Creating a Criteria instance" +msgstr "Creando una instancia de Criteria" + +#: index.docbook:14 +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"La interface org.hibernate.Criteria representa una " +"consulta contra una clase persistente en particular. La Session es una fábrica de instancias de Criteria." + +#: index.docbook:20 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:25 +msgid "Narrowing the result set" +msgstr "Estrechando el conjunto resultado" + +#: index.docbook:27 +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"Un criterio individual de consulta es una instancia de la interface " +"org.hibernate.criterion.Criterion. La clase org." +"hibernate.criterion.Restrictions define métodos de fá" +"brica para obtener ciertos tipos prefabricados de Criterion." + +#: index.docbook:35 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:37 +msgid "Restrictions may be grouped logically." +msgstr "Las restricciones pueden ser agrupadas lógicamente." + +#: index.docbook:41 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:43 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:45 +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"Hay un gran rango de tipos de criterio prefabricados (subclases de " +"Restrictions), pero uno que es especialmente útil te deja " +"especificar SQL directamente." + +#: index.docbook:50 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:52 +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "" +"El sitio {alias} será remplazado por el alias de " +"fila de la entidad consultada." + +#: index.docbook:57 +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"Un enfoque alternativo para obtener un criterio es tomarlo de una instancia " +"de Property. Puedes crear una Property " +"llamando a Property.forName()." + +#: index.docbook:63 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:68 +msgid "Ordering the results" +msgstr "Ordenando los resultados" + +#: index.docbook:70 +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"Puedes ordenar los resultados usando org.hibernate.criterion.Order." + +#: index.docbook:74 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:76 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:81 +msgid "Associations" +msgstr "Asociaciones" + +#: index.docbook:83 +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"Puedes especificar fácilmente restricciones sobre las entidades " +"relacionadas al navegar asociaciones usando createCriteria()." + +#: index.docbook:88 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:90 +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"nota que el segundo createCriteria() devuelve una nueva " +"instancia de Criteria, que hace referencia a los " +"elementos de la colección kittens." + +#: index.docbook:96 +msgid "The following, alternate form is useful in certain circumstances." +msgstr "La siguiente forma alternativa es útil en ciertas circunstancias." + +#: index.docbook:100 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:102 +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias() no crea una nueva instancia de " +"Criteria.)" + +#: index.docbook:107 +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"¡Observa que las colecciones de gatitos tenidas por las instancias de " +"Cat devueltas por las dos consultas previas no están prefiltradas por los criterios! Si deseas recuperar " +"sólo los gatitos que emparejen los criterios, debes usar " +"returnMaps()." + +#: index.docbook:114 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:119 +msgid "Dynamic association fetching" +msgstr "Recuperación dinámica de asociaciones" + +#: index.docbook:121 +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"Puedes especificar la semántica de recuperación de " +"asociaciones en tiempo de ejecución usando setFetchMode()." + +#: index.docbook:126 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:128 +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"Esta consulta recuperará tanto mate como " +"kittens por unión exterior (outer join). Ver para más información." + +#: index.docbook:136 +msgid "Example queries" +msgstr "Consultas por ejemplos" + +#: index.docbook:138 +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"La clase org.hibernate.criterion.Example te permite " +"construir un criterio de consulta a partir de una instancia dada." + +#: index.docbook:143 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:145 +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "" +"Las propiedades de versión, los identificadores y las asociaciones " +"son ignorados. Por defecto, las propiedades valuadas a nulo son excluí" +"das." + +#: index.docbook:150 +msgid "You can adjust how the Example is applied." +msgstr "Puedes ajustar cómo se aplica el Example." + +#: index.docbook:154 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:156 +msgid "You can even use examples to place criteria upon associated objects." +msgstr "" +"Puedes incluso usar ejemplos para colocar criterios sobre objetos asociados." + +#: index.docbook:160 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:165 +msgid "Projections, aggregation and grouping" +msgstr "Proyecciones, agregación y agrupamiento" + +#: index.docbook:166 +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"La clase org.hibernate.criterion.Projections es una " +"fábrica de instancias de Projection. Aplicamos una " +"proyección a una consulta llamando a setProjection()." + +#: index.docbook:172 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:174 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:176 +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"No es necesario ningún \"group by\" explícito en una consulta por " +"criterios. Ciertos tipos de proyecciones son definidos para ser " +"proyecciones agrupadas, que además aparecen en " +"la cláusula SQL group by." + +#: index.docbook:182 +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"Puede opcionalmente asignarse un alias a una proyección, de modo que " +"el valor proyectado pueda ser referido en restricciones u ordenamientos. " +"Aquí hay dos formas diferentes de hacer esto:" + +#: index.docbook:188 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:190 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:192 +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"Los métodos alias() y as() " +"simplemente envuelven una instancia de proyección en otra instancia " +"de Projection con alias. Como un atajo, puedes asignar un " +"alias cuando agregas la proyección a una lista de proyecciones:" + +#: index.docbook:199 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:201 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:203 +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "" +"Puedes también usar Property.forName() para " +"expresar proyecciones:" + +#: index.docbook:207 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:209 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:214 +msgid "Detached queries and subqueries" +msgstr "Consultas y subconsultas separadas" + +#: index.docbook:215 +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"La clase DetachedCriteria te deja crear una consulta " +"fuera del ámbito de una sesión, y entonces ejecutarla luego " +"usando alguna Session arbitraria." + +#: index.docbook:220 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:222 +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"También una DetachedCriteria puede usarse para " +"expresar una subconsulta. Las instancias de Criterion implicando " +"subconsultas pueden obtenerse vía Subqueries o " +"Property." + +#: index.docbook:228 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:230 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:232 +msgid "Even correlated subqueries are possible:" +msgstr "Incluso son posibles las subconsultas correlacionadas:" + +#: index.docbook:236 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:245 +msgid "Queries by natural identifier" +msgstr "Consultas por identificador natural" + +#: index.docbook:247 +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"Para la mayoría de consultas, incluyendo las consultas por criterios, " +"el caché de consulta no es muy eficiente, debido a que la " +"invalidación del caché de consulta ocurre demasiado " +"frecuentemente. Sin embargo, hay un tipo especial de consulta donde podemos " +"optimizar el algoritmo de invalidación de caché: búsquedas por " +"una clave natural constante. En algunas aplicaciones, este tipo de consulta, " +"ocurre frecuentemente. La API de criterios brinda especial provisión " +"para este caso de uso." + +#: index.docbook:255 +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"Primero, debes mapear la clave natural de tu entidad usando <" +"natural-id>, y habilitar el uso del caché de segundo " +"nivel." + +#: index.docbook:260 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:262 +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "" +"Nota que esta funcionalidad no está pensada para uso con entidades " +"con claves naturales mutable." + +#: index.docbook:267 +msgid "Next, enable the Hibernate query cache." +msgstr "Seguido, habilita el caché de consulta de Hibernate." + +#: index.docbook:271 +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"Ahora, Restrictions.naturalId() nos permite hacer uso de " +"el algoritmo de caché más eficiente." + +#: index.docbook:276 +msgid "" +"" +msgstr "" +"" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/query_hql.po b/documentation/envers/src/main/docbook/es-ES/content/query_hql.po new file mode 100644 index 0000000000..c2834eabba --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/query_hql.po @@ -0,0 +1,2230 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: El Lenguaje de Consulta de Hibernate" + +#: index.docbook:7 +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"Hibernate está equipado con un lenguaje de consulta extremadamente " +"potente que (intencionalmente en absoluto) se parece muchísimo a SQL. " +"Pero no te engañes por la sintaxis; HQL es completamente orientado a " +"objetos, entendiendo nociones como herencia, polimorfismo y asociació" +"n." + +#: index.docbook:14 +msgid "Case Sensitivity" +msgstr "Sensibilidad a Mayúsculas" + +#: index.docbook:16 +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"Las consultas son insensibles a mayúsculas, excepto para nombres de " +"clases Java y propiedades. De modo que SeLeCT es lo mismo " +"que sELEct e igual a SELECT, pero " +"org.hibernate.eg.FOO no lo es a org.hibernate.eg." +"Foo y foo.barSet no es igual a foo." +"BARSET." + +#: index.docbook:27 +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"Este manual usa palabras clave HQL en minúsculas. Algunos usuarios " +"encuentran las consultas con palabras clave en mayúsculas más " +"leíbles, pero encontramos esta convención fea cuando se encaja " +"en código Java." + +#: index.docbook:35 +msgid "The from clause" +msgstr "La cláusula from" + +#: index.docbook:37 +msgid "The simplest possible Hibernate query is of the form:" +msgstr "La consulta más simple posible de Hibernate es de la forma:" + +#: index.docbook:41 +msgid "" +msgstr "" + +#: index.docbook:43 +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"que simplemente devuelve todas las instancias de la clase eg.Cat. Usualmente no necesitamos cualificar el nombre de la clase, ya que " +"auto-import está por defecto. De modo que casi " +"siempre escribimos solamente:" + +#: index.docbook:49 +msgid "" +msgstr "" + +#: index.docbook:51 +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"La mayoría del tiempo, necesitarás asignar un alias, ya que querrás referirte al Cat en " +"otras partes de la consulta." + +#: index.docbook:57, index.docbook:372 +msgid "" +msgstr "" + +#: index.docbook:59 +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"Esta consulta asigna el alias cat a las instancias de " +"Cat, de modo que podríamos usar ese alias luego en " +"la consulta. La palabra clave as es opcional; " +"también podríamos escribir:" + +#: index.docbook:65 +msgid "" +msgstr "" + +#: index.docbook:67 +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "" +"Pueden aparecer múltiples clases, resultando en un producto " +"cartesiano o unión \"cruzada\" (cross join)." + +#: index.docbook:71 +msgid "" +msgstr "" + +#: index.docbook:72 +msgid "" +msgstr "" + +#: index.docbook:74 +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"Se considera buena práctica el nombrar los alias de consulta usando " +"una inicial en minúsculas, consistente con los estándares de " +"nombrado de Java para variables locales (por ejemplo, domesticCat)." + +#: index.docbook:83 +msgid "Associations and joins" +msgstr "Asociaciones y uniones (joins)" + +#: index.docbook:85 +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"Podemos también asignar aliases a entidades asociadas, e incluso a " +"elementos de una colección de valores, usando una join." + +#: index.docbook:90 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:92 +msgid "" +msgstr "" + +#: index.docbook:94 +msgid "" +msgstr "" + +#: index.docbook:96 +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "Los tipos de join soportados son prestados de ANSI SQL" + +#: index.docbook:103 +msgid "inner join" +msgstr "inner join" + +#: index.docbook:108 +msgid "left outer join" +msgstr "left outer join" + +#: index.docbook:113 +msgid "right outer join" +msgstr "right outer join" + +#: index.docbook:117 +msgid "full join (not usually useful)" +msgstr "full join (no útil usualmente)" + +#: index.docbook:123 +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"Las construcciones inner join, left outer join y right outer join pueden ser abreviadas." + +#: index.docbook:128 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:130 +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "" +"Puedes proveer condiciones de unión extra usando la palabra clave " +"with de HQL." + +#: index.docbook:135 +msgid "" +" 10.0]]>" +msgstr "" +" 10.0]]>" + +#: index.docbook:137 +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"En adición, un \"fetch\" join permite a las asociaciones o " +"colecciones de valores ser inicializadas junto a sus objetos padres, usando " +"una sola selección. Esto es particularmente útil en el case de " +"una colección. Efectivamente sobrescribe el outer join y las " +"declaraciones perezosas (lazy) del fichero de mapeo para asociaciones y " +"colecciones. Ver para más " +"información." + +#: index.docbook:145 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:147 +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"Usualmente a un fetch join no se necesita asignársele un alias, " +"porque los objetos asociados no deben ser usados en la cláusula " +"where (ni en cualquier otra cláusula). Ademá" +"s, los objetos asociados no son devueltos directamente en los resultados de " +"consulta. En cambio, pueden ser accedidos vía el objeto padre. La " +"única razón por la que necesitaríamos un alias es " +"estamos uniendo recursivamente otra colección:" + +#: index.docbook:155 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:157 +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"Nota que la construcción fetch no puede usarse en " +"consultas llamadas usando scroll() o iterate(). Ni debe usarse fetch junto con " +"setMaxResults() o setFirstResult(). " +"Tampoco puede usarse fetch junto a una condición " +"with ad hoc. Es posible crear un producto cartesiano " +"trayendo por join más de una colección en una colecció" +"n, así que ten cuidado en este caso. Traer por join múltiples " +"roles de colección también da a veces resultados inesperados " +"para mapeos de bag, así que sé cuidadoso sobre cómo " +"formular tus consultas en este caso. Finalmente, nota que full join " +"fetch y right join fetch no son significativos." + +#: index.docbook:172 +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"Si estás usando recuperación perezosa a nivel de propiedad " +"(con instrumentación de bytecode), es posible forzar a Hibernate a " +"traer las propiedades perezosas inmediatamente (en la primera consulta) " +"usando fetch all properties." + +#: index.docbook:178 +msgid "" +msgstr "" + +#: index.docbook:179 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:184 +msgid "Forms of join syntax" +msgstr "UNTRANSLATED!!! Forms of join syntax" + +#: index.docbook:186 +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"HQL supports two forms of association joining: implicit " +"and explicit." + +#: index.docbook:190 +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." + +#: index.docbook:195 +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." + +#: index.docbook:202 +msgid "" +msgstr "" + +#: index.docbook:206 +msgid "Refering to identifier property" +msgstr "Refering to identifier property" + +#: index.docbook:208 +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" + +#: index.docbook:213 +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." + +#: index.docbook:220 +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"If the entity defines a named identifier property, you may use that property " +"name." + +#: index.docbook:226 +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." + +#: index.docbook:233 +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." + +#: index.docbook:242 +msgid "The select clause" +msgstr "La cláusula select" + +#: index.docbook:244 +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"La cláusula select escoge qué objetos y " +"propiedades devolver in el conjunto resultado de la consulta. Considera:" + +#: index.docbook:249 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:251 +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"La consulta seleccionará mates de otros " +"Cats. Realmente, puedes expresar esta consulta en un " +"forma más compacta como:" + +#: index.docbook:256 +msgid "" +msgstr "" + +#: index.docbook:258 +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"Las consultas pueden devolver propiedades de cualquier tipo de valor " +"incluyendo propiedades de tipo componente:" + +#: index.docbook:262 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:264 +msgid "" +msgstr "" + +#: index.docbook:266 +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"Las consultas pueden devolver múltiples objetos y/o propiedades como " +"un array de tipo Object[]," + +#: index.docbook:271 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:273 +msgid "or as a List," +msgstr "o como una List," + +#: index.docbook:277 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:279 +msgid "or as an actual typesafe Java object," +msgstr "o como un objeto real Java de tipo seguro," + +#: index.docbook:283 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:285 +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "" +"asumiendo que la clase Family tiene un constructor " +"apropiado." + +#: index.docbook:289 +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "" +"Puedes asignar aliases para seleccionar expresiones usando as:" + +#: index.docbook:293 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:295 +msgid "" +"This is most useful when used together with select new map:" +msgstr "" +"Esto es lo más útil cuando se usa junto con select " +"new map:" + +#: index.docbook:299 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:301 +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "" +"Esta consulta devuelve un Map de aliases a valores " +"seleccionados." + +#: index.docbook:308 +msgid "Aggregate functions" +msgstr "Funciones de agregación" + +#: index.docbook:310 +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "" +"Las consultas HQL pueden incluso devolver resultados de funciones de " +"agregación sobre propiedades:" + +#: index.docbook:314 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:325 +msgid "The supported aggregate functions are" +msgstr "Las funciones de agregación soportadas son" + +#: index.docbook:332 +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#: index.docbook:337 +msgid "count(*)" +msgstr "count(*)" + +#: index.docbook:342 +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#: index.docbook:347 +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "" +"Puedes usar operadores aritméticos, concatenación, y funciones " +"SQL reconocidas en la cláusula select:" + +#: index.docbook:352 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:354 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:356 +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"Las palabras clave distinct y all " +"pueden ser usadas y tienen las misma semántica que en SQL." + +#: index.docbook:361 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:366 +msgid "Polymorphic queries" +msgstr "Consultas polimórficas" + +#: index.docbook:368 +msgid "A query like:" +msgstr "Una consulta como:" + +#: index.docbook:374 +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"devuelve instancias no sólo de Cat, sino " +"también de subclases como DomesticCat. Las " +"consultas de Hibernate pueden mencionar cualquier clase " +"o interface Java en la cláusula from. La consulta " +"devolverá instancias de todas las clases persistentes que extiendan " +"esa clase o implementen la interface. La siguiente consulta devolverí" +"a todos los objetos persistentes." + +#: index.docbook:382 +msgid "" +msgstr "" + +#: index.docbook:384 +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "" +"La interface Named podría ser implementada por " +"varias clases persistentes:" + +#: index.docbook:389 +msgid "" +msgstr "" + +#: index.docbook:391 +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"Nota que estas dos últimas consultas requerirán más de " +"un SELECT SQL. Esto significa que la cláusula " +"order by no ordenará correctamente todo el " +"conjunto resultado. (Significa además que no puedes llamar estas " +"consulta usando Query.scroll().)" + +#: index.docbook:400 +msgid "The where clause" +msgstr "La cláusula where" + +#: index.docbook:402 +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"La cláusula where te permite estrechar la lista de instancias " +"devueltas. Si no existe ningún alias. puedes referirte a las " +"propiedades por nombre:" + +#: index.docbook:407 +msgid "" +msgstr "" + +#: index.docbook:409 +msgid "If there is an alias, use a qualified property name:" +msgstr "Si existe un alias, usan un nombre cualificado de propiedad:" + +#: index.docbook:413 +msgid "" +msgstr "" + +#: index.docbook:415 +msgid "returns instances of Cat named 'Fritz'." +msgstr "devuelve las instancias de Cat llamadas 'Fritz'." + +#: index.docbook:419 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:421 +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"devolverá todas las instancias de Foo para las " +"cuales exista una instancia de bar con una propiedad " +"date igual a la propiedad startDate " +"del Foo. Las expresiones de ruta compuestas hacen la " +"cláusula where extremadamente potente. Considera:" + +#: index.docbook:430 +msgid "" +msgstr "" + +#: index.docbook:432 +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"Esta consulta se traduce en una consulta SQL con una unión de tabla " +"(interna). Si fueses a escribir algo como" + +#: index.docbook:437 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:439 +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "" +"terminarías con una consulta que requeriría cuatro uniones de " +"tablas en SQL." + +#: index.docbook:443 +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"El operador = puede ser usado para comparar no só" +"lo propiedades, sino también instancias:" + +#: index.docbook:448 +msgid "" +msgstr "" + +#: index.docbook:450 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:452 +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"La propiedad especial (en minúsculas) id puede ser " +"usada para referenciar el identificador único de un objeto. " +"(También puedes usar su nombre de propiedad.)" + +#: index.docbook:458 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:460 +msgid "The second query is efficient. No table join is required!" +msgstr "" +"La segunda consulta es eficiente. ¡No se requiere ninguna unió" +"n de tablas!" + +#: index.docbook:464 +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"También pueden ser usadas las propiedades de identificadores " +"compuestos. Supón que Person tiene un " +"identificador compuesto consistente en country y " +"medicareNumber." + +#: index.docbook:471 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:473 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:475 +msgid "Once again, the second query requires no table join." +msgstr "" +"Una vez más, la segunda consulta no requiere ninguna unión de " +"tablas." + +#: index.docbook:479 +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"Asimismo, la propiedad especial class acccede al valor " +"discriminador de una instancia en el caso de persistencia polimó" +"rfica. Un nombre de clase Java embebido en la cláusula where " +"será traducido a su valor discriminador." + +#: index.docbook:485 +msgid "" +msgstr "" + +#: index.docbook:487 +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." + +#: index.docbook:492 +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"Un tipo \"any\" tiene las propiedades especiales id y " +"class, permiténdonos expresar un join en la " +"siguiente forma (donde AuditLog.item es una propiedad " +"mapeada con <any>)." + +#: index.docbook:498 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:500 +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"Nota que log.item.class y payment.class harían referencia a los valores de columnas de base de datos " +"completamente diferentes en la consulta anterior." + +#: index.docbook:508 +msgid "Expressions" +msgstr "Expresiones" + +#: index.docbook:510 +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"Las expresiones permitidas en la cláusula where " +"incluyen la mayoría del tipo de cosas que podrías escribir en " +"SQL:" + +#: index.docbook:517 +msgid "mathematical operators +, -, *, /" +msgstr "operadores matemáticos +, -, *, /" + +#: index.docbook:522 +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "" +"operadores de comparación binarios =, >=, <=, <" +">, !=, like" + +#: index.docbook:527 +msgid "logical operations and, or, not" +msgstr "operadores lógicos and, or, not" + +#: index.docbook:532 +msgid "Parentheses ( ), indicating grouping" +msgstr "Paréntesis ( ), indicando agrupación" + +#: index.docbook:537 +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of y not member of" + +#: index.docbook:550 +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"Caso \"simple\", case ... when ... then ... else ... end, " +"y caso \"buscado\", case when ... then ... else ... end" + +#: index.docbook:556 +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"concatenación de cadenas ...||... o concat" +"(...,...)" + +#: index.docbook:561 +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#: index.docbook:567 +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#: index.docbook:574 +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"Cualquier función u operador definido por EJB-QL 3.0: " +"substring(), trim(), lower(), upper(), length(), locate(), abs(), " +"sqrt(), bit_length(), mod()" + +#: index.docbook:580 +msgid "coalesce() and nullif()" +msgstr "coalesce() y nullif()" + +#: index.docbook:585 +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "" +"str() para convertir valores numéricos o " +"temporales a una cadena legible." + +#: index.docbook:591 +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"cast(... as ...), donde el segundo argumento es el nombre " +"de un tipo Hibernate , y extract(... from ...) si " +"cast() y extract() fuesen soportados " +"por la base de datos subyacente." + +#: index.docbook:599 +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "" +"la función index() de HQL, que se aplica a alias " +"de una colección indexada unida." + +#: index.docbook:605 +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"funciones de HQL que tomen expresiones de ruta valuadas en colecciones: " +"size(), minelement(), maxelement(), minindex(), maxindex(), junto a las funciones especiales elements() and " +"indices que pueden ser cuantificadas usando " +"some, all, exists, any, in." + +#: index.docbook:613 +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"Cualquier función escalar SQL soportada por la base de datos como " +"sign(), trunc(), rtrim(), sin()" + +#: index.docbook:619 +msgid "JDBC-style positional parameters ?" +msgstr "parámetros posicionales JDBC ?" + +#: index.docbook:624 +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"parámetros con nombre :name, :start_date, :x1" + +#: index.docbook:629 +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"literales SQL 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" + +#: index.docbook:635 +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"constantes Java public static final eg.Color." +"TABBY" + +#: index.docbook:641 +msgid "" +"in and between may be used as follows:" +msgstr "" +"in y between pueden usarse como sigue:" + +#: index.docbook:645 +msgid "" +msgstr "" + +#: index.docbook:647 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:649 +msgid "and the negated forms may be written" +msgstr "y pueden escribirse las formas negadas" + +#: index.docbook:653 +msgid "" +msgstr "" +"" + +#: index.docbook:655 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:657 +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"Asimismo, is null y is not null pueden " +"ser usadas para comprobar valores nulos." + +#: index.docbook:662 +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"Los booleanos pueden ser fácilmente usados en expresiones declarando " +"substituciones de consulta HQL en la configuración de Hibernate:" + +#: index.docbook:667 +msgid "" +"true 1, false 0]]>" +msgstr "" +"true 1, false 0]]>" + +#: index.docbook:669 +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"Esto remplazará las palabras clave true y " +"false con los literales 1 y " +"0 en el SQL traducido de este HQL:" + +#: index.docbook:674 +msgid "" +msgstr "" + +#: index.docbook:676 +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"Puedes comprobar el tamaño de una colección con la propiedad " +"especial size, o la función especial size" +"()." + +#: index.docbook:681 +msgid " 0]]>" +msgstr " 0]]>" + +#: index.docbook:683 +msgid " 0]]>" +msgstr " 0]]>" + +#: index.docbook:685 +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"Para colecciones indexadas, puedes referirte a los índices má" +"ximo y mínimo usando las funciones minindex y " +"maxindex. Similarmente, puedes referirte a los elementos " +"máximo y mínimo de una colección de tipo básico " +"usando las funciones minelement y maxelement." + +#: index.docbook:693 +msgid "" +" current_date]]>" +msgstr "" +" current_date]]>" + +#: index.docbook:695 +msgid " 100]]>" +msgstr " 100]]>" + +#: index.docbook:697 +msgid " 10000]]>" +msgstr " 10000]]>" + +#: index.docbook:699 +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"Las funciones SQL any, some, all, exists, in están " +"soportadas cuando se les pasa el conjunto de elementos o índices de " +"una colección (funciones elements y " +"indices) o el resultado de una subconsulta (ver debajo)." + +#: index.docbook:705 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:707 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:709 +msgid "" +msgstr "" + +#: index.docbook:711 +msgid " all elements(p.scores)]]>" +msgstr " all elements(p.scores)]]>" + +#: index.docbook:713 +msgid "" +msgstr "" + +#: index.docbook:715 +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"Nota que estas construcciones - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - pueden ser usadas solamente en la clá" +"usula where en Hibernate3." + +#: index.docbook:722 +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"Los elementos de colecciones indexadas (arrays, listas, mapas) pueden ser " +"referidos por índice (en una cláusula where solamente):" + +#: index.docbook:727 +msgid "" +msgstr "" + +#: index.docbook:729 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:731 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:733 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:735 +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "" +"La expresión dentro de [] puede incluso ser una " +"expresión aritmética." + +#: index.docbook:739 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:741 +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"HQL provee además el función prefabricada index(), para elementos de una asociación uno-a-muchos o " +"colección de valores." + +#: index.docbook:746 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:748 +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "" +"Pueden usarse las funciones SQL escalares soportadas por la base de datos " +"subyacente" + +#: index.docbook:752 +msgid "" +msgstr "" + +#: index.docbook:754 +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"Si aún no estás convencido de todo esto, piensa cuánto " +"más largo y menos leíble sería la siguiente consulta en " +"SQL:" + +#: index.docbook:759 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:761 +msgid "Hint: something like" +msgstr "Ayuda: algo como" + +#: index.docbook:765 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:770 +msgid "The order by clause" +msgstr "La cláusula order by" + +#: index.docbook:772 +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"La lista devuelta por una consulta puede ser ordenada por cualquier " +"propiedad de una clase devuelta o componentes:" + +#: index.docbook:776 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:778 +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"Los asc o desc opcionales indican " +"ordenamiento ascendente o descendente respectivamente." + +#: index.docbook:785 +msgid "The group by clause" +msgstr "La cláusula group by" + +#: index.docbook:787 +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"Una consulta que devuelve valores agregados puede ser agrupada por cualquier " +"propiedad de una clase devuelta o componentes:" + +#: index.docbook:791 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:793 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:795 +msgid "A having clause is also allowed." +msgstr "" +"Se permite también una cláusula having." + +#: index.docbook:799 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:801 +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"Las funciones y funciones de agregación SQL están permitidas " +"en las cláusulas having y order by, si están soportadas por la base de datos subyacente (por " +"ejemplo, no en MySQL)." + +#: index.docbook:807 +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" + +#: index.docbook:809 +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"Nota que ni la cláusula group by ni la clá" +"usula order by pueden contener expresiones aritmé" +"ticas." + +#: index.docbook:821 +msgid "Subqueries" +msgstr "Subconsultas" + +#: index.docbook:823 +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"Para bases de datos que soportan subconsultas, Hibernate soporta " +"subconsultas dentro de consultas. Una subconsulta debe ser encerrada entre " +"paréntesis (frecuentemente por una llamada a una función de " +"agregación SQL). Incluso se permiten subconsultas correlacionadas " +"(subconsultas que hacen referencia a un alias en la consulta exterior)." + +#: index.docbook:829 +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +" )]]>" + +#: index.docbook:831 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:833 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:835 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:837 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:839 +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" +"Note that HQL subqueries may occur only in the select or where clauses." + +#: index.docbook:843 +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." + +#: index.docbook:851 +msgid "HQL examples" +msgstr "Ejemplos de HQL" + +#: index.docbook:853 +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"Las consultas de Hibernate pueden ser abolutamente potentes y complejas, De " +"hecho, el poder del lenguaje de consulta es uno de los puntos principales de " +"venta de Hibernate. He aquí algunos consultas de ejemplo muy " +"similares a consultas que he usado en un proyecto reciente. ¡Nota que " +"la mayoría de las consultas que escribirás som mucho má" +"s simples que estas!" + +#: index.docbook:859 +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"La siguiente consulta devuelve el order id, número de items y valor " +"total de la orden para todas las ordenes inpagas de un cliente en particular " +"y valor total mínimo dados, ordenando los resultados por valor total. " +"Al determinar los precios, usa el catálogo actual. La consulta SQL " +"resultante, contra las tablas ORDER, ORDER_LINE, PRODUCT, CATALOG and " +"PRICE tiene cuatro joins interiores y una subselect (no " +"correlacionada)." + +#: index.docbook:868 +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" +"= all (\n" +" select cat.effectiveDate \n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" + +#: index.docbook:870 +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"¡Qué monstruo! Realmente, en la vida real, no estoy muy " +"afilado en subconsultas, de modo que mi consulta fue realmente algo como " +"esto:" + +#: index.docbook:875 +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" + +#: index.docbook:877 +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"La próxima consulta cuenta el número de pagos en cada estado, " +"excluyendo todos los pagos en el estado AWAITING_APPROVAL " +"donde el estado más reciente fue hecho por el usuario actual. Se " +"traduce en una consulta SQL con dos joins interiores y una subselect " +"correlacionada contra las tablas PAYMENT, " +"PAYMENT_STATUS y PAYMENT_STATUS_CHANGE." + +#: index.docbook:885 +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = ( \n" +" select max(change.timeStamp) \n" +" from PaymentStatusChange change \n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" + +#: index.docbook:887 +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"Si hubiese mapeado la colección statusChanges como " +"una lista, en vez de un conjunto, la consulta habría sido mucho " +"más simple de escribir." + +#: index.docbook:892 +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" + +#: index.docbook:894 +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"La próxima consulta usa la función isNull() " +"de MS SQL Server para devolver todas las cuentas y pagos inpagos de la " +"organización a la que pertenece el usuario actual. Se traduce en una " +"consulta SQL con tres joins interiores, un join exterior y una subconsulta " +"contra las tablas ACCOUNT, PAYMENT, " +"PAYMENT_STATUS, ACCOUNT_TYPE, " +"ORGANIZATION y ORG_USER." + +#: index.docbook:903 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:905 +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "" +"Para algunas bases de datos, necesitaríamos eliminar la subselect " +"(correlacionada)." + +#: index.docbook:909 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:914 +msgid "Bulk update and delete" +msgstr "Sentencias UPDATE y DELETE masivas" + +#: index.docbook:916 +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"HQL soporta ahora sentencias UPDATE y DELETE en HQL. Ver para detalles." + +#: index.docbook:924 +msgid "Tips & Tricks" +msgstr "Consejos y Trucos" + +#: index.docbook:926 +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "" +"Puedes contar el número de resultados de una consulta sin devolverlos " +"realmente:" + +#: index.docbook:930 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:932 +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" +"Para ordenar un resultado por el tamaño de una colección, usa " +"la siguiente consulta:" + +#: index.docbook:936 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:938 +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"Si tu base de datos soporta subselects, puedes colocar una condición " +"sobre el tamaño de selección en la cláusula where de tu " +"consulta:" + +#: index.docbook:943 +msgid "= 1]]>" +msgstr "= 1]]>" + +#: index.docbook:945 +msgid "If your database doesn't support subselects, use the following query:" +msgstr "Si tu base de datos no soporta subselects, usa la siguiente consulta:" + +#: index.docbook:949 +msgid "" +"= 1]]>" +msgstr "" +"= 1]]>" + +#: index.docbook:951 +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"Como esta solución no puede devolver un User con " +"cero mensajes debido a la unión interior, la siguiente forma es " +"también útil:" + +#: index.docbook:956 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:958 +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" +"Las propiedades de un JavaBean pueden ser ligadas al parámetros de " +"consulta con nombre:" + +#: index.docbook:962 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:964 +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"Las colecciones son paginables usando la interface Query " +"con un filtro:" + +#: index.docbook:968 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:970 +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"Los elementos de colección pueden ser ordenados o agrupados usando un " +"filtro de consulta:" + +#: index.docbook:974 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:976 +msgid "You can find the size of a collection without initializing it:" +msgstr "" +"Puedes hallar el tamaño de una colección sin inicializarla:" + +#: index.docbook:980 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:985 +msgid "Components" +msgstr "UNTRANSLATED! Components" + +#: index.docbook:987 +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" + +#: index.docbook:992, index.docbook:1038 +msgid "" +msgstr "" + +#: index.docbook:993 +msgid "" +msgstr "" + +#: index.docbook:995 +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" + +#: index.docbook:1000 +msgid "" +msgstr "" + +#: index.docbook:1001 +msgid "" +msgstr "" + +#: index.docbook:1003 +msgid "Components can also be used in the order by clause:" +msgstr "Components can also be used in the order by clause:" + +#: index.docbook:1007 +msgid "" +msgstr "" + +#: index.docbook:1008 +msgid "" +msgstr "" + +#: index.docbook:1010 +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" +"Another common use of components is in row " +"value constructors." + +#: index.docbook:1016 +msgid "Row value constructor syntax" +msgstr "Row value constructor syntax" + +#: index.docbook:1018 +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" + +#: index.docbook:1025 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1027 +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" + +#: index.docbook:1032 +msgid "" +msgstr "" +"" + +#: index.docbook:1034 +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" +"It can also be useful to specify this in the select " +"clause:" + +#: index.docbook:1040 +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" + +#: index.docbook:1045 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:1047 +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/query_sql.po b/documentation/envers/src/main/docbook/es-ES/content/query_sql.po new file mode 100644 index 0000000000..cf682310df --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/query_sql.po @@ -0,0 +1,1474 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Native SQL" +msgstr "SQL Nativo" + +#: index.docbook:7 +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"Puedes también expresar consultas en el dialecto SQL nativo de tu " +"base de datos. Esto es útil si quieres utilizar aspectos especí" +"ficos de base de datos tal como consejos (hints) de consulta o la palabra " +"clave CONNECT en Oracle. Provee además una clara " +"ruta de migración desde una aplicación basada en SQL/JDBC " +"directo a Hibernate." + +#: index.docbook:13 +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3 te permite especificar SQL escrito a mano (incluyendo " +"procedimientos almacenados) para todas las operaciones de creación, " +"actualización, borrado y carga." + +#: index.docbook:17 +msgid "Using a SQLQuery" +msgstr "Using a SQLQuery" + +#: index.docbook:19 +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." + +#: index.docbook:25 +msgid "Scalar queries" +msgstr "Scalar queries" + +#: index.docbook:27 +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "The most basic SQL query is to get a list of scalars (values)." + +#: index.docbook:30 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:32 +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." + +#: index.docbook:37 +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." + +#: index.docbook:41 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:43, index.docbook:89, index.docbook:170, index.docbook:321 +msgid "This query specified:" +msgstr "This query specified:" + +#: index.docbook:47, index.docbook:93, index.docbook:325 +msgid "the SQL query string" +msgstr "the SQL query string" + +#: index.docbook:51 +msgid "the columns and types to return" +msgstr "the columns and types to return" + +#: index.docbook:55 +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." + +#: index.docbook:63 +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "" +"It is possible to leave out the type information for all or some of the " +"scalars." + +#: index.docbook:66 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:68 +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." + +#: index.docbook:72 +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." + +#: index.docbook:80 +msgid "Entity queries" +msgstr "Entity queries" + +#: index.docbook:82 +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." + +#: index.docbook:87 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:97 +msgid "the entity returned by the query" +msgstr "the entity returned by the query" + +#: index.docbook:101 +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." + +#: index.docbook:105 +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" + +#: index.docbook:113 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:115 +msgid "This will allow cat.getDog() to function properly." +msgstr "This will allow cat.getDog() to function properly." + +#: index.docbook:119 +msgid "Handling associations and collections" +msgstr "Handling associations and collections" + +#: index.docbook:121 +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." + +#: index.docbook:126 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:128 +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." + +#: index.docbook:136 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:138 +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." + +#: index.docbook:146 +msgid "Returning multiple entities" +msgstr "Returning multiple entities" + +#: index.docbook:148 +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." + +#: index.docbook:153 +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" + +#: index.docbook:156 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:158 +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." + +#: index.docbook:165 +msgid "The following form is not vulnerable to column name duplication:" +msgstr "The following form is not vulnerable to column name duplication:" + +#: index.docbook:168 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:174 +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" + +#: index.docbook:179 +msgid "the entities returned by the query" +msgstr "the entities returned by the query" + +#: index.docbook:183 +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." +msgstr "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." + +#: index.docbook:192 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:195 +msgid "Alias and property references" +msgstr "Alias and property references" + +#: index.docbook:197 +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." + +#: index.docbook:202 +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." + +#: index.docbook:208 +msgid "Alias injection names" +msgstr "Alias injection names" + +#: index.docbook:219 +msgid "Description" +msgstr "Description" + +#: index.docbook:221 +msgid "Syntax" +msgstr "Syntax" + +#: index.docbook:223 +msgid "Example" +msgstr "Example" + +#: index.docbook:229 +msgid "A simple property" +msgstr "A simple property" + +#: index.docbook:231 +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]" + +#: index.docbook:233 +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#: index.docbook:237 +msgid "A composite property" +msgstr "A composite property" + +#: index.docbook:239 +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#: index.docbook:241 +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#: index.docbook:246 +msgid "Discriminator of an entity" +msgstr "Discriminator of an entity" + +#: index.docbook:248 +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#: index.docbook:250 +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#: index.docbook:254 +msgid "All properties of an entity" +msgstr "All properties of an entity" + +#: index.docbook:256, index.docbook:304 +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#: index.docbook:258 +msgid "{item.*}" +msgstr "{item.*}" + +#: index.docbook:262 +msgid "A collection key" +msgstr "A collection key" + +#: index.docbook:264 +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#: index.docbook:266 +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#: index.docbook:270 +msgid "The id of an collection" +msgstr "The id of an collection" + +#: index.docbook:272 +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#: index.docbook:274 +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#: index.docbook:278 +msgid "The element of an collection" +msgstr "The element of an collection" + +#: index.docbook:280 +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#: index.docbook:282 +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#: index.docbook:286 +msgid "roperty of the element in the collection" +msgstr "roperty of the element in the collection" + +#: index.docbook:288 +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#: index.docbook:290 +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#: index.docbook:294 +msgid "All properties of the element in the collection" +msgstr "All properties of the element in the collection" + +#: index.docbook:296 +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#: index.docbook:298 +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#: index.docbook:302 +msgid "All properties of the the collection" +msgstr "All properties of the the collection" + +#: index.docbook:306 +msgid "{coll.*}" +msgstr "{coll.*}" + +#: index.docbook:315 +msgid "Returning non-managed entities" +msgstr "Returning non-managed entities" + +#: index.docbook:317 +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." + +#: index.docbook:319 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:329 +msgid "a result transformer" +msgstr "a result transformer" + +#: index.docbook:333 +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." + +#: index.docbook:340 +msgid "Handling inheritance" +msgstr "Handling inheritance" + +#: index.docbook:342 +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." + +#: index.docbook:348 +msgid "Parameters" +msgstr "Parameters" + +#: index.docbook:350 +msgid "Native sql queries support positional as well as named parameters:" +msgstr "Native sql queries support positional as well as named parameters:" + +#: index.docbook:353 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:361 +msgid "Named SQL queries" +msgstr "Consultas SQL con nombre" + +#: index.docbook:363 +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"Las consultas SQL con nombre pueden definirse en el documento de mapeo y " +"llamadas exactamente en la misma forma en que a una consulta HQL con nombre. " +"En este caso, no necesitamos llamar a addEntity" +"()." + +#: index.docbook:368 +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person \n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" + +#: index.docbook:370 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:372 +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"Los elementos <return-join> y <load-" +"collection> se usan para unir asociaciones y definir consultas " +"que inicialicen colecciones, respectivamente." + +#: index.docbook:377 +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person \n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" + +#: index.docbook:379 +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"Una consulta SQL con nombre puede devolver un valor escalar. Debes " +"especificar el alias de columna y tipo Hibernate usando el elementp " +"<return-scalar>:" + +#: index.docbook:383 +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" + +#: index.docbook:385 +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." + +#: index.docbook:390 +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +" ]]>" + +#: index.docbook:392 +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." + +#: index.docbook:395 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:398 +msgid "Using return-property to explicitly specify column/alias names" +msgstr "" +"Usando return-property para especificar explícitamente nombres de " +"columna/alias" + +#: index.docbook:401 +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"Con <return-property> puedes decirle explí" +"citamente a Hibernate qué alias de columna usar, en vez de usar la " +"sintáxis {} para dejar que Hibernate inyecte sus " +"propios alias." + +#: index.docbook:406 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" + +#: index.docbook:408 +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property> también trabaja con " +"múltiples columnas. Esto resuelve una limitación de la " +"sintáxis {}, la cual no puede permitir un control " +"fino de propiedades multi-columna." + +#: index.docbook:413 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer}, \n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" + +#: index.docbook:415 +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"Nota que en este ejemplo hemos usado <return-property> en combinación con la sintáxis {} " +"para inyección, permitiendo a los usuarios elejir cómo quieren " +"referirse a las columnas y propiedades." + +#: index.docbook:420 +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"Si tu mapeo tiene un discriminador debes usar <return-" +"discriminator> para especificar la columna discriminadora." + +#: index.docbook:426 +msgid "Using stored procedures for querying" +msgstr "Usando procedimientos almacenados para consultar" + +#: index.docbook:428 +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernate3 introduce soporte para consultas vía procedimientos " +"almacenados. Los procedimientos almacenados deben devolver un conjunto " +"resultado como el primer parámetro de salida para ser capaces de " +"funcionar con Hibernate. Un ejemplo de uno procedimiento almacenado en " +"Oracle 9 o superior es así:" + +#: index.docbook:434 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:436 +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "" +"Para usar esta consulta en Hibernate necesitas mapearla por medio de una " +"consulta con nombre." + +#: index.docbook:439 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" + +#: index.docbook:441 +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"Nota que los procedimientos almacenados sólo devuelven escalares y " +"entidades. No están soportados <return-join> " +"y <load-collection>." + +#: index.docbook:446 +msgid "Rules/limitations for using stored procedures" +msgstr "Reglas/limitaciones para usar procedimientos almacenados" + +#: index.docbook:448 +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"Para usar procedimientos almacenados con Hibernate los procedimientos tienen " +"que seguir algunas reglas. Si no siguen esas reglas no son usables por " +"Hibernate. Si aún quisieras usar estos procedimientos tendrías " +"que ejecutarlos por medio de session.connection(). Las " +"reglas son diferentes para cada base de datos, ya que los vendedores de base " +"de datos tienen diferentes semánticas/sintáxis de " +"procedimientos almacenados." + +#: index.docbook:455 +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"Las consultas de procedimientos almacenados no pueden ser paginadas con " +"setFirstResult()/setMaxResults()." + +#: index.docbook:458 +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "Para Oracle se aplican las siguientes reglas:" + +#: index.docbook:463 +msgid "For Oracle the following rules apply:" +msgstr "" +"El procedimiento debe devolver un conjunto resultado. Esto se hace " +"devolviendo un SYS_REFCURSOR en Oracle 9 o 10. En Oracle " +"necesitas definir un tipo REF CURSOR." + +#: index.docbook:467 +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"La forma recomendada es { ? = call procName(<parameters>) } o { ? = call procName } (esto es más una " +"regla de Oracle que una regla de Hibernate)." + +#: index.docbook:476 +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "Para Sybase o MS SQL server se aplican las siguientes reglas:" + +#: index.docbook:480 +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"El procedimiento debe devolver un conjunto resultado. Nota que ya que estos " +"servidores pueden y devolverán múltiples conjuntos resultados " +"y cuentas de actualización, Hibernate iterará los resultados y " +"tomará el primer resultado que sea un conjunto resultado como su " +"valor a devolver. Todo lo demás será descartado." + +#: index.docbook:488 +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"Si habilitas SET NOCOUNT ON en tu procedimiento " +"será probablemente más eficiente, pero esto no es un " +"requerimiento." + +#: index.docbook:498 +msgid "Custom SQL for create, update and delete" +msgstr "SQL personalizado para crear, actualizar y borrar" + +#: index.docbook:500 +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3 puede usar sentencias SQL personalizadas para las operaciones de " +"crear, actualizar y borrar. Los persistidores de clases y colecciones en " +"Hibernate ya contienen un conjunto de cadenas generadas en tiempo de " +"configuración (insertsql, deletesql, updatesql, etc.). Las etiquetas " +"de mapeo <sql-insert>, <sql-delete>, y <sql-update> sobrescriben estas cadenas:" + +#: index.docbook:508 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" + +#: index.docbook:510 +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"El SQL se ejecuta directamente en tu base de datos, de modo que eres libre " +"de usar cualquier dialecto que quieras. Esto reducirá, por supuesto, " +"la portabilidad de tu mapeo si usas SQL específico de la base de " +"datos." + +#: index.docbook:514 +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "" +"Los procedimientos almacenados son soportados si está establecido el " +"atributo callable:" + +#: index.docbook:517 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" + +#: index.docbook:519 +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "" +"El orden de los parámetros posicionales son actualmente vitales, ya " +"que deben estar en la misma secuencia en que las espera Hibernate." + +#: index.docbook:522 +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"Puedes ver el orden esperado habilitando el registro de depuración " +"para el nivel org.hibernate.persister.entity. Con este " +"nivel habilitado, Hibernate imprimirá el SQL estático que se " +"usa para crear, actualizar, borrar, etc. las entidades. (Para ver la " +"secuencia esperada, recuerda no incluir tu SQL personalizado en los ficheros " +"de mapeo ya que sobrescribirán el sql estático generado por " +"Hibernate.)" + +#: index.docbook:529 +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"Los procedimientos almacenados son, en la mayoría de los casos " +"(léase, mejor hacerlo que no hacerlo), obligados a devolver el " +"número de filas insertadas/actualizadas/borradas, ya que Hibernate " +"tiene algunas comprobaciones en tiempo de ejecución del éxito " +"de la sentencia. Hibernate siempre registra el primer parámetro de la " +"sentencia como un parámetro de salida numérico para las " +"operaciones CUD:" + +#: index.docbook:535 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:539 +msgid "Custom SQL for loading" +msgstr "SQL personalizado para carga" + +#: index.docbook:541 +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" +"Puedes también declarar tu propias consultas SQL (o HQL) para cargar " +"entidades:" + +#: index.docbook:544 +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id} \n" +" FROM PERSON \n" +" WHERE ID=? \n" +" FOR UPDATE\n" +"]]>" + +#: index.docbook:546 +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "" +"Esto es sólo una declaración de consulta con nombrem como se " +"ha discutido anteriormente. Puedes hacer referencia a esta consulta con " +"nombre en un mapeo de clase:" + +#: index.docbook:549 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:551 +msgid "This even works with stored procedures." +msgstr "Esto incluso funciona con procedimientos almacenados." + +#: index.docbook:553 +msgid "You may even define a query for collection loading:" +msgstr "Puedes incluso definit una consulta para la carga de colecciones:" + +#: index.docbook:555 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:557 +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" + +#: index.docbook:559 +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "" +"Podrías incluso definir un cargador de entidades que cargue una " +"colección por recuperación por unión (join fetching):" + +#: index.docbook:562 +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp \n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/quickstart.po b/documentation/envers/src/main/docbook/es-ES/content/quickstart.po new file mode 100644 index 0000000000..37c6d81eb9 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/quickstart.po @@ -0,0 +1,474 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:5 +msgid "appended paragraph 1" +msgstr "Comienzo rápido con Tomcat" + +#: index.docbook:8 +msgid "appended paragraph 2" +msgstr "Empezando con Hibernate" + +#: index.docbook:10 +msgid "appended paragraph 3" +msgstr "Este tutorial explica una instalación de Hibernate con el contenedor de servlets Apache Tomcat (hemos usado la versión 4.1, las diferencias con la 5.0 deben ser mínimas) para una aplicación basada en web. Hibernate trabaja bien en un entorno manejado con todos los servidores de aplicaciones J2EE importantes, o incluso en aplicaciones Java independientes. El sistema de base de datos es sólo una cuestión de cambiar la configuración del dialecto SQL de Hibernate y las propiedades de conexión." + +#: index.docbook:21 +msgid "appended paragraph 4" +msgstr "Primero, tenemos que copiar todas las bibliotecas requeridas a la instalación de Tomcat. Usamos un contexto web separado (webapps/quickstart) para este tutorial, de modo que tenemos que considerar tanto la ruta de búsqueda de bibliotecas global (TOMCAT/common/lib) como también el cargador de clases a nivel de contexto en webapps/quickstart/WEB-INF/lib (para ficheros JAR) y webapps/quickstart/WEB-INF/classes. Nos referiremos a ambos niveles de cargador de clases como el classpath global y el classpath de contexto, respectivamente." + +#: index.docbook:32 +msgid "appended paragraph 5" +msgstr "Ahora, copia las bibliotecas a los dos classpaths:" + +#: index.docbook:38 +msgid "appended paragraph 6" +msgstr "Copia el driver JDBC para la base de datos al classpath global. Esto se requiere para el software de pool de conexiones DBCP que se distribuye con Tomcat. Hibernate usa conexiones JDBC para ejecutar SQL sobre la base de datos, de modo que, o bien tienes que proveer conexiones JDBC en pool, o bien configurar Hibernate para que use uno de los pools soportados directamente (C3P0, Proxool). Para este tutorial, copia la biblioteca pg74jdbc3.jar (para PostgreSQL 7.4 y JDK 1.4) al classpath del cargador global. Si quisieras usar una base de datos diferente, simplemente copia su apropiado driver JDBC." + +#: index.docbook:51 +msgid "appended paragraph 7" +msgstr "Nunca copies nada más dentro de la ruta del cargador de clases global en Tomcat, o tendrás problemas con varias herramientas, incluyendo Log4J, commons-logging y otras. Siempre usa el classpath de contexto para cada aplicación web, esto es, copia las bibliotecas a WEB-INF/lib y tus propias clases y ficheros de configuración/propiedades a WEB-INF/classes. Ambos directorios están a nivel del classpath de contexto por defecto." + +#: index.docbook:62 +msgid "appended paragraph 8" +msgstr "Hibernate está empaquetado como una biblioteca JAR. El fichero hibernate3.jar debe ser copiado en el classpath de contexto junto a las otras clases de la aplicación. Hibernate requiere algunas bibliotecas de terceros en tiempo de ejecución; éstas vienen incluídas con la distribución de Hibernate en el directorio lib/. Ver . Copia las bibliotecas de terceros requeridas al classpath de contexto." + +#: index.docbook:75 +msgid "appended paragraph 9" +msgstr "Bibliotecas de terceros de Hibernate" + +#: index.docbook:83 +msgid "appended paragraph 10" +msgstr "Biblioteca" + +#: index.docbook:86 +msgid "appended paragraph 11" +msgstr "Descripción" + +#: index.docbook:93 +msgid "appended paragraph 12" +msgstr "antlr (requerida)" + +#: index.docbook:96 +msgid "appended paragraph 13" +msgstr "Hibernate usa ANTLR para producir analizadores de consultas, esta biblioteca también se necesita en tiempo de ejecución." + +#: index.docbook:102 +msgid "appended paragraph 14" +msgstr "dom4j (requerida)" + +#: index.docbook:105 +msgid "appended paragraph 15" +msgstr "Hibernate usa dom4j para analizar ficheros de configuración XML y ficheros de metadatos de mapeo XML." + +#: index.docbook:111 +msgid "appended paragraph 16" +msgstr "CGLIB, asm (requerida)" + +#: index.docbook:114 +msgid "appended paragraph 17" +msgstr "Hibernate usa la biblioteca de generación de código para aumentar las clases en tiempo de ejecución (en combinación con reflección Java)." + +#: index.docbook:121 +msgid "appended paragraph 18" +msgstr "Commons Collections, Commons Logging (requeridas)" + +#: index.docbook:124 +msgid "appended paragraph 19" +msgstr "Hibernate usa varias bibliotecas de utilidad del proyecto Jakarta Commons de Apache." + +#: index.docbook:130 +msgid "appended paragraph 20" +msgstr "EHCache (requerida)" + +#: index.docbook:133 +msgid "appended paragraph 21" +msgstr "Hibernate puede usar varios provedores de caché para el caché de segundo nivel. EHCache es el provedor de caché por defecto si no se cambia en la configuración." + +#: index.docbook:140 +msgid "appended paragraph 22" +msgstr "Log4j (opcional)" + +#: index.docbook:143 +msgid "appended paragraph 23" +msgstr "Hibernate usa la API de Commons Logging, que a su vez puede usar Log4J como el mecanismo de logging subyacente. Si la biblioteca Log4J está disponible en el directorio de bibliotecas del contexto, Commons Logging usará Log4J y la configuración log4j.properties en el classpath de contexto. Un fichero de propiedades de ejemplo para Log4J se incluye con la distribución de Hibernate. Así que copia log4j.jar y el fichero de configuración (de src/) a tu classpath de contexto si quieres ver que ocurre tras escénas." + +#: index.docbook:157 +msgid "appended paragraph 24" +msgstr "¿Requerida o no?" + +#: index.docbook:160 +msgid "appended paragraph 25" +msgstr "Echa una mirada al fichero lib/README.txt en la distribución de Hibernate. Esta es una lista actualizada de bibliotecas de terceros distribuídas con Hibernate. Encontrarás listadas ahí todas las bibliotecas requeridas y opcionales (Observa que \"buildtame required\" significa aquí para la construcción de Hibernate, no de tu aplicación)." + +#: index.docbook:174 +msgid "appended paragraph 26" +msgstr "Ahora instalamos el pooling y modo compartido de conexiones de base de datos tanto en Tomcat como Hibernate. Esto significa que Tomcat proveerá conexiones JDBC en pool (usando su funcionalidad prefabricada de pooling DBCP). Hibernate pide esas conexiones a través de JNDI. Alternativamente, puedes dejar que Hibernate maneje el pool de conexiones. Tomcat liga su pool de conexiones a JNDI; agregamos una declaración de recurso al fichero de configuración principal de Tomcat, TOMCAT/conf/server.xml:" + +#: index.docbook:184 +msgid "appended paragraph 27" +msgstr "" + "\n" + " \n" + " \n" + " \n" + " factory\n" + " org.apache.commons.dbcp.BasicDataSourceFactory\n" + " \n" + "\n" + " \n" + " \n" + " url\n" + " jdbc:postgresql://localhost/quickstart\n" + " \n" + " \n" + " driverClassNameorg.postgresql.Driver\n" + " \n" + " \n" + " username\n" + " quickstart\n" + " \n" + " \n" + " password\n" + " secret\n" + " \n" + "\n" + " \n" + " \n" + " maxWait\n" + " 3000\n" + " \n" + " \n" + " maxIdle\n" + " 100\n" + " \n" + " \n" + " maxActive\n" + " 10\n" + " \n" + " \n" + "]]>" + +#: index.docbook:186 +msgid "appended paragraph 28" +msgstr "El contexto que configuramos en este ejemplo se llama quickstart, su base es el directorio TOMCAT/webapp/quickstart. Para acceder a cualquier servlet, llama a la ruta http://localhost:8080/quickstart en tu navegador (por supuesto, agregando el nombre del servlet como se mapee en tu web.xml). Puedes también ir más allá y crear ahora un servlet simple que tenga un método process() vacío." + +#: index.docbook:196 +msgid "appended paragraph 29" +msgstr "Tomcat provee ahora conexiones a través de JNDI en java:comp/env/jdbc/quickstart. Si tienes problemas obteniendo el pool de conexiones en ejecución, refiérete a la documentación de Tomcat. Si obtienes mensajes de excepción del driver JDBC, intenta instalar primero el pool de conexiones JDBC sin Hibernate. Hay disponibles en la Web tutoriales de Tomcat y JDBC." + +#: index.docbook:205 +msgid "appended paragraph 30" +msgstr "Tu próximo paso es configurar Hibernate. Hibernate tiene que saber cómo debe obtener conexiones JDBC. Usamos la configuración de Hibernate basada en XML. El otro enfoque, usando un ficheros de propiedad, es casi equivalente pero pierde unas pocas funcionalidades que sí permite la sintaxis XML. El fichero de configuración XML se ubica en el classpath de contexto (WEB-INF/classes), como hibernate.cfg.xml:" + +#: index.docbook:214 +msgid "appended paragraph 31" +msgstr "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " java:comp/env/jdbc/quickstart\n" + " false\n" + " org.hibernate.dialect.PostgreSQLDialect\n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + "]]>" + +#: index.docbook:216 +msgid "appended paragraph 32" +msgstr "Desactivamos el registro (logging) de comandos SQL y decimos a Hibernate qué dialecto SQL de base de datos se usa y dónde obtener conexiones JDBC (declarando la dirección JNDI del pool ligado a Tomcat). El dialecto es una configuración requerida, las bases de datos difieren en su interpretación del \"estándar\" de SQL. Hibernate cuidará de las diferencias y viene con dialectos incluídos para todas las principales bases de datos comerciales y de código abierto." + +#: index.docbook:227 +msgid "appended paragraph 33" +msgstr "Una SessionFactory es el concepto de Hibernate de un almacén de datos solo. Pueden usarse múltiples bases de datos creando múltiples ficheros de configuración XML y creando múltiples objetos Configuration y SessionFactory en tu aplicación." + +#: index.docbook:235 +msgid "appended paragraph 34" +msgstr "El último elemento del hibernate.cfg.xml declara Cat.hbm.xml como el nombre de un fichero de mapeo XML para la clase persistente Cat. Este fichero contiene los metadatos para el mapeo de la clase POJO Cat a una tabla (o tablas) de base de datos. Volveremos a este fichero pronto. Escribamos primero la clase POJO y luego declaremos los metadatos de mapeo para ella." + +#: index.docbook:248 +msgid "appended paragraph 35" +msgstr "Primera clase persistente" + +#: index.docbook:250 +msgid "appended paragraph 36" +msgstr "Hibernate trabaja mejor con el modelo de programación de los Viejos Objetos Planos de Java (POJOs, a veces llamados Ordinarios Objetos Planos de Java) para clases persistentes. Un POJO es como un JavaBean, con las propiedades de la clase accesible vía métodos getter y setter, encapsulando la representación interna de la interfaz publicamente visible (Hibernate puede también acceder a los campos directamente, si se necesita):" + +#: index.docbook:260 +msgid "appended paragraph 37" +msgstr "" + "" + +#: index.docbook:262 +msgid "appended paragraph 38" +msgstr "Hibernate no está restringido en su uso de tipos de propiedad, todos los tipos y tipos primitivos del JDK de Java (como String, char y Date) pueden ser mapeados, incluyendo clases del framework de colecciones de Java. Puedes mapearlos como valores, colecciones de valores, o asociaciones a otras entidades. El id es una propiedad especial que representa el identificador de base de datos (clave primaria) de la clase. Es altamente recomendado para entidades como un Cat. Hibernate puede usar identificadores sólo internamente, pero perderíamos algo de la flexibilidad en nuestra arquitectura de aplicación." + +#: index.docbook:275 +msgid "appended paragraph 39" +msgstr "No tiene que implementarse ninguna interface especial para las clases persistentes ni tienes que subclasear de una clase persistente raíz en especial. Hibernate tampoco requiere ningún procesamiento en tiempo de construcción, como manipulación del byte-code. Se basa solamente en reflección de Java y aumentación de clases en tiempo de ejecución (a través de CGLIB). De modo que, sin ninguna dependencia de la clase POJO en Hibernate, podemos mapearla a una tabla de base de datos." + +#: index.docbook:288 +msgid "appended paragraph 40" +msgstr "Mapeando el gato" + +#: index.docbook:290 +msgid "appended paragraph 41" +msgstr "El fichero de mapeo Cat.hbm.xml contiene los metadatos requeridos para el mapeo objeto/relacional. Los metadatos incluyen la declaración de clases persistentes y el mapeo de propiedades (a columnas y relaciones de claves foráneas a otras entidades) a tablas de base de datos." + +#: index.docbook:298 +msgid "appended paragraph 42" +msgstr "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" + +#: index.docbook:300 +msgid "appended paragraph 43" +msgstr "Cada clase persistente debe tener un atributo identificador (realmente, sólo las clases que representen entidades, no las clases dependientes de tipo-valor, que son mapeadas como componentes de una entidad). Esta propiedad es usada para distinguir los objetos persistentes: Dos gatos son iguales si catA.getId().equals(catB.getId()) es verdadero. Este concepto se llama identidad de base de datos (database identity). Hibernate viene empaquetado con varios generadores de identificador para diferentes escenarios (incluyendo generadores nativos para secuencias de base de datos, tablas de identificadores alto/bajo, e identificadores asignados por aplicación). Usamos el generador UUID (recomendado sólo para pruebas, pues deben preferirse las claves enteras delegadas generadas por la base de datos) y también especificamos la columna CAT_ID de la tabla CAT para el valor identificador generado por Hibernate (como una clave primaria de la tabla)." + +#: index.docbook:317 +msgid "appended paragraph 44" +msgstr "Todas las demás propiedades de Cat son mapeadas a la misma tabla. En el caso de la propiedad name, la hemos mapeado con una declaración explícita de columna de base de datos. Esto es especialmente útil cuando el esquema de base de datos es generado automáticamente (como sentencias DDL de SQL) desde la declaración de mapeo con la herramienta SchemaExport de Hibernate. Todas las demás propiedades son mapeadas usando la configuración por defecto de Hibernate, que es lo que necesitas la mayoría del tiempo. La tabla CAT en la base de datos se ve así como:" + +#: index.docbook:329 +msgid "appended paragraph 45" +msgstr "" + "" + +#: index.docbook:331 +msgid "appended paragraph 46" +msgstr "Ahora debes crear esta tabla manualmente en tu base de datos, y luego leer el si quieres automatizar este paso con la herramienta hbm2ddl. Esta herramienta puede crear un DDL SQL completo, incluyendo definición de tablas, restricciones personalizadas de tipo de columnas, restricciones de unicidad e índices." + +#: index.docbook:342 +msgid "appended paragraph 47" +msgstr "Jugando con gatos" + +#: index.docbook:344 +msgid "appended paragraph 48" +msgstr "Ahora estamos listos para comenzar la Session de Hibernate. Es el manejador de persistencia que usamos para almacenar y traer Cats hacia y desde la base de datos. Pero primero, tenemos que obtener una Session (unidad de trabajo de Hibernate) de la SessionFactory:" + +#: index.docbook:352 +msgid "appended paragraph 49" +msgstr "" + "" + +#: index.docbook:354 +msgid "appended paragraph 50" +msgstr "La llamada a configure() carga el fichero de configuración hibernate.cfg.xml e inicializa la instancia de Configuration. Puedes establecer otras propiedades (e incluso cambiar los metadatos de mapeo) accediendo a la Configuration antes que construyas la SessionFactory (que es inmutable). ¿Dónde creamos la SessionFactory y cómo accedemos a ella en nuestra aplicación?" + +#: index.docbook:365 +msgid "appended paragraph 51" +msgstr "Una SessionFactory usualmente se construye una vez, por ejemplo, al arrancar con un servlet load-on-startup. Esto significa también que no debes mantenerla en una variable de instancia en tus servlets, sino en alguna otro sitio. Además, necesitamos algún tipo de Singleton, de modo que podamos acceder a la SessionFactory fácilmente en el código de aplicación. El siguiente enfoque mostrado resuelve ambos problemas: configuración de arranque y fácil acceso a una SessionFactory." + +#: index.docbook:377 +msgid "appended paragraph 52" +msgstr "Implementamos una clase de ayuda HibernateUtil:" + +#: index.docbook:381 +msgid "appended paragraph 53" +msgstr "" + "" + +#: index.docbook:383 +msgid "appended paragraph 54" +msgstr "Esta clase no sólo cuida de la SessionFactory con su inicializador static, sino que además tiene una variable ThreadLocal que tiene la Session para la hebra actual. Asegúrate de entender el concepto Java de una variable local a una hebra antes de intentar usar esta ayuda. Una clase HibernateUtil más compleja y potente puede encontrarse en CaveatEmptor, http://caveatemptor.hibernate.org/" + +#: index.docbook:393 +msgid "appended paragraph 55" +msgstr "Una SessionFactory es segura entre hebras, muchas hebras pueden acceder a ella concurrentemente y pedirle Sessions. Una Session no es un objeto seguro entre hebras que representa una sola unidad-de-trabajo con la base de datos. Las Sessions se abren desde una SessionFactory y son cerradas cuando todo el trabajo está completo. Un ejemplo en el método process() de tu servlet podría parecerse a esto (sin manejo de excepciones):" + +#: index.docbook:404 +msgid "appended paragraph 56" +msgstr "" + "" + +#: index.docbook:406 +msgid "appended paragraph 57" +msgstr "En una Session, cada operación de base de datos ocurre dentro de una transacción que aísla las operaciones de base de datos (incluso operaciones de sólo lectura). Usamos la API de Transaction de Hibernate para abstraer de la estrategia de transacciones subyacente (en nuestro caso, transacciones JDBC). Esto permite que nuestro código sea desplegado con transacciones manejadas por contenedor (usando JTA) sin cambio alguno." + +#: index.docbook:416 +msgid "appended paragraph 58" +msgstr "Observa que puedes llamar HibernateUtil.currentSession(); tantas veces como quieras, siempre obtendrás la Session actual de esta hebra. Tienes que asegurarte que la Session sea cerrada después que se complete tu unidad-de-trabajo, ya sea en código de tu servlet o en un filtro de servlet antes que la respuesta HTTP sea enviada. El bonito efecto colateral de la segunda opción es la fácil inicialización perezosa: la Session todavía está abierta cuando se dibuja la vista, de modo que Hibernate puede cargar objetos no inicializados mientras navegas tu actual grafo de objetos." + +#: index.docbook:428 +msgid "appended paragraph 59" +msgstr "Hibernate tiene varios métodos que pueden ser usados para traer objetos desde la base de datos. La forma más flexible es usando el Lenguaje de Consulta de Hibernate (Hibernate Query Language o HQL), que es una extensión orientada a objetos de SQL fácil de aprender:" + +#: index.docbook:436 +msgid "appended paragraph 60" +msgstr "" + "" + +#: index.docbook:438 +msgid "appended paragraph 61" +msgstr "Hibernate también ofrece una API consulta por criterios orientada a objetos que puede ser usada para formular consultas de tipo seguro. Por supuesto, Hibernate usa PreparedStatements y ligado de parámetros para toda la comunicación SQL con la base de datos. También puedes usar la funcionalidad de consulta SQL directa de Hibernate u obtener una conexión plana de JDBC de una Session en casos raros." + +#: index.docbook:451 +msgid "appended paragraph 62" +msgstr "Finalmente" + +#: index.docbook:453 +msgid "appended paragraph 63" +msgstr "Rasguñamos solamente la superficie de Hibernate en este pequeño tutorial. Por favor, observa que no incluimos ningún código específico de servlet en nuestros ejemplos. Tienes que crear un servlet por tí mismo e insertar el código de Hibernate como lo veas ubicado." + +#: index.docbook:461 +msgid "appended paragraph 64" +msgstr "Ten en mente que Hibernate, como capa de acceso a datos, está firmemente integrado dentro de tu aplicación. Usualmente, todas las otras capas dependen del mecanismo de persistencia. Asegúrate de entender las implicaciones de este diseño." + +#: index.docbook:468 +msgid "appended paragraph 65" +msgstr "Para un ejemplo de aplicación más compleja, ver http://caveatemptor.hibernate.org/ y echa una mirada a los otros tutoriales con links en http://www.hibernate.org/Documentation" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/es-ES/content/session_api.po b/documentation/envers/src/main/docbook/es-ES/content/session_api.po new file mode 100644 index 0000000000..9c7056f7e4 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/session_api.po @@ -0,0 +1,2148 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Working with objects" +msgstr "Trabajando con objetos" + +#: index.docbook:7 +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"Hibernate es una solución completa de mapeo objeto/relacional que no " +"sólo abstrae al desarrollador de los detalles del sistema de manejo " +"de base datos subyacente, sino que además ofrece manejo de " +"estado de objetos. Esto es, al contrario del manejo de " +"sentencias SQL en capas comunes de persistencia JDBC/SQL, " +"una vista de la persistencia en aplicaciones Java muy natural y orientada a " +"objetos." + +#: index.docbook:16 +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"En otras palabras, los desarroladores de aplicaciones Hibernate deben " +"siempre pensar en el estado de sus objetos, y no " +"necesariamente en la ejecución de sentencias SQL. Esta parte es " +"cuidada por Hibernate y es sólo relevante para el desarrollador de la " +"aplicación al afinar el rendimiento del sistema." + +#: index.docbook:24 +msgid "Hibernate object states" +msgstr "Estados de objeto de Hibernate" + +#: index.docbook:26 +msgid "Hibernate defines and supports the following object states:" +msgstr "Hibernate define y soporta los siguientes estados de objeto:" + +#: index.docbook:32 +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +"Transitorio - un objeto es transitorio si ha sido " +"recién instanciado usando el operador new, y no " +"está asociado a una Session de Hibernate. No tiene " +"una representación persistente en la base de datos y no se le ha " +"asignado un valor identificador. Las instancias transitorias serán " +"destruídas por el recolector de basura si la aplicación no " +"mantiene más una referencia. Usa la Session de " +"Hibernate para hacer un objeto persistente (y deja que Hibernate cuide de " +"las sentencias SQL que necesitan ejecutarse para esta transición)." + +#: index.docbook:44 +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"Persistente - una instancia persistente tiene una " +"representación en la base de datos y un valor identificador. Puede " +"haber sido salvado o cargado, sin embargo, está por definición " +"en el ámbito de una Session. Hibernate " +"detectará cualquier cambio hecho a un objeto en estado persistentey " +"sincronizará el estado con la base de datos cuando se complete la " +"unidad de trabajo. Los desarrolladores no ejecutan sentencias " +"UPDATE manuales, o sentencias DELETE " +"cuando un objeto debe ser hecho transitorio." + +#: index.docbook:55 +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"Separado (detached) - una instancia separada es un " +"objeto que ha sido hecho persistente, pero su Session ha " +"sido cerrada. La referencia al objeto todavía es válida, por " +"supuesto, y la instancia separada podría incluso ser modificada en " +"este estado. Una instancia separada puede ser re-unida a una nueva " +"Session en un punto posterior en el tiempo, hacié" +"ndola persistente de nuevo (con todas las modificaciones). Este aspecto " +"habilita un modelo de programación para unidades de trabajo de " +"ejecución larga que requieren tiempo-para-pensar del usuario. Las " +"llamamos transaccciones de aplicación, es decir, " +"una unidad de trabajo desde el punto de vista del usuario." + +#: index.docbook:69 +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"Discutiremos ahora los estados y transiciones de estados (y los mé" +"todos de Hibernate que disparan una transición) en más detalle:" + +#: index.docbook:77 +msgid "Making objects persistent" +msgstr "Haciendo los objetos persistentes" + +#: index.docbook:79 +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"Las instancias recién instanciadas de una clase persistente son " +"consideradas transitorias por Hibernate. Podemos hacer " +"una instancia transitoria persistente asociá" +"ndola con una sesión:" + +#: index.docbook:86 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:88 +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"Si Cat tiene un identificador generado, el identificador " +"es generado y asignado al cat cuando se llama a " +"save(). Si Cat tiene un identificador " +"assigned, o una clave compuesta, el identificador debe " +"ser asignado a la instancia de cat antes de llamar a " +"save(). Puedes también usar persist() en vez de save(), con la semántica " +"definida en el temprano borrador de EJB3." + +#: index.docbook:100 +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"UNTRANSLATED!!! persist() makes a transient instance " +"persistent. However, it doesn't guarantee that the identifier value will be " +"assigned to the persistent instance immediately, the assignment might happen " +"at flush time. persist() also guarantees that it will not " +"execute an INSERT statement if it is called outside of " +"transaction boundaries. This is useful in long-running conversations with an " +"extended Session/persistence context." + +#: index.docbook:111 +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#: index.docbook:121 +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "" +"Alternativamente, puedes asignar el identificador usando una versión " +"sobrecargada de save()." + +#: index.docbook:126 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:128 +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"Si el objeto que haces persistente tiene objetos asociados (por ejemplo, la " +"colección kittens en el ejemplo anterior), estos " +"objetos pueden ser hechos persistentes en cualquier orden que quieras a " +"menos que tengas una restricción NOT NULL sobre " +"una columna clave foránea. Nunca hay riesgo de violar restricciones " +"de clave foránea. Sin embargo, podrías violar una " +"restricción NOT NULL si llamas a save() sobre objetos en orden erróneo." + +#: index.docbook:138 +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"Usualmente no te preocupas con este detalle, pues muy probablemente " +"usarás la funcionalidad de persistencia transitiva de Hibernate para salvar los objetos asociados automá" +"ticamente. Entonces, ni siquiera ocurren violaciones de restricciones " +"NOT NULL - Hibernate cuidará de todo. La " +"persistencia transitiva se discute más adelante en este capí" +"tulo." + +#: index.docbook:149 +msgid "Loading an object" +msgstr "Cargando un objeto" + +#: index.docbook:151 +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"Los métodos load() de Session " +"te brindan una forma de traer una instancia persistente si ya saves su " +"identificador. load() toma un objeto clase y " +"cargará el estado dentro de una instancia recién instanciada " +"de esta clase, en estado persistente." + +#: index.docbook:158 +msgid "" +msgstr "" + +#: index.docbook:160 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:162 +msgid "Alternatively, you can load state into a given instance:" +msgstr "Alternativamente, puedes cargar estado dentro de una instancia dada:" + +#: index.docbook:166 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:168 +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"Nota que load() lanzará una excepción " +"irrecuperable si no hay una fila correspondiente en base de datos. Si la " +"clase es mapeada con un proxy, load() sólo " +"devuelve un proxy no inicializado y no llamará realmente a la base de " +"datos hasta que invoques un método del proxy. Este comportamiento es " +"muy útil si deseas crear una asociación a un objeto sin " +"cargarlo realmente de la base de datos. Permite además que mú" +"ltiples instancias sean cargadas como un lote si se define batch-" +"size para el mapeo de la clase." + +#: index.docbook:179 +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"Si no tienes certeza que exista una fila correspondiente, debes usar el " +"método get(), que llama a la base de datos " +"inmediatamente y devuelve nulo si no existe una fila correspondiente." + +#: index.docbook:185 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:187 +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"Puedes incluso cargar un objeto usando un SELECT ... FOR UPDATE de SQL, usando un LockMode. Ver la " +"documentación de la API para más información." + +#: index.docbook:192 +msgid "" +msgstr "" + +#: index.docbook:194 +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"Ten en cuenta que ninguna instancia asociada o " +"colección contenida es selecciona FOR UPDATE, a " +"menos que decidas especificar lock o all como un estilo de cascada para la asociación." + +#: index.docbook:201 +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"Es posible volver a cargar un objeto y todas sus colecciones en cualquier " +"momento, usando el método refresh(). Esto es " +"útil cuando se usan disparadores de base de datos para inicializar " +"algunas de las propiedades del objeto." + +#: index.docbook:207 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:209 +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"Una cuestión importante aparece usualmente en este punto: ¿Cuá" +"nto carga Hibernate de la base de datos y cuántos SELECTs de SQL usará? Esto depende de la estrategia de " +"recuperación y se explica en ." + +#: index.docbook:219 +msgid "Querying" +msgstr "Consultando" + +#: index.docbook:221 +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"Si no sabes los identificadores de los objetos que estás buscando, " +"necesitas una consulta. Hibernate soporta un lenguaje de consulta orientado " +"a objetos (HQL) fácil de usar pero potente. Para la creación " +"de consultas programáticas, Hibernate soporta una funcionalidad " +"sofisticada de consulta de Criteria y Example (QBC and QBE). También " +"puedes expresar tu consulta en el SQL nativo de tu base de datos, con " +"soporte opcional de Hibernate para la conversión del conjunto " +"resultado en objetos." + +#: index.docbook:231 +msgid "Executing queries" +msgstr "Ejecutando consultas" + +#: index.docbook:233 +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"Las consultas HQL y SQL nativas son representadas con una instancia de " +"org.hibernate.Query. Esta interface ofrece métodos " +"para la ligación de parámetros, manejo del conjunto resultado, " +"y para la ejecución de la consulta real. Siempre obtienes una " +"Query usando la Session actual:" + +#: index.docbook:240 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:242 +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"Una consulta se ejecuta usualmente invocando a list(), el " +"resultado de la consulta será cargado completamente dentro de una " +"colección en memoria. Las instancias de entidad traídas por " +"una consulta están en estado persistente. El método " +"uniqueResult() ofrece un atajo si sabes que tu consulta " +"devolverá sólo un objeto." + +#: index.docbook:254 +msgid "Iterating results" +msgstr "Iterando los resultados" + +#: index.docbook:256 +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"Ocasionalmente, podrías ser capaz de lograr mejor rendimiento al " +"ejecutar la consulta usando el método iterate(). " +"Esto sólo será en el caso que esperes que las instancias " +"reales de entidad devueltas por la consulta estén ya en la " +"sesión o caché de segundo nivel. Si todavía no " +"están en caché, iterate() será " +"más lento que list() y podría requerir " +"muchas llamadas a la base de datos para una consulta simple, usualmente " +"1 para la selección inicial que solamente " +"devuelve identificadores, y n selecciones adicionales " +"para inicializar las instancias reales." + +#: index.docbook:268 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:272 +msgid "Queries that return tuples" +msgstr "Consultas que devuelven tuplas" + +#: index.docbook:274 +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"Las consultas de Hibernate a veces devuelven tuplas de objetos, en cuyo caso " +"cada tupla se devuelve como un array:" + +#: index.docbook:279 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:284 +msgid "Scalar results" +msgstr "Resultados escalares" + +#: index.docbook:286 +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"Las consultas pueden especificar una propiedad de una clase en la clá" +"usula select. Pueden incluso llamar a funciones de " +"agregación SQL. Las propiedades o agregaciones son considerados " +"resultados \"escalares\" (y no entidades en estado persistente)." + +#: index.docbook:292 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:297 +msgid "Bind parameters" +msgstr "Ligación de parámetros" + +#: index.docbook:299 +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"Se proveen métodos en Query para ligar valores a " +"parámetros con nombre o parámetros ? de " +"estilo JDBC. Al contrario de JDBC, Hibernate numera los pará" +"metros desde cero. Los parámetros con nombre son " +"identificadores de la forma :name en la cadena de la " +"consulta. Las ventajas de los parámetros con nombre son:" + +#: index.docbook:309 +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "" +"los parámetros con nombre son insensibles al orden en que aparecen en " +"la cadena de consulta" + +#: index.docbook:315 +msgid "they may occur multiple times in the same query" +msgstr "pueden aparecer múltiples veces en la misma consulta" + +#: index.docbook:320 +msgid "they are self-documenting" +msgstr "son auto-documentados" + +#: index.docbook:326 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:328 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:330 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:335 +msgid "Pagination" +msgstr "Paginación" + +#: index.docbook:337 +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"Si necesitas especificar límites sobre tu conjunto resultado (el " +"número máximo de filas que quieras traer y/o la primera fila " +"que quieras traer) debes usar los métodos de la interface " +"Query:" + +#: index.docbook:343 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:345 +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"Hibernate sabe cómo traducir este límite de consulta al SQL " +"nativo de tu DBMS." + +#: index.docbook:353 +msgid "Scrollable iteration" +msgstr "Iteración scrollable" + +#: index.docbook:355 +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"Si tu driver JDBC soporta ResultSets scrollables, la " +"interface Query puede ser usada para obtener un objeto " +"ScrollableResults, que permite una navegación " +"flexible de los resultados de consulta." + +#: index.docbook:362 +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" + +#: index.docbook:364 +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"Nota que se requiere una conexión de base de datos abierta (y cursor) " +"para esta funcionalidad, usa setMaxResult()/" +"setFirstResult() si necesitas la funcionalidad de " +"paginación fuera de línea." + +#: index.docbook:373 +msgid "Externalizing named queries" +msgstr "Externalizando consultas con nombre" + +#: index.docbook:375 +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"Puedes además definir consultas con nombre en el documento de mapeo. " +"(Recuerda usar una sección CDATA si tu consulta " +"contiene caracteres que puedan ser interpretados como etiquetado.)" + +#: index.docbook:381 +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" +" ?\n" +"] ]>]]>" + +#: index.docbook:383 +msgid "Parameter binding and executing is done programatically:" +msgstr "" +"La ligación de parámetros y ejecución se hace " +"programáticamente:" + +#: index.docbook:387 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:389 +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"Nota que el código real del programa es independiente del lenguaje de " +"consulta usado; puedes además definir consultas SQL nativas en " +"metadatos, o migrar consultas existentes a Hibernate colocándolas en " +"ficheros de mapeo." + +#: index.docbook:395 +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"UNTRANSLATED! Also note that a query declaration inside a <" +"hibernate-mapping> element requires a global unique name for " +"the query, while a query declaration inside a <class> element is made unique automatically by prepending the fully " +"qualified name of the class, for example eg.Cat." +"ByNameAndMaximumWeight." + +#: index.docbook:408 +msgid "Filtering collections" +msgstr "Filtrando colecciones" + +#: index.docbook:409 +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"Un filtro de colección es un tipo especial de " +"consulta que puede ser aplicado a una colección persistente o array. " +"La cadena de consulta puede referirse a this, " +"significando el elemento de colección actual." + +#: index.docbook:415 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:417 +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"La colección devuelta es considerada un bag, y es una copia de la " +"colección dada. La colección original no es modificada (esto " +"es contrario a la implicación del nombre \"filtro\", pero consistente " +"con el comportamiento esperado)." + +#: index.docbook:423 +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"Observa que los filtros no requieren una cláusula from (aunque pueden tener uno si se requiere). Los filtros no está" +"n limitados a devolver los elementos de colección por sí " +"mismos." + +#: index.docbook:428 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:430 +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"Incluso una consulta de filtro vacío es útil, por ejemplo, " +"para cargar un subconjunto de elementos en una colección enorme:" + +#: index.docbook:435 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:440 +msgid "Criteria queries" +msgstr "Consultas de criterios" + +#: index.docbook:442 +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQL es extremadamente potente pero algunos desarrolladores prefieren " +"construir consultas dinámicamente usando una API orientada a objetos, " +"en vez construir cadenas de consulta. Hibernate provee una API intuitiva de " +"consulta Criteria para estos casos:" + +#: index.docbook:448 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:450 +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"Las APIs de Criteria y la asociada Example son discutidas en más detalle en ." + +#: index.docbook:458 +msgid "Queries in native SQL" +msgstr "Consultas en SQL nativo" + +#: index.docbook:460 +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"Puedes expresar una consulta en SQL, usando createSQLQuery() y dejando que Hibernate cuide del mapeo de los conjuntos resultado " +"a objetos. Nota que puedes llamar en cualquier momento a session." +"connection() y usar la Connection JDBC " +"directamente. Si eliges usar la API de Hibernate, debes encerrar los alias " +"de SQL entre llaves:" + +#: index.docbook:468 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:470 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:472 +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"Las consultas SQL pueden contener parámetros con nombre y " +"posicionales, al igual que las consultas de Hibernate. Puede encontrarse " +"más información sobre consultas en SQL nativo en ." + +#: index.docbook:483 +msgid "Modifying persistent objects" +msgstr "Modificando objetos persistentes" + +#: index.docbook:485 +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"Las instancias persistentes transaccionales (es decir, " +"objetos cargados, creados o consultados por la Session) " +"pueden ser manipulados por la aplicación y cualquier cambio al estado " +"persistente será persistido cuando la Session sea " +"limpiada (flushed) (discutido más adelante en " +"este capítulo). No hay necesidad de llamar un método en " +"particular (como update(), que tiene un propósito " +"diferente) para hacer persistentes tus modificaciones. De modo que la forma " +"más directa de actualizar el estado de un objeto es cargarlo con " +"load(), y entonces manipularlo directamente, mientras la " +"Session está abierta:" + +#: index.docbook:496 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:498 +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"A veces este modelo de programación es ineficiente pues podría " +"requerir una SELECT de SQL (para cargar un objeto) y un " +"UPDATE de SQL (para hacer persistentes sus datos " +"actualizados) en la misma sesión. Por lo tanto, Hibernate ofrece un " +"enfoque alternativo, usando instancias separadas (detached)." + +#: index.docbook:506 +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"Nota que Hibernate no ofreve su propia API para ejecución directa de " +"sentencias UPDATE o DELETE. Hibernate " +"es un servicio de gestión de estado, no tienes " +"que pensar en sentencias para usarlo. JDBC es una API " +"perfecta para ejecutar sentencias SQL; puedes obtener una " +"Connection JDBC en cualquier momento llamando a " +"session.connection(). Además, la noción de " +"operaciones masivas entra en conflicto con el mapeo objeto/relacional en " +"aplicaciones en línea orientadas al procesamiento de transacciones. " +"Versiones futuras de Hibernate pueden, sin embargo, proveer funciones de " +"operación masiva especiales. Ver por " +"algunos trucos de operación en lote (batch) posibles." + +#: index.docbook:521 +msgid "Modifying detached objects" +msgstr "Modificando objetos separados" + +#: index.docbook:523 +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"Muchas aplicaciones necesitan recuperar un objeto en una transacción, " +"enviarla a la capa de UI para su manipulación, y entonces salvar los " +"cambios en una nueva transacción. Las aplicaciones que usan este tipo " +"de enfoque en un entorno de alta concurrencia usualmente usan datos " +"versionados para asegurar el aislamiento de la unidad de trabajo \"larga\"." + +#: index.docbook:530 +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernate soporta este modelo al proveer re-unión de instancias " +"separadas usando los métodos Session.update() o " +"Session.merge():" + +#: index.docbook:536 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:538 +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"Si el Cat con identificador catId ya " +"hubiera sido cargado por secondSession cuando la " +"aplicación intentó volver a unirlo, se habría lanzado " +"una excepción." + +#: index.docbook:544 +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"Usa update() si no estás seguro que la sesió" +"n tenga una instancia ya persistente con el mismo identificador, y " +"merge() si quieres fusionar tus modificaciones en " +"cualquier momento sin consideración del estado de la sesión. " +"En otras palabras, update() es usualmente el primer " +"método que llamarías en una sesión fresca, asegurando " +"que la re-unión de tus instancias separadas es la primera " +"operación que se ejecuta." + +#: index.docbook:553 +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"La aplicación debe actualizar individualmente las instancias " +"separadas alcanzables por la instancia separada dada llamando a " +"update(), si y sólo si quiere " +"que sus estados sean también actualizados. Esto puede, por supuesto, " +"ser automatizado usando persistencia transitiva, ver " +"." + +#: index.docbook:560 +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"El método lock() también permite a una " +"aplicación reasociar un objeto con una sesión nueva. Sin " +"embargo, la instancia separada no puede haber sido modificada!" + +#: index.docbook:565 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:567 +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"Nota que lock() puede ser usado con varios " +"LockModes, ver la documentación de la API y el " +"capítulo sobre manejo de transacciones para más " +"información. La re-unión no es el único caso de uso " +"para lock()." + +#: index.docbook:574 +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"Se discuten otros modelos para unidades de trabajo largas en ." + +#: index.docbook:581 +msgid "Automatic state detection" +msgstr "Detección automática de estado" + +#: index.docbook:583 +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Los usuarios de Hibernate han pedido un método de propósito " +"general que bien salve una instancia transitoria generando un identificador " +"nuevo, o bien actualice/reúna las instancias separadas asociadas con " +"su identificador actual. El método saveOrUpdate() " +"implementa esta funcionalidad." + +#: index.docbook:590 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:592 +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"El uso y semántica de saveOrUpdate() parece ser " +"confuso para usuarios nuevos. Primeramente, en tanto no estés " +"intentando usar instancias de una sesión en otra sesión nueva, " +"no debes necesitar usar update(), saveOrUpdate()" +", o merge(). Algunas aplicaciones enteras nunca " +"usarán ninguno de estos métodos." + +#: index.docbook:600 +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"Usualmente update() o saveOrUpdate() " +"se usan en el siguiente escenario:" + +#: index.docbook:607 +msgid "the application loads an object in the first session" +msgstr "la aplicación carga un objeto en la primera sesión" + +#: index.docbook:612 +msgid "the object is passed up to the UI tier" +msgstr "el objeto es pasado a la capa de UI" + +#: index.docbook:617 +msgid "some modifications are made to the object" +msgstr "se hacen algunas modificaciones al objeto" + +#: index.docbook:622 +msgid "the object is passed back down to the business logic tier" +msgstr "el objeto se pasa abajo de regreso a la capa de negocio" + +#: index.docbook:627 +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "" +"la aplicación hace estas modificaciones persistentes llamando a " +"update() en una segunda sesión" + +#: index.docbook:634 +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate() hace lo siguiente:" + +#: index.docbook:640 +msgid "if the object is already persistent in this session, do nothing" +msgstr "si el objeto ya es persistente en esta sesión, no hace nada" + +#: index.docbook:645 +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"si otro objeto asociado con la sesión tiene el mismo identificador, " +"lanza una excepción" + +#: index.docbook:651 +msgid "if the object has no identifier property, save() it" +msgstr "" +"si el objeto no tiene ninguna propiedad identificadora, lo salva llamando a " +"save()" + +#: index.docbook:656 +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"si el identificador del objeto tiene el valor asignado a un objeto " +"recién instanciado, lo salva llamando a save()" + +#: index.docbook:662 +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"si el objeto está versionado (por un <version> o <timestamp>), y el valor de la propiedad " +"de versión es el mismo valor asignado a una objeto recién " +"instanciado, lo salva llamando a save()" + +#: index.docbook:670 +msgid "otherwise update() the object" +msgstr "" +"en cualquier otro caso se actualiza el objeto llamando a update()" + +#: index.docbook:676 +msgid "and merge() is very different:" +msgstr "y merge() es muy diferente:" + +#: index.docbook:682 +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"si existe una instancia persistente con el mismo identificador asignado " +"actualmente con la sesión, copia el estado del objeto dado en la " +"instancia persistente" + +#: index.docbook:689 +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"si no existe ninguna instancia persistente actualmente asociada a la " +"sesión, intente cargarla de la base de datos, o crear una nueva " +"instancia persistente" + +#: index.docbook:695 +msgid "the persistent instance is returned" +msgstr "la instancia persistente es devuelta" + +#: index.docbook:700 +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "" +"la instancia dada no resulta ser asociada a la sesión, permanece " +"separada" + +#: index.docbook:710 +msgid "Deleting persistent objects" +msgstr "Borrando objetos persistentes" + +#: index.docbook:712 +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"Session.delete() quitará el estado de un objeto de " +"la base de datos. Por supuesto, tu aplicación podría tener " +"aún una referencia a un objeto borrado. Lo mejor es pensar en " +"delete() como hacer transitoria una instancia persistente." + +#: index.docbook:719 +msgid "" +msgstr "" + +#: index.docbook:721 +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"Puedes borrar los objetos en el orden que gustes, sin riesgo de violaciones " +"de restricción de clave foránea. Aún es posible violar " +"una restricción NOT NULL sobre una columna clave " +"foránea borrando objetos en un orden erróneo, por ejemplo, si " +"borras el padre, pero olvidas borrar los hijos." + +#: index.docbook:732 +msgid "Replicating object between two different datastores" +msgstr "Replicando objetos entre dos almacénes de datos diferentes" + +#: index.docbook:734 +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"Es ocasionalmente útil ser capaz de tomar un grafo de instancias " +"persistentes y hacerlas persistentes en un almacén de datos " +"diferente, sin regenerar los valores identificadores." + +#: index.docbook:740 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:742 +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"El ReplicationMode determina cómo " +"replicate() tratará los conflictos con filas " +"existentes en la base de datos." + +#: index.docbook:749 +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "" +"ReplicationMode.IGNORE - ignora el objeto cuando existe " +"una fila de base de datos con el mismo identificador" + +#: index.docbook:755 +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "" +"ReplicationMode.OVERWRITE - sobrescribe cualquier fila de " +"base de datos existente con el mismo identificador" + +#: index.docbook:761 +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "" +"ReplicationMode.EXCEPTION - lanza una excepción si " +"existe una fila de base de datos con el mismo identificador" + +#: index.docbook:767 +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - sobrescribe la fila si " +"su número de versión es anterior al número de " +"versión del objeto, o en caso contrario ignora el objeto" + +#: index.docbook:775 +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"Los casos de uso para esta funcionalidad incluyen reconciliar datos " +"ingresados en instancias diferentes de bases de datos, actualizar " +"información de configuración de sistema durante " +"actualizaciones de producto, deshacer cambios producidos durante " +"transacciones no-ACID y más." + +#: index.docbook:784 +msgid "Flushing the Session" +msgstr "Limpiando (flushing) la sesión" + +#: index.docbook:786 +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"Cada tanto, la Session ejecutará las sentencias " +"SQL necesarias para sincronizar el estado de la conexión JDBC con el " +"estado de los objetos mantenidos en menoria. Este proceso, " +"limpieza (flush), ocurre por defecto en los siguientes " +"puntos" + +#: index.docbook:795 +msgid "before some query executions" +msgstr "antes de algunas ejecuciones de consulta" + +#: index.docbook:800 +msgid "from org.hibernate.Transaction.commit()" +msgstr "desde org.hibernate.Transaction.commit()" + +#: index.docbook:805 +msgid "from Session.flush()" +msgstr "desde Session.flush()" + +#: index.docbook:811 +msgid "The SQL statements are issued in the following order" +msgstr "Las sentencias SQL son liberadas en el siguiente orden" + +#: index.docbook:817 +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"todas las inserciones de entidades, en el mismo orden que los objetos " +"correspondientes fueron salvados usando Session.save()" + +#: index.docbook:823 +msgid "all entity updates" +msgstr "todas las actualizaciones de entidades" + +#: index.docbook:828 +msgid "all collection deletions" +msgstr "todas los borrados de colecciones" + +#: index.docbook:833 +msgid "all collection element deletions, updates and insertions" +msgstr "" +"todos los borrados, actualizaciones e inserciones de elementos de " +"colección" + +#: index.docbook:838 +msgid "all collection insertions" +msgstr "todas las inserciones de colecciones" + +#: index.docbook:843 +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"todos los borrados de entidades, en el mismo orden que los objetos " +"correspondientes fueron borrados usando Session.delete()" + +#: index.docbook:850 +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(Una excepción es que los objetos que usan generación de ID " +"native se insertan cuando son salvados.)" + +#: index.docbook:855 +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"Excepto cuando llamas explícitamente a flush(), no " +"hay en absoluto garantías sobre cuándo la " +"Session ejecuta las llamadas JDBC. sólo sobre el " +"orden en que son ejecutadas. Sin embargo, Hibernate " +"garantiza que los métodos Query.list(..) nunca " +"devolverán datos añejos o erróneos." + +#: index.docbook:863 +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"Es posible cambiar el comportamiento por defecto de modo que la limpieza " +"(flush) ocurra menos frecuentemente. La clase FlushMode " +"tres modos diferentes: sólo en tiempo de compromiso (y sólo " +"cuando se use la API de Transaction de Hibernate), " +"limpieza automática usando la rutina explicada, o nunca limpiar a " +"menos que se llame a flush() explícitamente. El " +"último modo es útil para unidades de trabajo largas, donde una " +"Session se mantiene abierta y desconectada por largo " +"tiempo (ver )." + +#: index.docbook:873 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:875 +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"Durante la limpieza, puede ocurrir una excepción (por ejemplo, si una " +"operación DML violase una restricción). Ya que el manejo de " +"excepciones implica alguna comprensión del comportamiento " +"transaccional de Hibernate, lo discutimos en ." + +#: index.docbook:884 +msgid "Transitive persistence" +msgstr "Persistencia transitiva" + +#: index.docbook:886 +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"Es absolutamente incómodo dalvar, borrar, o reunir objetos " +"individuales, especialmente si tratas con un grafo de objetos asociados. Un " +"caso común es una relación padre/hijo. Considera el siguiente " +"ejemplo:" + +#: index.docbook:892 +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"Si los hijos en una relación padre/hijo pudieran ser tipificados en " +"valor (por ejemplo, una colección de direcciones o cadenas), sus " +"ciclos de vida dependerían del padre y se requeriría ninguna " +"otra acción para el tratamiento en \"cascada\" de cambios de estado. " +"Cuando el padre es salvado, los objetos hijo tipificados en valor son " +"salvados también, cuando se borra el padre, se borran los hijos, etc. " +"Esto funciona incluso para operaciones como el retiro de un hijo de la " +"colección. Hibernate detectará esto y, ya que los objetos " +"tipificados en valor no pueden tener referencias compartidas, borrará " +"el hijo de la base de datos." + +#: index.docbook:903 +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"Ahora considera el mismo escenario con los objetos padre e hijos siendo " +"entidades, no tipos de valor (por ejemplo, categorías e ítems, " +"o gatos padre e hijos). Las entidades tienen su propio ciclo de vida, " +"soportan referencias compartidas (de modo que quitar una entidad de una " +"colección no significa que sea borrada), y no hay por defecto " +"ningún tratamiento en \"cascada\" de estado de una entidad a otras " +"entidades asociadas. Hibernate no implementa persistencia por " +"alcance." + +#: index.docbook:912 +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"Para cada operación básica de la sesión de Hibernate - " +"incluyendo persist(), merge(), saveOrUpdate(), delete(), lock(), " +"refresh(), evict(), replicate() - hay un estilo de cascada " +"correspondiente. Respectivamente, los estilos de cascada se llaman " +"create, merge, save-update, delete, lock, refresh, evict, " +"replicate. Si quieres que una operación sea tratada en " +"cascada a lo largo de una asociación, debes indicar eso en el " +"documento de mapeo. Por ejemplo:" + +#: index.docbook:921 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:923 +msgid "Cascade styles my be combined:" +msgstr "Los estilos de cascada pueden combinarse:" + +#: index.docbook:927 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:929 +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"Puedes incluso usar cascade=\"all\" para especificar que " +"todas las operaciones deben ser tratadas en cascada a " +"lo largo de la asociación. El por defecto cascade=\"none\" especifica que ninguna operación será tratada en " +"cascada." + +#: index.docbook:935 +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"Un estilo de cascada especial, delete-orphan, se aplica " +"sólo a asociaciones uno-a-muchos, e indica que la operación " +"delete() debe aplicarse a cualquier objeto hijo que sea " +"quitado de la asociación." + +#: index.docbook:942 +msgid "Recommendations:" +msgstr "Recomendaciones:" + +#: index.docbook:948 +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"Usualmente no tiene sentido habilitar el tratamiento en cascada a una " +"asociación <many-to-one> o <many-" +"to-many>. El tratamiento en cascada es frecuentemente ú" +"til para las asociaciones <one-to-one> y " +"<one-to-many>. associations." + +#: index.docbook:956 +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"Si la esperanza de vida de los objetos hijos está ligada a la " +"eesperanza de vida del objeto padre, házlo un objeto de " +"ciclo de vida especificando cascade=\"all,delete-orphan" +"\"." + +#: index.docbook:963 +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +"En otro caso, puede que no necesites tratamiento en cascada en absoluto. " +"Pero si piensas que estarás trabajando frecuentemente con padre e " +"hijos juntos en la misma transacción, y quieres ahorrarte algo de " +"tipeo, considera usar cascade=\"persist,merge,save-update\"." + +#: index.docbook:971 +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"Mapear una asociación (ya sea una asociación monovaluada, o " +"una colección) con cascade=\"all\" marca la " +"asociación como una relación del estilo padre/hijo donde save/update/delete en el padre resulta en save/update/delete " +"del hijo o hijos." + +#: index.docbook:977 +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"Además, una mera referencia a un hijo desde un padre persistente " +"resultará en un save/update del hijo. Esta metáfora " +"está incompleta, sin embargo. Un hijo que deje de ser referenciado " +"por su padre no es borrado automáticamente, " +"excepto en el caso de una asociación <one-to-many> mapeada con cascade=\"delete-orphan\". La " +"semántica precisa de las operaciones en cascada para una " +"relación padre/hijo es:" + +#: index.docbook:988 +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"Si un padre le es pasado a persist(), todos los hijos le " +"son pasados a persist()" + +#: index.docbook:994 +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"Si un padre le es pasado a merge(), todos los hijos le " +"son pasados a merge()" + +#: index.docbook:1000 +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"Si un padre le es pasado a save(), update() o saveOrUpdate(), todos los hijos le son pasados " +"a saveOrUpdate()" + +#: index.docbook:1006 +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"Si un hijo transitorio o separado se vuelve referenciado por un padre " +"persistente, le es pasado a saveOrUpdate()" + +#: index.docbook:1012 +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "" +"Si un padre es borrado, todos los hijos le son pasados a delete()" + +#: index.docbook:1017 +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"Si un hijo deja de ser referenciado por un padre persistente, no " +"ocurre nada especial - la aplicación debe borrar " +"explícitamente el hijo de ser necesario - a menos que " +"cascade=\"delete-orphan\", en cuyo caso el hijo " +"\"huérfano\" es borrado." + +#: index.docbook:1026 +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"UNTRANSLATED!!! Finally, note that cascading of operations can be applied to " +"an object graph at call time or at flush " +"time. All operations, if enabled, are cascaded to associated " +"entities reachable when the operation is executed. However, save-" +"upate and delete-orphan are transitive for all " +"associated entities reachable during flush of the Session." + +#: index.docbook:1038 +msgid "Using metadata" +msgstr "Usando metadatos" + +#: index.docbook:1040 +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"Hibernate requiere de un modelo de meta-nivel muy rico de todas las " +"entidades y tipos de valor. De vez en cuando, este modelo es muy útil " +"para la aplicación misma. Por ejemplo, la aplicación " +"podría usar los metadatos de Hibernate para implementar un algoritmo " +"\"inteligente\" de copia en profundidad que entienda qué objetos " +"deben ser copiados (por ejemplo, tipo de valor mutables) y cuáles no " +"(por ejemplo, tipos de valor inmutables y, posiblemente, entidades " +"asociadas)." + +#: index.docbook:1047 +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"Hibernate expone los metadatos vía las interfaces " +"ClassMetadata y CollectionMetadata y " +"la jerarquía Type. Las instancias de las " +"interfaces de metadatos pueden obtenerse de SessionFactory." + +#: index.docbook:1054 +msgid "" +"" +msgstr "" +"" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/toolset_guide.po b/documentation/envers/src/main/docbook/es-ES/content/toolset_guide.po new file mode 100644 index 0000000000..980bb29f66 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/toolset_guide.po @@ -0,0 +1,969 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "Toolset Guide" +msgstr "Guía del Conjunto de Herramientas" + +#: index.docbook:7 +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"La ingeniería de ida y vuelta con Hibernate es posible usando un " +"conjunto de plugins de Eclipse, herramientas de línea de comandos, " +"así como tareas de Ant." + +#: index.docbook:12 +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"Las Herramientas de Hibernate actualmente incluyen " +"plugins para la IDE de Eclipse así como tareas de Ant para la " +"ingeniería inversa de bases de datos existentes:" + +#: index.docbook:18 +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"Editor de Mapeo: Un editor de ficheros de mapeo XML, " +"que soporta autocompleción y resaltado de sintáxis. Soporta " +"también autocompleción semántica de nombres de clases y " +"nombres de campos/propiedades, haciéndolo mucho más " +"versátil que un editor de XML normal." + +#: index.docbook:23 +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"Consola: La consola es una nueva vista en Eclipse. " +"Además de la vista de árbol de tus configuraciones de consola, " +"tienes también una vista interactiva de tus clases persistentes y sus " +"relaciones. La console te permite ejecutar consultas HQL contra tu base de " +"datos y navegar el resultado directamente en Eclipse." + +#: index.docbook:30 +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"Asistentes de Desarrollo: Se proveen muchos asistentes " +"con las herramientas de Eclipse. Puedes usar un asistente para generar " +"rápidamente ficheros de configuración de Hibernate (cfg.xml), " +"o incluso puedes haceruna ingeniería inversa completa de un esquema " +"de base de datos existente en ficheros de código de POJO y ficheros " +"de mapeo de Hibernate. El asistente de ingeniería inversa soporta " +"plantillas personalizables." + +#: index.docbook:38 +msgid "Ant Tasks:" +msgstr "Tareas de Ant:" + +#: index.docbook:43 +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"Por favor refiérete al paquete Herramientas de Hibernate y su documentación para más información." + +#: index.docbook:48 +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"Sin embargo, el paquete principal de Hibernate viene incluyendo una " +"herramienta integrada (puede ser usada incluso \"dentro\" de Hibernate on-" +"the-fly): SchemaExport también conocido como " +"hbm2ddl." + +#: index.docbook:55 +msgid "Automatic schema generation" +msgstr "Generación automática de esquemas" + +#: index.docbook:57 +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"Una utilidad de Hibernate puede generar DDL desde tus ficheros de mapeo. El " +"esquema generado incluye restricciones de integridad referencial (claves " +"primarias y foráneas) para las tablas de entidades y colecciones. Las " +"tablas y secuencias también son creadas para los generadores de " +"identificadores mapeados." + +#: index.docbook:64 +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"Debes especificar un Dialecto SQL " +"vía la propiedad hibernate.dialect al usar esta " +"herramienta, ya que el DDL es altamente específico del vendedor." + +#: index.docbook:70 +msgid "First, customize your mapping files to improve the generated schema." +msgstr "First, customize your mapping files to improve the generated schema." + +#: index.docbook:75 +msgid "Customizing the schema" +msgstr "Personalizando el esquema" + +#: index.docbook:77 +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"Muchos elementos de mapeo de Hibernate definen un atributo opcional llamado " +"length. Con este atributo puedes establecer el " +"tamaño de una columna. (O, para tipos de datos numéricos/" +"decimales, la precisión.)" + +#: index.docbook:84 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:85 +msgid "]]>" +msgstr "]]>" + +#: index.docbook:87 +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"Algunas etiquetas también aceptan un atributo not-null (para generar una restricción NOT NULL en " +"columnas de tablas) y y un atributo unique (para generar " +"restricciones UNIQUE en columnas de tablas)." + +#: index.docbook:93 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:95 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:97 +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." + +#: index.docbook:105 +msgid "" +"\n" +"]]>" +msgstr "" +"\n" +"]]>" + +#: index.docbook:107 +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." + +#: index.docbook:113 +msgid "" +"\n" +"]]>" +msgstr "" +"\n" +" ]]>" + +#: index.docbook:115 +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." + +#: index.docbook:120 +msgid "" +"]]>" +msgstr "" +"]]>" + +#: index.docbook:122 +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" + +#: index.docbook:127 +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:129 +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." + +#: index.docbook:135 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ]]>" + +#: index.docbook:137 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" ]]>" + +#: index.docbook:139 +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"El atributo sql-type permite al usuario sobrescribir el " +"mapeo por defecto de tipo Hibernate a tipo de datos SQL." + +#: index.docbook:144 +msgid "" +"\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +"]]>" + +#: index.docbook:146 +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "" +"El atributo check te permite especificar una " +"comprobación de restricción." + +#: index.docbook:150 +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" +"\n" +" 10\"/>\n" +"]]>" + +#: index.docbook:152 +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:156 +msgid "Summary" +msgstr "Resumen" + +#: index.docbook:163 +msgid "Attribute" +msgstr "Atributo" + +#: index.docbook:164 +msgid "Values" +msgstr "Valores" + +#: index.docbook:165 +msgid "Interpretation" +msgstr "Interpretación" + +#: index.docbook:170 +msgid "length" +msgstr "length" + +#: index.docbook:171, index.docbook:176, index.docbook:181 +msgid "number" +msgstr "number" + +#: index.docbook:172 +msgid "column length" +msgstr "largo de columna/precisión decimal" + +#: index.docbook:175 +msgid "precision" +msgstr "precision" + +#: index.docbook:177 +msgid "column decimal precision" +msgstr "column decimal precision" + +#: index.docbook:180 +msgid "scale" +msgstr "scale" + +#: index.docbook:182 +msgid "column decimal scale" +msgstr "column decimal scale" + +#: index.docbook:185 +msgid "not-null" +msgstr "not-null" + +#: index.docbook:186, index.docbook:191 +msgid "true|false" +msgstr "true|false" + +#: index.docbook:187 +msgid "specfies that the column should be non-nullable" +msgstr "especifica que la columna debe ser no nulable" + +#: index.docbook:190 +msgid "unique" +msgstr "unique" + +#: index.docbook:192 +msgid "specifies that the column should have a unique constraint" +msgstr "" +"especifica que la columna debe tener una restricción de unicidad" + +#: index.docbook:195 +msgid "index" +msgstr "index" + +#: index.docbook:196 +msgid "index_name" +msgstr "index_name" + +#: index.docbook:197 +msgid "specifies the name of a (multi-column) index" +msgstr "especifica el nombre de un índice (multicolumna)" + +#: index.docbook:200 +msgid "unique-key" +msgstr "unique-key" + +#: index.docbook:201 +msgid "unique_key_name" +msgstr "unique_key_name" + +#: index.docbook:202 +msgid "specifies the name of a multi-column unique constraint" +msgstr "" +"especifica el nombre de una restricción de unicidad multicolumna" + +#: index.docbook:205 +msgid "foreign-key" +msgstr "foreign-key" + +#: index.docbook:206 +msgid "foreign_key_name" +msgstr "foreign_key_name" + +#: index.docbook:207 +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"especifica el nombre de la restricción de clave foránea " +"generada por una asociación, úsalo e <one-to-" +"one>, <many-to-one>, <" +"key>, or <many-to-many> . Nota que los " +"lados inverse=\"true\" no serán considerados por " +"SchemaExport." + +#: index.docbook:217 +msgid "sql-type" +msgstr "sql-type" + +#: index.docbook:218 +msgid "SQL column type" +msgstr "column_type" + +#: index.docbook:219 +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "" +"sobrescribe el tipo de columna por defecto (sólo atributo del " +"elemento <column>)" + +#: index.docbook:225 +msgid "default" +msgstr "default" + +#: index.docbook:226, index.docbook:233 +msgid "SQL expression" +msgstr "SQL expression" + +#: index.docbook:227 +msgid "specify a default value for the column" +msgstr "specify a default value for the column" + +#: index.docbook:232 +msgid "check" +msgstr "check" + +#: index.docbook:234 +msgid "create an SQL check constraint on either column or table" +msgstr "" +"crea una restricción de comprobación SQL en columna o tabla" + +#: index.docbook:242 +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"El elemento <comment> te permite especificar un " +"comentario para el esquema generado." + +#: index.docbook:247 +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" + +#: index.docbook:249 +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" + +#: index.docbook:251 +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"Esto resulta en una sentencia comment on table o " +"comment on column en el DDL generado (donde esté " +"soportado)." + +#: index.docbook:260 +msgid "Running the tool" +msgstr "Ejecutando la herramienta" + +#: index.docbook:262 +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"La herramienta SchemaExport escribe un guión DDL a " +"la salida estándar y/o ejecuta las sentencias DDL." + +#: index.docbook:267 +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" +"java -cp classpaths_de_hibernate " +"org.hibernate.tool.hbm2ddl.SchemaExport " +"opciones ficheros_de_mapeo" + +#: index.docbook:273 +msgid "SchemaExport Command Line Options" +msgstr "" +"Opciones de Línea de Comandos de SchemaExport" + +#: index.docbook:279, index.docbook:429, index.docbook:498 +msgid "Option" +msgstr "Opción" + +#: index.docbook:280, index.docbook:367, index.docbook:430, index.docbook:499 +msgid "Description" +msgstr "Descripción" + +#: index.docbook:285, index.docbook:435 +msgid "--quiet" +msgstr "--quiet" + +#: index.docbook:286, index.docbook:436 +msgid "don't output the script to stdout" +msgstr "no enviar a salida estándar el guión" + +#: index.docbook:289 +msgid "--drop" +msgstr "--drop" + +#: index.docbook:290 +msgid "only drop the tables" +msgstr "sólo desechar las tablas" + +#: index.docbook:293 +msgid "--create" +msgstr "--create" + +#: index.docbook:294 +msgid "only create the tables" +msgstr "only create the tables" + +#: index.docbook:297, index.docbook:439 +msgid "--text" +msgstr "--text" + +#: index.docbook:298 +msgid "don't export to the database" +msgstr "no exportar a la base de datos" + +#: index.docbook:301 +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#: index.docbook:302 +msgid "output the ddl script to a file" +msgstr "enviar la salida del guión ddl a un fichero" + +#: index.docbook:305, index.docbook:443, index.docbook:504 +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#: index.docbook:306, index.docbook:444, index.docbook:505 +msgid "select a NamingStrategy" +msgstr "select a NamingStrategy" + +#: index.docbook:309, index.docbook:451, index.docbook:512 +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#: index.docbook:310 +msgid "read Hibernate configuration from an XML file" +msgstr "lee la configuración de Hibernate de un fichero XML" + +#: index.docbook:313, index.docbook:447, index.docbook:508 +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#: index.docbook:314, index.docbook:448, index.docbook:509 +msgid "read database properties from a file" +msgstr "lee las propiedades de base de datos de un fichero" + +#: index.docbook:317 +msgid "--format" +msgstr "--format" + +#: index.docbook:318 +msgid "format the generated SQL nicely in the script" +msgstr "formatea agradablemente el SQL generado en el guión" + +#: index.docbook:321 +msgid "--delimiter=;" +msgstr "--delimiter=x" + +#: index.docbook:322 +msgid "set an end of line delimiter for the script" +msgstr "establece un delimitador de fin de línea para el guión" + +#: index.docbook:328 +msgid "You may even embed SchemaExport in your application:" +msgstr "" +"Puedes incluso encajar SchemaExport en tu aplicació" +"n:" + +#: index.docbook:332 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:337 +msgid "Properties" +msgstr "Propiedades" + +#: index.docbook:339 +msgid "Database properties may be specified" +msgstr "Las propiedades de base de datos pueden especificarse" + +#: index.docbook:345 +msgid "" +"as system properties with -D<property>" +msgstr "" +"como propiedades de sistema con -D<" +"property>" + +#: index.docbook:348 +msgid "in hibernate.properties" +msgstr "en hibernate.properties" + +#: index.docbook:351 +msgid "in a named properties file with --properties" +msgstr "" +"en un fichero de propiedades mencionado con --properties" + +#: index.docbook:355 +msgid "The needed properties are:" +msgstr "Las propiedades necesarias son:" + +#: index.docbook:360 +msgid "SchemaExport Connection Properties" +msgstr "Propiedades de Conexión de SchemaExport" + +#: index.docbook:366 +msgid "Property Name" +msgstr "Nombre de Propiedad" + +#: index.docbook:372 +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#: index.docbook:373 +msgid "jdbc driver class" +msgstr "clase del driver jdbc" + +#: index.docbook:376 +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#: index.docbook:377 +msgid "jdbc url" +msgstr "url de jdbc" + +#: index.docbook:380 +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#: index.docbook:381 +msgid "database user" +msgstr "usuario de base de datos" + +#: index.docbook:384 +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#: index.docbook:385 +msgid "user password" +msgstr "contraseña de usuario" + +#: index.docbook:388 +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#: index.docbook:389 +msgid "dialect" +msgstr "dialecto" + +#: index.docbook:398 +msgid "Using Ant" +msgstr "Usando Ant" + +#: index.docbook:400 +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "" +"Puedes llamar a SchemaExport desde tu guión de " +"construcción de Ant:" + +#: index.docbook:404 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:409 +msgid "Incremental schema updates" +msgstr "Actualizaciones incrementales de esquema" + +#: index.docbook:411 +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"La herramienta SchemaUpdate actualizará un esquema " +"existente con cambios \"incrementales\". Nota que SchemaUpdate depende fuertemente de la API de metadatos de JDBC, de modo que no " +"funcionará con todos los drivers JDBC." + +#: index.docbook:417 +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" +"java -cp classpaths_de_hibernate " +"org.hibernate.tool.hbm2ddl.SchemaUpdate " +"opciones ficheros_de_mapeo" + +#: index.docbook:423 +msgid "SchemaUpdate Command Line Options" +msgstr "" +"Opciones de Línea de Comandos de SchemaUpdate" + +#: index.docbook:440 +msgid "don't export the script to the database" +msgstr "don't export the script to the database" + +#: index.docbook:452, index.docbook:513 +msgid "specify a .cfg.xml file" +msgstr "specify a .cfg.xml file" + +#: index.docbook:458 +msgid "You may embed SchemaUpdate in your application:" +msgstr "" +"Puedes encajar SchemaUpdate en tu aplicación:" + +#: index.docbook:462 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:467 +msgid "Using Ant for incremental schema updates" +msgstr "Usando Ant para actualizaciones incrementales de esquema" + +#: index.docbook:469 +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "" +"Puedes llamar a SchemaUpdate desde el guión de Ant:" + +#: index.docbook:473 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:478 +msgid "Schema validation" +msgstr "Schema validation" + +#: index.docbook:480 +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." + +#: index.docbook:486 +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" + +#: index.docbook:492 +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator Command Line Options" + +#: index.docbook:519 +msgid "You may embed SchemaValidator in your application:" +msgstr "You may embed SchemaValidator in your application:" + +#: index.docbook:523 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:528 +msgid "Using Ant for schema validation" +msgstr "Using Ant for schema validation" + +#: index.docbook:530 +msgid "You can call SchemaValidator from the Ant script:" +msgstr "You can call SchemaValidator from the Ant script:" + +#: index.docbook:534 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ]]>" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/transactions.po b/documentation/envers/src/main/docbook/es-ES/content/transactions.po new file mode 100644 index 0000000000..6c8e0ee5ec --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/transactions.po @@ -0,0 +1,2079 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:5 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "Transacciones y Concurrencia" + +#. Tag: para +#: transactions.xml:7 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"El punto más importante sobre Hibernate y el control de concurrencia es que " +"muy fácil de comprender. Hibernate usa directamente conexiones JDBC y " +"recursos JTA sin agregar ningún comportamiento de bloqueo adicional. " +"Recomendamos altamente que gastes algo de tiempo con la especificación de " +"JDBC, ANSI, y el aislamiento de transacciones de tu sistema de gestión de " +"base de datos. Hibernate sólo añade versionado automático pero no bloquea " +"objetos en memoria ni cambia el nivel de aislamiento de tus transacciones de " +"base de datos. Básicamente, usa Hibernate como usarías JDBC directo (o JTA/" +"CMT) con tus recursos de base de datos." + +#. Tag: para +#: transactions.xml:14 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." + +#. Tag: para +#: transactions.xml:22 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"Sin embargo, además del versionado automático, Hibernate ofrece una API " +"(menor) para bloqueo pesimista de filas, usando la sintáxis SELECT " +"FOR UPDATE. Esta API se discute más adelante en este capítulo:" + +#. Tag: para +#: transactions.xml:29 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"Comenzamos la discusión del control de concurrencia en Hibernate con la " +"granularidad de Configuration, SessionFactory, y Session, así como la base de datos y las " +"transacciones de aplicación largas." + +#. Tag: title +#: transactions.xml:36 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "Ámbitos de sesión y de transacción" + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"Una SessionFactory es un objeto seguro entre hebras caro-" +"de-crear pensado para ser compartido por todas las hebras de la aplicación. " +"Es creado una sola vez, usualmente en el arranque de la aplicación, a partir " +"de una instancia de Configuration." + +#. Tag: para +#: transactions.xml:44 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Una Session es un objeto barato, inseguro entre hebras " +"que debe ser usado una sola vez, para un solo proceso de negocio, una sola " +"unidad de trabajo, y luego descartado. Una Session no " +"obtendrá una Connection JDBC (o un Datasource) a menos que sea necesario, de modo que puedas abrir y cerrar " +"seguramente una Session incluso si no estás seguro que se " +"necesitará acceso a los datos para servir una petición en particular. (Esto " +"se vuelve importante en cuanto estés implementando alguno de los siguientes " +"patrones usando intercepción de peticiones)." + +#. Tag: para +#: transactions.xml:52 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"Para completar este cuadro tienes que pensar también en las transacciones de " +"base de datos. Una transacción de base de datos tiene que ser tan corta como " +"sea posible, para reducir la contención de bloqueos en la base de datos. Las " +"transacciones largas de base de datos prevendrán a tu aplicación de escalar " +"a una carga altamente concurrente." + +#. Tag: para +#: transactions.xml:61 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"¿Qué es el ámbito de una unidad de trabajo? ¿Puede una sola " +"Session de Hibernate extenderse a través de varias " +"transacciones de base de datos o es ésta una relación uno-a-uno de ámbitos? " +"¿Cuándo debes abrir y cerrar una Session y cómo demarcas " +"los límites de la transacción de base de datos?" + +#. Tag: title +#: transactions.xml:69 +#, no-c-format +msgid "Unit of work" +msgstr "Unidad de trabajo" + +#. Tag: para +#: transactions.xml:71 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"Primero, no uses el antipatrón sesión-por-operación, " +"esto es, ¡no abras y cierres una Session para cada simple " +"llamada a la base de datos en una sola hebra! Por supuesto, lo mismo es " +"verdad para transacciones de base de datos. Las llamadas a base de datos en " +"una aplicación se hacen usando una secuencia prevista, que están agrupadas " +"dentro de unidades de trabajo atómicas. (Nota que esto también significa que " +"el auto-commit después de cada una de las sentencias SQL es inútil en una " +"aplicación, este modo está pensado para trabajo ad-hoc de consola SQL. " +"Hibernate deshabilita, o espera que el servidor de aplicaciones lo haga, el " +"modo auto-commit inmediatamente.)" + +#. Tag: para +#: transactions.xml:87 +#, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is send to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"El patrón más común en una aplicación mutiusuario cliente/servidor es " +"sesión-por-petición. En este modelo, una petición del " +"cliente es enviada al servidor (en donde se ejecuta la capa de persistencia " +"de Hibernate), se abre una nueva Session de Hibernate, y " +"todas las operaciones de base de datos se ejecutan en esta unidad de " +"trabajo. Una vez completado el trabajo (y se ha preparado la respuesta para " +"el cliente) la sesión es limpiada y cerrada. Podrías usar una sola " +"transacción de base de datos para servir a petición del cliente, " +"comenzándola y comprometiéndola cuando abres y cierras la Session. La relación entre las dos es uno-a-uno y este modelo es a la " +"medida perfecta de muchas aplicaciones." + +#. Tag: para +#: transactions.xml:99 +#, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is send to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is send to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." + +#. Tag: para +#: transactions.xml:112 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." + +#. Tag: para +#: transactions.xml:120 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." + +#. Tag: title +#: transactions.xml:135 +#, no-c-format +msgid "Long conversations" +msgstr "Transacciones de aplicación" + +#. Tag: para +#: transactions.xml:137 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"El patrón sesión-por-petición no es el único concepto útil que puedes usar " +"para diseñar unidades de trabajo. Muchos procesos de negocio requiere una " +"serie completa de interacciones con el usuario intercaladas con accesos a " +"base de datos. En aplicaciones web y de empresa no es aceptable que una " +"transacción de base de datos se extienda a través de la interacción de un " +"usuario. Considera el siguiente ejemplo:" + +#. Tag: para +#: transactions.xml:147 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"Se abre la primera pantalla de un diálogo, los datos vistos por el usuario " +"han sido cargados en una Session y transacción de base de " +"datos particular. El usuario es libre de modificar los objetos." + +#. Tag: para +#: transactions.xml:154 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"El usuario hace click en \"Salvar\" después de 5 minutos y espera que sus " +"modificaciones sean hechas persistentes. También espera que él sea la única " +"persona editando esta información y que no puede ocurrir ninguna " +"modificación en conflicto." + +#. Tag: para +#: transactions.xml:162 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"Llamamos a esto unidad de trabajo, desde el punto de vista del usuario, una " +"larga transacción de aplicación ejecutándose. Hay " +"muchas formas en que puedes implementar esto en tu aplicación." + +#. Tag: para +#: transactions.xml:168 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"Una primera implementación ingenua podría mantener abierta la " +"Session y la transacción de base de datos durante el " +"tiempo de pensar del usuario, con bloqueos tomados en la base de datos para " +"prevenir la modificación concurrente, y para garantizar aislamiento y " +"atomicidad. Esto es, por supuesto, un antipatrón, ya que la contención de " +"bloqueo no permitiría a la aplicación escalar con el número de usuarios " +"concurrentes." + +#. Tag: para +#: transactions.xml:176 +#, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"converastion. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"Claramente, tenemos que usar muchas transacciones de base de datos para " +"implementar la transacción de aplicación. En este caso, mantener el " +"aislamiento de los procesos de negocio se vuelve una responsabilidad parcial " +"de la capa de aplicación. Una sola transacción de aplicación usualmente " +"abarca varias transacciones de base de datos. Será atómica si sólo una de " +"estas transacciones de base de datos (la última) almacena los datos " +"actualizados, todas las otras simplemente leen datos (por ejemplo, en un " +"diálogo estilo-asistente abarcando muchos ciclos petición/respuesta). Esto " +"es más fácil de implementar de lo que suena, especialmente si usas las " +"funcionalidades de Hibernate:" + +#. Tag: para +#: transactions.xml:189 +#, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occured during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"Versionado Automático - Hibernate puede llevar un " +"control automático de concurrencia optimista por ti, puede detectar " +"automáticamente si una modificación concurrente ha ocurrido durante el " +"tiempo de pensar del usuario." + +#. Tag: para +#: transactions.xml:197 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"Objetos Separados - Si decides usar el ya discutido " +"patrón de sesión-por-petición, todas las instancias " +"cargadas estarán en estado separado durante el tiempo de pensar del usuario. " +"Hibernate te permite volver a unir los objetos y hacer persistentes las " +"modificaciones. El patrón se llama sesión-por-petición-con-objetos-" +"separados. Se usa versionado automático para aislar las " +"modificaciones concurrentes." + +#. Tag: para +#: transactions.xml:207 +#, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitely." +msgstr "" +"Sesión Larga - La Session de " +"Hibernate puede ser desconectada de la conexión JDBC subyacente después que " +"se haya sido comprometida la transacción de base de datos, y reconectada " +"cuando ocurra una nueva petición del cliente. Este patrón es conocido como " +"sesión-por-transacción-de-aplicación y hace la re-unión " +"innecesaria. Para aislar las modificaciones concurrentes se usa el " +"versionado automático." + +#. Tag: para +#: transactions.xml:220 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"Tanto sesión-por-petición-con-objetos-separados como " +"sesión-por-transacción-de-aplicación, ambas tienen " +"ventajas y desventajas, las discutimos más adelante en este capítulo en el " +"contexto del control optimista de concurrencia." + +#. Tag: title +#: transactions.xml:229 +#, no-c-format +msgid "Considering object identity" +msgstr "Considerando la identidad del objeto" + +#. Tag: para +#: transactions.xml:231 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"Una aplicación puede acceder concurrentemente a el mismo estado persistente " +"en dos Sessions diferentes. Sin embargo, una instancia de " +"una clase persistente nunca se comparte entre dos instancias de " +"Session. Por lo tanto existen dos nociones diferentes de " +"identidad:" + +#. Tag: term +#: transactions.xml:240 +#, no-c-format +msgid "Database Identity" +msgstr "Identidad de Base de Datos" + +#. Tag: literal +#: transactions.xml:243 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:248 +#, no-c-format +msgid "JVM Identity" +msgstr "Identidad JVM" + +#. Tag: literal +#: transactions.xml:251 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:257 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"Entonces para objetos unidos a una Sessionen " +"particular (es decir en el ámbito de una Session) las dos nociones son equivalentes, y la identidad JVM para la " +"identidad de base de datos está garantizada por Hibernate. Sin embargo, " +"mientras la aplicación acceda concurrentemente al \"mismo\" (identidad " +"persistente) objeto de negocio en dos sesiones diferentes, las dos " +"instancias serán realmente \"diferentes\" (identidad JVM). Los conflictos se " +"resuelven (con versionado automático) en tiempo de limpieza (flush) usando " +"un enfoque optimista." + +#. Tag: para +#: transactions.xml:266 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"Este enfoque deja que Hibernate y la base de datos se preocupen sobre la " +"concurrencia. Además provee la mejor escalabilidad, ya que garantizando la " +"identidad un unidades de trabajo monohebra no se necesitan bloqueos caros u " +"otros medios de sincronización. La aplicación nunca necesita sincronizar " +"sobre ningún objeto de negocio, siempre que se apegue a una sola hebra por " +"Session. Dentro de una Session la " +"aplicación puede usar con seguridad == para comparar " +"objetos." + +#. Tag: para +#: transactions.xml:275 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"Sin embargo, una aplicación que usa == fuera de una " +"Session, podría ver resultados inesperados. Esto podría " +"ocurrir incluso en sitios algo inesperados, por ejemplo, si pones dos " +"instancias separadas dentro del mismo Set. Ambas podrían " +"tener la misma identidad de base de datos (es decir, representar la misma " +"fila), pero la identidad JVM, por definición, no está garantizada para las " +"instancias en estado separado. El desarrollador tiene que sobrescribir los " +"métodos equals() y hashCode() en las " +"clases persistentes e implementar su propia noción de igualdad de objetos. " +"Hay una advertencia: Nunca uses el identificador de base de datos para " +"implementar la igualdad, usa una clave de negocio, una combinación de " +"atributos únicos, usualmente inmutables. El identificador de base de datos " +"cambiará si un objeto transitorio es hecho persistente. Si la instancia " +"transitoria (usualmente junta a instancias separadas) es mantenida en un " +"Set, cambiar el código hash rompe el contrato del " +"Set. Los atributos para las claves de negocio no tienen " +"que ser tan estables como las claves primarias de base de datos, sólo tienes " +"que garantizar estabilidad en tanto los objetos estén en el mismo " +"Set. Mira el sitio web de Hibernate para una discusión " +"más cuidadosa de este tema. Nota también que éste no es un tema de " +"Hibernate, sino simplemente cómo la identidad y la igualdad de los objetos " +"Java tiene que ser implementada." + +#. Tag: title +#: transactions.xml:296 +#, no-c-format +msgid "Common issues" +msgstr "Temas comunes" + +#. Tag: para +#: transactions.xml:298 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"Nunca uses los antipatrones sesión-por-sesión-de-usuario o sesión-por-aplicación (por supuesto, hay " +"raras excepciones a esta regla). Nota que algunis de los siguientes temas " +"podrían también aparecer con los patrones recomendados. Asegúrate que " +"entiendes las implicaciones antes de tomar una decisión de diseño:" + +#. Tag: para +#: transactions.xml:307 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"Una Session no es segura entre hebras. Las cosas que se " +"suponen que funcionan concurrentemente, como peticiones HTTP, beans de " +"sesión, o workers de Swing, provocarán condiciones de competencia si una " +"instancia de Session fuese compartida. Si guardas tu " +"Session de Hibernate en tu HttpSession " +"(discutido más adelante), debes considerar sincronizar el acceso a tu sesión " +"HTTP. De otro modo, un usuario que hace click lo suficientemente rápido " +"puede llegar a usar la misma Session en dos hebras " +"ejecutándose concurrentemente." + +#. Tag: para +#: transactions.xml:318 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"Una excepción lanzada por Hibernate significa que tienes que deshacer " +"(rollback) tu transacción de base de datos y cerrar la Session inmediatamente (discutido en más detalle luego). Si tu " +"Session está ligada a la aplicación, tienes que parar la " +"aplicación. Deshacer (rollback) la transacción de base de datos no pone a " +"tus objetos de vuelta al estado en que estaban al comienzo de la " +"transacción. Esto significa que el estado de la base de datos y los objetos " +"de negocio quedan fuera de sincronía. Usualmente esto no es un problema, " +"pues las excepciones no son recuperables y tienes que volver a comenzar " +"después del rollback de todos modos." + +#. Tag: para +#: transactions.xml:330 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"La Session pone en caché todo objeto que esté en estado " +"persistente (vigilado y chequeado por estado sucio por Hibernate). Esto " +"significa que crece sin fin hasta que obtienes una OutOfMemoryException, si " +"la mantienes abierta por un largo tiempo o simplemente cargas demasiados " +"datos. Una solución para esto es llamar a clear() y " +"evict() para gestionar el caché de la Session, pero probalemente debas considerar un procedimiento almacenado si " +"necesitas operaciones de datos masivas. Se muestran algunas soluciones en " +". Mantener una Session abierta " +"por la duración de una sesión de usuario significa también una alta " +"probabilidad de datos añejos." + +#. Tag: title +#: transactions.xml:348 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "Demarcación de la transacción de base de datos" + +#. Tag: para +#: transactions.xml:350 +#, no-c-format +msgid "" +"Datatabase (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"Los límites de las transacciones de base de datos (o sistema) son siempre " +"necesarios. Ninguna comunicación con la base de datos puede darse fuera de " +"una transacción de base de datos (esto parece confundir muchos " +"desarrolladores acostumbrados al modo auto-commit). Siempre usa límites de " +"transacción claros, incluso para las operaciones de sólo lectura. " +"Dependiendo del nivel de aislamiento y las capacidades de base de datos, " +"esto podría o no ser requerido, pero no hay un merma si siempre demarcas " +"explícitamente las transacciones." + +#. Tag: para +#: transactions.xml:360 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"Una aplicación Hibernate puede ejecutarse en entornos no manejados (es " +"decir, como independiente, Web simple, o aplicaciones Swing) y entornos " +"manejados J2EE. En un entorno no manejado, Hibernate es usualmente " +"responsable de su propio pool de conexiones de base de datos. El " +"desarrollador de aplicaciones tiene que establecer manualmente los límites " +"de transacción, en otras palabras, hacer begin, commit, o rollback las " +"transacciones de base de datos por sí mismo. Un entorno manejado usualmente " +"provee transacciones gestionadas por contenedor, con el ensamble de " +"transacción definido declarativamente en descriptores de despliegue de beans " +"de sesión EJB, por ejemplo. La demarcación programática de transacciones no " +"es más necesario, incluso limpiar (flush) la Session es " +"hecho automáticamente." + +#. Tag: para +#: transactions.xml:370 +#, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demaracation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"Sin embargo, frecuentemente es deseable mantener portable tu capa de " +"persistencia. Hibernate ofrece una API de envoltura llamada " +"Transaction que se traduce al sistema de transacciones " +"nativo de tu entorno de despliegue. Esta API es realmente opcional, pero " +"recomendamos fuertemente su uso salvo que estés en un bean de sesión CMT." + +#. Tag: para +#: transactions.xml:379 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "" +"Usualmente, finalizar una Session implica cuatro fases " +"distintas:" + +#. Tag: para +#: transactions.xml:385 +#, no-c-format +msgid "flush the session" +msgstr "limpiar (flush) la sesión" + +#. Tag: para +#: transactions.xml:390 +#, no-c-format +msgid "commit the transaction" +msgstr "comprometer la transacción" + +#. Tag: para +#: transactions.xml:395 +#, no-c-format +msgid "close the session" +msgstr "cerrar la sesión" + +#. Tag: para +#: transactions.xml:400 +#, no-c-format +msgid "handle exceptions" +msgstr "manejar excepciones" + +#. Tag: para +#: transactions.xml:406 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"Limpiar la sesión ha sido discutido anteriormente, tendremos ahora una " +"mirada más de cerca a la demarcación de transacciones y manejo de " +"excepciones en sendos entornos manejado y no manejados." + +#. Tag: title +#: transactions.xml:413 +#, no-c-format +msgid "Non-managed environment" +msgstr "Entorno no manejado" + +#. Tag: para +#: transactions.xml:415 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"Si una capa de persistencia Hibernate se ejecuta en un entorno no manejado, " +"las conexiones de base de datos son manejadas usualmente por el mecanismo de " +"pooling de Hibernate. El idioma manejo de sesión/transacción se ve así:" + +#. Tag: programlisting +#: transactions.xml:422 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"No tienes que limpiar con flush() la Session explícitamente - la llamada a commit() " +"automáticamente dispara la sincronización. Una llamada a close() marca el fin de una sesión. La principal implicación de " +"close() es que la conexión JDBC será abandonada por la " +"sesión." + +#. Tag: para +#: transactions.xml:433 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"Este código Java es portable y se ejecuta tanto en entornos no manejados " +"como en entornos JTA." + +#. Tag: programlisting +#: transactions.xml:438 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:440 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"Muy probablemente nunca veas este idioma en código de negocio en una " +"aplicación normal; las excepciones fatales (sistema) deben siempre ser " +"capturadas en la \"cima\". En otras palabras, el código que ejecuta las " +"llamadas de Hibernate (en la capa de persistencia) y el código que maneja " +"RuntimeException (y usualmente sólo puede limpiar y " +"salir) están en capas diferentes. Esto puede ser un desafío de diseñarlo tú " +"mismo y debes usar los servicios de contenedor J2EE/EJB en cuanto estuviesen " +"disponibles. El manejo de excepciones se dicute más adelante en este " +"capítulo." + +#. Tag: para +#: transactions.xml:450 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"Nota que debes seleccionar org.hibernate.transaction." +"JDBCTransactionFactory (que es el por defecto)." + +#. Tag: title +#: transactions.xml:459 +#, no-c-format +msgid "Using JTA" +msgstr "Usando JTA" + +#. Tag: para +#: transactions.xml:461 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"Si tu capa de persistencia se ejecuta en un servidor de aplicaciones (por " +"ejemplo, detrás de beans de sesión EJB), cada conexión de datasource " +"obtenida por Hibernate será parte automáticamente de la transacción JTA " +"global. Hibernate ofrece dos estrategias para esta integración." + +#. Tag: para +#: transactions.xml:468 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"Si usas transacciones gestionadas-por-bean (BMT) Hibernate le dirá al " +"servidor de aplicaciones que comience y finalice una transacción BMT si usas " +"la API de Transaction. De modo que, el código de gestión " +"de la transacción es idéntico al de un entorno no manejado." + +#. Tag: programlisting +#: transactions.xml:474 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:476 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "" +"Con CMT, la demarcación de la transacción se hace en descriptores de " +"despliegue de beans de sesión, no programáticamente. Si no quieres limpiar " +"(flush) y cerrar manualmente la Session por ti mismo, " +"solamente establece hibernate.transaction.flush_before_completion a true, hibernate.connection." +"release_mode a after_statement o auto y hibernate.transaction.auto_close_session a " +"true. Hibernate limpiará y cerrará entonces " +"automáticamente la Session para ti. Lo único que resta es " +"deshacer (rollback) la transacción cuando ocurra una excepción. " +"Afortunadamente, en un bean CMT, incluso esto ocurre automáticamente, ya que " +"una RuntimeException no manejada disparada por un método " +"de un bean de sesión le dice al contenedor que ponga a deshacer la " +"transacción global. Esto significa que, en CMT, no necesitas usar " +"en absoluto la API de Transaction de Hibernate." + +#. Tag: programlisting +#: transactions.xml:482 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:484 +#, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programatically, hence, the code is reduced to:" +msgstr "" +"Nota que debes elegir org.hibernate.transaction." +"JTATransactionFactory en un bean de sesión BMT, y org." +"hibernate.transaction.CMTTransactionFactory en un bean de sesión " +"CMT, cuando configures la fábrica de transacciones de Hibernate. Recuerda " +"además establecer org.hibernate.transaction.manager_lookup_class." + +#. Tag: programlisting +#: transactions.xml:489 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:491 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"Si trabajas en un entorno CMT, y usas limpieza (flushing) y cierre " +"automáticos de la sesión, podrías querer también usar la misma sesión en " +"diferentes partes de tu código. Típicamente, en un entorno no manejado, " +"usarías una variable ThreadLocal para tener la sesión, " +"pero una sola petición de EJB puede ejecutarse en diferentes hebras (por " +"ejemplo, un bean de sesión llamando a otro bean de sesión). Si no quieres " +"molestarte en pasar tu Session por alrededor, la " +"SessionFactory provee el método getCurrentSession" +"(), que devuelve una sesión que está pegada al contexto de " +"transacción JTA. ¡Esta es la forma más fácil de integrar Hibernate en una " +"aplicación! La sesión \"actual\" siempre tiene habilitados limpieza, cierre " +"y liberación de conexión automáticos (sin importar la configuración de las " +"propiedades anteriores). Nuestra idioma de gestión de sesión/transacción se " +"reduce a:" + +#. Tag: para +#: transactions.xml:499 +#, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatiblity), or set to \"jta\"." +msgstr "" +"En otras palabras, todo lo que tienes que hacer en un entorno manejado, es " +"llamar a SessionFactory.getCurrentSession(), hacer tu " +"trabajo de acceso a datos, y dejar el resto al contenedor. Los límites de " +"transacción se establecen declarativamente en los descriptores de despliegue " +"de tu bean de sesión. El ciclo de vida de la sesión es manejado " +"completamente por Hibernate." + +#. Tag: para +#: transactions.xml:508 +#, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicity " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"Existe una advertencia al uso del modo de liberación de conexión " +"after_statement. Debido a una limitación tonta de la " +"especificación de JTA, no es posible para Hibernate limpiar automáticamente " +"ningún ScrollableResults no cerrado ni instancias de " +"Iterator devueltas por scroll() o " +"iterate(). Debes liberar el cursor " +"de base de datos subyacente llamando a ScrollableResults.close() o Hibernate.close(Iterator) explícitamente desde " +"un bloque finally. (Por supuesto, la mayoría de las " +"aplicaciones pueden evitarlo fácilmente no usando en absoluto ningún " +"scroll() o iterate() desde el código " +"CMT.)" + +#. Tag: title +#: transactions.xml:524 +#, no-c-format +msgid "Exception handling" +msgstr "Manejo de excepciones" + +#. Tag: para +#: transactions.xml:526 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"Si la Session lanza una excepción (incluyendo cualquier " +"SQLException), debes inmediatamente deshacer (rollback) " +"la transacción de base de datos, llamar a Session.close() " +"y descartar la instancia de Session. Ciertos métodos de " +"Sessionno dejarán la sesión en un " +"estado consistente. Ninguna excepción lanzada por Hibernate puede ser " +"tratada como recuperable. Asegúrate que la Session sea " +"cerrada llamando a close() en un bloque finally." + +#. Tag: para +#: transactions.xml:537 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"La HibernateException, que envuelve la mayoría de los " +"errores que pueden ocurrir en la capa de persistencia de Hibernate, en una " +"excepción no chequeada (no lo era en versiones anteriores de Hibernate). En " +"nuestra opinión, no debemos forzar al desarrollador de aplicaciones a " +"capturar una excepción irrecuperable en una capa baja. En la mayoría de los " +"sistemas, las excepciones no chequeadas y fatales son manejadas en uno de " +"los primeros cuadros de la pila de llamadas a métodos (es decir, en las " +"capas más altas) y se presenta un mensaje de error al usuario de la " +"aplicación (o se toma alguna otra acción apropiada). Nota que Hibernate " +"podría también lanzar otras excepciones no chequeadas que no sean una " +"HibernateException. Una vez más, no son recuperables y " +"debe tomarse una acción apropiada." + +#. Tag: para +#: transactions.xml:549 +#, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the eexception into a more meningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"Hibernate envuelve SQLExceptions lanzadas mientras se " +"interactúa con la base de datos en una JDBCException. De " +"hecho, Hibernate intentará convertir la excepción en una subclase de " +"JDBCException más significativa. La " +"SQLException está siempre disponible vía " +"JDBCException.getCause(). Hibernate convierte la " +"SQLException en una subclase de JDBCException apropiada usando el SQLExceptionConverter " +"adjunto a la SessionFactory. Por defecto, el " +"SQLExceptionConverter está definido para el dialecto " +"configurado; sin embargo, es también posible enchufar una implementación " +"personalizada (ver los javadocs de la clase " +"SQLExceptionConverterFactory para los detalles). Los " +"subtipos estándar de JDBCException son:" + +#. Tag: para +#: transactions.xml:565 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - indica un error con la " +"comunicación JDBC subyacente." + +#. Tag: para +#: transactions.xml:571 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - indica un problema de gramática o " +"sintáxis con el SQL publicado." + +#. Tag: para +#: transactions.xml:577 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - indica alguna forma de " +"violación de restricción de integridad." + +#. Tag: para +#: transactions.xml:583 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - indica un error adquiriendo un " +"nivel de bloqueo necesario para realizar una operación solicitada." + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "" +"GenericJDBCException - una excepción genérica que no cayó " +"en ninguna de las otras categorías." + +#. Tag: title +#: transactions.xml:599 +#, no-c-format +msgid "Transaction timeout" +msgstr "Transaction timeout" + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functioanlity is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functioanlity is abstracted by the " +"Hibernate Transaction object." + +#. Tag: programlisting +#: transactions.xml:614 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:616 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." + +#. Tag: title +#: transactions.xml:626 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "Control optimista de concurrencia" + +#. Tag: para +#: transactions.xml:628 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"El único enfoque que es consistente con alta concurrencia y alta " +"escalabilidad es el control optimista de concurrencia con versionamiento. El " +"chuequeo de versión usa números de versión, o timestamps, para detectar " +"actualizaciones en conflicto (y para prevenir actualizaciones perdidas). " +"Hibernate provee para tres enfoques posibles de escribir código de " +"aplicación que use concurrencia optimista. Los casos de uso que hemos " +"mostrado están en el contexto de transacciones de aplicación largas pero el " +"chequeo de versiones tiene además el beneficio de prevenir actualizaciones " +"perdidas en transacciones de base de datos solas." + +#. Tag: title +#: transactions.xml:639 +#, no-c-format +msgid "Application version checking" +msgstr "Chequeo de versiones de aplicación" + +#. Tag: para +#: transactions.xml:641 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"En una implementación sin mucha ayuda de Hibernate, cada interacción con la " +"base de datos ocurre en una nueva Session y el " +"desarrollador es responsable de recargar todas las intancias persistentes " +"desde la base de datos antes de manipularlas. Este enfoque fuerza a la " +"aplicación a realizar su propio chequeo de versiones para asegurar el " +"aislamiento de transacciones de base de datos. Es el enfoque más similar a " +"los EJBs de entidad." + +#. Tag: programlisting +#: transactions.xml:650 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"La propiedad version se mapea usando <" +"version>, e Hibernate la incrementará automáticamente durante " +"la limpieza si la entidad está sucia." + +#. Tag: para +#: transactions.xml:658 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"Por supuesto, si estás operando un entorno de baja-concurrencia-de-datos y " +"no requieres chequeo de versiones, puedes usar este enfoque y simplemente " +"saltar el chequeo de versiones. En ese caso, el último compromiso " +"(commit) gana será la estrategia por defecto para tus " +"transacciones de aplicación largas. Ten en mente que esto podría confundir a " +"los usuarios de la aplicación, pues podrían experimentar actualizaciones " +"perdidas sin mensajes de error ni chance de fusionar los cambios " +"conflictivos." + +#. Tag: para +#: transactions.xml:667 +#, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified ojects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"Claramente, el chequeo manual de versiones es factible solamente en " +"circunstancias muy triviales, y no es práctico para la mayoría de " +"aplicaciones. Frecuentemente, no sólo intancias solas, sino grafos completos " +"de objetos modificados tienen que ser chequeados. Hibernate ofrece chequeo " +"de versiones automático con el paradigma de diseño de Session larga o de instancias separadas." + +#. Tag: title +#: transactions.xml:678 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "Sesión larga y versionado automático" + +#. Tag: para +#: transactions.xml:680 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"Una sola instancia de Session y sus instancias " +"persistentes son usadas para toda la transacción de aplicación. Hibernate " +"chequea las versiones de instancia en el momento de limpieza (flush), " +"lanzando una excepción si se detecta una modificación concurrente. Concierne " +"al desarrollador capturar y manejar esta excepción (las opciones comunes son " +"la oportunidad del usuario de fusionar los cambios, o recomenzar el proceso " +"de negocio sin datos añejos)." + +#. Tag: para +#: transactions.xml:689 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"La Session se desconecta de cualquier conexión JDBC " +"subyacente al esperar por una interacción del usuario. Este enfoque es el " +"más eficiente en términos de acceso a base de datos. La aplicación no " +"necesita tratar por sí misma con el chequeo de versiones, ni re-uniendo " +"instancias separadas, ni tiene que recargar instancias en cadatransactions-" +"demarcation-timeout transacción de base de datos." + +#. Tag: programlisting +#: transactions.xml:697 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:698 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"El objeto foo todavía conoce en qué Session fue cargado. Session.reconnect() obtiene una " +"nueva conexión (o puedes proveer una) y reasume la sesión. El método " +"Session.disconnect() desconectará la sesión de la " +"conexión JDBC y la devolverá la conexión al pool (a menos que hayas provisto " +"la conexión). Después de la reconexión, para forzar un chequeo de versión en " +"datos que no estés actualizando, puedes llamar a Session.lock() con LockMode.READ sobre cualquier objeto que " +"pudiese haber sido actualizado por otra transacción. No necesitas bloquear " +"ningún dato que sí estés actualizando." + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"Si las llamadas explícitas a disconnect() y " +"reconnect() son muy onerosas, puedes usar en cambio " +"hibernate.connection.release_mode." + +#. Tag: para +#: transactions.xml:723 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"Este patrón es problemático si la Session es demasiado " +"grande para ser almacenada durante el tiempo de pensar del usuario, por " +"ejemplo, una HttpSession debe mantenerse tan pequeña como " +"sea posible. Ya que la Session es también el caché " +"(obligatorio) de primer nivel y contiene todos los objetos cargados, podemos " +"probablemente cargar esta estrategia sólo para unos pocos ciclos petición/" +"respuesta. Esto está de hecho recomendado, ya que la Session tendrá pronto también datos añejos." + +#. Tag: para +#: transactions.xml:729 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"Nota también que debes mantener la Session desconectada " +"próxima a la capa de persistencia. En otras palabras, usa una sesión de EJB " +"con estado para tener la Session y no transferirla a la " +"capa web para almacenarla en la HttpSession (ni incluso " +"serializarla a una capa separada)." + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"UNTRANSLATED!!! The extended session pattern, or session-per-" +"conversation, is more difficult to implement with automatic " +"current session context management. You need to supply your own " +"implementation of the CurrentSessionContext for this, see " +"the Hibernate Wiki for examples." + +#. Tag: title +#: transactions.xml:747 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "Objetos separados y versionado automático" + +#. Tag: para +#: transactions.xml:749 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"Cada interacción con el almacén persistente ocurre en una nueva " +"Session. Sin embargo, las mismas instancias persistentes " +"son reusadas para cada interacción con la base de datos. La aplicación " +"manipula el estado de las instancias separadas originalmente cargadas en " +"otra Session y luego las readjunta usando " +"Session.update(), Session.saveOrUpdate(), o Session.merge()." + +#. Tag: programlisting +#: transactions.xml:757 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:759 +#, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occured." +msgstr "" +"De nuevo, Hibernate chequeará las versiones de instancia durante la limpieza " +"(flush), lanzando una excepción si ocurrieron actualizaciones en conflicto." + +#. Tag: para +#: transactions.xml:764 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"Puedes también llamar a lock() en vez de update()" +" y usar LockMode.READ (realizando un chequeo de " +"versión, puenteando todos los cachés) si estás seguro que el objeto no ha " +"sido modificado." + +#. Tag: title +#: transactions.xml:773 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "Personalizando el versionado automático" + +#. Tag: para +#: transactions.xml:775 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"Puedes deshabilitar el incremento de versión automático de Hibernate para " +"propiedades en particular y colecciones estableciendo el atributo de mapeo " +"optimistic-lock a false. Hibernate " +"entonces no incrementará ya más las versiones si la propiedad está sucia." + +#. Tag: para +#: transactions.xml:782 +#, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this concepetually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"Los esquemas de base de datos heredados son frecuentemente estáticos y no " +"pueden ser modificados. U otras aplicaciones podrían también acceder la " +"misma base de datos y no saber cómo manejar los números de versión ni " +"incluso timestamps. En ambos casos, el versionado no puede confiarse a una " +"columna en particular en una tabla. Para forzar un chequeo de versiones sin " +"un mapeo de propiedad de versión o timestamp, con una comparación del estado " +"de todos los campos en una fila, activa optimistic-lock=\"all\" en el mapeo de <class>. Nota que esto " +"conceptualmente funciona solamente si Hibernate puede comparar el estado " +"viejo y nuevo, es decir, si usas una sola Session larga y " +"no sesión-por-petición-con-instancias-separadas." + +#. Tag: para +#: transactions.xml:793 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"A veces las modificaciones concurrentes pueden permitirse, en cuanto los " +"cambios que hayan sido hechos no se traslapen. Si estableces " +"optimistic-lock=\"dirty\" al mapear la <" +"class>, Hibernate sólo comparará los campos sucios durante la " +"limpieza." + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute uneccessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"En ambos casos, con columnas de versión/timestamp dedicadas o con " +"comparación de campos completa/sucios, Hibernate usa una sola sentencia " +"UPDATE (con una cláusula WHERE " +"apropiada) por entidad para ejecutar el chequeo de versiones y actualizar la " +"información. Si usas persistencia transitiva para la re-unión en cascada de " +"entidades asociadas, Hibernate podría ejecutar actualizaciones innecesarias. " +"Esto usualmente no es un problema, pero podrían ejecutarse disparadores " +"(triggers) on update en la base de datos incluso cuando " +"no se haya hecho ningún cambio a las instancias separadas. Puedes " +"personalizar este comportamiento estableciendo select-before-update=" +"\"true\" en el mapeo de <class>, forzando " +"a Hibernate a SELECT la instancia para asegurar que las " +"actualizaciones realmente ocurran, antes de actualizar la fila." + +#. Tag: title +#: transactions.xml:817 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "Bloqueo pesimista" + +#. Tag: para +#: transactions.xml:819 +#, no-c-format +msgid "" +"It is not intended that users spend much time worring about locking " +"strategies. Its usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"No se pretende que los usuarios gasten mucho tiempo preocupándose de las " +"estrategias de bloqueo. Usualmente es suficiente con especificar un nivel de " +"aislamiento para las conexiones JDBC y entonces simplemente dejar que la " +"base de datos haga todo el trabajo. Sin embargo, los usuarios avanzados " +"pueden a veces obtener bloqueos exclusivos pesimistas, o reobtener bloqueos " +"al comienzo de una nueva transacción." + +#. Tag: para +#: transactions.xml:826 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "" +"¡Hibernate siempre usará el mecanismo de bloqueo de la base de datos, nunca " +"bloqueo de objetos en memoria!" + +#. Tag: para +#: transactions.xml:831 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"La clase LockMode define los diferentes niveles de " +"bloqueo que pueden ser adquiridos por Hibernate. Un bloqueo se obtiene por " +"los siguientes mecanismos:" + +#. Tag: para +#: transactions.xml:838 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"LockMode.WRITE se adquiere automáticamente cuando " +"Hibernate actualiza o inserta una fila." + +#. Tag: para +#: transactions.xml:844 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"LockMode.UPGRADE puede ser adquirido bajo petición " +"explícita del usuario usando SELECT ... FOR UPDATE en " +"base de datos que soporten esa sintáxis." + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"LockMode.UPGRADE_NOWAIT puede ser adquirido bajo petición " +"explícita del usuario usando un SELECT ... FOR UPDATE NOWAIT bajo Oracle." + +#. Tag: para +#: transactions.xml:856 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"LockMode.READ es adquirido automáticamente cuando " +"Hibernate lee datos bajo los niveles de aislamiento Repeatable Read o " +"Serializable. Puede ser readquirido por pedido explícito del usuario." + +#. Tag: para +#: transactions.xml:863 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE representa la ausencia de un bloqueo. Todos " +"los objetos se pasan a este modo de bloqueo al final de una " +"Transaction. Los objetos asociados con una sesión vía una " +"llamada a update() o saveOrUpdate() " +"también comienzan en este modo de bloqueo." + +#. Tag: para +#: transactions.xml:872 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "" +"La \"petición explícita del usuario\" se expresa en una de las siguientes " +"formas:" + +#. Tag: para +#: transactions.xml:878 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"Una llamada a Session.load(), especificando un " +"LockMode." + +#. Tag: para +#: transactions.xml:883 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "Una llamada a Session.lock()." + +#. Tag: para +#: transactions.xml:888 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "Una llamada a Query.setLockMode()." + +#. Tag: para +#: transactions.xml:894 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"Si se llama a Session.load() con UPGRADE o UPGRADE_NOWAIT, y el objeto pedido no ha sido " +"aún cargado por la sesión, el objeto es cargado usando SELECT ... " +"FOR UPDATE. Si se llama a load() para un objeto " +"que ya esté cargado con un bloqueo menos restrictivo que el pedido, " +"Hibernate llama a lock() para ese objeto." + +#. Tag: para +#: transactions.xml:903 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"Session.lock() realiza un chequeo de número de versión si " +"el modo de bloqueo especificado es READ, " +"UPGRADE o UPGRADE_NOWAIT. (En el caso " +"de UPGRADE o UPGRADE_NOWAIT, se usa " +"SELECT ... FOR UPDATE.)" + +#. Tag: para +#: transactions.xml:910 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"Si la base de datos no soporta el modo de bloqueo solicitado, Hibernate " +"usará un modo alternativo apropiado (en vez de lanzar una excepción). Esto " +"asegura que las aplicaciones serán portables." + +#. Tag: title +#: transactions.xml:919 +#, no-c-format +msgid "Connection Release Modes" +msgstr "translator-credits" + +#. Tag: para +#: transactions.xml:921 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" + +#. Tag: para +#: transactions.xml:935 +#, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obatins a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" + +#. Tag: para +#: transactions.xml:942 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" + +#. Tag: para +#: transactions.xml:948 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" + +#. Tag: para +#: transactions.xml:958 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" + +#. Tag: para +#: transactions.xml:965 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" + +#. Tag: para +#: transactions.xml:975 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" + +#. Tag: para +#: transactions.xml:981 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/tutorial.po b/documentation/envers/src/main/docbook/es-ES/content/tutorial.po new file mode 100644 index 0000000000..ceab1e83fe --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/tutorial.po @@ -0,0 +1,3137 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:7 +msgid "Introduction to Hibernate" +msgstr "Introducción a Hibernate" + +#: index.docbook:10 +msgid "Preface" +msgstr "Prefacio" + +#: index.docbook:12 +msgid "" +"This chapter is an introductory tutorial for new users of Hibernate. We " +"start with a simple command line application using an in-memory database and " +"develop it in easy to understand steps." +msgstr "" +"Este capítulo es un tutorial introductorio de Hibernate. Comenzamos " +"con una aplicación simple de línea de comandos usando un base " +"de datos en-memoria y desarrollándola en fácil para entender " +"los pasos." + +#: index.docbook:18 +msgid "" +"This tutorial is intended for new users of Hibernate but requires Java and " +"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party " +"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3." +msgstr "" +"Este tutorial está concebido para usuarios nuevos de Hibernate pero " +"requiere conocimiento en Java y SQL. Está basado en un tutorial de " +"Michael Gloegl. Las bibliotecas de terceros que mencionamos son para JDK 1.4 " +"y 5.0. Podrías necesitar otras para JDK 1.3." + +#: index.docbook:24 +msgid "" +"The source code for the tutorial is included in the distribution in the " +"doc/reference/tutorial/ directory." +msgstr "" +"UNTRANSLATED!!! The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." + +#: index.docbook:32 +msgid "Part 1 - The first Hibernate Application" +msgstr "Parte 1 - La primera Aplicación Hibernate" + +#: index.docbook:34 +msgid "" +"First, we'll create a simple console-based Hibernate application. We use an " +"Java database (HSQL DB), so we do not have to install any database server." +msgstr "" +"Primero, crearemos una aplicación simple de Hibenate basada en " +"consola. Usamos usamos una base de datos en-memoria (HSQL DB), de modo que " +"no necesitamos instalar ningún servidor de base de datos." + +#: index.docbook:39 +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the hosts of these events." +msgstr "" +"Asumamos que necesitamos una aplicación pequeña de base de " +"datos que pueda almacenar eventos que queremos atender, e información " +"acerca de los hostales de estos eventos." + +#: index.docbook:44 +msgid "" +"The first thing we do, is set up our development directory and put all the " +"Java libraries we need into it. Download the Hibernate distribution from the " +"Hibernate website. Extract the package and place all required libraries " +"found in /lib into into the /lib " +"directory of your new development working directory. It should look like " +"this:" +msgstr "" +"La primera cosa que hacemos, es armar nuestro directorio de desarrollo y " +"poner en él todas las bibliotecas Java que necesitamos. Descarga la " +"distribución de Hibernate del sitio web de Hibernate. Extrae el " +"paquete y coloca todas las bibliotecas requeridas encontradas en /" +"lib dentro del directorio /lib de nuestro nuevo " +"directorio de desarrollo de trabajo. Debe asemejarse a esto:" + +#: index.docbook:52 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:54 +msgid "" +"This is the minimum set of required libraries (note that we also copied " +"hibernate3.jar, the main archive) for Hibernate at the time of " +"writing. The Hibernate release you are using might require more " +"or less libraries. See the README.txt file in the " +"lib/ directory of the Hibernate distribution for more " +"information about required and optional third-party libraries. (Actually, " +"Log4j is not required but preferred by many developers.)" +msgstr "" +"Este es el conjunto mínimo de bibliotecas requeridas para Hibernate " +"(observa que también hemos copiado hibernate3.jar, el fichero " +"principal). Ver el fichero README.txt en el directorio " +"lib/ de la distribución de Hibernate para má" +"s información sobre bibliotecas de terceros requeridas y opcionales. " +"(Realmente, Log4J no es requerida aunque preferida por muchos " +"desarrolladores)." + +#: index.docbook:63 +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "" +"Por siguiente, creamos una clase que represente el evento que queremos " +"almacenar en base de datos." + +#: index.docbook:68 +msgid "The first class" +msgstr "La primera clase" + +#: index.docbook:70 +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "" +"Nuestra primera clase persistente es un JavaBean simple con algunas " +"propiedades:" + +#: index.docbook:74 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:76 +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"Puedes ver que esta clase usa las convenciones de nombrado estándar " +"de JavaBean para métodos getter y setter de propiedad, así " +"como visibilidad privada para los campos. Esto es un diseño " +"recomendado, aunque no requerido. Hibernate también puede acceder a " +"los campos directamente; el beneficio de los métodos de acceso es la " +"robustez para la refactorización." + +#: index.docbook:84 +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"La propiedad id tiene un valor único de " +"identificador para un evento en particular. Todas las clase de entidad " +"persistentes ( también hay clases dependientes menos importantes) " +"necesitarán una propiedad identificadora similar si queremos usar el " +"conjunto completo de funcionalidades de Hibernate. De hecho, la mayorí" +"a de las aplicaciones (esp. aplicaciones web) necesitan distinguir objetos " +"por identificador, de modo que debes considerar esto como un aspecto en vez " +"de una limitación. Sin embargo, usualmente no manipulamos la " +"identidad de un objeto, por lo tanto el método setter debe ser " +"privado. Sólo Hibernate asignará identificadores cuando un " +"objeto sea salvado. Puedes ver que Hibernate puede acceder a métodos " +"de acceso públicos, privados y protegidos, tanto como directamente a " +"campos (públicos, privados y protegidos). La elección " +"está en ti, y puedes ajustarla a tu diseño de aplicació" +"n." + +#: index.docbook:96 +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"El constructor sin argumentos es un requerimiento para todas las clases " +"persistentes. Hibernate tiene que crear objetos para ti, usando " +"reflección Java. El constructor puede ser privado, sin embargo, la " +"visibilidad de paquete es requerida para la generación de proxies en " +"tiempo de ejecución y la recuperación de datos sin " +"instrumentación del bytecode." + +#: index.docbook:103 +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"Coloca este fichero de código Java en un directorio llamado " +"src en la carpeta de desarrollo. El directorio ahora debe " +"verse como esto:" + +#: index.docbook:108 +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" +"\n" +"+src\n" +" Event.java]]>" + +#: index.docbook:110 +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "" +"En el próximo paso, le decimos a Hibernate sobre esta clase " +"persistente." + +#: index.docbook:117 +msgid "The mapping file" +msgstr "El fichero de mapeo" + +#: index.docbook:119 +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"Hibernate necesita saber cómo cargar y almacenar objetos de la clase " +"persistente. Aquí es donde el fichero de mapeo de Hibernate entra en " +"juego. El fichero de mapeo le dice a Hibernate a qué tabla en la base " +"de datos tiene que acceder, y qué columnas en esta tabla debe usar." + +#: index.docbook:126 +msgid "The basic structure of a mapping file looks like this:" +msgstr "La estructura básica de un fichero de mapeo se parece a esto:" + +#: index.docbook:130 +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" + +#: index.docbook:132 +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"Observa que el DTD de Hibernate es muy sofisticado. Puedes usarlo para " +"autocompleción de los elementos y atributos XML de mapeo en tu editor " +"o IDE. Debes también abrir el fichero DTD en tu editor de texto. Es " +"la forma más fácil para tener un panorama de todos los " +"elementos y atributos y ver los valores por defectos, así como " +"algunos comentarios. Nota que Hibernate no cargará el fichero DTD de " +"la web, sino que primero buscará en el classpath de la " +"aplicación. El fichero DTD está incluído en " +"hibernate3.jar así como también en el " +"directorio src/ de la distribución de Hibernate." + +#: index.docbook:143 +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"Omitiremos la declaración de DTD en futuros ejemplos para acortar el " +"código. Por supuesto, no es opcional." + +#: index.docbook:148 +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"Entre las dos etiquetas hibernate-mapping, incluye un " +"elemento class. Todas las clases de entidad persistentes " +"(de nuevo, podría haber más adelante clases dependientes, que " +"no sean entidades de-primera-clase) necesitan dicho mapeo a una tabla en la " +"base de datos SQL:" + +#: index.docbook:155 +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" + +#: index.docbook:157 +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"Hasta ahora dijimos a Hibernate cómo persistir y cargar el objeto de " +"clase Event a la tabla EVENTS, cada " +"instancia representada por una fila en esta tabla. Ahora continuamos con un " +"mapeo de la propiedad de identificado único a la clave primaria de la " +"tabla. Además, como no queremos cuidar del manejo de este " +"identificador, configuramos la estrategia de generación de " +"identificadores para una columna clave primaria delegada:" + +#: index.docbook:165 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:167 +msgid "" +"The id element is the declaration of the identifer " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"El elemento id el la declaración de la propiedad " +"identificadora, name=\"id\" declara el nombre de la " +"propiedad Java. Hibernate usará los métodos getter y setter " +"para acceder a la propiedad. El attributo de columna dice a Hibernate " +"cuál columna de la tabla EVENTS usamos para esta " +"clave primaria. El elemento anidado generator especifica " +"la estrategia de generación de identificadores, en este caso usamos " +"increment, que es un método muy simple de " +"incremento de número en-memoria útil mayormente para testeo (y " +"tutoriales). Hibernate también soporta identificadores generados por " +"base de datos, globalmente únicos, así como también " +"asignados por aplicación (o cualquier estrategia para la que hayas " +"escrito una extensión)." + +#: index.docbook:180 +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"Finalmente incluímos declaraciones para las propiedades persistentes " +"de la clases en el fichero de mapeo. Por defecto, ninguna propiedad de la " +"clase se considera persistente:" + +#: index.docbook:186 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:188 +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"Al igual que con el elemento id, el atributo " +"name del elemento property dice a " +"Hibernate cáles métodos getter y setter usar." + +#: index.docbook:195 +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"¿Por qué el mapeo de la propiedad date incluye el " +"atributo column, pero el de la de title no? Sin el atributo column Hibernate usa por " +"defecto el nombre de propiedad como nombre de columna. Esto funciona bien " +"para title. Sin embargo, However, date " +"es una palabra reservada en la mayoría de las bases de datos, " +"así que mejor la mapeamos a un nombre diferente." + +#: index.docbook:204 +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"La próxima cosa interesante es que el mapeo de title carece de un atributo type. Los tipos que " +"declaramos y usamos en el fichero de mapeo no son, como podrías " +"esperar, tipos de datos Java. Tampoco son tipos de base de datos SQL. Estos " +"tipos son los llamados así Tipos de mapeo de Hibernate, convertidores que pueden traducir de tipos Java a SQL y vice " +"versa. De nuevo, Hibernate intentará determinar la conversión " +"y el mapeo mismo de tipo correctos si el atributo type no " +"estuviese presente en el mapeo. En algunos casos esta detección " +"automática (usando reflección en la clase Java) puede no tener " +"lo que esperas o necesitas. Este es el caso de la propiedad date. Hibernate no puede saber is la propiedad mapeará a una " +"columna date, timestamp o " +"time. Declaramos que queremos preservar la " +"información completa de fecha y hora mapeando la propiedad con un " +"timestamp." + +#: index.docbook:220 +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"Este fichero de mapeo debe ser salvado como Event.hbm.xml, justo en el directorio próximo al fichero de código " +"fuente de la clase Java Event. El nombrado de los " +"ficheros de mapeo puede ser arbitrario, sin embargo, el sufijo hbm." +"xml se ha vuelto una convención el la comunidad de " +"desarrolladores de Hibernate. La estructura de directorio debe ahora verse " +"como esto:" + +#: index.docbook:228 +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" +"\n" +"+src\n" +" Event.java\n" +" Event.hbm.xml]]>" + +#: index.docbook:230 +msgid "We continue with the main configuration of Hibernate." +msgstr "Continuamos con la configuración principal de Hibernate." + +#: index.docbook:237 +msgid "Hibernate configuration" +msgstr "Configuración de Hibernate" + +#: index.docbook:239 +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"Tenemos ahora una clase persistente y su fichero de mapeo en su sitio. Es " +"momento de configurar Hibernate. Antes que hagamos esto, necesitaremos una " +"base de datos. HSQL DB, un DBMS SQL en-memoria basado en Java, puede ser " +"descargado del sitio web de HSQL DB. Realmente, de esta descarga sólo " +"necesitas el hsqldb.jar. Coloca este fichero en el " +"directorio lib/ de la carpeta de desarrollo." + +#: index.docbook:247 +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"Crea un directorio llamado data en la raíz del " +"directorio de desarrollo. Allí es donde HSQL DB almacenará sus " +"ficheros de datos." + +#: index.docbook:257 +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"Hibernate es la capa en tu aplicación que se conecta a esta base de " +"datos, de modo que necesita información de conexión. Las " +"conexiones se hacen a través de un pool de conexiones JDBC, que " +"tambén tenemos que configurar. La distribución de Hibernate " +"contiene muchas herramientas de pooling de conexiones JDBC de código " +"abierto, pero para este tutorial usaremos el pool de conexiones prefabricado " +"dentro de Hibernate. Observa que tienes que copiar la biblioteca requerida " +"en tu classpath y usar diferentes configuraciones de pooling de conexiones " +"si quieres usar un software de pooling JDBC de terceros de calidad de " +"producción." + +#: index.docbook:267 +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"Para la configuración de Hibernate, podemos usar un fichero " +"hibernate.properties simple, un fichero " +"hibernate.cfg.xml ligeramente más sofisticado, o " +"incluso una configuración completamente programática. La " +"mayoría de los usuarios prefieren el fichero de configuración " +"XML:" + +#: index.docbook:273 +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:data/tutorial\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" + +#: index.docbook:275 +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"Observa que esta configuración XML usa un DTD diferente. Configuramos " +"la SessionFactory de Hibernate, una fábrica global " +"responsable de una base de datos en particular. Si tienes varias bases de " +"datos, usa varias configuraciones <session-factory> , usualmente en varios ficheros de configuración (para un " +"arranque más fácil)." + +#: index.docbook:283 +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"Los primeros cuatro elementos property contienen la " +"configuración necesaria para la conexión JDBC. El elemento de " +"dialecto property especifica la variante de SQL en " +"particular que genera Hibernate. La opción hbm2ddl.auto activa la generación automática de esquemas de base " +"de datos, directamente en la base de datos. Esto, por supuesto, puede " +"desactivarse (quitando la opción config) o redirigido a un fichero " +"con la ayuda de la tarea de Ant SchemaExport. Finalmente, " +"agregamos el(los) fichero(s) de mapeo para clases persistentes." + +#: index.docbook:296 +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"Copia este fichero dentro del directorio de código fuente, de modo " +"que termine ubicado en la raiíz del classpath. Hibernate busca " +"automáticamente un fichero llamado hibernate.cfg.xml en la raíz del classpath al arrancar." + +#: index.docbook:305 +msgid "Building with Ant" +msgstr "Construyendo con Ant" + +#: index.docbook:307 +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"Construiremos ahora el tutorial con Ant. Necesitarás tener Ant " +"instalado. Obténlo de Página de descarga de Ant. No se cubrirá " +"aquí cómo instalar Ant. Por favor refiérete al Manual de Ant. " +"Después que hayas instalado Ant, podemos comenzar a crear el " +"buildfile. Será llamado build.xml y colocado " +"directamente en el directorio de desarrollo." + +#: index.docbook:316 +msgid "A basic build file looks like this:" +msgstr "Reparar Ant" + +#: index.docbook:320 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"Observa que la distribución de Ant está por defecto rota (como " +"se describe en el FAQ de Ant) y tiene que ser reparado por ti, por ejemplo, " +"si quisieras usar JUnit desde dentro de tu fichero de construcción. " +"Para hacer que funcione la tarea de JUnit (no lo necesitaremos en este " +"tutorial), copia junit.jar a ANT_HOME/lib o quita el " +"trozo de plugin ANT_HOME/lib/ant-junit.jar." + +#: index.docbook:322 +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "Un fichero de construcción básico se ve como esto:" + +#: index.docbook:329 +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:334 +msgid "Startup and helpers" +msgstr "" +"Esto dirá a Ant que agregue todos los ficheros en el directorio lib " +"que terminen con .jar al classpath usado para la " +"compilación. También copiará todos los ficheros que no " +"sean código Java al directorio objetivo, por ejemplo, ficheros de " +"configuración y mapeos de Hibernate. Si ahora corres Ant, debes " +"obtener esta salida:" + +#: index.docbook:336 +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" + +#: index.docbook:346 +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "Arranque y ayudantes" + +#: index.docbook:352 +msgid "" +"" +msgstr "" +"Es momento de cargar y almacenar algunos objetos Event, " +"pero primero tenemos que completar la configuración de algún " +"código de infraestructura. Tenemos que arrancar Hibernate. Este " +"arranque incluye construir un objeto SessionFactory " +"global y almacenarlo en algún sitio de fácil acceso en el " +"código de aplicación. Una SessionFactory " +"puede abrir nuevas Session's. Una Session representa un unidad de trabajo mono-hebra. La " +"SessionFactory es un objeto global seguro entre hebras, " +"instanciado una sola vez." + +#: index.docbook:354 +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"Crearemos una clase de ayuda HibernateUtil que cuide del " +"arranque y haga conveniente el manejo de Session. El " +"así llamado patrón Sesión de Hebra Local " +"(ThreadLocal Session) es útil aquí; mantenemos la " +"unidad de trabajo actual asociada a la hebra actual. Echemos una mirada a la " +"implementación:" + +#: index.docbook:361 +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"" + +#: index.docbook:370 +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"Esta clase no ólo produce la SessionFactory global " +"en su inicializador static (llamado sólo una vez por la JVM al cargar " +"la clase), sino que también tiene una variable ThreadLocal para tener la Session para la hebra actual. No " +"importa cuándo llames a HibernateUtil.currentSession(), siempre devolverá la misma unidad de trabajo de Hibernate " +"en la misma hebra. Una llamada a HibernateUtil.closeSession() termina la unidad de trabajo actualmente asociada a la hebra." + +#: index.docbook:375 +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" +"Asegúrate de entender el concepto Java de una variable local a una " +"hebra antes de usar esta ayuda. Una clase HibernateUtil " +"más potente puede encontrarse en CaveatEmptor, " +"http://caveatemptor.hibernate.org/, así como en el libro \"Java " +"Persistence with Hibernate\". Observa que esta clase no es necesaria si " +"despliegas Hibernate en un servidor de aplicaciones J2EE: una " +"Session será automáticamente ligada a la " +"transacción JTA actual, y puedes buscar la SessionFactory a través de JNDI. Si usas JBoss AS, Hibernate puede ser " +"desplegado como un servicio de sistema manejado y automáticamente " +"ligará la SessionFactory a un nombre JNDI." + +#: index.docbook:377 +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"Coloca HibernateUtil.java en el directorio de fuentes de " +"desarrollo, junto a Event.java:" + +#: index.docbook:387 +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "" +"\n" +"+src\n" +" Event.java\n" +" Event.hbm.xml\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" + +#: index.docbook:395 +msgid "Loading and storing objects" +msgstr "" +"Esto también debe compilar sin problemas. Finalmente necesitamos " +"configurar un sistema de logging (registro). Hibernate usa commons logging y " +"te deja la elección entre Log4J y logging de JDK 1.4. La mayorí" +"a de los desarrolladores prefieren Log4J: copia log4j.properties de la distribución de Hibernate (está en el " +"directorio etc/) a tu directorio src, " +"junto a hibernate.cfg.xml. Echa una mirada a la " +"configuración de ejemplo y cambia los ajustes si te gusta tener una " +"salida más verborrágica. Por defecto, sólo se muestra " +"el mensaje de arranque de Hibernate en la salida." + +#: index.docbook:397 +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"La infraestructura del tutorial está completa, y estamos listos para " +"hacer algún trabajo real con Hibernate." + +#: index.docbook:402 +msgid "" +"" +msgstr "Cargando y almacenando objetos" + +#: index.docbook:404 +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"Finalmente, podemos usar Hibernate para cargar y almacenar objetos. " +"Escribimos una clase EventManager con un método " +"main():" + +#: index.docbook:411 +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"" + +#: index.docbook:419 +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"Leemos algunos argumentos de la línea de comandos, y si el primer " +"argumento es \"store\", creamos y almacenamos un nuevo Event:" + +#: index.docbook:430 +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"" + +#: index.docbook:441 +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"Creamos un nuevo objeto Event, y se lo damos a Hibernate. " +"Hibernate cuida ahora del SQL y ejecuta INSERTs en la " +"base de datos. Echemos una mirada al código de manejo de " +"Session y Transaction antes de " +"ejecutar esto." + +#: index.docbook:452 +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"Una Session es una sola unidad de trabajo. Podría " +"sorprenderte que tengamos una API adicional, Transaction. " +"Esto implica que una unidad de trabajo puede ser \"más larga\" que " +"una sola transacción de base de datos; imagina una unidad de trabajo " +"que se abarca varios ciclos petición/respuesta HTTP (por ejemplo, un " +"diálogo asistente) en una aplicación web. Separar las " +"transacciones de base de datos de \"las unidades de trabajo de la " +"aplicación desde el punto de vista del usuario\" es uno de los " +"conceptos básicos de diseño de Hibernate. Llamamos una unidad " +"de trabajo larga Transacción de Aplicación, usualmente encapsulando varias transacciones de base de datos " +"más cortas. Por ahora mantendremos las cosas simples y asumiremos una " +"granularidad uno-a-uno entre una Session y una " +"Transaction." + +#: index.docbook:458 +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"¿Qué es lo que hacen Transaction.begin() y " +"commit()? ¿Dónde está el rollback en caso " +"que algo vaya mal? La API de Transaction de Hibernate es " +"opcional realmente, pero la usamos por conveniencia y portabilidad. Si " +"manejases la transacción de base de datos por ti mismo (por ejemplo, " +"llamando a session.connection.commit()), ligarías " +"el código a un entorno de despliegue particular, en este JDBC directo " +"no manejado. Estableciendo la fábrica de Transaction en tu configuración de Hibernate puedes desplegar tu capa de " +"persistencia en cualquier sitio. Echa una mirada al para más información sobre manejo y " +"demarcación de transacciones. Hemos saltado también cualquier " +"manejo de excepciones y rollback en este ejemplo." + +#: index.docbook:462 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" +"Para ejecutar la primera rutina tenemos que agregar un objetivo llamable al " +"fichero de construcción de Ant:" + +#: index.docbook:464 +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" + +#: index.docbook:469 +msgid "ant run -Daction=store]]>" +msgstr "" +"El valor del argumento action es establecido por lí" +"nea de comandos al llamar al objetivo:" + +#: index.docbook:471 +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "ant run -Daction=store]]>" + +#: index.docbook:476 +msgid "" +"" +msgstr "" +"Debes ver, después de la compilación, a Hibernate arrancando " +"y, dependiendo de tu configuración mucha salida de registro (log). Al " +"final encontrarás la siguiente línea:" + +#: index.docbook:478 +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"" + +#: index.docbook:484 +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"Esta es la INSERT ejecutada por Hibernate, los signos de " +"preguntas representan parámetros de ligado JDBC. Para ver los valores " +"ligados como argumentos, o para reducir la verborragia del registro, chequea " +"tu log4j.properties." + +#: index.docbook:488 +msgid "" +"" +msgstr "" +"Ahora quisiéramos listar acontecimientos almacenados también, " +"así que agregamos una opción al método principal:" + +#: index.docbook:490 +msgid "We also add a new listEvents() method:" +msgstr "" +"" + +#: index.docbook:494 +msgid "" +"" +msgstr "" +"Agregamos también un nuevo método listEvents():" + +#: index.docbook:496 +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"" + +#: index.docbook:503 +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "" +"Lo que hacemos aquí es usar una consulta HQL (Lenguaje de Consulta de " +"Hibernate o Hibernate Query Language) para cargar todos los objetos " +"Event existentes de la base de datos. Hibernate " +"generará el SQL apropiado, lo enviará a la base de datosy " +"poblará los objetos Event con datos. Puedes, por " +"supuesto, crear consultas más complejas con HQL." + +#: index.docbook:509 +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "Now, to execute and test all of this, follow these steps:" + +#: index.docbook:515 +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." + +#: index.docbook:525 +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." + +#: index.docbook:531 +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." + +#: index.docbook:544 +msgid "Part 2 - Mapping associations" +msgstr "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." + +#: index.docbook:546 +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "Part 2 - Mapeando asociaciones" + +#: index.docbook:552 +msgid "Mapping the Person class" +msgstr "" +"Hemos mapeado un clase de entidad persistente a una tabla. Construyamos " +"sobre esto y agreguemos algunas asociaciones de clase. Primero agregaremos " +"personas a nuestra aplicación, y almacenaremos una lista de eventos " +"en las que participan." + +#: index.docbook:554 +msgid "The first cut of the Person class is simple:" +msgstr "Mapeando la clase Person" + +#: index.docbook:558 +msgid "" +"" +msgstr "El primer corte de la clase Person es simple:" + +#: index.docbook:560 +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"" + +#: index.docbook:565 +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "Crea un fichero de mapeo llamado Person.hbm.xml:" + +#: index.docbook:567 +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:571 +msgid "" +"\n" +"]]>" +msgstr "" +"Finalmente, agrega el nuevo mapeo a la configuración de Hibernate:" + +#: index.docbook:573 +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"\n" +" \n" +"]]>" + +#: index.docbook:583 +msgid "A unidirectional Set-based association" +msgstr "" +"Crearemos ahora una asociación entre estas dos entidades. Obviamente, " +"las personas pueden participar en eventos, y los eventos tienen " +"participantes. Las cuestiones de diseño con que tenemos que tratar " +"son: direccionalidad, multiplicidad y comportamiento de colección." + +#: index.docbook:585 +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "Una asociación unidireccional basada en Set" + +#: index.docbook:592 +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "" +"Agregaremos una colección de eventos a la clase Person. De esta forma podemos navegar facilmente a los eventos de una " +"persona en particular, sin ejecutar una consulta explícita, llamando " +"a aPerson.getEvents(). Usamos una colección Java, " +"un Set, porque la colección no contendrá " +"elementos duplicados y el ordenamiento no nos es relevante." + +#: index.docbook:597 +msgid "" +"" +msgstr "" +"Hasta ahora hemos diseñado asociaciones unidireccionales " +"multivaluadas, implementadas con un Set. Escribamos el " +"código para esto en las clases Java y luego lo mapeemos:" + +#: index.docbook:599 +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"" + +#: index.docbook:610 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" +"Antes que mapeemos esta asociación, piensa sobre el otro lado. " +"Claramente, podemos mantener esto solamente unidireccional. O podemos crear " +"otra colección en el Event, si queremos ser " +"capaces de navegarlos bidireccionalmente; por ejemplo, anEvent." +"getParticipants(). Esta es una elección de diseño " +"que recae en ti, pero lo que está claro de esta discusión es " +"la multiplicidad de la asociación: \"multi\" valuada a ambos lados, " +"llamamos a esto una asociación muchos-a-muchos. " +"Por lo tanto, usamos un mapeo many-to-many de Hibernate:" + +#: index.docbook:612 +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" + +#: index.docbook:624 +msgid "The database schema for this mapping is therefore:" +msgstr "" +"Hibernate soporta todo tipo de mapeos de colección, siendo el " +"más común un <set>. Para una " +"asociación muchos-a-muchos (o relación de entidad n:" +"m), se necesita una tabla de asociación. Cada fila en esta " +"tabla representa un enlace entre una persona y un evento. Esta tabla se " +"configura con el atributo table del elemento " +"set. El nombre de la columna identificadora en la " +"asociación, para el lado de la persona, se define con el elemento " +"<key>. El nombre de columna para el lado del evento " +"se define con el atributo column del <many-to-" +"many>. También tienes que decirle a Hibernate la clase " +"de los objetos en tu colección (correcto: la clase del otro lado de " +"la colección de referencias)." + +#: index.docbook:628 +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "El esquema de base de datos para este mapeo es, por lo tanto:" + +#: index.docbook:633 +msgid "Working the association" +msgstr "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" + +#: index.docbook:635 +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "Trabajando la asociación" + +#: index.docbook:639 +msgid "" +"" +msgstr "" +"Traigamos alguna gente y eventos juntos en un nuevo método en " +"EventManager:" + +#: index.docbook:641 +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"" + +#: index.docbook:656 +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"Después de cargar una Person y un Event, simplemente modifica la colección usando sus métodos " +"normales. Como puedes ver, no hay una llamada explícita a " +"update() o save(). Hibernate detecta " +"automáticamente que la colección ha sido modificada y necesita " +"ser salvada. Esto es llamado chequeo sucio automótico " +"(automatic dirty checking), y también puedes intentarlo " +"modificando el nombre de la propiedad de fecha de cualquiera de tus objetos. " +"Mientras estén en estado persistente, esto es, " +"ligados a una Session de Hibernate particular (es decir, " +"justo han sido cargados o almacenados en una unidad de trabajo), Hibernate " +"monitoriza cualquier cambio y ejecuta SQL en estilo escribe-por-detrá" +"s. El proceso de sincronización del estado de memoria con la base de " +"datos, usualmente sólo al final de una unidad de trabajo, es llamado " +"limpieza (flushing)." + +#: index.docbook:663 +msgid "" +"" +msgstr "" +"Podrías, por supuesto, cargar persona y evento en unidades de trabajo " +"diferentes. O modificas un objeto fuera de una Session, " +"cuando no está en estado persistente (si antes era persistente " +"llamamos a este estado separado (detached) ). En " +"código (no muy realista), esto se vería como sigue:" + +#: index.docbook:665 +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"" + +#: index.docbook:672 +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"La llamada a update hace a un objeto persistente de " +"nuevo, podrías decir que la liga a una nueva unidad de trabajo, de " +"modo que cualquier modificación que le hagas mientras esté " +"separado puede ser salvada a base de datos." + +#: index.docbook:680 +msgid "" +"" +msgstr "" +"Bueno, esto no es muy usado en nuestra situación actual, pero es un " +"concepto importante que puedes diseñar en tu propia aplicació" +"n. Por ahora, completa este ejercicio agregando una nueva acción al " +"método main de EventManager y llámala desde " +"la línea de comandos. Si necesitas los identificadores de una persona " +"o evento, el método save() los devuelve." + +#: index.docbook:682 +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"Esto fue un ejemplo de una asociación entre dos clases igualmente " +"importantes, dos entidades. Como se ha mencionado anteriormente, hay otras " +"clases y tipos en un modelo típico, usualmente \"menos importantes\". " +"Algunos ya los habrás visto, como un int o un " +"String. Llamamos a estas clases tipos de valor " +"(value types), y sus instancias dependen de " +"una entidad en particular. Las instancias de estos tipos no tienen su propia " +"identidad, ni son compartidas entre entidades (dos personas no referencian " +"el mismo objeto firstname, incluso si tuvieran el mismo " +"primer nombre). Por supuesto, los tipos de valor no sólo pueden " +"encontrarse en el JDK (de hecho, en una aplicación Hibernate todas " +"las clases del JDK son consideradas tipos de valor), sino que además " +"puedes escribir por ti mismo clases dependientes, por ejemplo, " +"Address o MonetaryAmount." + +#: index.docbook:695 +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"También puedes diseñar una colección de tipos de valor. " +"Esto es conceptualmente muy diferente de una colección de referencias " +"a otras entidades, pero se ve casi lo mismo en Java." + +#: index.docbook:703 +msgid "Collection of values" +msgstr "Colección de valores" + +#: index.docbook:705 +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"Agregamos una colección de objetos tipificados en valor a la entidad " +"Person. Queremos almacenar direcciones de email, de modo " +"que el tipo que usamos es String, y la colección " +"es nuevamente un Set:" + +#: index.docbook:710 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:712 +msgid "The mapping of this Set:" +msgstr "El mapeo de este Set:" + +#: index.docbook:716 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:718 +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"La diferencia comparada con el mapeo anterior es la parte element, que le dice a Hibernate que la colección no contiene " +"referencias a otra entidad, sino una colección de elementos de tipo " +"String (el nombre en minúsculas te dice que es un " +"tipo/conversor de mapeo de Hibernate). Una vez más, el atributo " +"table del elemento set determina el " +"nombre de la tabla para la colección. El elemento key define el nombre de la columna clave foránea en la tabla de " +"colección. El atributo column en el elemento " +"element define el nombre de columna donde realmente " +"serán almacenados los valores String." + +#: index.docbook:728 +msgid "Have a look at the updated schema:" +msgstr "Echa una mirada al esquema actualizado:" + +#: index.docbook:732 +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" + +#: index.docbook:734 +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"Puedes ver que la clave primaria de la tabla de colección es de hecho " +"una clave compuesta, usando ambas columnas. Esto implica también que " +"no pueden haber direcciones de email duplicadas por persona, que es " +"exactamente la semántica que necesitamos para un conjunto en Java." + +#: index.docbook:740 +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"" + +#: index.docbook:745 +msgid "" +"" +msgstr "" +"Puedes ahora intentar y agregar elementos a esta colección, al igual " +"que hicimos antes enlazando personas y eventos. Es el mismo código en " +"Java." + +#: index.docbook:747 +msgid "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." + +#: index.docbook:757 +msgid "Bi-directional associations" +msgstr "Asociaciones bidireccionales" + +#: index.docbook:759 +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"A continuacion vamos a mapear una asociación bidireccional, haciendo " +"que la asociación entre persona y evento funcione desde ambos lados " +"en Java. Por supuesto, el esquema de base de datos no cambia; todavía " +"necesitamos multiplicidad muchos-a-muchos. Una base de datos relacional es " +"más flexible que un lenguaje de programación de red, " +"así que no necesita nada parecido a una dirección de " +"navegación; los datos pueden ser vistos y recuperados en cualquier " +"forma posible." + +#: index.docbook:767 +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "" +"Primero agrega una colección de participantes a la clase de eventos " +"Event:" + +#: index.docbook:771 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:773 +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "" +"Ahora mapea este lado de la asociación también, en " +"Event.hbm.xml." + +#: index.docbook:777 +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +"]]>" + +#: index.docbook:779 +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"Como ves, estos son mapeos normales de set en ambos " +"documentos de mapeo. Nota que los nombres de columnas en key y many-to-many fueron permutados en ambos " +"documentos de mapeo. Aquí la adición más importante es " +"el atributo inverse=\"true\" en el elemento set del mapeo de colección de Event." + +#: index.docbook:787 +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"Lo que esto significa es que Hibernate debe tomar el otro lado - la clase " +"Person - cuando necesite descubrir información " +"sobre el enlace entre las dos. Esto será mucho más fá" +"cil de entender una vez que veas cómo se crea el enlace bidireccional " +"entre nuestras dos entidades." + +#: index.docbook:796 +msgid "Working bi-directional links" +msgstr "Trabajando enlaces bidireccionales" + +#: index.docbook:798 +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"Primero, ten en mente que Hhibernate no afecta la semántica normal de " +"Java. ¿Cómo hemos creado un enlace entre una Person y un Event en el ejemplo unidireccional? Hemos " +"agregado una instancia de Event a la colección de " +"referencias de eventos de una instancia de Person. De " +"modo que, obviamente, si queremos que este enlace funcione " +"bidireccionalmente, tenemos que hacer lo mismo del otro lado, agregando una " +"referencia a Person a la colección en un " +"Event. Este \"establecer el enlace a ambos lados\" es " +"absolutamente necesario y nunca debes olvidar hacerlo." + +#: index.docbook:808 +msgid "" +"Many developers program defensive and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"Muchos desarrolladores programan a la defensiva y crean métodos de " +"manejo de un enlace para establecer correctamente ambos lados, por ejemplo " +"en Person:" + +#: index.docbook:813 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:815 +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"Nota que los métodos get y set para esta colección son ahora " +"protegidos. Esto le permite a clases en el mismo paquete y a subclases " +"acceder aún a los métodos, pero previene a cualquier otro de " +"ensuciarse con la colección directamente (bueno, casi). Probablemente " +"debas hacer lo mismo con la colección al otro lado." + +#: index.docbook:822 +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"Y ¿qué del atributo de mapeo inverse? Para ti, y " +"para Java, un enlace bidireccional es simplemente cuestión de " +"establecer correctamente las referencias a ambos lados. Hibernate, sin " +"embargo, no tiene suficiente información para arreglar correctamente " +"sentencias INSERT y UPDATE de SQL " +"(para evitar violación de restricciones), y necesita alguna ayuda " +"para manejar asociaciones bidireccionales apropiadamente. El hacer un lado " +"de la asociación inverse le dice a Hibernate que " +"basicamente lo ignore, que lo considere un espejo del " +"otro lado. Esto es todo lo necesario para que Hibernate resuelva todas las " +"incidencias al transformar un modelo de navegación direccional a un " +"esquema SQL de base de datos. Las reglas que tienes que recordar son " +"directas: Todas las asociaciones bidireccionales necesitan uno de los lados " +"como inverse. En una asociación uno-a-muchos debe " +"ser el lado-de-muchos. En una asociación muchos-a-muchos, puedes " +"tomar cualquier lado, no hay diferencia." + +#: index.docbook:837 +msgid "Let's turn this into a small web application." +msgstr "Let's turn this into a small web application." + +#: index.docbook:844 +msgid "Part 3 - The EventManager web application" +msgstr "Part 3 - The EventManager web application" + +#: index.docbook:846 +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." + +#: index.docbook:854 +msgid "Writing the basic servlet" +msgstr "Writing the basic servlet" + +#: index.docbook:856 +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "" +"Create a new class in your source directory, in the events package:" + +#: index.docbook:861 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:863 +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" + +#: index.docbook:868 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:870 +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." + +#: index.docbook:879 +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." + +#: index.docbook:886 +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." + +#: index.docbook:891 +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." + +#: index.docbook:905 +msgid "Processing and rendering" +msgstr "Processing and rendering" + +#: index.docbook:907 +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "" +"Let's implement the processing of the request and rendering of the page." + +#: index.docbook:911 +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" +"Event Manager\");\n" +" \n" +" // Handle " +"actions\n" +" if ( \"store\"." +"equals(request.getParameter(\"action\")) ) {\n" +" \n" +" String " +"eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate " +"= request.getParameter(\"eventDate\");\n" +" \n" +" if ( \"\".equals" +"(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println" +"(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent" +"(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println" +"(\"Added event.\");\n" +" }\n" +" }\n" +" \n" +" // Print page\n" +" printEventForm" +"(out);\n" +" listEvents(out, " +"dateFormatter);\n" +" \n" +" // Write HTML " +"footer\n" +" out.println(\"\");\n" +" out.flush();\n" +" out.close();]]>" + +#: index.docbook:913 +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" + +#: index.docbook:922 +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" +"Add new event:\");\n" +" out." +"println(\"
\");\n" +" out." +"println(\"Title:
\");\n" +" out." +"println(\"Date (e.g. 24.12.2009):
" +"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"
\");\n" +" }]]>" + +#: index.docbook:924 +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" + +#: index.docbook:930 +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" +" 0) {\n" +" out." +"println(\"

Events in database:

\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" for " +"(Iterator it = result.iterator(); it.hasNext();) {\n" +" Event " +"event = (Event) it.next();\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" out." +"println(\"\");\n" +" }\n" +" out." +"println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + \"
\");\n" +" }\n" +" }]]>" + +#: index.docbook:932 +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" + +#: index.docbook:938 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:940 +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." + +#: index.docbook:954 +msgid "Deploying and testing" +msgstr "Deploying and testing" + +#: index.docbook:956 +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" + +#: index.docbook:961 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ]]>" + +#: index.docbook:963 +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" + +#: index.docbook:969 +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +" \n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +" ]]>" + +#: index.docbook:971 +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." +msgstr "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." + +#: index.docbook:979 +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." + +#: index.docbook:987 +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." + +#: index.docbook:1000 +msgid "Summary" +msgstr "Summary" + +#: index.docbook:1002 +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"Este tutorial cubrió los fundamentos de escribir una simple " +"aplicación independiente de Hibernate." + +#: index.docbook:1007 +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"Si ya te sientes confidente con Hibernate, continúa navegando a " +"través de la tabla de contenidos de la documentación de " +"referencia para los temas que encuentres interesantes. Los más " +"consultados son procesamiento transaccional (), rendimiento de recuperación (), o " +"el uso de la API () y las funcionalidades de " +"consulta ()." + +#: index.docbook:1015 +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" +"No olvides chequear el sitio web de Hibernate por más " +"(especializados) tutoriales." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/content/xml.po b/documentation/envers/src/main/docbook/es-ES/content/xml.po new file mode 100644 index 0000000000..0baa2d8cef --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/content/xml.po @@ -0,0 +1,520 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" + +#: index.docbook:5 +msgid "XML Mapping" +msgstr "Mapeo XML" + +#: index.docbook:7 +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "" +"Nota que esta es una funcionalidad experimental en Hibernate 3.0 y está bajo " +"un desarrollo extremadamente activo." + +#: index.docbook:13 +msgid "Working with XML data" +msgstr "Trabajando con datos XML" + +#: index.docbook:15 +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"Hibernate te permite trabajar con datos XML persistentes en casi la misma " +"forma que trabajas con POJOs persistentes. Un árbol XML analizado (parsed) " +"puede ser pensado como sólo otra forma de representar los datos relacionales " +"a nivel de objetos, en vez de POJOs." + +#: index.docbook:22 +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"Hibernate soporta dom4j como API para manipular árboles XML. Puedes escribir " +"consultas que traigan árboles dom4j de la base de datos y tener cualquier " +"modificación que hagas al árbol sincronizada automáticamente a la base de " +"datos. Puedes incluso tomar un documento XML, analizarlo usando dom4j, y " +"escribirlo a la base de datos con cualquiera de las operaciones básicas de " +"Hibernate: persist(), saveOrUpdate(), merge(), delete(), replicate()" +" (la fusión no está aún soportada)." + +#: index.docbook:32 +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"Esta funcionalidad tiene muchas aplicaciones incluyendo la importación/" +"exportación de datos, externalización de datos de entidad vía JMS o SOAP y " +"reportes basados en XSLT." + +#: index.docbook:37 +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"Un solo mapeo puede ser usado para mapear simultáneamente las propiedades de " +"una clase y los nodos de un documento XML a la base de datos, o, si no hay " +"ninguna clase a mapear, puede ser usado para mapear sólo el XML." + +#: index.docbook:44 +msgid "Specifying XML and class mapping together" +msgstr "Especificando los mapeos de XML y de clase juntos" + +#: index.docbook:46 +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "He aquí un ejemplo de mapear un POJO y XML simultáneamente:" + +#: index.docbook:50 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:54 +msgid "Specifying only an XML mapping" +msgstr "Especificando sólo un mapeo XML" + +#: index.docbook:56 +msgid "Here is an example where there is no POJO class:" +msgstr "He aquí un ejemplo donde no hay ninguna clase POJO:" + +#: index.docbook:60 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:62 +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"Este mapeo te permite acceder a los datos como un árbol dom4j, o como un " +"grafo de pares nombre/valor de propiedad (Maps de Java). " +"Los nombres de propiedades son construcciones puramente lógicas a las que se " +"puede hacer referencia en consultas HQL." + +#: index.docbook:73 +msgid "XML mapping metadata" +msgstr "Mapeo de metadatos XML" + +#: index.docbook:75 +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"Muchos elementos de mapeo de Hibernate aceptan el atributo node. Esto te permite espcificar el nombre de un atributo o elemento XML " +"que contenga los datos de la propiedad o entidad. El formato del atributo " +"node debe ser uno de los siguientes:" + +#: index.docbook:84 +msgid "\"element-name\" - map to the named XML element" +msgstr "\"element-name\" - mapea al elemento XML mencionado" + +#: index.docbook:87 +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" +"\"@attribute-name\" - mapea al atributo XML mencionado" + +#: index.docbook:90 +msgid "\".\" - map to the parent element" +msgstr "\".\" - mapea al elemento padre" + +#: index.docbook:93 +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - mapea al atributo " +"mencionado del elemento mencionado" + +#: index.docbook:100 +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"Para las colecciones y asociaciones monovaluadas, existe un atributo " +"adicional embed-xml. Si embed-xml=\"true\", que es el valor por defecto, el árbol XML para la entidad asociada " +"(o colección de tipo de valor) será embebida directamente en el árbol XML " +"para la entidad que posee la asociación. En otro caso, si embed-xml=" +"\"false\", sólo el valor identificador referenciado aparecerá en " +"el XML para asociaciones de punto único y para las colecciones simplemente " +"no aparecerá en absoluto." + +#: index.docbook:110 +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"¡Debes ser cuidadoso de no dejar embed-xml=\"true\" para " +"demasiadas asociaciones, ya que XML no trata bien la circularidad!" + +#: index.docbook:115 +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" + +#: index.docbook:117 +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"en este caso, hemos decidido embeber la colección de ids de cuenta, pero no " +"los datos reales de cuenta. La siguiente consulta HQL:" + +#: index.docbook:122 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:124 +msgid "Would return datasets such as this:" +msgstr "devolvería conjuntos de datos como estos:" + +#: index.docbook:128 +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:130 +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"Si estableces embed-xml=\"true\" en el mapeo <" +"one-to-many>, los datos podrían verse así:" + +#: index.docbook:135 +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" + +#: index.docbook:141 +msgid "Manipulating XML data" +msgstr "Manipulando datos XML" + +#: index.docbook:143 +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"Vamos a releer y actualizar documentos XML en la aplicación. Hacemos esto " +"obteniendo una sesión dom4j:" + +#: index.docbook:148 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:150 +msgid "" +"" +msgstr "" +"" + +#: index.docbook:152 +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"Es extremadamente útil combinar esta funcionalidad con la operación " +"replicate() de Hibernate para implementar la importación/" +"exportación de datos basada en XML." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" diff --git a/documentation/envers/src/main/docbook/es-ES/legal_notice.po b/documentation/envers/src/main/docbook/es-ES/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/es-ES/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/fr-FR/Hibernate_Reference.po b/documentation/envers/src/main/docbook/fr-FR/Hibernate_Reference.po new file mode 100644 index 0000000000..7a74c1dec0 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - Persistance relationnelle en Java standard" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "Documentation de référence d'Hibernate" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/fr-FR/content/architecture.po b/documentation/envers/src/main/docbook/fr-FR/content/architecture.po new file mode 100644 index 0000000000..1e06c4995d --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/architecture.po @@ -0,0 +1,652 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:30 +#, no-c-format +msgid "Architecture" +msgstr "Architecture" + +#. Tag: title +#: architecture.xml:33 +#, no-c-format +msgid "Overview" +msgstr "Généralités" + +#. Tag: para +#: architecture.xml:35 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "Voici une vue (très) haut niveau de l'architecture d'Hibernate :" + +#. Tag: para +#: architecture.xml:48 +#, no-c-format +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"Ce diagramme montre Hibernate utilisant une base de données et des données " +"de configuration pour fournir un service de persistance (et des objets " +"persistants) à l'application." + +#. Tag: para +#: architecture.xml:53 +#, no-c-format +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"Nous aimerions décrire une vue plus détaillée de l'architecture. " +"Malheureusement, Hibernate est flexible et supporte différentes approches. " +"Nous allons en montrer les deux extrêmes. L'architecture légère laisse " +"l'application fournir ses propres connexions JDBC et gérer ses propres " +"transactions. Cette approche utilise le minimum des APIs Hibernate :" + +#. Tag: para +#: architecture.xml:70 +#, no-c-format +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"L'architecture la plus complète abstrait l'application des APIs JDBC/JTA " +"sous-jacentes et laisse Hibernate s'occuper des détails." + +#. Tag: para +#: architecture.xml:84 +#, fuzzy, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "" +"Voici quelques définitions des objets des diagrammes : " + +#. Tag: term +#: architecture.xml:89 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#. Tag: para +#: architecture.xml:91 +#, no-c-format +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"Un cache threadsafe (immuable) des mappings vers une (et une seule) base de " +"données. Une factory (fabrique) de Session et un client " +"de ConnectionProvider. Peut contenir un cache optionnel " +"de données (de second niveau) qui est réutilisable entre les différentes " +"transactions que cela soit au sein du même processus (JVLM) ou par plusieurs " +"nœuds d'un cluster." + +#. Tag: term +#: architecture.xml:101 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#. Tag: para +#: architecture.xml:103 +#, no-c-format +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"Un objet mono-threadé, à durée de vie courte, qui représente une " +"conversation entre l'application et l'entrepôt de persistance. Encapsule une " +"connexion JDBC. Factory (fabrique) des objets Transaction. Contient un cache (de premier niveau) des objets persistants, ce " +"cache est obligatoire. Il est utilisé lors de la navigation dans le graphe " +"d'objets ou lors de la récupération d'objets par leur identifiant." + +#. Tag: term +#: architecture.xml:113 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "Objets et Collections persistants" + +#. Tag: para +#: architecture.xml:115 +#, no-c-format +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"Objets mono-threadés à vie courte contenant l'état de persistance et la " +"fonction métier. Ceux-ci sont en général les objets de type JavaBean (ou " +"POJOs) ; la seule particularité est qu'ils sont associés avec une (et une " +"seule) Session. Dès que la Session est " +"fermée, ils seront détachés et libres d'être utilisés par n'importe laquelle " +"des couches de l'application (ie. de et vers la présentation en tant que " +"Data Transfer Objects - DTO : objet de transfert de données)." + +#. Tag: term +#: architecture.xml:126 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "Objets et collections transients" + +#. Tag: para +#: architecture.xml:128 +#, no-c-format +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"Instances de classes persistantes qui ne sont actuellement pas associées à " +"une Session. Elles ont pu être instanciées par " +"l'application et ne pas avoir (encore) été persistées ou elle ont pu être " +"instanciées par une Session fermée." + +#. Tag: term +#: architecture.xml:137 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "Transaction (org.hibernate.Transaction)" + +#. Tag: para +#: architecture.xml:139 +#, no-c-format +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(Optionnel) Un objet mono-threadé à vie courte utilisé par l'application " +"pour définir une unité de travail atomique. Abstrait l'application des " +"transactions sous-jacentes qu'elles soient JDBC, JTA ou CORBA. Une " +"Session peut fournir plusieurs Transactions dans certains cas. Toutefois, la délimitation des transactions, " +"via l'API d'Hibernate ou par la Transaction sous-jacente, " +"n'est jamais optionnelle!" + +#. Tag: term +#: architecture.xml:150 +#, no-c-format +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#. Tag: para +#: architecture.xml:152 +#, no-c-format +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(Optionnel) Une fabrique de (pool de) connexions JDBC. Abstrait " +"l'application de la Datasource ou du " +"DriverManager sous-jacent. Non exposé à l'application, " +"mais peut être étendu/implémenté par le développeur." + +#. Tag: term +#: architecture.xml:160 +#, no-c-format +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(Optionnel) Une fabrique d'instances de Transaction. Non " +"exposé à l'application, mais peut être étendu/implémenté par le développeur." + +#. Tag: emphasis +#: architecture.xml:169 +#, no-c-format +msgid "Extension Interfaces" +msgstr "Interfaces d'extension" + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"Hibernate fournit de nombreuses interfaces d'extensions optionnelles que " +"vous pouvez implémenter pour personnaliser le comportement de votre couche " +"de persistance. Reportez vous à la documentation de l'API pour plus de " +"détails." + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"Dans une architecture légère, l'application n'aura pas à utiliser les APIs " +"Transaction/TransactionFactory et/ou " +"n'utilisera pas les APIs ConnectionProvider pour utiliser " +"JTA ou JDBC." + +#. Tag: title +#: architecture.xml:188 +#, no-c-format +msgid "Instance states" +msgstr "Etats des instances" + +#. Tag: para +#: architecture.xml:189 +#, no-c-format +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"Une instance d'une classe persistante peut être dans l'un des trois états " +"suivants, définis par rapport à un contexte de persistance. L'objet Session d'hibernate correspond à ce " +"concept de contexte de persistance :" + +#. Tag: term +#: architecture.xml:197 +#, no-c-format +msgid "transient" +msgstr "passager (transient)" + +#. Tag: para +#: architecture.xml:199 +#, no-c-format +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "" +"L'instance n'est pas et n'a jamais été associée à un contexte de " +"persistance. Elle ne possède pas d'identité persistante (valeur de clé " +"primaire)" + +#. Tag: term +#: architecture.xml:207 +#, no-c-format +msgid "persistent" +msgstr "persistant" + +#. Tag: para +#: architecture.xml:209 +#, no-c-format +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"L'instance est associée au contexte de persistance. Elle possède une " +"identité persistante (valeur de clé primaire) et, peut-être, un " +"enregistrement correspondant dans la base. Pour un contexte de persistance " +"particulier, Hibernate garantit que l'identité " +"persistante est équivalente à l'identité Java (emplacement mémoire de " +"l'objet)" + +#. Tag: term +#: architecture.xml:221 +#, no-c-format +msgid "detached" +msgstr "détaché" + +#. Tag: para +#: architecture.xml:223 +#, fuzzy, no-c-format +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corresponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"L'instance a été associée au contexte de persistance mais ce contexte a été " +"fermé, ou l'instance a été sérialisée vers un autre processus. Elle possède " +"une identité persistante et peut-être un enregistrement correspondant dans " +"la base. Pour des instances détachées, Hibernate ne donne aucune garantie " +"sur la relation entre l'identité persistante et l'identité Java." + +#. Tag: title +#: architecture.xml:238 +#, no-c-format +msgid "JMX Integration" +msgstr "Intégration JMX" + +#. Tag: para +#: architecture.xml:240 +#, no-c-format +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMX est le standard J2EE de gestion des composants Java. Hibernate peut être " +"géré via un service JMX standard. Nous fournissons une implémentation d'un " +"MBean dans la distribution : org.hibernate.jmx.HibernateService." + +#. Tag: para +#: architecture.xml:246 +#, no-c-format +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"Pour avoir un exemple sur la manière de déployer Hibernate en tant que " +"service JMX dans le serveur d'application JBoss Application Server, référez " +"vous au guide utilisateur JBoss (JBoss User Guide). Si vous déployez " +"Hibernate via JMX sur JBoss AS, vous aurez également les bénéfices suivants :" + +#. Tag: para +#: architecture.xml:254 +#, no-c-format +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"Gestion de la session : Le cycle de vie de la " +"Session Hibernate peut être automatiquement limitée à la " +"portée d'une transaction JTA. Cela signifie que vous n'avez plus besoin " +"d'ouvrir et de fermer la Session manuellement, cela " +"devient le travail de l'intercepteur EJB de JBoss. Vous n'avez pas non plus " +"à vous occuper des démarcations des transactions dans votre code (sauf si " +"vous voulez écrire une couche de persistance qui soit portable, dans ce cas " +"vous pouvez utiliser l'API optionnelle Transaction " +"d'Hibernate). Vous appelez l'HibernateContext pour " +"accéder à la Session." + +#. Tag: para +#: architecture.xml:266 +#, no-c-format +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"Déploiement HAR : Habituellement vous déployez le " +"service JMX Hibernate en utilisant le descripteur de déploiement de JBoss " +"(dans un fichier EAR et/ou un SAR), il supporte toutes les options de " +"configuration usuelles d'une SessionFactory Hibernate. " +"Cependant, vous devez toujours nommer tous vos fichiers de mapping dans le " +"descripteur de déploiement. Si vous décidez d'utiliser le déploiement " +"optionnel sous forme de HAR, JBoss détectera automatiquement tous vos " +"fichiers de mapping dans votre fichier HAR." + +#. Tag: para +#: architecture.xml:277 +#, no-c-format +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "" +"Consultez le guide d'utilisation de JBoss AS pour plus d'informations sur " +"ces options." + +#. Tag: para +#: architecture.xml:281 +#, no-c-format +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"Les statistiques pendant l'exécution d'Hibernate (au runtime) sont une autre " +"fonctionnalité disponible en tant que service JMX. Voyez pour cela ." + +#. Tag: title +#: architecture.xml:288 +#, no-c-format +msgid "JCA Support" +msgstr "Support JCA" + +#. Tag: para +#: architecture.xml:289 +#, no-c-format +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hibernate peut aussi être configuré en tant que connecteur JCA. Référez-vous " +"au site web pour de plus amples détails. Il est important de noter que le " +"support JCA d'Hibernate est encore considéré comme expérimental." + +#. Tag: title +#: architecture.xml:296 +#, no-c-format +msgid "Contextual Sessions" +msgstr "Sessions Contextuelles" + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"Certaines applications utilisant Hibernate ont besoin d'une sorte de session " +"\"contextuelle\", où une session est liée à la portée d'un contexte " +"particulier. Cependant, les applications ne définissent pas toutes la notion " +"de contexte de la même manière, et différents contextes définissent " +"différentes portées à la notion de \"courant\". Les applications à base " +"d'Hibernate, versions précédentes à la 3.0 utilisaient généralement un " +"principe maison de sessions contextuelles basées sur le " +"ThreadLocal, ainsi que sur des classes utilitaires comme " +"HibernateUtil, ou utilisaient des framework tiers (comme " +"Spring ou Pico) qui fournissaient des sessions contextuelles basées sur " +"l'utilisation de proxy/interception." + +#. Tag: para +#: architecture.xml:306 +#, no-c-format +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"A partir de la version 3.0.1, Hibernate a ajouté la méthode " +"SessionFactory.getCurrentSession(). Initialement, cela " +"demandait l'usage de transactions JTA, où la transaction " +"JTA définissait la portée et le contexte de la session " +"courante. L'équipe Hibernate pense que, étant donnée la maturité des " +"implémentations de JTA TransactionManager , la plupart " +"(sinon toutes) des applications devraient utiliser la gestion des " +"transactions par JTA qu'elles soient ou non déployées " +"dans un conteneur J2EE. Par conséquent, vous devriez " +"toujours contextualiser vos sessions, si vous en avez besoin, via la méthode " +"basée sur JTA." + +#. Tag: para +#: architecture.xml:316 +#, no-c-format +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"Cependant, depuis la version 3.1, la logique derrière " +"SessionFactory.getCurrentSession() est désormais " +"branchable. A cette fin, une nouvelle interface d'extension (org." +"hibernate.context.CurrentSessionContext) et un nouveau paramètre " +"de configuration (hibernate.current_session_context_class) ont été ajoutés pour permettre de configurer d'autres moyens de " +"définir la portée et le contexte des sessions courantes." + +#. Tag: para +#: architecture.xml:323 +#, no-c-format +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"Allez voir les Javadocs de l'interface org.hibernate.context." +"CurrentSessionContext pour une description détaillée de son " +"contrat. Elle définit une seule méthode, currentSession(), depuis laquelle l'implémentation est responsable de traquer la " +"session courante du contexte. Hibernate fournit deux implémentation de cette " +"interface." + +#. Tag: para +#: architecture.xml:333 +#, no-c-format +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - les sessions " +"courantes sont associées à une transaction JTA. La " +"logique est la même que l'ancienne approche basée sur JTA. Voir les javadocs " +"pour les détails." + +#. Tag: para +#: architecture.xml:341 +#, no-c-format +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - les " +"sessions courantes sont associées au thread d'exécution. Voir les javadocs " +"pour les détails." + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." + +#. Tag: para +#: architecture.xml:356 +#, fuzzy, no-c-format +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programmatic " +"transaction demarcation in plain JSE without JTA, you are advised to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"Les deux implémentations fournissent un modèle de programmation de type " +"\"une session - une transaction à la base de données\", aussi connu sous le " +"nom de session-per-request. Le début et la fin d'une " +"session Hibernate sont définis par la durée d'une transaction de base de " +"données. Si vous utilisez une démarcation programmatique de la transaction " +"(par exemple sous J2SE ou JTA/UserTransaction/BMT), nous vous conseillons " +"d'utiliser l'API Hibernate Transaction pour masquer le " +"système de transaction utilisé. Si vous exécutez sous un conteneur EJB qui " +"supporte CMT, vous n'avez besoin d'aucune opérations de démarcations de " +"session ou transaction dans votre code puisque tout est géré de manière " +"déclarative. Référez vous à pour plus " +"d'informations et des exemples de code." + +#. Tag: para +#: architecture.xml:368 +#, no-c-format +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"Le paramètre de configuration hibernate." +"current_session_context_class définit quelle implémentation de " +"org.hibernate.context.CurrentSessionContext doit être " +"utilisée. Notez que pour assurer la compatibilité avec les versions " +"précédentes, si ce paramètre n'est pas défini mais qu'un org." +"hibernate.transaction.TransactionManagerLookup est configuré, " +"Hibernate utilisera le org.hibernate.context.JTASessionContext. La valeur de ce paramètre devrait juste nommer la classe " +"d'implémentation à utiliser, pour les deux implémentations fournies, il y a " +"cependant deux alias correspondant: \"jta\" et \"thread\"." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/association_mapping.po b/documentation/envers/src/main/docbook/fr-FR/content/association_mapping.po new file mode 100644 index 0000000000..6c7e781ccf --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/association_mapping.po @@ -0,0 +1,912 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:30 +#, no-c-format +msgid "Association Mappings" +msgstr "Mapper les associations" + +#. Tag: title +#: association_mapping.xml:33 +#, no-c-format +msgid "Introduction" +msgstr "Introduction" + +#. Tag: para +#: association_mapping.xml:35 +#, no-c-format +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"Correctement mapper les associations est souvent la tâche la plus difficile. " +"Dans cette section nous traiterons les cas classiques les uns après les " +"autres. Nous commencerons d'abbord par les mappings unidirectionnels, puis " +"nous aborderons la question des mappings bidirectionnels. Nous illustrerons " +"tous nos exemples avec les classes Person et " +"Address." + +#. Tag: para +#: association_mapping.xml:43 +#, no-c-format +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "" +"Nous utiliserons deux critères pour classer les associations : le premier " +"sera de savoir si l'association est bâti sur une table supplémentaire " +"d'association et le deuxieme sera basé sur la multiplicité de cette " +"association." + +#. Tag: para +#: association_mapping.xml:48 +#, no-c-format +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"Autoriser une clé étrangère nulle est considéré comme un mauvais choix dans " +"la construction d'un modèle de données. Nous supposerons donc que dans tous " +"les exemples qui vont suivre on aura interdit la valeur nulle pour les clés " +"étrangères. Attention, ceci ne veut pas dire que Hibernate ne supporte pas " +"les clés étrangères pouvant prendre des valeurs nulles, les exemples qui " +"suivent continueront de fonctionner si vous décidiez ne plus imposer la " +"contrainte de non-nullité sur les clés étrangères." + +#. Tag: title +#: association_mapping.xml:58 +#, no-c-format +msgid "Unidirectional associations" +msgstr "Association unidirectionnelle" + +#. Tag: title +#: association_mapping.xml:61 association_mapping.xml:132 +#, no-c-format +msgid "many to one" +msgstr "plusieurs à un" + +#. Tag: para +#: association_mapping.xml:63 +#, no-c-format +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "" +"Une association plusieurs-à-un (many-to-one) unidirectionnelle est le type que l'on rencontre le plus souvent dans les " +"associations unidirectionnelles." + +#. Tag: programlisting +#: association_mapping.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:69 association_mapping.xml:185 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:74 association_mapping.xml:145 +#: association_mapping.xml:209 association_mapping.xml:249 +#, fuzzy, no-c-format +msgid "one to one" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"un à un\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"un à un\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Un à un\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Un à un" + +#. Tag: para +#: association_mapping.xml:76 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"une association un-à-un (one-to-one) sur une clé étrangère est presque identique. La seule différence est sur la contrainte " +"d'unicité que l'on impose à cette colonne." + +#. Tag: programlisting +#: association_mapping.xml:81 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:82 association_mapping.xml:217 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:84 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"Une association un-à-un (one-to-one) unidirectionnelle sur une clé " +"primaire utilise un générateur d'identifiant particulier. " +"(Remarquez que nous avons inversé le sens de cette association dans cet " +"exemple.)" + +#. Tag: programlisting +#: association_mapping.xml:90 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:91 association_mapping.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:96 association_mapping.xml:118 +#, no-c-format +msgid "one to many" +msgstr "un à plusieurs" + +#. Tag: para +#: association_mapping.xml:98 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"Une association un-à-plusieurs (one-to-many) unidirectionnelle sur " +"une clé étrangère est vraiment inhabituelle, et n'est pas " +"vraiment recommandée." + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:104 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:106 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "" +"Nous pensons qu'il est préférable d'utiliser une table de jointure pour ce " +"type d'association." + +#. Tag: title +#: association_mapping.xml:115 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "Associations unidirectionnelles avec tables de jointure" + +#. Tag: para +#: association_mapping.xml:120 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"Une association unidirectionnelle un-à-plusieurs (one-to-many) " +"avec une table de jointure est un bien meilleur choix. Remarquez " +"qu'en spécifiant unique=\"true\", on a changé la " +"multiplicité plusieurs-à-plusieurs (many-to-many) pour un-à-plusieurs (one-" +"to-many)." + +#. Tag: programlisting +#: association_mapping.xml:126 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:127 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:134 +#, no-c-format +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"Une assiociation plusieurs-à-un (many-to-one) unidirectionnelle " +"sur une table de jointure est très fréquente quand l'association " +"est optionnelle." + +#. Tag: programlisting +#: association_mapping.xml:139 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:147 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Une association unidirectionnelle un-à-un (one-to-one) sur une " +"table de jointure est extrèmement rare mais envisageable." + +#. Tag: programlisting +#: association_mapping.xml:152 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:153 association_mapping.xml:257 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:158 association_mapping.xml:262 +#, no-c-format +msgid "many to many" +msgstr "plusieurs à plusieurs" + +#. Tag: para +#: association_mapping.xml:160 +#, no-c-format +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "" +"Finallement, nous avons l'association unidirectionnelle plusieurs-" +"à-plusieurs (many-to-many)." + +#. Tag: programlisting +#: association_mapping.xml:164 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:165 association_mapping.xml:270 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:172 +#, no-c-format +msgid "Bidirectional associations" +msgstr "Associations bidirectionnelles" + +#. Tag: title +#: association_mapping.xml:175 association_mapping.xml:235 +#, no-c-format +msgid "one to many / many to one" +msgstr "un à plusieurs / plusieurs à un" + +#. Tag: para +#: association_mapping.xml:177 +#, no-c-format +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"Une association bidirectionnelle plusieurs à un (many-to-one) est le type d'association que l'on rencontre le plus souvent. " +"(c'est la façon standard de créer des relations parents/enfants.)" + +#. Tag: programlisting +#: association_mapping.xml:183 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"Si vous utilisez une List (ou toute autre collection " +"indexée) vous devez paramétrer la colonne key de la clé " +"étrangère à not null, et laisser Hibernate gérer " +"l'association depuis l'extrémité collection pour maintenir l'index de chaque " +"élément (rendant l'autre extrémité virtuellement inverse en paramétrant " +"update=\"false\" et insert=\"false\"):" + +#. Tag: programlisting +#: association_mapping.xml:195 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:197 +#, no-c-format +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." + +#. Tag: para +#: association_mapping.xml:211 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "" +"Une association bidirectionnelle un à un (one-to-one) sur une clé " +"étrangère est aussi très fréquente." + +#. Tag: programlisting +#: association_mapping.xml:216 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:219 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "" +"Une association bidirectionnelle un-à-un (one-to-one) sur une clé " +"primaire utilise un générateur particulier d'id." + +#. Tag: programlisting +#: association_mapping.xml:224 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:232 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "Associations bidirectionnelles avec table de jointure" + +#. Tag: para +#: association_mapping.xml:237 +#, no-c-format +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"Une association bidirectionnelle un-à-plusieurs (one-to-many) sur " +"une table de jointure . Remarquez que inverse=\"true\" peut s'appliquer sur les deux extrémités de l' association, sur la " +"collection, ou sur la jointure." + +#. Tag: programlisting +#: association_mapping.xml:243 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:251 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Une association bidirectionnelle un-à-un (one-to-one) sur une " +"table de jointure est extrèmement rare mais envisageable." + +#. Tag: programlisting +#: association_mapping.xml:256 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:264 +#, no-c-format +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "" +"Finallement nous avons l'association bidirectionnelle plusieurs à " +"plusieurs." + +#. Tag: programlisting +#: association_mapping.xml:268 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:277 +#, no-c-format +msgid "More complex association mappings" +msgstr "Des mappings plus complexes" + +#. Tag: para +#: association_mapping.xml:279 +#, no-c-format +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"Des associations encore plus complexes sont extrêmement " +"rares. Hibernate permet de gérer des situations plus complexes en utilisant " +"des parties SQL dans les fichiers de mapping. Par exemple, si une table avec " +"l'historiques des informations d'un compte définit les colonnes " +"accountNumber, effectiveEndDate et " +"effectiveStartDate, mappées de telle sorte:" + +#. Tag: programlisting +#: association_mapping.xml:288 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:290 +#, no-c-format +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"alors nous pouvons mapper une association à l'instance courante (celle avec une effectiveEndDate) nulle en " +"utilisant:" + +#. Tag: programlisting +#: association_mapping.xml:295 +#, no-c-format +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:297 +#, no-c-format +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"Dans un exemple plus complexe, imaginez qu'une association entre " +"Employee et Organization est gérée " +"dans une table Employment pleines de données historiques. " +"Dans ce cas, une association vers l'employeur le plus récent (celui avec la startDate la plus récente) " +"pourrait être mappée comme cela:" + +#. Tag: programlisting +#: association_mapping.xml:305 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:307 +#, no-c-format +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"Vous pouvez être créatif grace à ces possibilités, mais il est généralement " +"plus pratique d'utiliser des requêtes HQL ou criteria dans ce genre de " +"situation." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/basic_mapping.po b/documentation/envers/src/main/docbook/fr-FR/content/basic_mapping.po new file mode 100644 index 0000000000..b764eddd78 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/basic_mapping.po @@ -0,0 +1,5795 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:29 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "Mapping O/R basique" + +#. Tag: title +#: basic_mapping.xml:32 +#, no-c-format +msgid "Mapping declaration" +msgstr "Déclaration de Mapping" + +#. Tag: para +#: basic_mapping.xml:34 +#, no-c-format +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"Les mappings Objet/relationnel sont généralement définis dans un document " +"XML. Le document de mapping est conçu pour être lisible et éditable à la " +"main. Le langage de mapping est Java-centrique, c'est à dire que les " +"mappings sont construits à partir des déclarations des classes persistantes " +"et non des déclarations des tables." + +#. Tag: para +#: basic_mapping.xml:41 +#, no-c-format +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"Remarquez que même si beaucoup d'utilisateurs de Hibernate préfèrent écrire " +"les fichiers de mappings à la main, plusieurs outils existent pour générer " +"ce document, notamment XDoclet, Middlegen et AndroMDA." + +#. Tag: para +#: basic_mapping.xml:47 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "Démarrons avec un exemple de mapping :" + +#. Tag: programlisting +#: basic_mapping.xml:51 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"Etudions le contenu du document de mapping. Nous décrirons uniquement les " +"éléments et attributs du document utilisés par Hibernate à l'exécution. Le " +"document de mapping contient aussi des attributs et éléments optionnels qui " +"agissent sur le schéma de base de données exporté par l'outil de génération " +"de schéma. (Par exemple l'attribut not-null.)" + +#. Tag: title +#: basic_mapping.xml:64 +#, no-c-format +msgid "Doctype" +msgstr "Doctype" + +#. Tag: para +#: basic_mapping.xml:66 +#, no-c-format +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"Tous les mappings XML devraient utiliser le doctype indiqué. Ce fichier est " +"présent à l'URL ci-dessus, dans le répertoire hibernate-x.x.x/src/" +"org/hibernate ou dans hibernate3.jar. Hibernate " +"va toujours chercher la DTD dans son classpath en premier lieu. Si vous " +"constatez des recherches de la DTD sur Internet, vérifiez votre déclaration " +"de DTD par rapport au contenu de votre classpath." + +#. Tag: title +#: basic_mapping.xml:76 +#, no-c-format +msgid "EntityResolver" +msgstr "EntityResolver" + +#. Tag: para +#: basic_mapping.xml:77 +#, no-c-format +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." + +#. Tag: para +#: basic_mapping.xml:85 +#, no-c-format +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." + +#. Tag: para +#: basic_mapping.xml:94 +#, no-c-format +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." + +#. Tag: para +#: basic_mapping.xml:103 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "An example of utilizing user namespacing:" + +#. Tag: programlisting +#: basic_mapping.xml:106 +#, no-c-format +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:107 +#, no-c-format +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." + +#. Tag: title +#: basic_mapping.xml:115 +#, no-c-format +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"Cet élément a plusieurs attributs optionnels. Les attributs schema et catalog indiquent que les tables référencées " +"par ce mapping appartiennent au schéma nommé et/ou au catalogue. S'ils sont " +"spécifiés, les noms de tables seront qualifiés par les noms de schéma et " +"catalogue. L'attribut default-cascade indique quel type " +"de cascade sera utlisé par défaut pour les propriétés et collections qui ne " +"précisent pas l'attribut cascade. L'attribut " +"auto-import nous permet d'utiliser par défaut des noms de " +"classes non qualifiés dans le langage de requête." + +#. Tag: programlisting +#: basic_mapping.xml:138 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:141 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "" +"schema (optionnel) : Le nom d'un schéma de base de " +"données." + +#. Tag: para +#: basic_mapping.xml:146 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "" +"catalog (optionnel) : Le nom d'un catalogue de base de " +"données." + +#. Tag: para +#: basic_mapping.xml:151 +#, no-c-format +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (optionnel - par défaut vaut : " +"none) : Un type de cascade par défaut." + +#. Tag: para +#: basic_mapping.xml:157 +#, no-c-format +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (optionnel - par défaut vaut : " +"property) : Comment hibernate accèdera aux propriétés. On " +"peut aussi redéfinir sa propre implémentation de PropertyAccessor." + +#. Tag: para +#: basic_mapping.xml:164 +#, no-c-format +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (optionnel - par défaut vaut : " +"true) : Valeur par défaut pour un attribut lazy non spécifié : celui des mappings de classes et de collection." + +#. Tag: para +#: basic_mapping.xml:171 +#, no-c-format +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import (optionnel - par défaut vaut : true) : Spécifie si l'on peut utiliser des noms de classes non qualifiés " +"(des classes de ce mapping) dans le langage de requête." + +#. Tag: para +#: basic_mapping.xml:178 +#, no-c-format +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (optionnel) : Préfixe de package par défaut pour " +"les noms de classe non qualifiés du document de mapping." + +#. Tag: para +#: basic_mapping.xml:186 +#, no-c-format +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"Si deux classes possèdent le même nom de classe (non qualifié), vous devez " +"indiquer auto-import=\"false\". Hibernate lancera une " +"exception si vous essayez d'assigner à deux classes le même nom importé." + +#. Tag: para +#: basic_mapping.xml:192 +#, no-c-format +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"Notez que l'élément hibernate-mapping vous permet " +"d'imbriquer plusieurs mappings de <class> " +"persistantes, comme dans l'exemple ci-dessus. Cependant la bonne pratique " +"(ce qui est attendu par certains outils) est de mapper une seule classe (ou " +"une seule hiérarchie de classes) par fichier de mapping et de nommer ce " +"fichier d'après le nom de la superclasse, par exemple Cat.hbm.xml, Dog.hbm.xml, ou en cas d'héritage, " +"Animal.hbm.xml." + +#. Tag: title +#: basic_mapping.xml:205 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:207 +#, no-c-format +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "" +"Déclarez une classe persistante avec l'élément class :" + +#. Tag: programlisting +#: basic_mapping.xml:235 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:238 +#, no-c-format +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (optionnel) : Le nom Java complet de la classe (ou " +"interface) persistante. Si cet attribut est absent, il est supposé que ce " +"mapping ne se rapporte pas à une entité POJO." + +#. Tag: para +#: basic_mapping.xml:245 +#, no-c-format +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (optionnel - par défaut le nom (non-qualifié) de la " +"classe) : Le nom de sa table en base de données." + +#. Tag: para +#: basic_mapping.xml:251 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (optionnel - par défaut le nom de la " +"classe) : Une valeur permettant de distinguer les sous-classes dans le cas " +"de l'utilisation du polymorphisme. Les valeurs null et " +"not null sont autorisées." + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (optionnel, vaut true par " +"défaut) : Spécifie que des instances de la classe sont (ou non) immuables." + +#. Tag: para +#: basic_mapping.xml:264 basic_mapping.xml:2228 +#, fuzzy, no-c-format +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (optionnel) : Surcharge le nom de schéma spécifié " +"par l'élément racine <hibernate-mapping>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (optionnel) : court-circuite le nom de schéma " +"spécifié par l'élément de base <hibernate-mapping>." + +#. Tag: para +#: basic_mapping.xml:270 basic_mapping.xml:2234 +#, fuzzy, no-c-format +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (optionnel) : Surcharge le nom du catalogue " +"spécifié par l'élément racine <hibernate-mapping>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (optionnel) : court-circuite le nom de catalogue " +"spécifié par l'élément de base <hibernate-mapping>." + +#. Tag: para +#: basic_mapping.xml:276 +#, no-c-format +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (optionnel) : Spécifie une interface à utiliser " +"pour l'initialisation différée (lazy loading) des proxies. Vous pouvez " +"indiquer le nom de la classe elle-même." + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (optionnel, par défaut à false) : Spécifie que les UPDATE SQL doivent être " +"générés à l'exécution et contenir uniquement les colonnes dont les valeurs " +"ont été modifiées." + +#. Tag: para +#: basic_mapping.xml:289 +#, no-c-format +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (optionnel, par défaut à false): Spécifie que les INSERT SQL doivent être " +"générés à l'exécution et ne contenir que les colonnes dont les valeurs sont " +"non nulles." + +#. Tag: para +#: basic_mapping.xml:296 +#, no-c-format +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (optionnel, par défaut à " +"false): Spécifie que Hibernate ne doit jamais exécuter un UPDATE SQL sans être certain qu'un " +"objet a été réellement modifié. Dans certains cas, (en réalité, seulement " +"quand un objet transient a été associé à une nouvelle session par " +"update()), cela signifie que Hibernate exécutera un " +"SELECT SQL pour s'assurer qu'un UPDATE " +"SQL est véritablement nécessaire." + +#. Tag: para +#: basic_mapping.xml:306 +#, no-c-format +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"polymorphism (optionnel, vaut implicit " +"par défaut) : Détermine si, pour cette classe, une requête polymorphique " +"implicite ou explicite est utilisée." + +#. Tag: para +#: basic_mapping.xml:312 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (optionnel) spécifie une clause SQL WHERE à utiliser lorsque l'on récupère des objets de cette classe." + +#. Tag: para +#: basic_mapping.xml:318 +#, no-c-format +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (optionnel) : Spécifie un " +"ClassPersister particulier." + +#. Tag: para +#: basic_mapping.xml:323 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (optionnel, par défaut = 1) : spécifie une taille de batch pour remplir les instances de cette " +"classe par identifiant en une seule requête." + +#. Tag: para +#: basic_mapping.xml:329 +#, no-c-format +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock (optionnel, par défaut = " +"version) : Détermine la stratégie de verrou optimiste." + +#. Tag: para +#: basic_mapping.xml:335 +#, no-c-format +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (optionnel) : Déclarer lazy=\"true\" est un raccourci pour spécifier le nom de la classe comme étant " +"l'interface proxy." + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name (optionnel) : Hibernate3 permet à une classe " +"d'être mappée plusieurs fois (potentiellement à plusieurs tables), et permet " +"aux mappings d'entité d'être représentés par des Maps ou du XML au niveau " +"Java. Dans ces cas, vous devez indiquer un nom explicite arbitraire pour les " +"entités. Voir et pour plus d'informations." + +#. Tag: para +#: basic_mapping.xml:351 +#, no-c-format +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (optionnel) : expression SQL utilisée pour générer " +"une contrainte de vérification multi-lignes pour la génération automatique " +"de schéma." + +#. Tag: para +#: basic_mapping.xml:357 +#, no-c-format +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (optionnel) : Hibernate peut utiliser des ROWID sur " +"les bases de données qui utilisent ce mécanisme. Par exemple avec Oracle, " +"Hibernate peut utiliser la colonne additionnelle rowid " +"pour des mises à jour rapides si cette option vaut rowid. " +"Un ROWID représente la localisation physique d'un tuple enregistré." + +#. Tag: para +#: basic_mapping.xml:365 +#, no-c-format +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (optionnel) : Permet de mapper une entité " +"immuable en lecture-seule sur un sous-select de base de données. Utile pour " +"avoir une vue au lieu d'une table en base, mais à éviter. Voir plus bas pour " +"plus d'information." + +#. Tag: para +#: basic_mapping.xml:372 +#, no-c-format +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (optionnel) : Utilisé pour marquer des " +"superclasses abstraites dans des hiérarchies de <union-" +"subclass>." + +#. Tag: para +#: basic_mapping.xml:380 +#, no-c-format +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"Il est tout à fait possible d'utiliser une interface comme nom de classe " +"persistante. Vous devez alors déclarer les classes implémentant cette " +"interface en utilisant l'élément <subclass>. Vous " +"pouvez faire persister toute classe interne static. " +"Vous devez alors spécifier le nom de la classe par la notation habituelle " +"des classes internes c'est à dire eg.Foo$Bar." + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"Les classes immuables, mutable=\"false\", ne peuvent pas " +"être modifiées ou supprimées par l'application. Cela permet à Hibernate de " +"faire quelques optimisations mineures sur les performances." + +#. Tag: para +#: basic_mapping.xml:392 +#, no-c-format +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"L'attribut optionnnel proxy permet les intialisations " +"différées des instances persistantes de la classe. Hibernate retournera " +"initialement des proxies CGLIB qui implémentent l'interface nommée. Le " +"véritable objet persistant ne sera chargé que lorsque une méthode du proxy " +"sera appelée. Voir plus bas le paragraphe abordant les proxies et le " +"chargement différé (lazy initialization)." + +#. Tag: para +#: basic_mapping.xml:399 +#, no-c-format +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"Le polymorphisme implicite signifie que les instances " +"de la classe seront retournées par une requête qui utilise les noms de la " +"classe ou de chacune de ses superclasses ou encore des interfaces " +"implémentées par cette classe ou ses superclasses. Les instances des classes " +"filles seront retournées par une requête qui utilise le nom de la classe " +"elle même. Le polymorphisme explicite signifie que les " +"instances de la classe ne seront retournées que par une requête qui utilise " +"explicitement son nom et que seules les instances des classes filles " +"déclarées dans les éléments <subclass> ou " +"<joined-subclass> seront retournées. Dans la " +"majorités des cas la valeur par défaut, polymorphism=\"implicit\", est appropriée. Le polymorphisme explicite est utile lorsque deux " +"classes différentes sont mappées à la même table (ceci permet d'écrire une " +"classe \"légère\" qui ne contient qu'une partie des colonnes de la table - " +"voir la partie design pattern du site communautaire)." + +#. Tag: para +#: basic_mapping.xml:411 +#, no-c-format +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"L'attribut persister vous permet de customiser la " +"stratégie utilisée pour la classe. Vous pouvez, par exemple, spécifier votre " +"propre sous-classe de org.hibernate.persister.EntityPersister ou vous pourriez aussi créer une nouvelle implémentation de " +"l'interface org.hibernate.persister.ClassPersister qui " +"proposerait une persistance via, par exemple, des appels de procédures " +"stockées, de la sérialisation vers des fichiers plats ou un annuaire LDAP. " +"Voir org.hibernate.test.CustomPersister pour un exemple " +"simple (d'une \"persistance\" vers une Hashtable)." + +#. Tag: para +#: basic_mapping.xml:422 +#, no-c-format +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"Notez que les paramètres dynamic-update et " +"dynamic-insert ne sont pas hérités par les sous-classes " +"et peuvent donc être spécifiés pour les éléments <subclass> ou <joined-subclass> Ces paramètres " +"peuvent améliorer les performances dans certains cas, mais peuvent aussi les " +"amoindrir. A utiliser en connaissance de causes." + +#. Tag: para +#: basic_mapping.xml:430 +#, no-c-format +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"L'utilisation de select-before-update va généralement " +"faire baisser les performances. Ce paramètre est pratique pour prévenir " +"l'appel inutile d'un trigger sur modification quand on réattache un graphe " +"d'instances à une Session." + +#. Tag: para +#: basic_mapping.xml:436 +#, no-c-format +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"Si vous utilisez le dynamic-update, les différentes " +"stratégies de verrouillage optimiste (optimistic locking) sont les suivantes:" + +#. Tag: para +#: basic_mapping.xml:442 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "version vérifie les colonnes version/timestamp" + +#. Tag: para +#: basic_mapping.xml:447 +#, no-c-format +msgid "all check all columns" +msgstr "all vérifie toutes les colonnes" + +#. Tag: para +#: basic_mapping.xml:452 +#, no-c-format +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "" +"dirty vérifie les colonnes modifiées, permettant des " +"updates concurrents" + +#. Tag: para +#: basic_mapping.xml:457 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "none pas de verrouillage optimiste" + +#. Tag: para +#: basic_mapping.xml:462 +#, no-c-format +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"Nous encourageons très fortement l'utilisation de " +"colonnes de version/timestamp pour le verrouillage optimiste avec Hibernate. " +"C'est la meilleure stratégie en regard des performances et la seule qui gère " +"correctement les modifications sur les objets détachés (c'est à dire " +"lorsqu'on utilise Session.merge())." + +#. Tag: para +#: basic_mapping.xml:469 +#, no-c-format +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"Il n'y a pas de différence entre table et vue pour le mapping Hibernate, " +"tant que c'est transparent au niveau base de données (remarquez que " +"certaines BDD ne supportent pas les vues correctement, notamment pour les " +"updates). Vous rencontrerez peut-être des cas où vous souhaitez utiliser une " +"vue mais ne pouvez pas en créer sur votre BDD (par exemple à cause de " +"schémas anciens et figés). Dans ces cas, vous pouvez mapper une entité " +"immuable en lecture seule sur un sous-select SQL donné:" + +#. Tag: programlisting +#: basic_mapping.xml:477 +#, no-c-format +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:479 +#, no-c-format +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"Déclarez les tables à synchroniser avec cette entité pour assurer que le " +"flush automatique se produise correctement, et pour que les requêtes sur " +"l'entité dérivée ne renvoient pas des données périmées. Le litéral " +"<subselect> est disponible comme attribut ou comme " +"élément de mapping." + +#. Tag: title +#: basic_mapping.xml:489 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:491 +#, no-c-format +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"Les classes mappées doivent déclarer la clef primaire " +"de la table en base de données. La plupart des classes auront aussi une " +"propriété de type javabean présentant l'identifiant unique d'une instance. " +"L'élément <id> sert à définir le mapping entre " +"cette propriété et la clef primaire en base." + +#. Tag: programlisting +#: basic_mapping.xml:506 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:509 +#, no-c-format +msgid "" +"name (optional): The name of the identifier property." +msgstr "" +"name (optionnel) : Nom de la propriété qui sert " +"d'identifiant." + +#. Tag: para +#: basic_mapping.xml:514 +#, no-c-format +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "type (optionnel) : Nom indiquant le type Hibernate." + +#. Tag: para +#: basic_mapping.xml:519 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "" +"column (optionnel - le nom de la propriété est pris par " +"défaut) : Nom de la clef primaire." + +#. Tag: para +#: basic_mapping.xml:525 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value (optionnel - par défaut une valeur \"bien " +"choisie\") : Une valeur de la propriété d'identifiant qui indique que " +"l'instance est nouvellement instanciée (non sauvegardée), et qui la " +"distingue des instances transients qui ont été " +"sauvegardées ou chargées dans une session précédente." + +#. Tag: para +#: basic_mapping.xml:533 basic_mapping.xml:1041 basic_mapping.xml:1180 +#: basic_mapping.xml:1262 basic_mapping.xml:1369 basic_mapping.xml:1558 +#: basic_mapping.xml:1732 basic_mapping.xml:1902 basic_mapping.xml:2481 +#, fuzzy, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut property) : La stratégie que doit utiliser Hibernate pour accéder aux " +"valeurs des propriétés.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - défaut à property) : La stratégie qu'Hibernate utilisera pour accéder à la valeur de " +"la propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property) : La stratégie à utiliser par Hibernate pour accéder à la valeur " +"de la propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property) : La stratégie à utiliser par Hibernate pour accéder à la valeur " +"de la propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property): Stratégie que Hibernate doit utiliser pour accéder à cette " +"valeur.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property) : La stratégie à utiliser par Hibernate pour accéder à la valeur " +"de cette propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"formula (optionnel) : Presque toutes les associations one-" +"to-one pointent sur la clef primaire de l'entité propriétaire. Dans les " +"rares cas différents, vous devez donner une ou plusieurs autres colonnes ou " +"expression à joindre par une formule SQL (voir org.hibernate.test." +"onetooneformula pour un exemple).\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (optionnel - par défaut à false) : Indique que ce composant doit être chargé au premier accès à la " +"variable d'instance (nécessite une instrumentation du bytecode au moment du " +"build).\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property) : La stratégie à utiliser par Hibernate pour accéder à cette " +"propriété." + +#. Tag: para +#: basic_mapping.xml:541 +#, no-c-format +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "" +"Si l'attribut name est absent, Hibernate considère que la " +"classe ne possède pas de propriété identifiant." + +#. Tag: para +#: basic_mapping.xml:546 +#, no-c-format +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "" +"L'attribut unsaved-value est important ! Si l'identifiant " +"de votre classe n'a pas une valeur par défaut compatible avec le " +"comportement standard de Java (zéro ou null), vous devez alors préciser la " +"valeur par défaut." + +#. Tag: para +#: basic_mapping.xml:550 +#, no-c-format +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"La déclaration alternative <composite-id> permet " +"l'acccès aux données d'anciens systèmes qui utilisent des clefs composées. " +"Son utilisation est fortement déconseillée pour d'autres cas." + +#. Tag: title +#: basic_mapping.xml:556 +#, no-c-format +msgid "Generator" +msgstr "Generator" + +#. Tag: para +#: basic_mapping.xml:558 +#, no-c-format +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"L'élément fils <generator> nomme une classe Java " +"utilisée pour générer les identifiants uniques pour les instances des " +"classes persistantes. Si des paramètres sont requis pour configurer ou " +"initialiser l'instance du générateur, ils sont passés en utilisant l'élément " +"<param>." + +#. Tag: programlisting +#: basic_mapping.xml:565 +#, no-c-format +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:567 +#, fuzzy, no-c-format +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"Tous les générateurs doivent implémenter l'interface org.hibernate." +"id.IdentifierGenerator. C'est une interface très simple ; " +"certaines applications peuvent proposer leur propre implémentations " +"spécialisées. Cependant, Hibernate propose une série d'implémentations " +"intégrées. Il existe des noms raccourcis pour les générateurs intégrés : " +"" + +#. Tag: literal +#: basic_mapping.xml:575 +#, no-c-format +msgid "increment" +msgstr "increment" + +#. Tag: para +#: basic_mapping.xml:577 +#, no-c-format +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"Génère des identifiants de type long, short ou int qui ne sont uniques que si aucun autre " +"processus n'insère de données dans la même table. Ne pas utiliser " +"en environnement clusterisé." + +#. Tag: literal +#: basic_mapping.xml:586 +#, no-c-format +msgid "identity" +msgstr "identity" + +#. Tag: para +#: basic_mapping.xml:588 +#, no-c-format +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"Utilisation de la colonne identity de DB2, MySQL, MS SQL Server, Sybase et " +"HypersonicSQL. L'identifiant renvoyé est de type long, " +"short ou int." + +#. Tag: literal +#: basic_mapping.xml:596 +#, no-c-format +msgid "sequence" +msgstr "sequence" + +#. Tag: para +#: basic_mapping.xml:598 +#, no-c-format +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"Utilisation des séquences dans DB2, PostgreSQL, Oracle, SAP DB, McKoi ou " +"d'un générateur dans Interbase. L'identifiant renvoyé est de type " +"long, short ou int" + +#. Tag: literal +#: basic_mapping.xml:606 +#, no-c-format +msgid "hilo" +msgstr "hilo" + +#. Tag: para +#: basic_mapping.xml:608 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"Utilise un algorithme hi/lo pour générer de façon efficace des identifiants " +"de type long, short ou int, en prenant comme source de valeur \"hi\" une table et une colonne " +"(par défaut hibernate_unique_key et next_hi respectivement). L'algorithme hi/lo génère des identifiants uniques " +"pour une base de données particulière seulement." + +#. Tag: literal +#: basic_mapping.xml:618 +#, no-c-format +msgid "seqhilo" +msgstr "seqhilo" + +#. Tag: para +#: basic_mapping.xml:620 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"Utilise un algorithme hi/lo pour générer efficacement des identifiants de " +"type long, short ou int, étant donné un nom de séquence en base." + +#. Tag: literal +#: basic_mapping.xml:628 +#, no-c-format +msgid "uuid" +msgstr "uuid" + +#. Tag: para +#: basic_mapping.xml:630 +#, no-c-format +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"Utilise un algorithme de type UUID 128 bits pour générer des identifiants de " +"type string, unique au sein d'un réseau (l'adresse IP est utilisée). Le UUID " +"en codé en une chaîne de nombre héxadécimaux de longueur 32." + +#. Tag: literal +#: basic_mapping.xml:638 +#, no-c-format +msgid "guid" +msgstr "guid" + +#. Tag: para +#: basic_mapping.xml:640 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "" +"Utilise une chaîne GUID générée par la base pour MS SQL Server et MySQL." + +#. Tag: literal +#: basic_mapping.xml:646 +#, no-c-format +msgid "native" +msgstr "native" + +#. Tag: para +#: basic_mapping.xml:648 +#, no-c-format +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"Choisit identity, sequence ou " +"hilo selon les possibilités offertes par la base de " +"données sous-jacente." + +#. Tag: literal +#: basic_mapping.xml:656 +#, no-c-format +msgid "assigned" +msgstr "assigned" + +#. Tag: para +#: basic_mapping.xml:658 +#, no-c-format +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"Laisse l'application affecter un identifiant à l'objet avant que la métode " +"save() soit appelée. Il s'agit de la stratégie par défaut " +"si aucun <generator> n'est spécifié." + +#. Tag: literal +#: basic_mapping.xml:666 +#, no-c-format +msgid "select" +msgstr "select" + +#. Tag: para +#: basic_mapping.xml:668 +#, no-c-format +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "" +"Récupère une clef primaire assignée par un trigger en sélectionnant la ligne " +"par une clef unique quelconque." + +#. Tag: literal +#: basic_mapping.xml:675 +#, no-c-format +msgid "foreign" +msgstr "foreign" + +#. Tag: para +#: basic_mapping.xml:677 +#, no-c-format +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"Utilise l'identifiant d'un objet associé. Habituellement utilisé en " +"conjonction avec une association <one-to-one> sur " +"la clef primaire." + +#. Tag: literal +#: basic_mapping.xml:684 +#, no-c-format +msgid "sequence-identity" +msgstr "sequence-identity" + +#. Tag: para +#: basic_mapping.xml:686 +#, no-c-format +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." + +#. Tag: title +#: basic_mapping.xml:703 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "algorithme Hi/lo" + +#. Tag: para +#: basic_mapping.xml:704 +#, no-c-format +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"Les générateurs hilo et seqhilo " +"proposent deux implémentations alternatives de l'algorithme hi/lo, une " +"approche largement utilisée pour générer des identifiants. La première " +"implémentation nécessite une table \"spéciale\" en base pour héberger la " +"prochaine valeur \"hi\" disponible. La seconde utilise une séquence de type " +"Oracle (quand la base sous-jacente le propose)." + +#. Tag: programlisting +#: basic_mapping.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:713 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:715 +#, no-c-format +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"Malheureusement, vous ne pouvez pas utilisez hilo quand " +"vous apportez votre propre Connection à Hibernate. Quand " +"Hibernate utilise une datasource du serveur d'application pour obtenir des " +"connexions inscrites avec JTA, vous devez correctement configurer " +"hibernate.transaction.manager_lookup_class." + +#. Tag: title +#: basic_mapping.xml:724 +#, no-c-format +msgid "UUID algorithm" +msgstr "UUID algorithm" + +#. Tag: para +#: basic_mapping.xml:725 +#, no-c-format +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"Le contenu du UUID est : adresse IP, date de démarrage de la JVM (précis au " +"quart de seconde), l'heure système et un compteur (unique au sein de la " +"JVM). Il n'est pas possible d'obtenir l'adresse MAC ou une adresse mémoire à " +"partir de Java, c'est donc le mieux que l'on puisse faire sans utiliser JNI." + +#. Tag: title +#: basic_mapping.xml:734 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "Colonnes identifiantes et séquences" + +#. Tag: para +#: basic_mapping.xml:735 +#, no-c-format +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"Pour les bases qui implémentent les colonnes \"identité\" (DB2, MySQL, " +"Sybase, MS SQL), vous pouvez utiliser la génération de clef par " +"identity. Pour les bases qui implémentent les séquences " +"(DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) vous pouvez utiliser la " +"génération de clef par sequence. Ces deux méthodes " +"nécessitent deux requêtes SQL pour insérer un objet." + +#. Tag: programlisting +#: basic_mapping.xml:743 +#, no-c-format +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:745 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:747 +#, no-c-format +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"Pour le développement multi-plateformes, la stratégie native choisira entre les méthodes identity, " +"sequence et hilo, selon les " +"possibilités offertes par la base sous-jacente." + +#. Tag: title +#: basic_mapping.xml:756 +#, no-c-format +msgid "Assigned identifiers" +msgstr "Identifiants assignés" + +#. Tag: para +#: basic_mapping.xml:757 +#, no-c-format +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"Si vous souhaitez que l'application assigne des identifiants (par opposition " +"à la génération par Hibernate), vous pouvez utiliser le générateur " +"assigned. Ce générateur spécial utilisera une valeur " +"d'identifiant déjà utilisé par la propriété identifiant l'objet. Ce " +"générateur est utilisé quand la clef primaire est une clef naturelle plutôt " +"qu'une clef secondaire. C'est le comportement par défaut si vous ne précisez " +"pas d'élément <generator>." + +#. Tag: para +#: basic_mapping.xml:766 +#, no-c-format +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"Choisir le générateur assigned fait utiliser " +"unsaved-value=\"undefined\" par Hibernate, le forçant à " +"interroger la base pour déterminer si l'instance est transiente ou détachée, " +"à moins d'utiliser une propriété version ou timestamp, ou alors de définir " +"Interceptor.isUnsaved()." + +#. Tag: title +#: basic_mapping.xml:776 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "Clefs primaires assignées par trigger" + +#. Tag: para +#: basic_mapping.xml:777 +#, no-c-format +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "" +"Pour les schémas de base hérités d'anciens systèmes uniquement (Hibernate ne " +"génère pas de DDL avec des triggers)" + +#. Tag: programlisting +#: basic_mapping.xml:781 +#, no-c-format +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:783 +#, no-c-format +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"Dans l'exemple ci-dessus, socialSecurityNumber a une " +"valeur unique définie par la classe en tant que clef naturelle et " +"person_id est une clef secondaire dont la valeur est " +"générée par trigger." + +#. Tag: title +#: basic_mapping.xml:795 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "Enhanced identifier generators" + +#. Tag: para +#: basic_mapping.xml:797 +#, no-c-format +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#. Tag: para +#: basic_mapping.xml:805 +#, fuzzy, no-c-format +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters: " +"" + +#. Tag: para +#: basic_mapping.xml:819 +#, no-c-format +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#. Tag: para +#: basic_mapping.xml:825 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#. Tag: para +#: basic_mapping.xml:832 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#. Tag: para +#: basic_mapping.xml:839 +#, no-c-format +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#. Tag: para +#: basic_mapping.xml:853 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"cascade (optionnel - par défaut à none) : le style de cascade." + +#. Tag: para +#: basic_mapping.xml:860 +#, fuzzy, no-c-format +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters: " + +#. Tag: para +#: basic_mapping.xml:870 +#, no-c-format +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#. Tag: para +#: basic_mapping.xml:876 +#, no-c-format +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#. Tag: para +#: basic_mapping.xml:882 +#, no-c-format +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#. Tag: para +#: basic_mapping.xml:889 +#, no-c-format +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#. Tag: para +#: basic_mapping.xml:896 +#, no-c-format +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#. Tag: para +#: basic_mapping.xml:902 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#. Tag: para +#: basic_mapping.xml:908 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#. Tag: para +#: basic_mapping.xml:914 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"cascade (optionnel - par défaut à none) : le style de cascade." + +#. Tag: title +#: basic_mapping.xml:924 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "Identifier generator optimization" + +#. Tag: para +#: basic_mapping.xml:925 +#, fuzzy, no-c-format +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion. " + +#. Tag: para +#: basic_mapping.xml:933 +#, no-c-format +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#. Tag: para +#: basic_mapping.xml:939 +#, no-c-format +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#. Tag: para +#: basic_mapping.xml:948 +#, no-c-format +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#. Tag: title +#: basic_mapping.xml:961 +#, no-c-format +msgid "composite-id" +msgstr "composite-id" + +#. Tag: programlisting +#: basic_mapping.xml:963 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"Pour une table avec clef composée, vous pouvez mapper plusieurs attributs de " +"la classe comme propriétés identifiantes. L'élement <composite-" +"id> accepte les mappings de propriétés <key-" +"property> et les mappings <key-many-to-one> comme fils." + +#. Tag: programlisting +#: basic_mapping.xml:972 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:974 +#, no-c-format +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"Vos classes persistantes doivent surcharger les " +"méthodes equals() et hashCode() pour " +"implémenter l'égalité d'identifiant composé. Elles doivent aussi implenter " +"l'interface Serializable." + +#. Tag: para +#: basic_mapping.xml:980 +#, no-c-format +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"Malheureusement cette approche sur les identifiants composés signifie qu'un " +"objet persistant est son propre identifiant. Il n'y a pas d'autre moyen " +"pratique de manipuler l'objet que par l'objet lui-même. Vous devez " +"instancier une instance de la classe persistante elle-même et peupler ses " +"attributs identifiants avant de pouvoir appeler la méthode load() pour charger son état persistant associé à une clef composée. Nous " +"appelons cette approche \"identifiant composé embarqué" +"\" et ne la recommandons pas pour des applications complexes." + +#. Tag: para +#: basic_mapping.xml:989 +#, no-c-format +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"Une seconde approche, appelée identifiant composé mappé, consiste à encapsuler les propriétés identifiantes (celles " +"contenues dans <composite-id>) dans une classe " +"particulière." + +#. Tag: programlisting +#: basic_mapping.xml:995 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:997 +#, no-c-format +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"Dans cet exemple, la classe d'identifiant composée,MedicareId et la classe mappée elle-même, possèdent les propriétés " +"medicareNumber et dependent. La classe " +"identifiante doit redéfinir equals() et hashCode" +"() et implémenter Serializable. Le désavantage " +"de cette approche est la duplication du code." + +#. Tag: para +#: basic_mapping.xml:1006 +#, no-c-format +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "" +"Les attributs suivants servent à configurer un identifiant composé mappé :" + +#. Tag: para +#: basic_mapping.xml:1012 +#, no-c-format +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped (optionnel, défaut à false) : " +"indique qu'un identifiant composé mappé est utilisé, et que les propriétés " +"contenues font référence aux deux classes (celle mappée et la classe " +"identifiante)." + +#. Tag: para +#: basic_mapping.xml:1020 +#, no-c-format +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (optionnel, mais requis pour un identifiant composé " +"mappé) : La classe composant utilisée comme identifiant composé." + +#. Tag: para +#: basic_mapping.xml:1027 +#, no-c-format +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"Nous décrirons une troisième approche beaucoup plus efficace ou " +"l'identifiant composé est implémenté comme une classe composant dans . Les attributs décrits ci dessous, ne " +"s'appliquent que pour cette dernière approche :" + +#. Tag: para +#: basic_mapping.xml:1035 +#, no-c-format +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (optionnel, requis pour cette approche) : une " +"propriété de type composant qui contient l'identifiant composé (voir " +"chapitre 9)." + +#. Tag: para +#: basic_mapping.xml:1047 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (optionnel - défaut au type de la propriété " +"déterminé par réflexion) : La classe composant utilisée comme identifiant " +"(voir prochaine section)." + +#. Tag: para +#: basic_mapping.xml:1054 +#, no-c-format +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"Cette dernière approche est celle que nous recommandons pour toutes vos " +"applications." + +#. Tag: title +#: basic_mapping.xml:1062 +#, no-c-format +msgid "discriminator" +msgstr "discriminator" + +#. Tag: para +#: basic_mapping.xml:1064 +#, no-c-format +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"L'élément <discriminator> est nécessaire pour la " +"persistance polymorphique qui utilise la stratégie de mapping de table par " +"hiérarchie de classe. La colonne discriminante contient une valeur marqueur " +"qui permet à la couche de persistance de savoir quelle sous-classe " +"instancier pour une ligne particulière de table en base. Un nombre restreint " +"de types peuvent être utilisés : string, " +"character, integer, byte, short, boolean, " +"yes_no, true_false." + +#. Tag: programlisting +#: basic_mapping.xml:1082 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1085 +#, no-c-format +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column (optionnel - par défaut à class) le nom de la colonne discriminante." + +#. Tag: para +#: basic_mapping.xml:1091 +#, no-c-format +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (optionnel - par défaut à string) " +"un nom indiquant le type Hibernate." + +#. Tag: para +#: basic_mapping.xml:1097 +#, no-c-format +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force (optionnel - par défaut à false) " +"\"oblige\" Hibernate à spécifier une valeur discriminante autorisée même " +"quand on récupère toutes les instances de la classe de base." + +#. Tag: para +#: basic_mapping.xml:1104 +#, no-c-format +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (optionnel - par défaut à true) " +"à passer à false si la colonne discriminante fait aussi " +"partie d'un identifiant composé mappé (Indique à Hibernate de ne pas inclure " +"la colonne dans les INSERT SQL)." + +#. Tag: para +#: basic_mapping.xml:1112 +#, no-c-format +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (optionnel) une expression SQL arbitraire qui est " +"exécutée quand un type doit être évalué. Permet la discrimination basée sur " +"le contenu." + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"Les véritables valeurs de la colonne discriminante sont spécifiées par " +"l'attribut discriminator-value des éléments <" +"class> et <subclass>." + +#. Tag: para +#: basic_mapping.xml:1126 +#, no-c-format +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"L'attribut force n'est utile que si la table contient des " +"lignes avec des valeurs \"extra\" discriminantes qui ne sont pas mappées à " +"une classe persistante. Ce ne sera généralement pas le cas." + +#. Tag: para +#: basic_mapping.xml:1132 +#, no-c-format +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"En utilisant l'attribut formula vous pouvez déclarer une " +"expression SQL arbitraire qui sera utilisée pour évaluer le type d'une " +"ligne :" + +#. Tag: programlisting +#: basic_mapping.xml:1137 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1142 +#, no-c-format +msgid "version (optional)" +msgstr "version (optionnel)" + +#. Tag: para +#: basic_mapping.xml:1144 +#, no-c-format +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"L'élément <version> est optionnel et indique que la " +"table contient des données versionnées. C'est particulièrement utile si vous " +"avez l'intention d'utiliser des transactions longues " +"(voir plus-bas)." + +#. Tag: programlisting +#: basic_mapping.xml:1160 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1163 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column (optionnel - par défaut égal au nom de la " +"propriété) : Le nom de la colonne contenant le numéro de version." + +#. Tag: para +#: basic_mapping.xml:1169 +#, no-c-format +msgid "" +"name: The name of a property of the persistent class." +msgstr "" +"name : Le nom d'un attribut de la classe persistante." + +#. Tag: para +#: basic_mapping.xml:1174 +#, no-c-format +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (optionnel - par défaut à integer) : Le type du numéro de version." + +#. Tag: para +#: basic_mapping.xml:1186 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (optionnel - par défaut à " +"undefined) : Une valeur de la propriété d'identifiant qui " +"indique que l'instance est nouvellement instanciée (non sauvegardée), et qui " +"la distingue des instances détachées qui ont été sauvegardées ou chargées " +"dans une session précédente (undefined indique que la " +"valeur de l'atribut identifiant devrait être utilisé)." + +#. Tag: para +#: basic_mapping.xml:1195 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"generated (optional - défaut à never) : Indique que la valeur de la propriété version est générée par la " +"base de données cf. generated " +"properties." + +#. Tag: para +#: basic_mapping.xml:1202 +#, no-c-format +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"insert (optionnel - défaut à true) : " +"Indique si la colonne de version doit être incluse dans les ordres insert. " +"Peut être à false si et seulement si la colonne de la " +"base de données est définie avec une valeur par défaut à 0." + +#. Tag: para +#: basic_mapping.xml:1212 +#, no-c-format +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"Les numéros de version doivent avoir les types Hibernate long, integer, short, " +"timestamp ou calendar." + +#. Tag: para +#: basic_mapping.xml:1217 +#, no-c-format +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"Une propriété de version ou un timestamp ne doit jamais être null pour une " +"instance détachée, ainsi Hibernate pourra détecter toute instance ayant une " +"version ou un timestamp null comme transient, quelles que soient les " +"stratégies unsaved-value spécifiées. Déclarer " +"un numéro de version ou un timestamp \"nullable\" est un moyen pratique " +"d'éviter tout problème avec les réattachements transitifs dans Hibernate, " +"particulièrement utile pour ceux qui utilisent des identifiants assignés ou " +"des clefs composées !" + +#. Tag: title +#: basic_mapping.xml:1228 +#, no-c-format +msgid "timestamp (optional)" +msgstr "timestamp (optionnel)" + +#. Tag: para +#: basic_mapping.xml:1230 +#, no-c-format +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"L'élément optionnel <timestamp> indique que la " +"table contient des données horodatées (timestamp). Cela sert d'alternative à " +"l'utilisation de numéros de version. Les timestamps (ou horodatage) sont par " +"nature une implémentation moins fiable pour l'optimistic locking. Cependant, " +"l'application peut parfois utiliser l'horodatage à d'autres fins." + +#. Tag: programlisting +#: basic_mapping.xml:1246 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1249 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "" +"column (optionnel - par défaut à le nom de la " +"propriété) : Le nom d'une colonne contenant le timestamp." + +#. Tag: para +#: basic_mapping.xml:1255 +#, no-c-format +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name : Le nom d'une propriété au sens JavaBean de type " +"Date ou Timestamp de la classe " +"persistante." + +#. Tag: para +#: basic_mapping.xml:1268 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (optionnel - par défaut à null) : Propriété dont la valeur est un numéro de version qui indique " +"que l'instance est nouvellement instanciée (non sauvegardée), et qui la " +"distingue des instances détachées qui ont été sauvegardées ou chargées dans " +"une session précédente (undefined indique que la valeur " +"de l'attribut identifiant devrait être utilisée)." + +#. Tag: para +#: basic_mapping.xml:1277 +#, no-c-format +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"source (optionnel - par défaut à vm) : " +"D'où Hibernate doit-il récupérer la valeur du timestamp? Depuis la base de " +"données ou depuis la JVM d'exécution? Les valeurs de timestamp de la base de " +"données provoquent une surcharge puisque Hibernate doit interroger la base " +"pour déterminer la prochaine valeur mais cela est plus sûr lorsque vous " +"fonctionnez dans un cluster. Remarquez aussi que certains des dialectes ne " +"supportent pas cette fonction, et que d'autres l'implémentent mal, " +"provoquant des erreurs de précision (Oracle 8 par exemple)." + +#. Tag: para +#: basic_mapping.xml:1289 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"generated (optional - défaut à never) : Indique que la valeur de ce timestamp est générée par la base de " +"données cf. generated properties." + +#. Tag: para +#: basic_mapping.xml:1298 +#, no-c-format +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"Notez que <timestamp> est équivalent à <" +"version type=\"timestamp\">." + +#. Tag: title +#: basic_mapping.xml:1308 +#, no-c-format +msgid "property" +msgstr "property" + +#. Tag: para +#: basic_mapping.xml:1310 +#, no-c-format +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"L'élément <property> déclare une propriété de la " +"classe au sens JavaBean." + +#. Tag: programlisting +#: basic_mapping.xml:1332 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1335 +#, no-c-format +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "" +"name : nom de la propriété, avec une lettre initiale en " +"minuscule." + +#. Tag: para +#: basic_mapping.xml:1341 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column (optionnel - par défaut au nom de la propriété) : " +"le nom de la colonne mappée. Cela peut aussi être indiqué dans le(s) sous-" +"élément(s) <column>." + +#. Tag: para +#: basic_mapping.xml:1348 +#, no-c-format +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "type (optionnel) : nom indiquant le type Hibernate." + +#. Tag: para +#: basic_mapping.xml:1353 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (optionnel - par défaut à true) : indique que les colonnes mappées devraient être incluses dans " +"des UPDATE SQL et/ou des INSERT. " +"Mettre les deux à false empêche la propagation en base de " +"données (utile si vous savez qu'un trigger affectera la valeur à la colonne)." + +#. Tag: para +#: basic_mapping.xml:1362 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula (optionnel) : une expression SQL qui définit la " +"valeur pour une propriété calculée. Les propriétés " +"calculées ne possède pas leur propre mapping." + +#. Tag: para +#: basic_mapping.xml:1375 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (optionnel - par défaut à false): " +"Indique que cette propriété devrait être chargée en différé (lazy loading) " +"quand on accède à la variable d'instance pour la première fois." + +#. Tag: para +#: basic_mapping.xml:1382 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (optionnel): Génère le DDL d'une contrainte " +"d'unicité pour les colonnes. Permet aussi d'en faire la cible d'un " +"property-ref." + +#. Tag: para +#: basic_mapping.xml:1389 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (optionnel): Génère le DDL d'une contrainte de " +"non nullité pour les colonnes." + +#. Tag: para +#: basic_mapping.xml:1395 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (optionnel - par défaut à true): Indique que les mises à jour de cette propriété peuvent ou non " +"nécessiter l'acquisition d'un verrou optimiste. En d'autres termes, cela " +"détermine s'il est nécessaire d'incrémenter un numéro de version quand cette " +"propriété est marquée obsolète (dirty)." + +#. Tag: para +#: basic_mapping.xml:1403 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"generated (optional - défaut ànever): " +"Indique que la valeur de ce timestamp est générée par la base de données cf. " +"generated properties." + +#. Tag: para +#: basic_mapping.xml:1412 +#, no-c-format +msgid "typename could be:" +msgstr "typename peut être:" + +#. Tag: para +#: basic_mapping.xml:1418 +#, no-c-format +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"Nom d'un type basique Hibernate (ex: integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." + +#. Tag: para +#: basic_mapping.xml:1424 +#, no-c-format +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"Nom d'une classe Java avec un type basique par défaut (ex: int, " +"float, char, java.lang.String, java.util.Date, java.lang.Integer, java.sql." +"Clob)." + +#. Tag: para +#: basic_mapping.xml:1430 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "Nom d'une classe Java sérialisable." + +#. Tag: para +#: basic_mapping.xml:1435 +#, no-c-format +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"Nom d'une classe ayant un type spécifique (ex: com.illflow.type." +"MyCustomType)." + +#. Tag: para +#: basic_mapping.xml:1441 +#, no-c-format +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"Si vous n'indiquez pas un type, Hibernate utlisera la réflexion sur le nom " +"de la propriété pour tenter de trouver le type Hibernate correct. Hibernate " +"essayera d'interprêter le nom de la classe retournée par le getter de la " +"propriété en utilisant les régles 2, 3, 4 dans cet ordre. Cependant, ce " +"n'est pas toujours suffisant. Dans certains cas vous aurez encore besoin de " +"l'attribut type (Par exemple, pour distinguer " +"Hibernate.DATE et Hibernate.TIMESTAMP, " +"ou pour préciser un type spécifique)." + +#. Tag: para +#: basic_mapping.xml:1451 +#, no-c-format +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"L'attribut access permet de contrôler comment Hibernate " +"accèdera à la propriété à l'exécution. Par défaut, Hibernate utilisera les " +"méthodes set/get. Si vous indiquez access=\"field\", " +"Hibernate ignorera les getter/setter et accèdera à la propriété directement " +"en utilisant la réflexion. Vous pouvez spécifier votre propre stratégie " +"d'accès aux propriété en donnant une classe qui implémente l'interface " +"org.hibernate.property.PropertyAccessor." + +#. Tag: para +#: basic_mapping.xml:1460 +#, no-c-format +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"Une fonctionnalité particulièrement intéressante est les propriétés " +"dérivées. Ces propriétés sont par définition en lecture seule, la valeur de " +"la propriété est calculée au chargement. Le calcul est déclaré comme une " +"expression SQL, qui se traduit par une sous-requête SELECT dans la requête SQL qui charge une instance :" + +#. Tag: programlisting +#: basic_mapping.xml:1467 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1469 +#, no-c-format +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"Remarquez que vous pouvez référencer la propre table des entités en ne " +"déclarant pas un alias sur une colonne particulière (customerId dans l'exemple donné). Notez aussi que vous pouvez utiliser le sous-" +"élément de mapping <formula> plutôt que d'utiliser " +"l'attribut si vous le souhaitez." + +#. Tag: title +#: basic_mapping.xml:1479 +#, no-c-format +msgid "many-to-one" +msgstr "many-to-one" + +#. Tag: para +#: basic_mapping.xml:1481 +#, no-c-format +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"Une association ordinaire vers une autre classe persistante est déclarée en " +"utilisant un élément many-to-one. Le modèle relationnel " +"est une association de type many-to-one : une clef étrangère dans une table " +"référence la ou les clef(s) primaire(s) dans la table cible." + +#. Tag: programlisting +#: basic_mapping.xml:1509 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1693 basic_mapping.xml:1879 +#, fuzzy, no-c-format +msgid "name: The name of the property." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name : Nom de la propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (optionnel - par défaut du type de la propriété " +"déterminé par réflexion) : Le nom de la classe associée.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (optionnel - par défaut au type de la propriété " +"déterminé par réflexion) : le nom de la classe (fille) du composant." + +#. Tag: para +#: basic_mapping.xml:1517 basic_mapping.xml:2308 +#, fuzzy, no-c-format +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (optionnel) : Le nom de la clef étrangère. Cela " +"peut être aussi indiqué avec le sous-élément <column>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (optionnel) : Le nom de la colonne de la clef " +"étrangère Cela peut aussi être spécifié par l'élément(s) intégré(s) " +"<column>." + +#. Tag: para +#: basic_mapping.xml:1524 basic_mapping.xml:1698 +#, fuzzy, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (optionnel - par défaut le type de la propriété " +"déterminé par réflexion) : Le nom de la classe associée.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"cascade (optionnel) : Indique quelles opérations doivent " +"être cascadées de l'objet père vers l'objet associé." + +#. Tag: para +#: basic_mapping.xml:1530 +#, no-c-format +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (optionnel) : Indique quelles opérations doivent " +"être propagées de l'objet père vers les objets associés." + +#. Tag: para +#: basic_mapping.xml:1536 basic_mapping.xml:1719 +#, fuzzy, no-c-format +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (optionnel - par défaut à select) : Choisit entre le chargement de type outer-join ou le chargement " +"par select successifs.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"property-ref (optionnel) : Le nom de la propriété de la " +"classe associée qui est jointe à la clef primaire de cette classe. Si ce " +"n'est pas spécifié, la clef primaire de la classe associée est utilisée." + +#. Tag: para +#: basic_mapping.xml:1542 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert (optionnel - par défaut à true) : indique que les colonnes mappées devraient être incluses dans " +"des UPDATE SQL et/ou des INSERT. " +"Mettre les deux à false empêche la propagation en base de " +"données (utile si vous savez qu'un trigger affectera la valeur à la colonne)." + +#. Tag: para +#: basic_mapping.xml:1551 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref : (optionnel) Le nom d'une propriété de la " +"classe associée qui est liée à cette clef étrangère. Si ce n'est pas " +"spécifié, la clef primaire de la classe associée est utilisée." + +#. Tag: para +#: basic_mapping.xml:1564 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique (optionnel) : Génère le DDL d'une contrainte " +"d'unicité pour la clef étrangère. Permet aussi d'en faire la cible d'un " +"property-ref. Cela permet de créer une véritable " +"association one-to-one." + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (optionnel) : Génère le DDL pour une contrainte " +"de non nullité pour la clef étrangère." + +#. Tag: para +#: basic_mapping.xml:1578 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (optionnel - par défaut à true) : Indique que les mises à jour de cette propriété requièrent ou " +"non l'acquisition d'un verrou optimiste. En d'autres termes, détermine si un " +"incrément de version doit avoir lieu quand la propriété est marquée obsolète " +"(dirty)." + +#. Tag: para +#: basic_mapping.xml:1586 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy (optionnel - par défaut à false) : Indique que cette propriété doit être chargée en différé (lazy " +"loading) au premier accès à la variable d'instance (nécessite une " +"instrumentation du bytecode lors de la phase de construction). Remarquez que " +"cela n'influence pas le comportement du proxy Hibernate - comme l'attribut " +"lazy sur des classes ou des mappings de collections, mais " +"utilise l'interception pour le chargement différé. lazy=\"false\" indique que l'association sera toujours chargée." + +#. Tag: para +#: basic_mapping.xml:1596 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (optionnel - par défaut à exception) : Indique comment les clefs étrangères qui référencent des lignes " +"manquantes doivent être manipulées : ignore traitera une " +"ligne manquante comme une association nulle." + +#. Tag: para +#: basic_mapping.xml:1603 basic_mapping.xml:1757 +#, fuzzy, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (optionnel) : Le nom de l'entité de la classe " +"associée.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Il existe deux types d'associations one-to-one :" + +#. Tag: para +#: basic_mapping.xml:1608 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (optionnel) : une expression SQL qui définit la " +"valeur pour une clé étrangère calculée." + +#. Tag: para +#: basic_mapping.xml:1616 +#, no-c-format +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"Donner une valeur significative à l'attribut cascade " +"autre que none propagera certaines opérations à l'objet " +"associé. Les valeurs significatives sont les noms des opérations Hibernate " +"basiques, persist, merge, delete, save-update, evict, replicate, " +"lock, refresh, ainsi que les valeurs spéciales delete-" +"orphan et all et des combinaisons de noms " +"d'opérations séparées par des virgules, comme par exemple cascade=" +"\"persist,merge,evict\" ou cascade=\"all,delete-orphan\". Voir pour une " +"explication complète. Notez que les assocations many-to-one et one-to-one ne " +"supportent pas orphan delete." + +#. Tag: para +#: basic_mapping.xml:1629 +#, no-c-format +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "" +"Une déclaration many-to-one typique est aussi simple que :" + +#. Tag: programlisting +#: basic_mapping.xml:1633 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1635 +#, no-c-format +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"L'attribut property-ref devrait être utilisé pour mapper " +"seulement des données provenant d'un ancien système où les clefs étrangères " +"font référence à une clef unique de la table associée et qui n'est pas la " +"clef primaire. C'est un cas de mauvaise conception relationnelle. Par " +"exemple, supposez que la classe Product a un numéro de " +"série unique qui n'est pas la clef primaire. (L'attribut unique contrôle la génération DDL par Hibernate avec l'outil SchemaExport.)" + +#. Tag: programlisting +#: basic_mapping.xml:1644 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1646 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "Ainsi le mapping pour OrderItem peut utiliser :" + +#. Tag: programlisting +#: basic_mapping.xml:1650 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1652 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "bien que ce ne soit certainement pas encouragé." + +#. Tag: para +#: basic_mapping.xml:1656 +#, no-c-format +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"Si la clef unique référencée comprend des propriétés multiples de l'entité " +"associée, vous devez mapper ces propriétés à l'intérieur d'un élément " +"<properties>." + +#. Tag: para +#: basic_mapping.xml:1661 +#, no-c-format +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "one-to-one" + +#. Tag: programlisting +#: basic_mapping.xml:1665 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1670 +#, no-c-format +msgid "one-to-one" +msgstr "" +"Une association one-to-one vers une autre classe persistante est déclarée " +"avec l'élément one-to-one." + +#. Tag: para +#: basic_mapping.xml:1672 +#, no-c-format +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "name : Le nom de la propriété." + +#. Tag: programlisting +#: basic_mapping.xml:1690 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1704 +#, no-c-format +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"constrained (optionnel) : Indique qu'une contrainte de " +"clef étrangère sur la clef primaire de la table mappée référence la table de " +"la classe associée. Cette option affecte l'ordre dans lequel chaque " +"save() et chaque delete() sont " +"cascadés et détermine si l'association peut utiliser un proxy (aussi utilisé " +"par l'outil d'export de schéma)." + +#. Tag: para +#: basic_mapping.xml:1710 +#, no-c-format +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"fetch (optionnel - par défaut à select) : Choisit entre récupération par jointure externe ou select " +"séquentiel." + +#. Tag: para +#: basic_mapping.xml:1725 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"access (optionnel - par défaut à property) : La stratégie à utiliser par Hibernate pour accéder à la valeur " +"de la propriété." + +#. Tag: para +#: basic_mapping.xml:1738 +#, no-c-format +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"lazy (optionnel - par défaut proxy) : " +"Par défaut, les associations simples sont soumise à proxy. lazy=" +"\"no-proxy\" spécifie que la propriété doit être chargée à la " +"demande au premier accès à l'instance. (nécessite l'intrumentation du " +"bytecode à la construction). lazy=\"false\" indique que " +"l'association sera toujours chargée agressivement. Notez que si " +"constrained=\"false\", l'utilisation de proxy est " +"impossible et Hibernate chargera automatiquement l'association !" + +#. Tag: para +#: basic_mapping.xml:1746 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"entity-name (optional) : The entity name of the " +"associated class." + +#. Tag: para +#: basic_mapping.xml:1764 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "associations par clef primaire" + +#. Tag: para +#: basic_mapping.xml:1768 +#, no-c-format +msgid "primary key associations" +msgstr "association par clef étrangère unique" + +#. Tag: para +#: basic_mapping.xml:1771 +#, no-c-format +msgid "unique foreign key associations" +msgstr "" +"Les associations par clef primaire ne nécessitent pas une colonne " +"supplémentaire en table ; si deux lignes sont liés par l'association alors " +"les deux lignes de la table partagent la même valeur de clef primaire. Donc " +"si vous voulez que deux objets soient liés par une association par clef " +"primaire, vous devez faire en sorte qu'on leur assigne la même valeur " +"d'identifiant !" + +#. Tag: para +#: basic_mapping.xml:1776 +#, no-c-format +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"Pour une association par clef primaire, ajoutez les mappings suivants à " +"Employee et Person, respectivement." + +#. Tag: para +#: basic_mapping.xml:1783 +#, no-c-format +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"Maintenant, vous devez faire en sorte que les clefs primaires des lignes " +"liées dans les tables PERSON et EMPLOYEE sont égales. On utilise une " +"stratégie Hibernate spéciale de génération d'identifiants appelée " +"foreign :" + +#. Tag: programlisting +#: basic_mapping.xml:1788 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1789 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1791 +#, no-c-format +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"Une instance fraîchement enregistrée de Person se voit " +"alors assignée la même valeur de clef primaire que l'instance de " +"Employee référencée par la propriété employee de cette Person." + +#. Tag: programlisting +#: basic_mapping.xml:1797 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1799 +#, no-c-format +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"Alternativement, une clef étrangère avec contrainte d'unicité de " +"Employee vers Person peut être " +"indiquée ainsi :" + +#. Tag: para +#: basic_mapping.xml:1805 +#, no-c-format +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"Et cette association peut être rendue bidirectionnelle en ajoutant ceci au " +"mapping de Person :" + +#. Tag: programlisting +#: basic_mapping.xml:1810 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1812 +#, no-c-format +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "natural-id" + +#. Tag: programlisting +#: basic_mapping.xml:1817 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1822 +#, no-c-format +msgid "natural-id" +msgstr "" +"Bien que nous recommandions l'utilisation de clé primaire générée, vous " +"devriez toujours essayer d'identifier des clé métier (naturelles) pour " +"toutes vos entités. Une clé naturelle est une propriété ou une combinaison " +"de propriétés uniques et non nulles. Si elle est aussi immuable, c'est " +"encore mieux. Mappez les propriétés de la clé naturelle dans l'élément " +"<natural-id>. Hibernate générera la clé unique " +"nécessaire et les contraintes de non-nullité, et votre mapping s'auto-" +"documentera." + +#. Tag: programlisting +#: basic_mapping.xml:1824 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1826 +#, no-c-format +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"Nous vous recommandons fortement d'implémenter equals() " +"et hashCode() pour comparer les clés naturelles de " +"l'entité." + +#. Tag: para +#: basic_mapping.xml:1835 +#, no-c-format +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"Ce mapping n'est pas destiné à être utilisé avec des entités qui ont des " +"clés naturelles." + +#. Tag: para +#: basic_mapping.xml:1840 +#, no-c-format +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "" +"mutable (optionel, par défaut à false) : Par défaut, les identifiants naturels sont supposés être " +"immuable (constants)." + +#. Tag: para +#: basic_mapping.xml:1846 +#, no-c-format +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "component, dynamic-component" + +#. Tag: title +#: basic_mapping.xml:1856 +#, no-c-format +msgid "component, dynamic-component" +msgstr "" +"L'élément <component> mappe les propriétés d'un " +"objet fils aux colonnes d'une classe parente. Les composants peuvent en " +"retour déclarer leurs propres propriétés, composants ou collections. Voir " +"\"Components\" plus bas." + +#. Tag: para +#: basic_mapping.xml:1858 +#, no-c-format +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "name : Nom de la propriété" + +#. Tag: programlisting +#: basic_mapping.xml:1876 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"insert : Est ce que les colonnes mappées apparaissent " +"dans les INSERTs ?" + +#. Tag: para +#: basic_mapping.xml:1890 basic_mapping.xml:1979 +#, fuzzy, no-c-format +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update: Est ce que les colonnes mappées apparaissent dans " +"les UPDATEs ?\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update : Est-ce que les colonnes mappées apparaissent " +"dans les UPDATEs ?" + +#. Tag: para +#: basic_mapping.xml:1896 basic_mapping.xml:1985 +#, fuzzy, no-c-format +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (optionnel - par défaut à property) : La stratégie que Hibernate doit utiliser pour accéder à la " +"valeur de cette propriété.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"optimistic-lock (optionnel - par défaut à true) : Indique que les mises à jour sur ce composant nécessitent ou non " +"l'acquisition d'un verrou optimiste. En d'autres termes, cela détermine si " +"une incrémentation de version doit avoir lieu quand la propriété est marquée " +"obsolète (dirty)." + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"optimistic-lock (optionnel - par défaut à true) : Indique que les mises à jour sur ce composant nécessitent ou non " +"l'acquisition d'un verrou optimiste. En d'autres termes, cela détermine si " +"une incrémentation de version doit avoir lieu quand la propriété est marquée " +"obsolète (dirty)." + +#. Tag: para +#: basic_mapping.xml:1915 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"unique (optionnel - par défaut à false) : Indique qu'une contrainte d'unicité existe sur toutes les " +"colonnes mappées de ce composant." + +#. Tag: para +#: basic_mapping.xml:1923 basic_mapping.xml:1999 +#, fuzzy, no-c-format +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Les tags fils <property> mappent les propriétés de " +"la classe fille sur les colonnes de la table.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Par exemple, si nous avons le mapping de <properties> suivant :" + +#. Tag: para +#: basic_mapping.xml:1932 +#, no-c-format +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"L'élément <component> permet de déclarer sous-" +"élément <parent> qui associe une propriété de la " +"classe composant comme une référence arrière vers l'entité contenante." + +#. Tag: para +#: basic_mapping.xml:1937 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"L'élément <dynamic-component> permet à une " +"Map d'être mappée comme un composant, quand les noms de " +"la propriété font référence aux clefs de cette Map, voir ." + +#. Tag: para +#: basic_mapping.xml:1943 +#, no-c-format +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "properties" + +#. Tag: title +#: basic_mapping.xml:1952 +#, no-c-format +msgid "properties" +msgstr "" +"L'élément <properties> permet la définition d'un " +"groupement logique nommé des propriétés d'une classe. L'utilisation la plus " +"importante de cette construction est la possibilité pour une combinaison de " +"propriétés d'être la cible d'un property-ref. C'est aussi " +"un moyen pratique de définir une contrainte d'unicité multi-colonnes." + +#. Tag: para +#: basic_mapping.xml:1954 +#, no-c-format +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"name : Le nom logique d'un regroupement et non le véritable nom d'une propriété." + +#. Tag: programlisting +#: basic_mapping.xml:1970 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1973 +#, no-c-format +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"insert : Est-ce que les colonnes mappées apparaissent " +"dans les INSERTs ?" + +#. Tag: para +#: basic_mapping.xml:1991 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"unique (optionnel - par défaut à false) : Indique qu'une contrainte d'unicité existe sur toutes les " +"colonnes mappées de ce composant." + +#. Tag: para +#: basic_mapping.xml:2008 +#, no-c-format +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "" +"Alors nous pourrions avoir une association sur des données d'un ancien " +"système (legacy) qui font référence à cette clef unique de la table " +"Person au lieu de la clef primaire :" + +#. Tag: programlisting +#: basic_mapping.xml:2012 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2014 +#, no-c-format +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"Nous ne recommandons pas l'utilisation de ce genre de chose en dehors du " +"contexte de mapping de données héritées d'anciens systèmes." + +#. Tag: programlisting +#: basic_mapping.xml:2019 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2021 +#, no-c-format +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "subclass" + +#. Tag: title +#: basic_mapping.xml:2029 +#, no-c-format +msgid "subclass" +msgstr "" +"Pour finir, la persistance polymorphique nécessite la déclaration de chaque " +"sous-classe de la classe persistante de base. pour la stratégie de mapping " +"de type table-per-class-hierarchy, on utilise la déclaration <" +"subclass>." + +#. Tag: para +#: basic_mapping.xml:2031 +#, no-c-format +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "name : Le nom complet de la sous-classe." + +#. Tag: programlisting +#: basic_mapping.xml:2044 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2047 basic_mapping.xml:2105 basic_mapping.xml:2168 +#, fuzzy, no-c-format +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"discriminator-value (optionnel - par défaut le nom de la " +"classe) : une valeur qui distingue les différentes sous-classes.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name : Le nom Java complet de la sous-classe.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name : Le nom Java complet de la sous-classe." + +#. Tag: para +#: basic_mapping.xml:2052 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"proxy (optionnel) : Indique une classe ou interface à " +"utiliser pour les chargements à la demande des proxies (lazy)." + +#. Tag: para +#: basic_mapping.xml:2058 basic_mapping.xml:2115 basic_mapping.xml:2178 +#, fuzzy, no-c-format +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (optionnel, par défaut à true) : " +"Spécifier lazy=\"false\" désactive l'utilisation du " +"chargement à la demande (lazy).\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (optionnel) : Indique une classe ou interface pour " +"le chargement différé des proxies.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (optionnel) : Indique une classe ou interface pour " +"le chargement différé des proxies." + +#. Tag: para +#: basic_mapping.xml:2064 basic_mapping.xml:2121 basic_mapping.xml:2184 +#, fuzzy, no-c-format +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Chaque sous-classe devrait déclarer ses propres propriétés persistantes et " +"sous-classes. Les propriétés <version> et " +"<id> sont implicitement hérités de la classe de " +"base. Chaque sous-classe dans une hiérarchie doit définir une unique " +"discriminator-value. Si aucune n'est spécifiée, le nom " +"complet de la classe Java est utilisé.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (optionnel, par défaut à true) : " +"Indiquer lazy=\"false\" désactive l'utilisation du " +"chargement à la demande.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (optionnel, par défaut à true) : " +"Indiquer lazy=\"false\" désactive l'utilisation du " +"chargement à la demande." + +#. Tag: para +#: basic_mapping.xml:2072 +#, no-c-format +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"Pour plus d'infos sur le mapping d'héritage, voir ." + +#. Tag: para +#: basic_mapping.xml:2080 basic_mapping.xml:2138 basic_mapping.xml:2196 +#, no-c-format +msgid "" +"For information about inheritance mappings, see ." +msgstr "" +"Pour des informations sur les mappings d'héritage, voir ." + +#. Tag: title +#: basic_mapping.xml:2087 +#, no-c-format +msgid "joined-subclass" +msgstr "joined-subclass" + +#. Tag: para +#: basic_mapping.xml:2089 +#, no-c-format +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"Une autre façon possible de faire est la suivante, chaque sous-classe peut " +"être mappée vers sa propre table (stratégie de mapping de type table-per-" +"subclass). L'état hérité est récupéré en joignant la table de la super-" +"classe. L'élément <joined-subclass> est utilisé." + +#. Tag: programlisting +#: basic_mapping.xml:2102 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2110 basic_mapping.xml:2173 +#, fuzzy, no-c-format +msgid "table: The name of the subclass table." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table : Le nom de la table de la sous-classe.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table : nom de la table de la sous-classe." + +#. Tag: para +#: basic_mapping.xml:2129 +#, no-c-format +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"Aucune colonne discriminante n'est nécessaire pour cette stratégie de " +"mapping. Cependant, chaque sous-classe doit déclarer une colonne de table " +"contenant l'objet identifiant qui utilise l'élément <key>. Le mapping au début de ce chapitre serait ré-écrit ainsi :" + +#. Tag: programlisting +#: basic_mapping.xml:2136 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2145 +#, no-c-format +msgid "union-subclass" +msgstr "union-subclass" + +#. Tag: para +#: basic_mapping.xml:2147 +#, no-c-format +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"Une troisième option est de seulement mapper vers des tables les classes " +"concrètes d'une hiérarchie d'héritage, (stratégie de type table-per-concrete-" +"class) où chaque table définit tous les états persistants de la classe, y " +"compris les états hérités. Dans Hibernate il n'est absolument pas nécessaire " +"de mapper explicitement de telles hiérarchies d'héritage. Vous pouvez " +"simplement mapper chaque classe avec une déclaration <class> différente. Cependant, si vous souhaitez utiliser des associations " +"polymorphiques (càd une association vers la superclasse de la hiérarchie), " +"vous devez utiliser le mapping <union-subclass>." + +#. Tag: programlisting +#: basic_mapping.xml:2165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2192 +#, no-c-format +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "" +"Aucune colonne discriminante ou colonne clef n'est requise pour cette " +"stratégie de mapping." + +#. Tag: title +#: basic_mapping.xml:2203 +#, no-c-format +msgid "join" +msgstr "join" + +#. Tag: para +#: basic_mapping.xml:2205 +#, no-c-format +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"En utilisant l'élément <join>, il est possible de " +"mapper des propriétés d'une classe sur plusieurs tables." + +#. Tag: programlisting +#: basic_mapping.xml:2219 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2223 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "table : Le nom de la table jointe." + +#. Tag: para +#: basic_mapping.xml:2240 +#, no-c-format +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch (optionnel - par défaut à join) : Si positionné à join, Hibernate utilisera une " +"jointure interne pour charger une jointure définie par " +"une classe ou ses super-classes et une jointure externe pour une " +"<jointure> définie par une sous-classe. Si " +"positionné à select alors Hibernate utilisera un select " +"séquentiel pour une <jointure> définie sur une sous-" +"classe, qui ne sera délivrée que si une ligne se représente une instance de " +"la sous-classe. Les jointures internes seront quand même utilisées pour " +"charger une <jointure> définie par une classe et " +"ses super-classes." + +#. Tag: para +#: basic_mapping.xml:2253 +#, no-c-format +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (optionnel - par défaut à false) : Si positionné à true, Hibernate n'essaiera pas d'insérer ou de " +"mettre à jour les propriétés définies par cette jointure." + +#. Tag: para +#: basic_mapping.xml:2260 +#, no-c-format +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optionnel (optionnel - par défaut à false) : Si positionné à true, Hibernate insèrera une ligne seulement si " +"les propriétés définies par cette jointure sont non-nulles et utilisera " +"toujours une jointure externe pour charger les propriétés." + +#. Tag: para +#: basic_mapping.xml:2269 +#, no-c-format +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"Par exemple, les informations d'adresse pour une personne peuvent être " +"mappées vers une table séparée (tout en préservant des sémantiques de type " +"valeur pour toutes ses propriétés) :" + +#. Tag: programlisting +#: basic_mapping.xml:2274 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2276 +#, no-c-format +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"Cette fonctionnalité est souvent seulement utile pour les modèles de données " +"hérités d'anciens systèmes (legacy), nous recommandons d'utiliser moins de " +"tables que de classes et un modèle de domaine à granularité fine. Cependant, " +"c'est utile pour passer d'une stratégie de mapping d'héritage à une autre " +"dans une hiérarchie simple ainsi qu'il est expliqué plus tard." + +#. Tag: title +#: basic_mapping.xml:2286 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2288 +#, no-c-format +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"Nous avons rencontré l'élément <key> à plusieurs " +"reprises maintenant. Il apparaît partout que l'élément de mapping parent " +"définit une jointure sur une nouvele table, et définit la clef étrangère " +"dans la table jointe, ce qui référence la clef primaire de la table " +"d'origine." + +#. Tag: programlisting +#: basic_mapping.xml:2304 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2315 +#, no-c-format +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (optionnel, par défaut à noaction) : Indique si la contrainte de clef étrangère possède la " +"possibilité au niveau base de données de suppression en cascade." + +#. Tag: para +#: basic_mapping.xml:2322 +#, no-c-format +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (optionnel) : Indique que la clef étrangère " +"fait référence à des colonnes qui ne sont pas la clef primaire de la table " +"d'origine (Pour les données de systèmes legacy)." + +#. Tag: para +#: basic_mapping.xml:2329 +#, no-c-format +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (optionnel) : Indique que les colonnes des clefs " +"étrangères ne peuvent pas être nulles (c'est implicite si la clef étrangère " +"fait partie de la clef primaire)." + +#. Tag: para +#: basic_mapping.xml:2336 +#, no-c-format +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (optionnel) : Indique que la clef étrangère ne " +"devrait jamais être mise à jour (implicite si celle-ci fait partie de la " +"clef primaire)." + +#. Tag: para +#: basic_mapping.xml:2343 +#, no-c-format +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (optionnel) : Indique que la clef étrangère doit " +"posséder une contrainte d'unicité (implicite si la clef étrangère est aussi " +"la clef primaire)." + +#. Tag: para +#: basic_mapping.xml:2351 +#, no-c-format +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"Nous recommandons pour les systèmes où les suppressions doivent être " +"performantes de définir toutes les clefs on-delete=\"cascade\", ainsi Hibernate utilisera une contrainte ON CASCADE " +"DELETE au niveau base de données, plutôt que de nombreux " +"DELETE individuels. Attention, cette fonctionnalité court-" +"circuite la stratégie habituelle de verrou optimiste pour les données " +"versionnées." + +#. Tag: para +#: basic_mapping.xml:2359 +#, no-c-format +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"Les attributs not-null et update sont " +"utiles pour mapper une association one-to-many unidirectionnelle. Si vous " +"mappez un one-to-many unidirectionnel vers une clef étrangère non nulle, " +"vous devez déclarer la colonne de la clef en utilisant " +"<key not-null=\"true\">." + +#. Tag: title +#: basic_mapping.xml:2369 +#, no-c-format +msgid "column and formula elements" +msgstr "éléments column et formula" + +#. Tag: para +#: basic_mapping.xml:2370 +#, no-c-format +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"Tout élément de mapping qui accepte un attribut column " +"acceptera alternativement un sous-élément <column>. " +"De façon identique, <formula> est une alternative à " +"l'attribut formula." + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2378 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2380 +#, no-c-format +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"Les attributs column et formula " +"peuvent même être combinés au sein d'une même propriété ou mapping " +"d'association pour exprimer, par exemple, des conditions de jointure " +"exotiques." + +#. Tag: programlisting +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"
]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2391 +#, no-c-format +msgid "import" +msgstr "import" + +#. Tag: para +#: basic_mapping.xml:2393 +#, no-c-format +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"Supposez que votre application possède deux classes persistantes du même " +"nom, et vous ne voulez pas préciser le nom Java complet (packages inclus) " +"dans les queries Hibernate. Les classes peuvent alors être \"importées\" " +"explicitement plutôt que de compter sur auto-import=\"true\".Vous pouvez même importer des classes et interfaces qui ne sont pas " +"mappées explicitement." + +#. Tag: programlisting +#: basic_mapping.xml:2400 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2407 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2410 +#, no-c-format +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "class : Nom Java complet de la classe." + +#. Tag: para +#: basic_mapping.xml:2415 +#, no-c-format +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename (optionnel - par défaut vaut le nom de la classe " +"Java (sans package)) : Nom pouvant être utilisé dans le langage de requête." + +#. Tag: title +#: basic_mapping.xml:2426 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2428 +#, no-c-format +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"Il existe encore un type de mapping de propriété. L'élément de mapping " +"<any> définit une association polymorphique vers " +"des classes de tables multiples. Ce type de mapping requiert toujours plus " +"d'une colonne. La première colonne contient le type de l'entité associée. " +"Les colonnes restantes contiennent l'identifiant. il est impossible de " +"spécifier une contrainte de clef étrangère pour ce type d'association, donc " +"ce n'est certainement pas considéré comme le moyen habituel de mapper des " +"associations (polymorphiques). Vous devriez utiliser cela uniquement dans " +"des cas particuliers (par exemple des logs d'audit, des données de session " +"utilisateur, etc...)." + +#. Tag: para +#: basic_mapping.xml:2438 +#, no-c-format +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"L'attribut meta-type permet à l'application de spécifier " +"un type personnalisé qui mappe des valeurs de colonnes de le base de données " +"sur des classes persistantes qui ont un attribut identifiant du type " +"spécifié par id-type. Vous devez spécifier le mapping à " +"partir de valeurs du méta-type sur les noms des classes." + +#. Tag: programlisting +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2456 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2459 +#, no-c-format +msgid "name: the property name." +msgstr "name : le nom de la propriété." + +#. Tag: para +#: basic_mapping.xml:2464 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "id-type : le type identifiant." + +#. Tag: para +#: basic_mapping.xml:2469 +#, no-c-format +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type (optionnel - par défaut à string) : Tout type permis pour un mapping par discriminateur." + +#. Tag: para +#: basic_mapping.xml:2475 +#, no-c-format +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade (optionnel - par défaut à none) : le style de cascade." + +#. Tag: para +#: basic_mapping.xml:2487 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (optionnel - par défaut à true) : Indique que les mises à jour sur cette propriété nécessitent ou " +"non l'acquisition d'un verrou optimiste. En d'autres termes, définit si un " +"incrément de version doit avoir lieu quand cette propriété est marquée dirty." + +#. Tag: title +#: basic_mapping.xml:2502 +#, no-c-format +msgid "Hibernate Types" +msgstr "Hibernate Types" + +#. Tag: title +#: basic_mapping.xml:2505 +#, no-c-format +msgid "Entities and values" +msgstr "Entités et valeurs" + +#. Tag: para +#: basic_mapping.xml:2507 +#, no-c-format +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"Pour comprendre le comportement des différents objets Java par rapport au " +"service de persistance, nous avons besoin de les classer en deux groupes :" + +#. Tag: para +#: basic_mapping.xml:2512 +#, no-c-format +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +"Une entité existe indépendamment de tout autre objet " +"possédant une référence vers l'entité. Comparez cela avec le modèle Java " +"habituel où un objet est supprimé par le garbage collector dès qu'il n'est " +"plus référencé. Les entités doivent être explicitement enregistrées et " +"supprimées (sauf dans les cas où sauvegardes et suppressions sont " +"cascadées d'une entité mère vers ses enfants). C'est " +"différent du modèle ODMG de persistance par atteignabilité - et correspond " +"mieux à la façon dont les objets sont habituellement utilisés dans des " +"grands systèmes. Les entités permettent les références circulaires et " +"partagées. Elles peuvent aussi être versionnées." + +#. Tag: para +#: basic_mapping.xml:2523 +#, no-c-format +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"L'état persistant d'une entité consiste en des références vers d'autres " +"entités et instances de types valeurs. Ces valeurs sont " +"des types primitifs, des collections (et non le contenu d'une collection), " +"des composants de certains objets immuables. Contrairement aux entités, les " +"valeurs (et en particulier les collections et composants) sont persistés par atteignabiliité. Comme les valeurs (et types " +"primitifs) sont persistés et supprimés avec l'entité qui les contient, ils " +"ne peuvent pas posséder leurs propres versions. Les valeurs n'ont pas " +"d'identité indépendantes, ainsi elles ne peuvent pas être partagées par deux " +"entités ou collections." + +#. Tag: para +#: basic_mapping.xml:2534 +#, no-c-format +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"Jusqu'à présent nous avons utilisé le terme \"classe persistante\" pour " +"parler d'entités. Nous allons continuer à faire ainsi. Cependant, au sens " +"strict, toutes les classes définies par un utilisateur possédant un état " +"persistant ne sont pas des entités. Un composant est " +"une classe définie par un utilisateur avec les caractéristiques d'une " +"valeur. Une propriété Java de type java.lang.String a " +"aussi les caractéristiques d'une valeur. Given this definition, we can say " +"that all types (classes) provided by the JDK have value type semantics in " +"Java, while user-defined types may be mapped with entity or value type " +"semantics. This decision is up to the application developer. A good hint for " +"an entity class in a domain model are shared references to a single instance " +"of that class, while composition or aggregation usually translates to a " +"value type." + +#. Tag: para +#: basic_mapping.xml:2548 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "" +"Nous nous pencherons sur ces deux concepts tout au long de la documentation." + +#. Tag: para +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"Le défi est de mapper les type Javas (et la définition des développeurs des " +"entités et valeurs types) sur les types du SQL ou des bases de données. Le " +"pont entre les deux systèmes est proposé par Hibernate : pour les entités " +"nous utilisons <class>, <subclass> et ainsi de suite. Pour les types valeurs nous utilisons " +"<property>, <component>, " +"etc., habituellement avec un attribut type. La valeur de " +"cet attribut est le nom d'un type de mapping Hibernate. " +"Hibernate propose de base de nombreux mappings (pour les types de valeurs " +"standards du JDK). Vous pouvez écrire vos propres types de mappings et " +"implémenter aussi vos propres stratégies de conversion, nous le verrons plus " +"tard." + +#. Tag: para +#: basic_mapping.xml:2565 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" +"Tous les types proposés de base par Hibernate à part les collections " +"autorisent la valeur null." + +#. Tag: title +#: basic_mapping.xml:2572 +#, no-c-format +msgid "Basic value types" +msgstr "Basic value types" + +#. Tag: para +#: basic_mapping.xml:2574 +#, fuzzy, no-c-format +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "" +"Les types basiques de mapping proposés de base peuvent " +"grossièrement être rangés dans les catégories suivantes : " + +#. Tag: literal +#: basic_mapping.xml:2579 +#, no-c-format +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#. Tag: para +#: basic_mapping.xml:2582 +#, no-c-format +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"Les mappings de type des primitives Java ou leurs classes wrappers (ex: " +"Integer pour int) vers les types SQL (propriétaires) appropriés. " +"boolean, yes_noet true_false sont tous " +"des alternatives pour les types Java boolean ou " +"java.lang.Boolean." + +#. Tag: literal +#: basic_mapping.xml:2591 +#, no-c-format +msgid "string" +msgstr "string" + +#. Tag: para +#: basic_mapping.xml:2593 +#, no-c-format +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"Mapping de type de java.lang.String vers " +"VARCHAR (ou le VARCHAR2 Oracle)." + +#. Tag: literal +#: basic_mapping.xml:2600 +#, no-c-format +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#. Tag: para +#: basic_mapping.xml:2602 +#, no-c-format +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"Mappings de type pour java.util.Date et ses sous-classes " +"vers les types SQL DATE, TIME et " +"TIMESTAMP (ou équivalent)." + +#. Tag: literal +#: basic_mapping.xml:2610 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#. Tag: para +#: basic_mapping.xml:2612 +#, no-c-format +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"Mappings de type pour java.util.Calendar vers les types " +"SQL TIMESTAMP et DATE (ou équivalent)." + +#. Tag: literal +#: basic_mapping.xml:2620 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"Mappings de type pour java.math.BigDecimal et " +"java.math.BigInteger vers NUMERIC (ou " +"le NUMBER Oracle)." + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"Mappings de type pour java.util.Locale, java." +"util.TimeZone et java.util.Currency vers " +"VARCHAR (ou le VARCHAR2 Oracle). Les " +"instances de Locale et Currency sont " +"mappées sur leurs codes ISO. Les instances de TimeZone " +"sont mappées sur leur ID." + +#. Tag: literal +#: basic_mapping.xml:2644 +#, fuzzy, no-c-format +msgid "class" +msgstr "all vérifie toutes les colonnes" + +#. Tag: para +#: basic_mapping.xml:2646 +#, no-c-format +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"Un type de mapping pour java.lang.Class vers " +"VARCHAR (ou le VARCHAR2 Oracle). Un " +"objet Class est mappé sur son nom Java complet." + +#. Tag: literal +#: basic_mapping.xml:2654 +#, no-c-format +msgid "binary" +msgstr "binary" + +#. Tag: para +#: basic_mapping.xml:2656 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "Mappe les tableaux de bytes vers le type binaire SQL approprié." + +#. Tag: literal +#: basic_mapping.xml:2662 +#, no-c-format +msgid "text" +msgstr "text" + +#. Tag: para +#: basic_mapping.xml:2664 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"Mappe les longues chaînes de caractères Java vers les types SQL " +"CLOB ou TEXT." + +#. Tag: literal +#: basic_mapping.xml:2671 +#, no-c-format +msgid "serializable" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:2673 +#, no-c-format +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"Mappe les types Java sérialisables vers le type SQL binaire approprié. Vous " +"pouvez aussi indiquer le type Hibernate serializable avec " +"le nom d'une classe Java sérialisable ou une interface qui ne soit pas par " +"défaut un type de base." + +#. Tag: literal +#: basic_mapping.xml:2682 +#, no-c-format +msgid "clob, blob" +msgstr "clob, blob" + +#. Tag: para +#: basic_mapping.xml:2684 +#, no-c-format +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"Mappings de type pour les classes JDBC java.sql.Clob and " +"java.sql.Blob. Ces types peuvent ne pas convenir pour " +"certaines applications car un objet blob ou clob peut ne pas être " +"réutilisable en dehors d'une transaction (de plus l'implémentation par les " +"pilotes est moyennement bonne)." + +#. Tag: literal +#: basic_mapping.xml:2694 +#, no-c-format +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" + +#. Tag: para +#: basic_mapping.xml:2698 +#, no-c-format +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"Mappings de type pour ceux qui sont habituellement modifiable, pour lesquels " +"Hibernate effectue certains optimisations convenant seulement aux types Java " +"immuables, et l'application les traite comme immuable. Par exemple, vous ne " +"devriez pas appeler Date.setTime() sur une instance " +"mappée sur un imm_timestamp. Pour changer la valeur de la " +"propriété, et faire que cette modification soit persistée, l'application " +"doit assigner un nouvel (non identique) objet à la propriété." + +#. Tag: para +#: basic_mapping.xml:2713 +#, no-c-format +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"Les identifiants uniques des entités et collections peuvent être de " +"n'importe quel type de base excepté binary, " +"blob et clob (les identifiants " +"composites sont aussi permis, voir plus bas)." + +#. Tag: para +#: basic_mapping.xml:2719 +#, no-c-format +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"Les types de base des valeurs ont des Type constants " +"correspondants définis dans org.hibernate.Hibernate. Par " +"exemple, Hibernate.STRING représenté le type " +"string." + +#. Tag: title +#: basic_mapping.xml:2728 +#, no-c-format +msgid "Custom value types" +msgstr "Types de valeur définis par l'utilisateur" + +#. Tag: para +#: basic_mapping.xml:2730 +#, no-c-format +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"Il est assez facile pour les développeurs de créer leurs propres types de " +"valeurs. Par exemple, vous pourriez vouloir persister des propriétés du type " +"java.lang.BigInteger dans des colonnnes VARCHAR. Hibernate ne procure pas par défaut un type pour cela. Mais les " +"types que vous pouvez créer ne se limitent pas à mapper des propriétés (ou " +"élément collection) à une simple colonne d'une table. Donc, par exemple, " +"vous pourriez avoir une propriété Java getName()/" +"setName() de type java.lang.String " +"persistée dans les colonnes FIRST_NAME, INITIAL, SURNAME." + +#. Tag: para +#: basic_mapping.xml:2741 +#, no-c-format +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"Pour implémenter votre propre type, vous pouvez soit implémenter " +"org.hibernate.UserType soit org.hibernate." +"CompositeUserType et déclarer des propriétés utilisant des noms de " +"classes complets du type. Regardez org.hibernate.test." +"DoubleStringType pour voir ce qu'il est possible de faire." + +#. Tag: programlisting +#: basic_mapping.xml:2749 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2751 +#, no-c-format +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"Remarquez l'utilisation des tags <column> pour " +"mapper une propriété sur des colonnes multiples." + +#. Tag: para +#: basic_mapping.xml:2756 +#, no-c-format +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"Les interfaces CompositeUserType, " +"EnhancedUserType, UserCollectionType, " +"et UserVersionType permettent des utilisations plus " +"spécialisées." + +#. Tag: para +#: basic_mapping.xml:2762 +#, no-c-format +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"Vous pouvez même donner des paramètres en indiquant UserType dans le fichier de mapping ; Pour cela, votre UserType doit implémenter l'interface org.hibernate.usertype." +"ParameterizedType. Pour spécifier des paramètres dans votre type " +"propre, vous pouvez utiliser l'élément <type> dans " +"vos fichiers de mapping." + +#. Tag: programlisting +#: basic_mapping.xml:2770 +#, no-c-format +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2772 +#, no-c-format +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"Le UserType permet maintenant de récupérer la valeur pour " +"le paramètre nommé default à partir de l'objet " +"Properties qui lui est passé." + +#. Tag: para +#: basic_mapping.xml:2777 +#, no-c-format +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"Si vous utilisez fréquemment un UserType, cela peut être " +"utile de lui définir un nom plus court. Vous pouvez faire cela en utilisant " +"l'élément <typedef>. Les typedefs permettent " +"d'assigner un nom à votre type propre et peuvent aussi contenir une liste de " +"valeurs de paramètres par défaut si ce type est paramétré." + +#. Tag: programlisting +#: basic_mapping.xml:2784 +#, no-c-format +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2786 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2788 +#, no-c-format +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "" +"Il est aussi possible de redéfinir les paramètres par défaut du typedef au " +"cas par cas en utilisant des paramètres type sur le mapping de la propriété." + +#. Tag: para +#: basic_mapping.xml:2793 +#, no-c-format +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"Bien que le fait que Hibernate propose de base une riche variété de types, " +"et qu'il supporte les composants signifie que vous aurez très rarement " +"besoin d'utiliser un nouveau type propre, il est " +"néanmoins de bonne pratique d'utiliser des types propres pour les classes " +"(non entités) qui apparaissent fréquemment dans votre application. Par " +"exemple une classe MonetaryAmount est un bon candidat " +"pour un CompositeUserType même s'il pourrait facilement " +"être mappé comme un composant. Une motivation pour cela est l'abstraction. " +"Avec un type propre vos documents de mapping sont à l'abri des changements " +"futurs dans votre façon de représenter des valeurs monétaires." + +#. Tag: title +#: basic_mapping.xml:2809 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "Mapper une classe plus d'une fois" + +#. Tag: para +#: basic_mapping.xml:2810 +#, no-c-format +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"Il est possible de proposer plus d'un mapping par classe persistante. Dans " +"ce cas, vous devez spécifier un nom d'entité pour lever " +"l'ambiguité entre les instances des entités mappées (par défaut, le nom de " +"l'entité est celui de la classe). Hibernate vous permet de spécifier le nom " +"de l'entité lorsque vous utilisez des objets persistants, lorsque vous " +"écrivez des requêtes ou quand vous mappez des associations vers les entités " +"nommées." + +#. Tag: programlisting +#: basic_mapping.xml:2818 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"Remarquez comment les associations sont désormais spécifiées en utilisant " +"entity-name au lieu de class." + +#. Tag: title +#: basic_mapping.xml:2828 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "SQL quoted identifiers" + +#. Tag: para +#: basic_mapping.xml:2829 +#, no-c-format +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"Vous pouvez forcer Hibernate à mettre un identifiant entre quotes dans le " +"SQL généré en mettant le nom de la table ou de la colonne entre backticks " +"dans le document de mapping. Hibernate utilisera les bons styles de quotes " +"pour le Dialect SQL (habituellement des doubles quotes, " +"mais des parenthèses pour SQL server et des backticks pour MySQL)." + +#. Tag: programlisting +#: basic_mapping.xml:2836 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2842 +#, no-c-format +msgid "Metadata alternatives" +msgstr "alternatives Metadata" + +#. Tag: para +#: basic_mapping.xml:2844 +#, no-c-format +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XML ne convient pas à tout le monde, il y a donc des moyens alternatifs pour " +"définir des metatda de mappings O/R dans Hibernate." + +#. Tag: title +#: basic_mapping.xml:2849 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "utilisation de XDoclet" + +#. Tag: para +#: basic_mapping.xml:2851 +#, no-c-format +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"De nombreux utilisateurs de Hibernate préfèrent embarquer les informations " +"de mappings directement au sein du code source en utilisant les tags XDoclet " +"@hibernate.tags. Nous ne couvrons pas cette approche dans " +"ce document cependant, puisque c'est considéré comme faisant partie de " +"XDoclet. Cependant, nous présentons l'exemple suivant de la classe " +"Cat avec des mappings XDoclet." + +#. Tag: programlisting +#: basic_mapping.xml:2858 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2860 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "" +"Voyez le site web de Hibernate pour plus d'exemples sur XDoclet et Hibernate." + +#. Tag: title +#: basic_mapping.xml:2867 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "Utilisation des annotations JDK 5.0" + +#. Tag: para +#: basic_mapping.xml:2869 +#, no-c-format +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"Le JDK 5.0 introduit des annotations proches de celles de XDoclet au niveau " +"java, qui sont type-safe et vérifiées à la compilation. Ce mécanisme est " +"plus puissant que XDoclet et mieux supporté par les outils et IDE. IntelliJ " +"IDEA, par exemple, supporte l'auto-complétion et le surlignement syntaxique " +"des annotations JDK 5.0. La nouvelle révision des spécifications des EJB " +"(JSR-220) utilise les annotations JDK 5.0 comme mécanisme primaire pour les " +"meta-données des beans entités. Hibernate3 implémente " +"l'EntityManager de la JSR-220 (API de persistance), le " +"support du mapping de meta-données est disponible via le package " +"Hibernate Annotations, en tant que module séparé à " +"télécharger. EJB3 (JSR-220) et les métadata Hibernate3 sont supportés." + +#. Tag: para +#: basic_mapping.xml:2880 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "Ceci est un exemple d'une classe POJO annotée comme un EJB entité :" + +#. Tag: programlisting +#: basic_mapping.xml:2884 +#, no-c-format +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2886 +#, no-c-format +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"Notez que le support des annotations JDK 5.0 (et de la JSR-220) est encore " +"en cours et n'est pas terminé. Référez vous au module Hibernate Annotation " +"pour plus de détails." + +#. Tag: title +#: basic_mapping.xml:2895 +#, no-c-format +msgid "Generated Properties" +msgstr "Propriétés générées" + +#. Tag: para +#: basic_mapping.xml:2896 +#, no-c-format +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"Les propriétés générées sont des propriétés dont les valeurs sont générées " +"par la base de données. Typiquement, les applications Hibernate avaient " +"besoin d'invoquer refresh sur les instances qui " +"contenaient des propriétés pour lesquelles la base de données générait des " +"valeurs. Marquer les propriétés comme générées permet à l'application de " +"déléguer cette responsabilité à Hibernate. Principalement, à chaque fois " +"qu'Hibernate réalise une insertion ou une mise à jour en base de données " +"pour une entité marquée comme telle, cela provoque immédiatement un select " +"pour récupérer les valeurs générées." + +#. Tag: para +#: basic_mapping.xml:2905 +#, no-c-format +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"Les propriétés marquées comme générées doivent de plus ne pas être " +"insérables et modifiables Seuls versions, timestamps, et simple properties peuvent être marqués comme générées." + +#. Tag: para +#: basic_mapping.xml:2912 +#, no-c-format +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "" +"never (par défaut) - indique la valeur de la propriété " +"n'est pas générée dans la base de données." + +#. Tag: para +#: basic_mapping.xml:2916 +#, no-c-format +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - indique que la valeur de la propriété donnée est " +"générée à l'insertion mais pas lors des futures mises à jour de " +"l'enregistrement. Les colonnes de type \"date de création\" sont le cas " +"d'utilisation typique de cette option. Notez que même les propriétés version et timestamp peuvent être déclarées " +"comme générées, cette option n'est pas disponible à cet endroit..." + +#. Tag: para +#: basic_mapping.xml:2924 +#, no-c-format +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "" +"always - indique que la valeur de la propriété est " +"générée à l'insert comme aux updates." + +#. Tag: title +#: basic_mapping.xml:2931 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "Objets auxiliaires de la base de données" + +#. Tag: para +#: basic_mapping.xml:2932 +#, no-c-format +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Permettent les ordres CREATE et DROP d'objets arbitraire de la base de " +"donnéées, en conjonction avec les outils Hibernate d'évolutions de schéma, " +"pour permettre de définir complètement un schéma utilisateur au sein des " +"fichiers de mapping Hibernate. Bien que conçu spécifiquement pour créer et " +"supprimer des objets tels que des triggers et des procédures stockées, ou " +"toute commande pouvant être exécutée via une méthode de java.sql." +"Statement.execute() (ALTERs, INSERTS, etc). Il y a principalement " +"deux modes pour définir les objets auxiliaires de base de données..." + +#. Tag: para +#: basic_mapping.xml:2941 +#, no-c-format +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "" +"Le premier mode est de lister explicitement les commandes CREATE et DROP " +"dans le fichier de mapping:" + +#. Tag: programlisting +#: basic_mapping.xml:2945 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2946 +#, no-c-format +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"Le second mode est de fournir une classe particulière qui connait comment " +"construire les commandes CREATE et DROP. Cette classe particulière doit " +"implémenter l'interface org.hibernate.mapping." +"AuxiliaryDatabaseObject." + +#. Tag: programlisting +#: basic_mapping.xml:2951 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2952 +#, no-c-format +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "" +"Additionnellement, ces objets de base de données peuvent être " +"optionnellement traités selon l'utilisation de dialectes particuliers.." + +#. Tag: programlisting +#: basic_mapping.xml:2956 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "class" +#~ msgstr "class" + +#~ msgid "id" +#~ msgstr "id" + +#~ msgid "" +#~ "optimizer (optional, defaults to none): See " +#~ msgstr "" +#~ "optimizer (optional, defaults to none): See " + +#~ msgid "" +#~ "optimizer (optional, defaults to ): See " +#~ "" +#~ msgstr "" +#~ "optimizer (optional, defaults to ): See " +#~ "" + +#~ msgid "key" +#~ msgstr "key" + +#~ msgid "any" +#~ msgstr "any" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/batch.po b/documentation/envers/src/main/docbook/fr-FR/content/batch.po new file mode 100644 index 0000000000..af250d1d07 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/batch.po @@ -0,0 +1,642 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:29 +#, no-c-format +msgid "Batch processing" +msgstr "Traitement par paquet" + +#. Tag: para +#: batch.xml:31 +#, no-c-format +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"Une approche naïve pour insérer 100 000 lignes dans la base de données en " +"utilisant Hibernate pourrait ressembler à ça :" + +#. Tag: programlisting +#: batch.xml:36 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:38 +#, no-c-format +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"Ceci devrait s'écrouler avec une OutOfMemoryException " +"quelque part aux alentours de la 50 000ème ligne. C'est parce qu'Hibernate " +"cache toutes les instances de Customer nouvellement " +"insérées dans le cache de second niveau." + +#. Tag: para +#: batch.xml:44 +#, no-c-format +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"Dans ce chapitre nous montrerons comment éviter ce problème. D'abord, " +"cependant, si vous faites des traitements par batch, il est absolument " +"critique que vous activiez l'utilisation ds paquet JDBC (NdT : JDBC " +"batching), si vous avez l'intention d'obtenir des performances raisonnables. " +"Configurez la taille du paquet JDBC avec un nombre raisonnable (disons, 10-" +"50) :" + +#. Tag: programlisting +#: batch.xml:51 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:53 +#, no-c-format +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"Vous pourriez aussi vouloir faire cette sorte de travail dans un traitement " +"où l'interaction avec le cache de second niveau est complètement désactivé :" + +#. Tag: para +#: batch.xml:58 +#, no-c-format +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "Insertions en paquet" + +#. Tag: programlisting +#: batch.xml:63 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:65 +#, no-c-format +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"Lorsque vous rendez des nouveaux objets persistants, vous devez " +"régulièrement appeler flush() et puis clear() sur la session, pour contrôler la taille du cache de premier niveau." + +#. Tag: title +#: batch.xml:71 +#, no-c-format +msgid "Batch inserts" +msgstr "Paquet de mises à jour" + +#. Tag: para +#: batch.xml:73 +#, no-c-format +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"Pour récupérer et mettre à jour des données les mêmes idées s'appliquent. En " +"plus, vous avez besoin d'utiliser scroll() pour tirer " +"partie des curseurs côté serveur pour les requêtes qui retournent beaucoup " +"de lignes de données." + +#. Tag: programlisting +#: batch.xml:79 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:84 +#, no-c-format +msgid "Batch updates" +msgstr "L'interface StatelessSession" + +#. Tag: para +#: batch.xml:86 +#, no-c-format +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"Alternativement, Hibernate fournit une API orientée commande qui peut être " +"utilisée avec des flux de données pour et en provenance de la base de " +"données sous la forme d'objets détachés. Une StatelessSession n'a pas de contexte de persistance associé et ne fournit pas " +"beaucoup de sémantique de durée de vie de haut niveau. En particulier, une " +"session sans état n'implémente pas de cache de premier niveau et n'interagit " +"pas non plus avec un cache de seconde niveau ou un cache de requêtes. Elle " +"n'implémente pas les transactions ou la vérification sale automatique (NdT : " +"automatic dirty checking). Les opérations réalisées avec une session sans " +"état ne sont jamais répercutées en cascade sur les instances associées. Les " +"collections sont ignorées par une session sans état. Les opérations " +"exécutées via une session sans état outrepasse le modèle d'événements " +"d'Hibernate et les intercepteurs. Les sessions sans état sont vulnérables " +"aux effets de modification des données, ceci est dû au manque de cache de " +"premier niveau. Une session sans état est une abstraction bas niveau, plus " +"proche de la couche JDBC sous-jacente." + +#. Tag: programlisting +#: batch.xml:92 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:97 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "" +"Notez que dans le code de l'exemple, les intances de Customer retournées par la requête sont immédiatement détachées. Elles ne " +"sont jamais associées à un contexte de persistance." + +#. Tag: para +#: batch.xml:98 +#, no-c-format +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"Les opérations insert(), update() et " +"delete() définies par l'interface " +"StatelessSession sont considérées comme des opérations " +"d'accès direct aux lignes de la base de données, ce qui résulte en une " +"exécution immédiate du SQL INSERT, UPDATE ou DELETE respectif. De là, elles ont des " +"sémantiques tres différentes des opérations save(), " +"saveOrUpdate() et delete() définies " +"par l'interface Session." + +#. Tag: programlisting +#: batch.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:115 +#, no-c-format +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "Opérations de style DML" + +#. Tag: para +#: batch.xml:121 +#, no-c-format +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"Comme déjà discuté avant, le mapping objet/relationnel automatique et " +"transparent est intéressé par la gestion de l'état de l'objet. Ceci implique " +"que l'état de l'objet est disponible en mémoire, d'où manipuler (en " +"utilisant des expressions du langage de manipulation de données - " +"Data Manipulation Language (DML) - SQL) les données " +"directement dans la base n'affectera pas l'état en mémoire. Pourtant, " +"Hibernate fournit des méthodes pour l'exécution d'expression DML de style " +"SQL lesquelles sont réalisées à travers le langage de requête d'Hibernate " +"(HQL)." + +#. Tag: title +#: batch.xml:134 +#, no-c-format +msgid "DML-style operations" +msgstr "" +"La pseudo-syntaxe pour les expressions UPDATE et " +"DELETE est : ( UPDATE | DELETE ) FROM? " +"EntityName (WHERE where_conditions)?. Certains points sont à " +"noter :" + +#. Tag: para +#: batch.xml:136 +#, no-c-format +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "Dans la clause from, le mot-clef FROM est optionnel" + +#. Tag: para +#: batch.xml:146 +#, no-c-format +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"Il ne peut y avoir qu'une seule entité nommée dans la clause from ; elle " +"peut optionnellement avoir un alias. Si le nom de l'entité a un alias, alors " +"n'importe quelle référence de propriété doit être qualifiée en ayant un " +"alias ; si le nom de l'entité n'a pas d'alias, alors il est illégal pour " +"n'importe quelle référence de propriété d'être qualifiée." + +#. Tag: para +#: batch.xml:154 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "" +"Aucune jointure (implicite ou explicite) ne peut être spécifiée dans une " +"requête HQL. Les sous-requêtes peuvent être utilisées dans la clause where ; " +"les sous-requêtes, elles-mêmes, peuvent contenir des jointures." + +#. Tag: para +#: batch.xml:159 +#, no-c-format +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "La clause where est aussi optionnelle." + +#. Tag: para +#: batch.xml:167 +#, no-c-format +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"Par exemple, pour exécuter un UPDATE HQL, utilisez la " +"méthode Query.executeUpdate() (la méthode est données " +"pour ceux qui sont familiers avec PreparedStatement.executeUpdate()" +" de JDBC) :" + +#. Tag: para +#: batch.xml:174 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "" +"Pour exécuter un DELETE HQL, utilisez la même méthode " +"Query.executeUpdate() :" + +#. Tag: para +#: batch.xml:180 +#, no-c-format +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"La valeur du int retourné par la méthode Query." +"executeUpdate() indique le nombre d'entités affectées par " +"l'opération. Considérez que cela peut ou pas corréler le nombre de lignes " +"affectés dans la base de données. Une opération HQL pourrait entraîner " +"l'exécution de multiples expressions SQL réelles, pour des classes filles " +"mappées par jointure (NdT: join-subclass), par exemple. Le nombre retourné " +"indique le nombre d'entités réelles affectées par l'expression. Retour à " +"l'exemple de la classe fille mappée par jointure, un effacement d'une des " +"classes filles peut réellement entraîner des suppressions pas seulement dans " +"la table qui mappe la classe fille, mais aussi dans la table \"racine\" et " +"potentillement dans les tables des classes filles plus bas dans la " +"hiérarchie d'héritage." + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"La pseudo-syntaxe pour l'expression INSERT est : " +"INSERT INTO EntityName properties_list select_statement. " +"Quelques points sont à noter :" + +#. Tag: programlisting +#: batch.xml:198 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:200 +#, no-c-format +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"Seule la forme INSERT INTO ... SELECT ... est supportée ; pas la forme " +"INSERT INTO ... VALUES ... ." + +#. Tag: para +#: batch.xml:205 +#, no-c-format +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"La properties_list est analogue à la spécification de la colonne The properties_list is analogous to the column " +"speficiation dans l'expression SQL INSERT. Pour " +"les entités impliquées dans un héritage mappé, seules les propriétés " +"directement définies à ce niveau de classe donné peuvent être utilisées dans " +"properties_list. Les propriétés de la classe mère ne sont pas permises ; et " +"les propriétés des classes filles n'ont pas de sens. En d'autres mots, les " +"expressions INSERT par nature non polymorphiques." + +#. Tag: programlisting +#: batch.xml:210 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:212 +#, no-c-format +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"select_statement peut être n'importe quelle requête de sélection HQl valide, " +"avec l'avertissement que les types de retour doivent correspondre aux types " +"attendus par l'insertion. Actuellement, c'est vérifié durant la compilation " +"de la requête plutôt que la vérification soit reléguée à la base de données. " +"Notez cependant que cela pourrait poser des problèmes entre les " +"Types d'Hibernate qui sont équivalents opposé à égaux. Cela pourrait poser des " +"problèmes avec des disparités entre une propriété définie comme un " +"org.hibernate.type.DateType et une propriété définie " +"comme un org.hibernate.type.TimestampType, même si la " +"base de données ne ferait pas de distinction ou ne serait pas capable de " +"gérer la conversion." + +#. Tag: para +#: batch.xml:223 +#, no-c-format +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"Pour la propriéte id, l'expression d'insertion vous donne deux options. Vous " +"pouvez soit spécifier explicitement la propriété id dans properties_list " +"(auquel cas sa valeur est extraite de l'expression de sélection " +"correspondante), soit l'omettre de properties_list (auquel cas une valeur " +"générée est utilisée). Cette dernière option est seulement disponible en " +"utilisant le générateur d'identifiant qui opère dans la base de données ; " +"tenter d'utiliser cette option avec n'importe quel type de générateur \"en " +"mémoire\" causera une exception durant l'analyse. Notez que pour les buts de " +"cette discussion, les générateurs \"en base\" sont considérés être " +"org.hibernate.id.SequenceGenerator (et ses classes " +"filles) et n'importe quelles implémentations de org.hibernate.id." +"PostInsertIdentifierGenerator. L'exception la plus notable ici est " +"org.hibernate.id.TableHiLoGenerator, qu ne peut pas être " +"utilisée parce qu'il ne propose pas un moyen de d'exposer ses valeurs par un " +"select." + +#. Tag: para +#: batch.xml:231 +#, no-c-format +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" +"Pour des propriétés mappées comme version ou " +"timestamp, l'expression d'insertion vous donne deux " +"options. Vous pouvez soit spécifier la propriété dans properties_list " +"(auquel cas sa valeur est extraite des expressions select correspondantes), " +"soit l'omettre de properties_list (auquel cas la valeur de graine (NdT : seed value) définie par le org.hibernate.type." +"VersionType est utilisée)." + +#. Tag: para +#: batch.xml:234 +#, no-c-format +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" +"Un exemple d'exécution d'une expression INSERT HQL :" + +#. Tag: para +#: batch.xml:244 +#, no-c-format +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "translator-credits" + +#. Tag: para +#: batch.xml:256 +#, no-c-format +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" + +#. Tag: para +#: batch.xml:271 +#, no-c-format +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" + +#. Tag: para +#: batch.xml:281 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "" + +#. Tag: programlisting +#: batch.xml:285 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/best_practices.po b/documentation/envers/src/main/docbook/fr-FR/content/best_practices.po new file mode 100644 index 0000000000..c292904a56 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/best_practices.po @@ -0,0 +1,466 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:29 +#, no-c-format +msgid "Best Practices" +msgstr "Meilleures pratiques" + +#. Tag: term +#: best_practices.xml:33 +#, no-c-format +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"Découpez finement vos classes et mappez les en utilisant <" +"component>." + +#. Tag: para +#: best_practices.xml:35 +#, no-c-format +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"Utilisez une classe Adresse pour encapsuler Rue, Region, CodePostal. Ceci " +"permet la réutilisation du code et simplifie la maintenance." + +#. Tag: term +#: best_practices.xml:43 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "Déclarez des propriétés d'identifiants dans les classes persistantes." + +#. Tag: para +#: best_practices.xml:45 +#, no-c-format +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"Hibernate rend les propriétés d'identifiants optionnelles. Il existe " +"beaucoup de raisons pour lesquelles vous devriez les utiliser. Nous " +"recommandons que vous utilisiez des identifiants techniques (générés, et " +"sans connotation métier)." + +#. Tag: term +#: best_practices.xml:53 +#, no-c-format +msgid "Identify natural keys." +msgstr "Identifiez les clefs naturelles." + +#. Tag: para +#: best_practices.xml:55 +#, no-c-format +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"Identifiez les clefs naturelles pour toutes les entités, et mappez les avec " +"<natural-id>. Implémentez equals() et hashCode() pour comparer les propriétés qui " +"composent la clef naturelle." + +#. Tag: term +#: best_practices.xml:63 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "Placez chaque mapping de classe dans son propre fichier." + +#. Tag: para +#: best_practices.xml:65 +#, no-c-format +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"N'utilisez pas un unique document de mapping. Mappez com.eg.Foo dans le fichier com/eg/Foo.hbm.xml. Cela prend " +"tout son sens lors d'un travail en équipe." + +#. Tag: term +#: best_practices.xml:73 +#, no-c-format +msgid "Load mappings as resources." +msgstr "Chargez les mappings comme des ressources." + +#. Tag: para +#: best_practices.xml:75 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "Déployez les mappings en même temps que les classes qu'ils mappent." + +#. Tag: term +#: best_practices.xml:81 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "Pensez à externaliser les chaînes de caractères." + +#. Tag: para +#: best_practices.xml:83 +#, no-c-format +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"Ceci est une bonne habitude si vos requêtes appellent des fonctions SQL qui " +"ne sont pas au standard ANSI. Cette externalisation dans les fichiers de " +"mapping rendra votre application plus portable." + +#. Tag: term +#: best_practices.xml:91 +#, no-c-format +msgid "Use bind variables." +msgstr "Utilisez les variables \"bindées\"." + +#. Tag: para +#: best_practices.xml:93 +#, no-c-format +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"Comme en JDBC, remplacez toujours les valeurs non constantes par \"?\". " +"N'utilisez jamais la manipulation des chaînes de caractères pour remplacer " +"des valeurs non constantes dans une requête ! Encore mieux, utilisez les " +"paramètres nommés dans les requêtes." + +#. Tag: term +#: best_practices.xml:101 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "Ne gérez pas vous même les connexions JDBC." + +#. Tag: para +#: best_practices.xml:103 +#, no-c-format +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"Hibernate laisse l'application gérer les connexions JDBC. Vous ne devriez " +"gérer vos connexions qu'en dernier recours. Si vous ne pouvez pas utiliser " +"les systèmes de connexions livrés, réfléchissez à l'idée de fournir votre " +"propre implémentation de org.hibernate.connection." +"ConnectionProvider." + +#. Tag: term +#: best_practices.xml:111 +#, no-c-format +msgid "Consider using a custom type." +msgstr "Pensez à utiliser les types utilisateurs." + +#. Tag: para +#: best_practices.xml:113 +#, no-c-format +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"Supposez que vous ayez une type Java, de telle bibliothèque, qui a besoin " +"d'être persisté mais qui ne fournit pas les accesseurs nécessaires pour le " +"mapper comme composant. Vous devriez implémenter org.hibernate." +"UserType.Cette approche libère le code de l'application de " +"l'implémentation des transformations vers / depuis les types Hibernate." + +#. Tag: term +#: best_practices.xml:122 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "Utilisez du JDBC pur dans les goulets d'étranglement." + +#. Tag: para +#: best_practices.xml:124 +#, no-c-format +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"Dans certaines parties critiques de votre système d'un point de vue " +"performance, quelques opérations peuvent tirer partie d'un appel JDBC natif. " +"Mais attendez de savoir que c'est un goulet " +"d'étranglement. Ne supposez jamais qu'un appel JDBC sera forcément plus " +"rapide. Si vous avez besoin d'utiliser JDBC directement, ouvrez une " +"Session Hibernate et utilisez la connexion SQL sous-" +"jacente. Ainsi vous pourrez utiliser la même stratégie de transation et la " +"même gestion des connexions." + +#. Tag: term +#: best_practices.xml:134 +#, no-c-format +msgid "Understand Session flushing." +msgstr "Comprendre le flush de Session." + +#. Tag: para +#: best_practices.xml:136 +#, no-c-format +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"De temps en temps la Session synchronise ses états persistants avec la base " +"de données. Les performances seront affectées si ce processus arrive trop " +"souvent. Vous pouvez parfois minimiser les flush non nécessaires en " +"désactivant le flush automatique ou même en changeant l'ordre des opérations " +"menées dans une transaction particulière." + +#. Tag: term +#: best_practices.xml:145 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "" +"Dans une architecture à trois couches, pensez à utiliser " +"saveOrUpdate()." + +#. Tag: para +#: best_practices.xml:147 +#, no-c-format +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"Quand vous utilisez une architecture à base de servlet / session bean, vous " +"pourriez passer des objets chargés dans le bean session vers et depuis la " +"couche servlet / JSP. Utilisez une nouvelle session pour traiter chaque " +"requête. Utilisez Session.merge() ou Session." +"saveOrUpdate() pour synchroniser les objets avec la base de " +"données." + +#. Tag: term +#: best_practices.xml:156 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "" +"Dans une architecture à deux couches, pensez à utiliser la déconnexion de " +"session." + +#. Tag: para +#: best_practices.xml:158 +#, no-c-format +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"Les transactions de bases de données doivent être aussi courtes que possible " +"pour une meilleure montée en charge.Cependant, il est souvent nécessaire " +"d'implémenter de longues transactions applicatives, une " +"simple unité de travail du point de vue de l'utilisateur. Une transaction " +"applicative peut s'étaler sur plusieurs cycles de requêtes/réponses du " +"client. Il est commun d'utiliser des objets détachés pour implémenter des " +"transactions applicatives. Une alternative, extrêmement appropriée dans une " +"architecture à 2 couches, est de maintenir un seul contact de persistance " +"ouvert (session) pour toute la durée de vie de la transaction applicative et " +"simplement se déconnecter de la connexion JDBC à la fin de chaque requête, " +"et se reconnecter au début de la requête suivante. Ne partagez jamais une " +"seule session avec plus d'une transaction applicative, ou vous travaillerez " +"avec des données périmées." + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "Considérez que les exceptions ne sont pas rattrapables." + +#. Tag: para +#: best_practices.xml:174 +#, no-c-format +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"Il s'agit plus d'une pratique obligatoire que d'une \"meilleure pratique\". " +"Quand une exception intervient, il faut faire un rollback de la " +"Transaction et fermer la Session. " +"Sinon, Hibernate ne peut garantir l'intégrité des états persistants en " +"mémoire. En particulier, n'utilisez pas Session.load() " +"pour déterminer si une instance avec un identifiant donné existe en base de " +"données, utilisez Session.get() ou un requête." + +#. Tag: term +#: best_practices.xml:184 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "Préférez le chargement tardif des associations." + +#. Tag: para +#: best_practices.xml:186 +#, no-c-format +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"Utilisez le chargement complet avec modération. Utilisez les proxies et les " +"collections chargées tardivement pour la plupart des associations vers des " +"classes qui ne sont pas susceptibles d'être complètement retenues dans le " +"cache de second niveau. Pour les assocations de classes en cache, où il y a " +"une extrêmement forte probabilité que l'élément soit en cache, désactivez " +"explicitement le chargement par jointures ouvertes en utilisant " +"outer-join=\"false\". Lorsqu'un chargement par jointure " +"ouverte est approprié pour un cas d'utilisation particulier, utilisez une " +"requête avec un left join fetch." + +#. Tag: term +#: best_practices.xml:196 +#, no-c-format +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"Utilisez le pattern d'une ouverture de session dans une vue, ou une phase d'assemblage disciplinée pour " +"éviter des problèmes avec des données non rapatriées." + +#. Tag: para +#: best_practices.xml:201 +#, no-c-format +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernate libère les développeurs de l'écriture fastidieuse des " +"objets de transfert de données (NdT : Data Transfer Objects) (DTO). Dans une architecture EJB traditionnelle, les DTOs ont deux " +"buts : premièrement, ils contournent le problème des \"entity bean\" qui ne " +"sont pas sérialisables ; deuxièmement, ils définissent implicitement une " +"phase d'assemblage où toutes les données utilisées par la vue sont " +"rapatriées et organisées dans les DTOs avant de retourner sous le contrôle " +"de la couche de présentation. Hibernate élimine le premier but. Pourtant, " +"vous aurez encore besoin d'une phase d'assemblage (pensez vos méthodes " +"métier comme ayant un contrat strict avec la couche de présentation à propos " +"de quelles données sont disponibles dans les objets détachés) à moins que " +"vous soyez préparés à garder le contexte de persistance (la session) ouvert " +"à travers tout le processus de rendu de la vue." + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "Pensez à abstraite votre logique métier d'Hibernate." + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"Cachez le mécanisme d'accès aux données (Hibernate) derrière une interface. " +"Combinez les patterns DAO et Thread Local " +"Session. Vous pouvez même avoir quelques classes persistées par " +"du JDBC pur, associées à Hibernate via un UserType (ce " +"conseil est valable pour des applications de taille respectables ; il n'est " +"pas valable pour une application avec cinq tables)." + +#. Tag: term +#: best_practices.xml:227 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "N'utilisez pas d'associations de mapping exotiques." + +#. Tag: para +#: best_practices.xml:229 +#, no-c-format +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"De bons cas d'utilisation pour de vraies associations plusieurs-vers-" +"plusieurs sont rares. La plupart du temps vous avez besoin d'informations " +"additionnelles stockées dans la table d'association. Dans ce cas, il est " +"préférable d'utiliser deux associations un-vers-plusieurs vers une classe de " +"liaisons intermédiaire. En fait, nous pensons que la plupart des " +"associations sont de type un-vers-plusieurs ou plusieurs-vers-un, vous devez " +"être très attentifs lorsque vous utilisez autre chose et vous demander si " +"c'est vraiment nécessaire." + +#. Tag: term +#: best_practices.xml:239 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "Préférez les associations bidirectionnelles." + +#. Tag: para +#: best_practices.xml:241 +#, no-c-format +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"Les associations unidirectionnelles sont plus difficiles à questionner. Dans " +"une grande application, la plupart des associations devraient être " +"navigables dans les deux directions dans les requêtes." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/collection_mapping.po b/documentation/envers/src/main/docbook/fr-FR/content/collection_mapping.po new file mode 100644 index 0000000000..a6137cc9f0 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/collection_mapping.po @@ -0,0 +1,1956 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:29 +#, no-c-format +msgid "Collection Mapping" +msgstr "Mapping des collections" + +#. Tag: title +#: collection_mapping.xml:32 +#, no-c-format +msgid "Persistent collections" +msgstr "Collections persistantes" + +#. Tag: para +#: collection_mapping.xml:34 +#, no-c-format +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"Hibernate requiert que les champs contenant des collections persistantes " +"soient déclarés comme des types d'interface, par exemple :" + +#. Tag: programlisting +#: collection_mapping.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:41 +#, no-c-format +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"L'interface réelle devrait être java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap ou ... n'importe quoi d'autre ! (Où " +"\"n'importe quoi d'autre\" signifie que vous devrez écrire une " +"implémentation de org.hibernate.usertype.UserCollectionType.)" + +#. Tag: para +#: collection_mapping.xml:50 +#, no-c-format +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"Notez comment nous avons initialisé les variables d'instance avec une " +"instance de HashSet. C'est le meilleur moyen pour " +"initialiser les collections d'instances nouvellement créées (non " +"persistantes). Quand nous fabriquons l'instance persistante - en appelant " +"persist(), par exemple - Hibernate remplacera réellement " +"le HashSet avec une instance d'une implémentation propre " +"à Hibernate de Set. Prenez garde aux erreurs :" + +#. Tag: programlisting +#: collection_mapping.xml:60 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:62 +#, no-c-format +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"Les collections persistantes injectées par Hibernate se comportent de la " +"même manière que HashMap, HashSet, " +"TreeMap, TreeSet ou " +"ArrayList, selon le type de l'interface." + +#. Tag: para +#: collection_mapping.xml:69 +#, no-c-format +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"Les instances des collections ont le comportement habituel des types des " +"valeurs. Elles sont automatiquement persistées quand elles sont référencées " +"par un objet persistant et automatiquement effacées quand elles sont " +"déréférencées. Si une collection est passée d'un objet persistant à un " +"autre, ses éléments pourraient être déplacés d'une table à une autre. Deux " +"entités ne peuvent pas partager une référence vers une même instance d'une " +"collection. Dû au modèle relationnel sous-jacent, les propriétés contenant " +"des collections ne supportent pas la sémantique de la valeur null ; " +"Hibernate ne distingue pas une référence vers une collection nulle d'une " +"collection vide." + +#. Tag: para +#: collection_mapping.xml:80 +#, no-c-format +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"Vous ne devriez pas vous préoccuper trop de ça. Utilisez les collections " +"persistantes de la même manière que vous utilisez des collections Java " +"ordinaires. Assurez-vous de comprendre la sémantique des associations " +"bidirectionnelles (traitée plus loin)." + +#. Tag: title +#: collection_mapping.xml:89 +#, no-c-format +msgid "Collection mappings" +msgstr "Mapper une collection" + +#. Tag: para +#: collection_mapping.xml:92 +#, no-c-format +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"Il y a pas mal de variétés de mappings qui peuvent être générés pour les " +"collections, couvrant beaucoup des modèles relationnels communs. Nous vous " +"suggérons d'expérimenter avec l'outil de génération de schéma pour avoir une " +"idée de comment traduire les différentes déclarations de mapping vers des " +"table de la base de données." + +#. Tag: para +#: collection_mapping.xml:99 +#, no-c-format +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"L'élément de mapping d'Hibernate utilisé pour mapper une collection dépend " +"du type de l'interface. Par exemple, un élément <set> est utilisé pour mapper des propriétés de type Set." + +#. Tag: programlisting +#: collection_mapping.xml:105 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:107 +#, no-c-format +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"À part <set>, il y aussi les éléments de mapping " +"<list>, <map>, " +"<bag>, <array> et " +"<primitive-array>. L'élément <map> est représentatif :" + +#. Tag: programlisting +#: collection_mapping.xml:132 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "name the collection property name" +msgstr "" +"name : le nom de la propriété contenant la collection" + +#. Tag: para +#: collection_mapping.xml:140 +#, no-c-format +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (optionnel - par défaut = nom de la propriété) : le " +"nom de la table de la collection (non utilisé pour les associations one-to-" +"many)" + +#. Tag: para +#: collection_mapping.xml:146 +#, no-c-format +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (optionnel) : le nom du schéma pour surcharger le " +"schéma déclaré dans l'élément racine" + +#. Tag: para +#: collection_mapping.xml:152 +#, no-c-format +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (optionnel - par défaut = true) : " +"peut être utilisé pour désactiver l'initialisation tardive et spécifier que " +"l'association est toujours rapportée, ou pour activer la récupération extra-" +"paresseuse (NdT : extra-lazy) où la plupart des opérations n'initialisent " +"pas la collection (approprié pour de très grosses collections)" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (optionnel - par défaut = false) : définit cette collection comme l'extrêmité \"inverse\" de " +"l'association bidirectionnelle" + +#. Tag: para +#: collection_mapping.xml:167 +#, no-c-format +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (optionnel - par défaut = none) : active les opérations de cascade vers les entités filles" + +#. Tag: para +#: collection_mapping.xml:173 +#, no-c-format +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort (optionnel) : spécifie une collection triée via un " +"ordre de tri naturel, ou via une classe comparateur " +"donnée (implémentant Comparator)" + +#. Tag: para +#: collection_mapping.xml:179 +#, no-c-format +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (optionnel, seulement à partir du JDK1.4) : " +"spécifie une colonne de table (ou des colonnes) qui définit l'ordre " +"d'itération de Map, Set ou Bag, avec " +"en option asc ou desc" + +#. Tag: para +#: collection_mapping.xml:186 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (optionnel) : spécifie une condition SQL arbitraire " +"WHERE à utiliser au chargement ou à la suppression d'une " +"collection (utile si la collection ne doit contenir qu'un sous ensemble des " +"données disponibles)" + +#. Tag: para +#: collection_mapping.xml:193 +#, no-c-format +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch (optionnel, par défaut = select) : à choisir entre récupération par jointures externes, " +"récupération par selects séquentiels, et récupération par sous-selects " +"séquentiels" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (optionnel, par défaut = 1) : une taille de batch (batch size) utilisée pour charger plusieurs " +"instances de cette collection en initialisation tardive" + +#. Tag: para +#: collection_mapping.xml:206 +#, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access (optionnel - par défaut = property) : La stratégie qu'Hibernate doit utiliser pour accéder à la valeur " +"de la propriété" + +#. Tag: para +#: collection_mapping.xml:212 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"optimistic-lock (optionnel - par défaut = true) : spécifie que changer l'état de la collection entraîne " +"l'incrémentation de la version appartenant à l'entité (Pour une association " +"un vers plusieurs, il est souvent raisonnable de désactiver ce paramètre)" + +#. Tag: para +#: collection_mapping.xml:220 +#, no-c-format +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable (optionnel - par défaut = true) : une valeur à false spécifie que les éléments " +"de la collection ne changent jamais (une optimisation mineure dans certains " +"cas)" + +#. Tag: title +#: collection_mapping.xml:230 +#, no-c-format +msgid "Collection foreign keys" +msgstr "Les clefs étrangères d'une collection" + +#. Tag: para +#: collection_mapping.xml:232 +#, no-c-format +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"Les instances d'une collection sont distinguées dans la base par la clef " +"étrangère de l'entité qui possède la collection. Cette clef étrangère est " +"référencée comme la(es) colonne(s) de la clef de la collection de la table de la collection. La colonne de la clef de la " +"collection est mappée par l'élément <key>." + +#. Tag: para +#: collection_mapping.xml:240 +#, no-c-format +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"Il peut y avoir une contrainte de nullité sur la colonne de la clef " +"étrangère. Pour les associations unidirectionnelles un vers plusieurs, la " +"colonne de la clef étrangère peut être nulle par défaut, donc vous pourriez " +"avoir besoin de spécifier not-null=\"true\"." + +#. Tag: programlisting +#: collection_mapping.xml:247 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:249 +#, no-c-format +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "" +"La contraite de la clef étrangère peut utiliser ON DELETE CASCADE." + +#. Tag: programlisting +#: collection_mapping.xml:253 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:255 +#, no-c-format +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "" +"Voir le chapitre précédent pour une définition complète de l'élément " +"<key>." + +#. Tag: title +#: collection_mapping.xml:263 +#, no-c-format +msgid "Collection elements" +msgstr "Les éléments d'une collection" + +#. Tag: para +#: collection_mapping.xml:265 +#, no-c-format +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"Les collections peuvent contenir la plupart des autres types Hibernate, dont " +"tous les types basiques, les types utilisateur, les composants, et bien sûr, " +"les références vers d'autres entités. C'est une distinction importante : un " +"objet dans une collection pourrait être géré avec une sémantique de \"valeur" +"\" (sa durée de vie dépend complètement du propriétaire de la collection) ou " +"il pourrait avoir une référence vers une autre entité, avec sa propre durée " +"de vie. Dans le dernier cas, seul le \"lien\" entre les 2 objets est " +"considéré être l'état retenu par la collection." + +#. Tag: para +#: collection_mapping.xml:274 +#, no-c-format +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"Le type contenu est référencé comme le type de l'élément de la " +"collection. Les éléments de la collections sont mappés par " +"<element> ou <composite-element>, ou dans le cas des références d'entité, avec <one-to-" +"many> ou <many-to-many>. Les deux " +"premiers mappent des éléments avec un sémantique de valeur, les deux " +"suivants sont utilisés pour mapper des associations d'entité." + +#. Tag: title +#: collection_mapping.xml:286 +#, no-c-format +msgid "Indexed collections" +msgstr "Collections indexées" + +#. Tag: para +#: collection_mapping.xml:288 +#, no-c-format +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"Tous les mappings de collection, exceptés ceux avec les sémantiques " +"d'ensemble (NdT : set) et de sac (NdT : bag), ont besoin d'une " +"colonne d'index dans la table de la collection - une " +"colonne qui mappe un index de tableau, ou un index de List, ou une clef de Map. L'index d'une Map peut être n'importe quel type basique, mappé avec <map-" +"key>, ça peut être une référence d'entité mappée avec " +"<map-key-many-to-many>, ou ça peut être un type " +"composé, mappé avec <composite-map-key>. L'index " +"d'un tableau ou d'une liste est toujours de type integer " +"et est mappé en utilisant l'élément <list-index>. " +"Les colonnes mappées contiennent des entiers séquentiels (numérotés à partir " +"de zéro par défaut)." + +#. Tag: sect2 +#: collection_mapping.xml:299 +#, no-c-format +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:380 +#, no-c-format +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"Si votre table n'a pas de colonne d'index, et que vous souhaitez tout de " +"même utiliser List comme type de propriété, vous devriez " +"mapper la propriété comme un <bag> Hibernate. Un " +"sac (NdT : bag) ne garde pas son ordre quand il est récupéré de la base de " +"données, mais il peut être optionnellement trié ou ordonné." + +#. Tag: title +#: collection_mapping.xml:390 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "Collections de valeurs et associations plusieurs-vers-plusieurs" + +#. Tag: para +#: collection_mapping.xml:392 +#, no-c-format +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "" +"N'importe quelle collection de valeurs ou association plusieurs-vers-" +"plusieurs requiert une table de collection avec une" +"(des) colonne(s) de clef étrangère, une(des) colonne(s) d'élément " +"de la collection ou des colonnes et possiblement une(des) colonne" +"(s) d'index." + +#. Tag: para +#: collection_mapping.xml:399 +#, no-c-format +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "" +"Pour une collection de valeurs, nous utilisons la balise <" +"element>." + +#. Tag: sect2 +#: collection_mapping.xml:401 +#, no-c-format +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:506 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "Quelques exemples, d'abord, un ensemble de chaînes de caractères :" + +#. Tag: programlisting +#: collection_mapping.xml:510 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:512 +#, no-c-format +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"Un bag contenant des entiers (avec un ordre d'itération déterminé par " +"l'attribut order-by) :" + +#. Tag: programlisting +#: collection_mapping.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:519 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "" +"Un tableau d'entités - dans ce cas, une association plusieurs-vers-" +"plusieurs :" + +#. Tag: programlisting +#: collection_mapping.xml:523 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:525 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "Une map de chaînes de caractères vers des dates :" + +#. Tag: programlisting +#: collection_mapping.xml:529 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:531 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "Une liste de composants (discute dans le prochain chapitre) :" + +#. Tag: programlisting +#: collection_mapping.xml:535 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:540 +#, no-c-format +msgid "One-to-many associations" +msgstr "Association un-vers-plusieurs" + +#. Tag: para +#: collection_mapping.xml:542 +#, no-c-format +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "" +"Une association un vers plusieurs lie les tables de " +"deux classes par une clef étrangère, sans l'intervention d'une table de " +"collection. Ce mapping perd certaines sémantiques des collections Java " +"normales :" + +#. Tag: para +#: collection_mapping.xml:550 +#, no-c-format +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "" +"Une instance de la classe de l'entité contenue ne peut pas appartenir à plus " +"d'une instance de la collection" + +#. Tag: para +#: collection_mapping.xml:556 +#, no-c-format +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"Une instance de la classe de l'entité contenue ne peut pas apparaître plus " +"plus d'une valeur d'index de la collection" + +#. Tag: para +#: collection_mapping.xml:563 +#, no-c-format +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "" +"Une association de Product vers Part " +"requiert l'existence d'une clef étrangère et possiblement une colonne " +"d'index pour la table Part. Une balise <one-" +"to-many> indique que c'est une association un vers plusieurs." + +#. Tag: programlisting +#: collection_mapping.xml:576 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "class (required): The name of the associated class." +msgstr "class (requis) : le nom de la classe associée" + +#. Tag: para +#: collection_mapping.xml:584 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (optionnel - par défaut exception) : spécifie comment les identifiants cachés qui référencent des " +"lignes manquantes seront gérés : ignore traitera une " +"ligne manquante comme une association nulle" + +#. Tag: para +#: collection_mapping.xml:591 +#, fuzzy, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (optionnel) : le nom de l'entité de la classe " +"associée, comme une alternative à class\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (optionnel) : le nom de l'entité de la classe " +"associée, comme une alternative à class." + +#. Tag: para +#: collection_mapping.xml:599 +#, no-c-format +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"Notez que l'élément <one-to-many> n'a pas besoin de " +"déclarer de colonnes. Il n'est pas non plus nécessaire de spécifier le nom " +"de la table nulle part." + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"Note très importante : si la colonne de la clef d'une " +"association <one-to-many> est déclarée NOT " +"NULL, vous devez déclarer le mapping de <key> avec not-null=\"true\" ou utiliser une " +"association bidirectionnelle avec le mapping de la collection " +"marqué inverse=\"true\". Voir la discussion sur les " +"associations bidirectionnelles plus tard dans ce chapitre." + +#. Tag: para +#: collection_mapping.xml:614 +#, no-c-format +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"Cet exemple montre une map d'entités Part par nom (où " +"partName est une propriété persistante de Part). Notez l'utilisation d'un index basé sur une formule." + +#. Tag: programlisting +#: collection_mapping.xml:620 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:626 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "Mappings de collection avancés" + +#. Tag: title +#: collection_mapping.xml:629 +#, no-c-format +msgid "Sorted collections" +msgstr "Collections triées" + +#. Tag: para +#: collection_mapping.xml:631 +#, no-c-format +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernate supporte des collections implémentant java.util." +"SortedMap et java.util.SortedSet. Vous devez " +"spécifier un comparateur dans le fichier de mapping :" + +#. Tag: programlisting +#: collection_mapping.xml:636 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:638 +#, no-c-format +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"Les valeurs permises pour l'attribut sort sont " +"unsorted, natural et le nom d'une " +"classe implémentant java.util.Comparator." + +#. Tag: para +#: collection_mapping.xml:644 +#, no-c-format +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"Les collections triées se comportent réellement comme java.util." +"TreeSet ou java.util.TreeMap." + +#. Tag: para +#: collection_mapping.xml:649 +#, no-c-format +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"Si vous voulez que la base de données elle-même ordonne les éléments de la " +"collection, utilisez l'attribut order-by des mappings " +"set, bag ou map. " +"Cette solution est seulement disponible à partir du JDK 1.4 (c'est " +"implémenté en utilisant LinkedHashSet ou " +"LinkedHashMap). Ceci exécute le tri dans la requête SQL, " +"pas en mémoire." + +#. Tag: programlisting +#: collection_mapping.xml:658 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"Notez que la valeur de l'attribut order-by est un ordre " +"SQL, pas un ordre HQL !" + +#. Tag: para +#: collection_mapping.xml:665 +#, no-c-format +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"Les associations peuvent même être triées sur des critères arbitraires à " +"l'exécution en utilisant un filter() de collection." + +#. Tag: programlisting +#: collection_mapping.xml:670 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:675 +#, no-c-format +msgid "Bidirectional associations" +msgstr "Associations bidirectionnelles" + +#. Tag: para +#: collection_mapping.xml:677 +#, fuzzy, no-c-format +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"Une association bidirectionnelle permet une navigation " +"à partir de la \"fin\" de l'association. Deux sortes d'associations " +"bidirectionnelles sont supportées : " + +#. Tag: term +#: collection_mapping.xml:684 +#, no-c-format +msgid "one-to-many" +msgstr "un-vers-plusieurs (NdT : one-to-many)" + +#. Tag: para +#: collection_mapping.xml:686 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "ensemble ou sac à une extrémité, une seule valeur à l'autre" + +#. Tag: term +#: collection_mapping.xml:692 +#, no-c-format +msgid "many-to-many" +msgstr "plusieurs-vers-plusieurs (NdT : many-to-many)" + +#. Tag: para +#: collection_mapping.xml:694 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "ensemble ou sac aux deux extrémités" + +#. Tag: para +#: collection_mapping.xml:703 +#, no-c-format +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"Vous pouvez spécifier une association plusieurs-vers-plusieurs " +"bidirectionnelle simplement en mappant deux associations plusieurs-vers-" +"plusieurs vers la même table de base de données et en déclarant une " +"extrémité comme inverse (celle de votre choix, mais ça " +"ne peut pas être une collection indexée)." + +#. Tag: para +#: collection_mapping.xml:710 +#, no-c-format +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"Voici un exemple d'association bidirectionnelle plusieurs-vers-plusieurs ; " +"chaque catégorie peut avoir plusieurs objets et chaque objet peut être dans " +"plusieurs catégories :" + +#. Tag: programlisting +#: collection_mapping.xml:715 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:717 +#, no-c-format +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"Les changements faits uniquement sur l'extréminté inverse de l'association " +"ne sont pas persistés. Ceci signifie qu'Hibernate a " +"deux représentations en mémoire pour chaque association bidirectionnelles, " +"un lien de A vers B et un autre de B vers A. C'est plus facile à comprendre " +"si vous pensez au modèle objet de Java et comment nous créons une relation " +"plusieurs-vers-plusieurs en Java :" + +#. Tag: programlisting +#: collection_mapping.xml:725 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:727 +#, no-c-format +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "" +"La partie non-inverse est utilisée pour sauvegarder la représentation en " +"mémoire dans la base de données." + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"Vous pouvez définir une association un-vers-plusieurs bidirectionnelle en " +"mappant une association un-vers-plusieurs vers la(es) même(s) colonne(s) de " +"table qu'une association plusieurs-vers-un et en déclarant l'extrémité pluri-" +"valuée inverse=\"true\"." + +#. Tag: programlisting +#: collection_mapping.xml:737 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:739 +#, no-c-format +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"Mapper une extrémité d'une association avec inverse=\"true\" n'affecte pas l'opération de cascades, ce sont des concepts " +"orthogonaux !" + +#. Tag: title +#: collection_mapping.xml:747 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "Associations bidirectionnelles avec des collections indexées" + +#. Tag: para +#: collection_mapping.xml:748 +#, no-c-format +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"Une association bidirectionnelle où une extrémité est représentée comme une " +"<list> ou une <map> " +"requiert une considération spéciale. Si il y a une propriété de la classe " +"enfant qui mappe la colonne de l'index, pas de problème, nous pouvons " +"continuer à utiliser inverse=\"true\" sur le mapping de " +"la collection :" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:757 +#, no-c-format +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"Mais, si il n'y a pas de telle prorpriété sur la classe enfant, nous ne " +"pouvons pas penser à l'association comme vraiment bidirectionnelle (il y a " +"des informations disponibles à une extrémité de l'association qui ne sont " +"pas disponibles à l'autre extrémité). Dans ce cas, nous ne pouvons pas " +"mapper la collection inverse=\"true\". À la place, nous " +"pourrions utiliser le mapping suivant :" + +#. Tag: programlisting +#: collection_mapping.xml:764 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:766 +#, no-c-format +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"Notez que dans ce mapping, l'extrémité de l'association contenant la " +"collection est responsable des mises à jour de la clef étrangère. À faire : " +"cela entraîne-t-il réellement des expressions updates inutiles ?" + +#. Tag: title +#: collection_mapping.xml:774 +#, no-c-format +msgid "Ternary associations" +msgstr "Associations ternaires" + +#. Tag: para +#: collection_mapping.xml:776 +#, no-c-format +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"Il y a trois approches possibles pour mapper une association ternaire. L'une " +"est d'utiliser une Map avec une association en tant " +"qu'index :" + +#. Tag: programlisting +#: collection_mapping.xml:781 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:783 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:785 +#, no-c-format +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"Une seconde approche est simplement de remodeler l'association comme une " +"classe d'entité. C'est l'approche la plus commune." + +#. Tag: para +#: collection_mapping.xml:790 +#, no-c-format +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "" +"Une alternative finale est d'utiliser des éléments composites, dont nous " +"discuterons plus tard." + +#. Tag: literal +#: collection_mapping.xml:797 +#, no-c-format +msgid "Using an <idbag>" +msgstr "Utiliser un <idbag>" + +#. Tag: para +#: collection_mapping.xml:799 +#, no-c-format +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"Si vous embrassez pleinement notre vue que les clefs composées sont une " +"mauvaise chose et que des entités devraient avoir des identifiants " +"artificiels (des clefs subrogées), alors vous pourriez trouver un peu " +"curieux que les associations plusieurs-vers-plusieurs et les collections de " +"valeurs que nous avons montré jusqu'ici mappent toutes des tables avec des " +"clefs composées ! Maintenant, ce point est assez discutable ; une table " +"d'association pure ne semble pas beaucoup bénéficier d'une clef subrogée " +"(bien qu'une collection de valeur composées le pourrait). Néanmoins, Hibernate fournit une foncionnalité qui vous permet " +"de mapper des associations plusieurs-vers-plusieurs et des collections de " +"valeurs vers une table avec une clef subrogée." + +#. Tag: para +#: collection_mapping.xml:810 +#, no-c-format +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"L'élément <idbag> vous laisse mapper une " +"List (ou une Collection) avec une " +"sémantique de sac." + +#. Tag: programlisting +#: collection_mapping.xml:815 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:817 +#, no-c-format +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"Comme vous pouvez voir, un <idbag> a un généréteur " +"d'id artificiel, comme une classe d'entité ! Une clef subrogée différente " +"est assignée à chaque ligne de la collection. Cependant, Hibernate ne " +"fournit pas de mécanisme pour découvrir la valeur d'une clef subrogée d'une " +"ligne particulière." + +#. Tag: para +#: collection_mapping.xml:824 +#, no-c-format +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"Notez que les performances de la mise à jour d'un <idbag> sont bien meilleures qu'un <bag>" +" ordinaire ! Hibernate peut localiser des lignes individuelles " +"efficacement et les mettre à jour ou les effacer individuellement, comme une " +"liste, une map ou un ensemble." + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"Dans l'implémentation actuelle, la stratégie de la génération de " +"l'identifiant native n'est pas supportée pour les " +"identifiants de collection <idbag>." + +#. Tag: title +#: collection_mapping.xml:855 +#, no-c-format +msgid "Collection examples" +msgstr "Exemples de collections" + +#. Tag: para +#: collection_mapping.xml:857 +#, no-c-format +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "" +"Les sections précédentes sont assez confuses. Donc prenons un exemple. Cette " +"classe :" + +#. Tag: programlisting +#: collection_mapping.xml:862 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:864 +#, no-c-format +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"a une collection d'instances de Child. Si chaque enfant a " +"au plus un parent, le mapping le plus naturel est une association un-vers-" +"plusieurs :" + +#. Tag: programlisting +#: collection_mapping.xml:870 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:872 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "Ceci mappe les définitions de tables suivantes :" + +#. Tag: programlisting +#: collection_mapping.xml:876 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:878 +#, no-c-format +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"Si le parent est requis, utilisez une association un-" +"vers-plusieurs unidirectionnelle :" + +#. Tag: programlisting +#: collection_mapping.xml:883 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:885 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "Notez la contrainte NOT NULL :" + +#. Tag: programlisting +#: collection_mapping.xml:889 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"Alternativement, si vous insistez absolument pour que cette association soit " +"unidirectionnelle, vous pouvez déclarer la contrainte NOT NULL sur le mapping <key> :" + +#. Tag: programlisting +#: collection_mapping.xml:897 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:899 +#, no-c-format +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "" +"D'un autre côté, si un enfant pouvait avoir plusieurs parent, une " +"association plusieurs-vers-plusieurs est plus appropriée :" + +#. Tag: programlisting +#: collection_mapping.xml:904 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:906 +#, no-c-format +msgid "Table definitions:" +msgstr "Définitions des tables :" + +#. Tag: programlisting +#: collection_mapping.xml:910 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:912 +#, no-c-format +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"Pour plus d'exemples et une revue complète du mapping de la relation parent/" +"enfant, voir see ." + +#. Tag: para +#: collection_mapping.xml:917 +#, no-c-format +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "" +"Des mappings d'association plus exotiques sont possibles, nous cataloguerons " +"toutes les possibilités dans le prochain chapitre." + +#~ msgid "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." +#~ msgstr "" +#~ "nom_de_colonne (requis) : le nom de la colonne " +#~ "contenant les valeurs de l'index de la collection" + +#~ msgid "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." +#~ msgstr "" +#~ "base (optionnel, par défaut = 0) : " +#~ "la valeur de la colonne de l'index qui correspond au premier élément de " +#~ "la liste ou du tableau" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." +#~ msgstr "" +#~ "column (optionnel) : le nom de la colonne contenant " +#~ "les valeurs de l'index de la collection" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." +#~ msgstr "" +#~ "formula (optionnel) : une formule SQL utilisée pour " +#~ "évaluer la clef de la map" + +#~ msgid "type (reguired): The type of the map keys." +#~ msgstr "type (reguis): le type des clefs de la map" + +#~ msgid "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." +#~ msgstr "" +#~ "column (optionnel) : le nom de la colonne de la clef " +#~ "étrangère pour les valeurs de l'index de la collection" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." +#~ msgstr "" +#~ "formula (optionnel) : une formulre SQL utilisée pour " +#~ "évaluer la clef étrangère de la clef de la map" + +#~ msgid "" +#~ "class (required): The entity class used as the map key." +#~ msgstr "" +#~ "class (requis): la classe de l'entité utilisée comme " +#~ "clef de la map" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." +#~ msgstr "" +#~ "column (optionnel) : le nom de la colonne contenant " +#~ "les valeurs de l'élément de la collection" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." +#~ msgstr "" +#~ "formula (optionnel) : une formule SQL utilisée pour " +#~ "évaluer l'élément" + +#~ msgid "" +#~ "type (required): The type of the collection element." +#~ msgstr "" +#~ "type (requis) : le type de l'élément de la collection" + +#~ msgid "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." +#~ msgstr "" +#~ "Une association plusieurs-vers-plusieurs est " +#~ "spécifiée en utilisant l'élément <many-to-many>." + +#~ msgid "" +#~ "column (optional): The name of the element foreign key " +#~ "column." +#~ msgstr "" +#~ "column (optionnel) : le nom de la colonne de la clef " +#~ "étrangère de l'élément" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." +#~ msgstr "" +#~ "formula (optionnel) : une formule SQL utilisée pour " +#~ "évaluer la valeur de la clef étrangère de l'élément" + +#~ msgid "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." +#~ msgstr "" +#~ "fetch (optionnel - par défaut join) : active les récupérations par jointures externes ou par " +#~ "selects séquentiels pour cette association. C'est un cas spécial ; pour " +#~ "une récupération complète sans attente (dans un seul SELECT) d'une entité et de ses relations plusieurs-vers-plusieurs vers " +#~ "d'autres entités, vous devriez activer la récupération join non seulement sur la collection elle-même, mais aussi avec cet " +#~ "attribut sur l'élément imbriqué <many-to-many>." + +#~ msgid "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." +#~ msgstr "" +#~ "unique (optionnel) : activer la génération DDL d'une " +#~ "contrainte d'unicité pour la colonne de la clef étrangère. Ça rend la " +#~ "pluralité de l'association effectivement un-vers-plusieurs." + +#~ msgid "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." +#~ msgstr "" +#~ "not-found (optionnel - par défaut exception) : spécifie comment les clefs étrangères qui référencent la " +#~ "lignes manquantes seront gérées : ignore traitera une " +#~ "ligne manquante comme une association nulle." + +#~ msgid "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." +#~ msgstr "" +#~ "property-ref (optionnel) : le nom d'une propriété de " +#~ "la classe associée qui est jointe à cette clef étrangère. Si non " +#~ "spécifiée, la clef primaire de la classe associée est utilisée." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/component_mapping.po b/documentation/envers/src/main/docbook/fr-FR/content/component_mapping.po new file mode 100644 index 0000000000..8832d05368 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/component_mapping.po @@ -0,0 +1,687 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: component_mapping.xml:29 +#, no-c-format +msgid "Component Mapping" +msgstr "Mapping de composants" + +#. Tag: para +#: component_mapping.xml:31 +#, no-c-format +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"La notion de composants est réutilisé dans différents " +"contextes, avec différents objectifs, à travers Hibernate." + +#. Tag: title +#: component_mapping.xml:37 +#, no-c-format +msgid "Dependent objects" +msgstr "Objects dépendants" + +#. Tag: para +#: component_mapping.xml:39 +#, no-c-format +msgid "" +"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 "" +"Le composant est un objet inclu dans un autre qui est sauvegardé comme une " +"valeur, et non pas comme une entité. Le composant fait référence à la notion " +"(au sens objet) de composition (et non pas de composant au sens " +"d'architecture de composants). Par exemple on pourrait modélisé l'objet " +"personne de cette façon:" + +#. Tag: programlisting +#: component_mapping.xml:45 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:47 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: component_mapping.xml:49 +#, no-c-format +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"Maintenant Name peut-être sauvegardé comme un composant " +"de Person. Remarquer que Name définit " +"des methodes d'accès et de modification pour ses propriétés persistantes, " +"mais il n'a pas besoin des interfaces ou des propriétés d'identification " +"( par exemple getId() ) qui sont propres aux entités." + +#. Tag: para +#: component_mapping.xml:56 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "Nous serions alors amené à mapper ce composant de cette façon:" + +#. Tag: programlisting +#: component_mapping.xml:60 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"La table person aurai les colonnes pid, " +"birthday, initial, first and last." + +#. Tag: para +#: component_mapping.xml:70 +#, no-c-format +msgid "" +"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 ad hoc. 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 "" +"Comme tous les types valeurs, les composants ne supportent pas les " +"références partagés. En d'autres mots, deux instances de person peuvent " +"avoir un même nom, mais ces noms sont indépendants, ils peuvent être " +"identiques si on les compare par valeur mais ils représentent deux objets " +"distincts en mémoire. La notion de nullité pour un composant est " +"ad hoc. Quand il recharge l'objet qui contient le " +"composant, Hibernate supposera que si tous les champs du composants sont " +"nuls alors le composant sera positionné à la valeur null. Ce choix " +"programmatif devrait être satisfaisant dans la plupart des cas." + +#. Tag: para +#: component_mapping.xml:79 +#, no-c-format +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"Les propriétés d'un composant peuvent être de tous les types qu'Hibernate " +"supporte habituellement (collections, many-to-one associations, autres " +"composants, etc). Les composants inclus ne doivent pas " +"être vus comme quelque chose d'exotique. Hibernate a été conçu pour " +"supporter un modèle objet très granulaire." + +#. Tag: para +#: component_mapping.xml:86 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"Le <component> peut inclure dans la liste de ses " +"propriétés une référence au <parent> conteneur." + +#. Tag: programlisting +#: component_mapping.xml:92 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:108 +#, no-c-format +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"Remarque: Si vous définissez un Set d'élément composite, " +"il est très important d'implémenter la méthode equals() " +"et hashCode() correctement." + +#. Tag: para +#: component_mapping.xml:114 +#, no-c-format +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 "" +"Les élements composite peuvent aussi contenir des composants mais pas des " +"collections. Si votre élément composite contient aussi des composants, " +"utilisez l'élément <nested-composite-element> . Une " +"collections de composants qui ccontiennent eux-mêmes des composants est un " +"cas très exotique. A ce stade demandez-vous si une association un-à-" +"plusieurs ne serait pas plus approprié. Essayez de re remodeler votre " +"élément composite comme une entité ( Dans ce cas même si le modèle Java est " +"le même la logique de persitence et de relation sont tout de même " +"différentes)" + +#. Tag: para +#: component_mapping.xml:126 +#, no-c-format +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"Remarque, le mapping d'éléments composites ne supporte pas la nullité des " +"propriétés lorsqu'on utilise un <set>. Hibernate " +"lorsqu'il supprime un objet utilise chaque colonne pour identifier un objet " +"(on ne peut pas utiliser des clés primaires distinctes dans une table " +"d'éléments composites), ce qui n'est pas possible avec des valeurs nulles. " +"Vous devez donc choisir d'interdire la nullité des propriétés d'un élément " +"composite ou choisir un autre type de collection comme : <" +"list>, <map>, <bag> ou <idbag>." + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"Un cas particulier d'élément composite est un élément composite qui inclut " +"un élément <many-to-one>. Un mapping comme celui-ci " +"vous permet d'associer les colonnes d'une table d'association plusieurs à " +"plusieurs (many-to-many) à la classse de l'élément composite. L'exemple " +"suivant est une association plusieurs à plusieurs de Order à Item à purchaseDate, " +"price et quantity sont des propriétés " +"de l'association." + +#. Tag: programlisting +#: component_mapping.xml:147 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:149 +#, no-c-format +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"Bien sûr, il ne peut pas y avoir de référence à l'achat (purchase) depuis " +"l'article (item), pour pouvoir naviguer de façon bidirectionnelle dans " +"l'association. N'oubliez pas que les composants sont de type valeurs et " +"n'autorise pas les références partagées." + +#. Tag: para +#: component_mapping.xml:157 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "Même les associations ternaires ou quaternaires sont possibles:" + +#. Tag: programlisting +#: component_mapping.xml:159 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:161 +#, no-c-format +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "" +"Les éléments composites peuvent apparaître dans les requêtes en utilisant la " +"même syntaxe que associations" + +#. Tag: title +#: component_mapping.xml:169 +#, no-c-format +msgid "Components as Map indices" +msgstr "Utiliser les composants comme index de map" + +#. Tag: para +#: component_mapping.xml:171 +#, no-c-format +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"l'élément <composite-map-key> vous permet " +"d'utiliser une classe de composant comme indice de Map. " +"Assurez-vous d'avoir surdéfini hashCode() et " +"equals() dans la classe du composant." + +#. Tag: title +#: component_mapping.xml:180 +#, no-c-format +msgid "Components as composite identifiers" +msgstr "Utiliser un composant comme identifiant" + +#. Tag: para +#: component_mapping.xml:182 +#, no-c-format +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"Vous pouvez utiliser un composant comme identifiant d'une entité. Mais pour " +"cela la classe du composant doit respecter certaines règles." + +#. Tag: para +#: component_mapping.xml:189 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "Elle doit implémenter java.io.Serializable." + +#. Tag: para +#: component_mapping.xml:194 +#, no-c-format +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"Elle doit redéfinir equals() et hashCode(), de façon cohérente avec le fait qu'elle définit une clé composite " +"dans la base de données." + +#. Tag: emphasis +#: component_mapping.xml:203 +#, no-c-format +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"Remarque: avec hibernate3, la seconde règle n'est plus absolument necessaire " +"mais faîtes le quand même." + +#. Tag: para +#: component_mapping.xml:207 +#, no-c-format +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"Vous ne pouvez pas utiliser de IdentifierGenerator pour " +"générer une clé composite, l'application devra définir elle même ses propres " +"identifiants." + +#. Tag: para +#: component_mapping.xml:212 +#, no-c-format +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"Utiliser l'élément <composite-id> (en incluant " +"l'élément <key-property>) à la place de l'habituel " +"déclaration <id>. Par exemple la classe " +"OrderLine qui dépend de la clé primaire (composite) de " +"Order." + +#. Tag: programlisting +#: component_mapping.xml:220 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:222 +#, no-c-format +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"Maintenant toutes clés étrangères référençant la table OrderLine devra aussi être composite. Vous devez en tenir compte lorsque vous " +"écrivez vos mapping d'association pour les autres classes. Une association à " +"OrderLine devrait être mappé de la façon suivante :" + +#. Tag: programlisting +#: component_mapping.xml:228 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:230 +#, no-c-format +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(Remarque: l'élément <column> est une alternative à " +"l'attribut column que l'on utilise partout.)" + +#. Tag: para +#: component_mapping.xml:235 +#, no-c-format +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"Une association plusieurs-à-plusieurs (many-to-many) à " +"OrderLine utilisera aussi une clé étrangère composite:" + +#. Tag: programlisting +#: component_mapping.xml:240 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:242 +#, no-c-format +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"La collection des OrderLines dans Order utilisera:" + +#. Tag: programlisting +#: component_mapping.xml:247 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:249 +#, no-c-format +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "" +"(L'élément <one-to-many>, comme d'habitude, ne " +"déclare pas de colonne.)" + +#. Tag: para +#: component_mapping.xml:253 +#, no-c-format +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "" +"Si OrderLine lui-même possède une collection, celle-ci " +"aura aussi une clé composite étrangère." + +#. Tag: programlisting +#: component_mapping.xml:258 +#, no-c-format +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:263 +#, no-c-format +msgid "Dynamic components" +msgstr "Composant Dynamique" + +#. Tag: para +#: component_mapping.xml:265 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "Vous pouvez même mapper une propriété de type Map:" + +#. Tag: programlisting +#: component_mapping.xml:269 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:271 +#, no-c-format +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"La sémantique de l'association à un <dynamic-component> est identique à celle que l'on utilise pour les composants. " +"L'avantage de ce type de mapping est qu'il pemet de déterminer les " +"véritables propriétés du bean au moment su déploiement en éditant simplement " +"le document de mapping. La manipulation du document de mapping pendant " +"l'execution de l'application est aussi possible en utilisant un parser DOM. " +"Il ya même mieux, vous pouvez accéder (et changer) le metamodel de " +"configuration d'hibernate en utilisant l'objet Configuration" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/configuration.po b/documentation/envers/src/main/docbook/fr-FR/content/configuration.po new file mode 100644 index 0000000000..3eee59ea9a --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/configuration.po @@ -0,0 +1,3976 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:29 +#, no-c-format +msgid "Configuration" +msgstr "Configuration" + +#. Tag: para +#: configuration.xml:31 +#, no-c-format +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"Parce qu'Hibernate est conçu pour fonctionner dans différents " +"environnements, il existe beaucoup de paramètres de configuration. " +"Heureusement, la plupart ont des valeurs par défaut appropriées et la " +"distribution d'Hibernate contient un exemple de fichier hibernate." +"properties dans le répertoire etc/ qui montre " +"les différentes options. Vous n'avez qu'à placer ce fichier dans votre " +"classpath et à l'adapter." + +#. Tag: title +#: configuration.xml:40 +#, no-c-format +msgid "Programmatic configuration" +msgstr "Configuration par programmation" + +#. Tag: para +#: configuration.xml:42 +#, fuzzy, no-c-format +msgid "" +"An instance of org.hibernate.cfg.Configuration " +"represents an entire set of mappings of an application's Java types to an " +"SQL database. The org.hibernate.cfg.Configuration is " +"used to build an (immutable) org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files." +msgstr "" +"Une instance de org.hibernate.cfg.Configuration " +"représente un ensemble de mappings des classes Java d'une application vers " +"la base de données SQL. La Configuration est utilisée " +"pour construire un objet (immuable) SessionFactory. Les " +"mappings sont constitués d'un ensemble de fichiers de mapping XML." + +#. Tag: para +#: configuration.xml:49 +#, fuzzy, no-c-format +msgid "" +"You may obtain a org.hibernate.cfg.Configuration " +"instance by instantiating it directly and specifying XML mapping documents. " +"If the mapping files are in the classpath, use addResource():" +msgstr "" +"Vous pouvez obtenir une instance de Configuration en " +"l'instanciant directement et en spécifiant la liste des documents XML de " +"mapping. Si les fichiers de mapping sont dans le classpath, vous pouvez le " +"faire à l'aide de la méthode addResource() :" + +#. Tag: programlisting +#: configuration.xml:55 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:57 +#, no-c-format +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"Une alternative (parfois meilleure) est de spécifier les classes mappées et " +"de laisser Hibernate trouver les documents de mapping pour vous :" + +#. Tag: programlisting +#: configuration.xml:62 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:64 +#, fuzzy, no-c-format +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"Hibernate va rechercher les fichiers de mappings /org/hibernate/" +"auction/Item.hbm.xml et /org/hibernate/auction/Bid.hbm." +"xml dans le classpath. Cette approche élimine les noms de fichiers " +"en dur." + +#. Tag: para +#: configuration.xml:70 +#, fuzzy, no-c-format +msgid "" +"A org.hibernate.cfg.Configuration also allows you to " +"specify configuration properties:" +msgstr "" +"Une Configuration vous permet également de préciser des " +"propriétés de configuration :" + +#. Tag: programlisting +#: configuration.xml:75 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:77 +#, no-c-format +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "" +"Ce n'est pas le seul moyen de passer des propriétés de configuration à " +"Hibernate. Les différentes options sont :" + +#. Tag: para +#: configuration.xml:84 +#, fuzzy, no-c-format +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"Passer une instance de java.util.Properties à " +"Configuration.setProperties()." + +#. Tag: para +#: configuration.xml:90 +#, fuzzy, no-c-format +msgid "" +"Place a file named hibernate.properties in a root " +"directory of the classpath." +msgstr "" +"Placer hibernate.properties dans un répertoire racine du " +"classpath" + +#. Tag: para +#: configuration.xml:95 +#, no-c-format +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"Positionner les propriétés System en utilisant " +"java -Dproperty=value." + +#. Tag: para +#: configuration.xml:100 +#, no-c-format +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"Inclure des éléments <property> dans le fichier " +"hibernate.cfg.xml (voir plus loin)." + +#. Tag: para +#: configuration.xml:107 +#, fuzzy, no-c-format +msgid "" +"hibernate.properties is the easiest approach if you " +"want to get started quickly." +msgstr "" +"L'utilisation d'hibernate.properties est l'approche la " +"plus simple si vous voulez démarrer rapidement" + +#. Tag: para +#: configuration.xml:111 +#, fuzzy, no-c-format +msgid "" +"The org.hibernate.cfg.Configuration is intended as a " +"startup-time object, to be discarded once a SessionFactory is created." +msgstr "" +"La Configuration est un objet de démarrage qui sera " +"supprimé une fois qu'une SessionFactory aura été créée." + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "Obtenir une SessionFactory" + +#. Tag: para +#: configuration.xml:121 +#, fuzzy, no-c-format +msgid "" +"When all mappings have been parsed by the org.hibernate.cfg." +"Configuration, the application must obtain a factory for " +"org.hibernate.Session instances. This factory " +"is intended to be shared by all application threads:" +msgstr "" +"Une fois que tous les mappings ont été parsés par la Configuration, l'application doit obtenir une fabrique d'instances de " +"Session. Cette fabrique sera partagée entre tous les " +"threads de l'application :" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, fuzzy, no-c-format +msgid "" +"Hibernate does allow your application to instantiate more than one " +"org.hibernate.SessionFactory. This is useful " +"if you are using more than one database." +msgstr "" +"Hibernate permet à votre application d'instancier plus d'une " +"SessionFactory. Cela est pratique lorsque vous utilisez " +"plus d'une base de données." + +#. Tag: title +#: configuration.xml:138 +#, no-c-format +msgid "JDBC connections" +msgstr "Connexions JDBC" + +#. Tag: para +#: configuration.xml:140 +#, fuzzy, no-c-format +msgid "" +"Usually, you want to have the org.hibernate.SessionFactory create and pool JDBC connections for you. If you take this " +"approach, opening a org.hibernate.Session is " +"as simple as:" +msgstr "" +"Habituellement, vous voulez que la SessionFactory crée " +"les connexions JDBC et les mette dans un pool pour vous. Si vous suivez " +"cette approche, ouvrir une Session est aussi simple que :" + +#. Tag: programlisting +#: configuration.xml:146 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:148 +#, no-c-format +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"Dès que vous ferez quelquechose qui requiert un accès à la base de données, " +"une connexion JDBC sera récupérée dans le pool." + +#. Tag: para +#: configuration.xml:153 +#, fuzzy, no-c-format +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now " +"describe the most important settings for JDBC connection configuration." +msgstr "" +"Pour faire cela, il faut passer les propriétés de la connexion JDBC à " +"Hibernate. Tous les noms des propriétés Hibernate et leur signification sont " +"définies dans la classe org.hibernate.cfg.Environment. " +"Nous allons maintenant décrire les paramètres de configuration des " +"connexions JDBC les plus importants." + +#. Tag: para +#: configuration.xml:159 +#, fuzzy, no-c-format +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"Hibernate obtiendra des connexions (et les mettra dans un pool) en utilisant " +"java.sql.DriverManager si vous positionnez les paramètres " +"de la manière suivante :" + +#. Tag: title +#: configuration.xml:165 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "Propriétés JDBC d'Hibernate" + +#. Tag: entry +#: configuration.xml:171 configuration.xml:257 configuration.xml:353 +#: configuration.xml:548 configuration.xml:743 configuration.xml:850 +#: configuration.xml:938 +#, fuzzy, no-c-format +msgid "Property name" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom d'une propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Nom de la propriété" + +#. Tag: entry +#: configuration.xml:172 configuration.xml:258 configuration.xml:354 +#: configuration.xml:549 configuration.xml:744 configuration.xml:851 +#: configuration.xml:939 +#, fuzzy, no-c-format +msgid "Purpose" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Fonction" + +#. Tag: property +#: configuration.xml:178 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: emphasis +#: configuration.xml:181 +#, no-c-format +msgid "JDBC driver class" +msgstr "Classe du driver jdbc" + +#. Tag: property +#: configuration.xml:186 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: emphasis +#: configuration.xml:189 +#, no-c-format +msgid "JDBC URL" +msgstr "URL jdbc" + +#. Tag: property +#: configuration.xml:194 configuration.xml:288 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: emphasis +#: configuration.xml:197 +#, no-c-format +msgid "database user" +msgstr "utilisateur de la base de données" + +#. Tag: property +#: configuration.xml:202 configuration.xml:296 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: emphasis +#: configuration.xml:205 +#, no-c-format +msgid "database user password" +msgstr "mot de passe de la base de données" + +#. Tag: property +#: configuration.xml:210 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#. Tag: emphasis +#: configuration.xml:213 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "nombre maximum de connexions dans le pool" + +#. Tag: para +#: configuration.xml:220 +#, fuzzy, no-c-format +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property " +"with connection pool specific settings. This will turn off Hibernate's " +"internal pool. For example, you might like to use C3P0." +msgstr "" +"L'algorithme natif de pool de connexions d'Hibernate est plutôt " +"rudimentaire. Il a été fait dans le but de vous aider à démarrer et " +"n'est pas prévu pour un système en production ou même " +"pour un test de peformance. Utilisez plutôt un pool tiers pour de meilleures " +"performances et une meilleure stabilité : pour cela, remplacez la propriété " +"hibernate.connection.pool_size avec les propriétés " +"spécifique au pool de connexions que vous avez choisi. Cela désactivera le " +"pool de connexions interne d'Hibernate. Vous pouvez par exemple utiliser " +"C3P0." + +#. Tag: para +#: configuration.xml:230 +#, fuzzy, no-c-format +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"org.hibernate.connection.C3P0ConnectionProvider for " +"connection pooling if you set hibernate.c3p0.* " +"properties. If you'd like to use Proxool refer to the packaged " +"hibernate.properties and the Hibernate web site for " +"more information." +msgstr "" +"C3P0 est un pool de connexions JDBC open source distribué avec Hibernate " +"dans le répertoire lib. Hibernate utilisera son provider " +"C3P0ConnectionProvider pour le pool de connexions si vous " +"positionnez les propriétés hibernate.c3p0.*. Si vous " +"voulez utiliser Proxool, référez vous au groupe de propriétés " +"d'hibernate.properties correspondant et regardez sur le " +"site web d'Hibernate pour plus d'informations." + +#. Tag: para +#: configuration.xml:238 +#, fuzzy, no-c-format +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "" +"Voici un exemple de fichier hibernate.properties pour " +"C3P0:" + +#. Tag: programlisting +#: configuration.xml:242 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:244 +#, fuzzy, no-c-format +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"javax.sql.Datasource registered in JNDI. " +"You'll need to set at least one of the following properties:" +msgstr "" +"Dans le cadre de l'utilisation au sein d'un serveur d'applications, vous " +"devriez quasiment toujours configurer Hibernate pour qu'il obtienne ses " +"connexions de la DataSource du serveur d'application " +"enregistrée dans le JNDI. Pour cela vous devrez définir au moins une des " +"propriétés suivantes :" + +#. Tag: title +#: configuration.xml:251 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "Propriété d'une Datasource Hibernate" + +#. Tag: property +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#. Tag: emphasis +#: configuration.xml:267 +#, no-c-format +msgid "datasource JNDI name" +msgstr "Nom JNDI de la datasource" + +#. Tag: property +#: configuration.xml:272 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#. Tag: entry +#: configuration.xml:274 +#, fuzzy, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "URL du fournisseur JNDI" + +#. Tag: property +#: configuration.xml:280 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:290 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:298 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:306 +#, fuzzy, no-c-format +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"Voici un exemple de fichier hibernate.properties pour " +"l'utilisation d'une datasource JNDI fournie par un serveur d'applications :" + +#. Tag: programlisting +#: configuration.xml:311 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:313 +#, no-c-format +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"Les connexions JDBC obtenues à partir d'une datasource JNDI participeront " +"automatiquement aux transactions gérées par le conteneur du serveur " +"d'applications." + +#. Tag: para +#: configuration.xml:318 +#, fuzzy, no-c-format +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the connection property name. " +"For example, you may specify a charSet connection " +"property using hibernate.connection.charSet." +msgstr "" +"Des propriétés supplémentaires de connexion peuvent être passées en " +"préfixant le nom de la propriété par \"hibernate.connnection\". Par exemple, vous pouvez spécifier un jeu de caractères en " +"utilisant hibernate.connection.charSet." + +#. Tag: para +#: configuration.xml:324 +#, fuzzy, no-c-format +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider, and specifying your custom " +"implementation via the hibernate.connection.provider_class property." +msgstr "" +"Vous pouvez fournir votre propre stratégie d'obtention des connexions JDBC " +"en implémentant l'interface org.hibernate.connection." +"ConnectionProvider. Vous pouvez sélectionner une implémentation " +"spécifique en positionnant hibernate.connection.provider_class." + +#. Tag: title +#: configuration.xml:333 +#, no-c-format +msgid "Optional configuration properties" +msgstr "Propriétés de configuration optionnelles" + +#. Tag: para +#: configuration.xml:335 +#, no-c-format +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"Il y a un certain nombre d'autres propriétés qui contrôlent le " +"fonctionnement d'Hibernate à l'exécution. Toutes sont optionnelles et ont " +"comme valeurs par défaut des valeurs \"raisonnables\" pour un fonctionnement " +"nominal." + +#. Tag: para +#: configuration.xml:340 +#, fuzzy, no-c-format +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"Attention : Certaines de ces propriétés sont uniquement de niveau " +"System. Les propriétés de niveau System ne peuvent être " +"positionnées que via la ligne de commande (java -Dproperty=value) ou être définies dans hibernate.properties. " +"Elle ne peuvent pas l'être via une des autres " +"techniques décrites ci-dessus." + +#. Tag: title +#: configuration.xml:347 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "Propriétés de configuration d'Hibernate" + +#. Tag: property +#: configuration.xml:360 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: configuration.xml:362 +#, fuzzy, no-c-format +msgid "" +"The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular " +"relational database." +msgstr "" +"Le nom de la classe du Hibernate. qui permet à Hibernate de " +"générer du SQL optimisé pour une base de données relationnelle particulière. " +"" + +#. Tag: para +#: configuration.xml:365 +#, fuzzy, no-c-format +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: para +#: configuration.xml:369 +#, no-c-format +msgid "" +"In most cases Hibernate will actually be able to chose the correct " +"org.hibernate.dialect.Dialect implementation to use " +"based on the JDBC metadata returned by the JDBC driver." +msgstr "" + +#. Tag: property +#: configuration.xml:378 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#. Tag: entry +#: configuration.xml:380 +#, fuzzy, no-c-format +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"Ecrit toutes les requêtes SQL sur la console. Il s'agit d'une alternative au " +"positionnement de la catégorie de log au niveau " +". " + +#. Tag: para +#: configuration.xml:384 configuration.xml:396 configuration.xml:490 +#: configuration.xml:503 configuration.xml:516 configuration.xml:529 +#: configuration.xml:583 configuration.xml:610 configuration.xml:623 +#: configuration.xml:678 configuration.xml:906 configuration.xml:921 +#: configuration.xml:1011 +#, fuzzy, no-c-format +msgid "" +"eg. true | " +"false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:392 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#. Tag: entry +#: configuration.xml:394 +#, fuzzy, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "" +"Formate et indente le sql dans la console et dans le log " + +#. Tag: property +#: configuration.xml:404 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#. Tag: entry +#: configuration.xml:406 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"Positionne dans le SQL généré un schéma/tablespace par défaut pour les noms " +"de table ne l'ayant pas surchargé. " + +#. Tag: para +#: configuration.xml:409 +#, fuzzy, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:417 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#. Tag: entry +#: configuration.xml:419 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" +"Qualifie les noms de tables non qualifiées avec ce catalogue dans le SQL " +"généré. " + +#. Tag: para +#: configuration.xml:422 +#, fuzzy, no-c-format +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:430 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#. Tag: entry +#: configuration.xml:432 +#, fuzzy, no-c-format +msgid "" +"The org.hibernate.SessionFactory will be " +"automatically bound to this name in JNDI after it has been created." +msgstr "" +"La sera automatiquement liée à ce nom dans le JNDI après sa " +"création. " + +#. Tag: para +#: configuration.xml:435 configuration.xml:877 +#, fuzzy, no-c-format +msgid "" +"eg. jndi/composite/name" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:443 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#. Tag: entry +#: configuration.xml:445 +#, fuzzy, no-c-format +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"Définit la profondeur maximale d'un arbre de chargement par jointures " +"ouvertes pour les associations à cardinalité unitaire (un-à-un, plusieurs-à-" +"un). Un désactive le chargement par jointure ouverte. " +"" + +#. Tag: para +#: configuration.xml:449 +#, no-c-format +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"ex. valeurs recommandées entre " +"0 et 3" + +#. Tag: property +#: configuration.xml:458 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#. Tag: entry +#: configuration.xml:460 +#, fuzzy, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "" +"Définit une taille par défaut pour le chargement par lot des associations " +"" + +#. Tag: para +#: configuration.xml:462 +#, no-c-format +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"ex. Valeurs recommandées : 4, 8, 16" + +#. Tag: property +#: configuration.xml:471 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#. Tag: entry +#: configuration.xml:473 +#, fuzzy, no-c-format +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +"Définit un mode de représentation par défaut des entités pour toutes les " +"sessions ouvertes depuis cette " + +#. Tag: para +#: configuration.xml:476 +#, no-c-format +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"dynamic-map, dom4j, pojo" + +#. Tag: property +#: configuration.xml:484 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#. Tag: entry +#: configuration.xml:486 +#, fuzzy, no-c-format +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"Force Hibernate à trier les updates SQL par la valeur de la clé primaire des " +"éléments qui sont mis à jour. Cela permet de limiter les deadlocks de " +"transaction dans les systèmes hautement concurents. " + +#. Tag: property +#: configuration.xml:498 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#. Tag: entry +#: configuration.xml:500 +#, fuzzy, no-c-format +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" +"Si activé, Hibernate va collecter des statistiques utiles pour le réglage " +"des performances. " + +#. Tag: property +#: configuration.xml:511 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#. Tag: entry +#: configuration.xml:513 +#, fuzzy, no-c-format +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"Si activé, les propriétés correspondant à l'identifiant des objets vont être " +"remises aux valeurs par défaut lorsque les objets seront supprimés. " +"" + +#. Tag: property +#: configuration.xml:524 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#. Tag: entry +#: configuration.xml:526 +#, fuzzy, no-c-format +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"Si activé, Hibernate va générer des commentaires à l'intérieur des requêtes " +"SQL pour faciliter le debogage., par défaut à . " + +#. Tag: title +#: configuration.xml:540 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "Propriétés Hibernate liées à JDBC et aux connexions" + +#. Tag: property +#: configuration.xml:555 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#. Tag: entry +#: configuration.xml:557 +#, fuzzy, no-c-format +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "" +"Une valeur non nulle détermine la taille de chargement des statements JDBC " +"(appelle )." + +#. Tag: property +#: configuration.xml:564 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#. Tag: entry +#: configuration.xml:566 +#, fuzzy, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" +"Une valeur non nulle active l'utilisation par Hibernate des mises à jour par " +"batch de JDBC2. " + +#. Tag: para +#: configuration.xml:568 +#, no-c-format +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"ex. les valeurs recommandées entre " +"5 et 30" + +#. Tag: property +#: configuration.xml:576 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#. Tag: entry +#: configuration.xml:578 +#, fuzzy, no-c-format +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"Paramétrez cette propriété à si votre pilote JDBC retourne " +"des row counts corrects depuis (il est souvent approprié " +"d'activer cette option). Hibernate utilisera alors le \"batched DML\" pour " +"versionner automatiquement les données. Par défaut = . " +"" + +#. Tag: property +#: configuration.xml:591 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#. Tag: entry +#: configuration.xml:593 +#, fuzzy, no-c-format +msgid "" +"Select a custom org.hibernate.jdbc.Batcher. " +"Most applications will not need this configuration property." +msgstr "" +"Sélectionne un personnalisé. La plupart des applications " +"n'auront pas besoin de cette propriété de configuration " + +#. Tag: para +#: configuration.xml:596 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:604 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#. Tag: entry +#: configuration.xml:606 +#, fuzzy, no-c-format +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"Active l'utilisation par Hibernate des resultsets scrollables de JDBC2. " +"Cette propriété est seulement nécessaire lorsque l'on utilise une connexion " +"JDBC fournie par l'utilisateur. Autrement, Hibernate utilise les métadonnées " +"de la connexion. " + +#. Tag: property +#: configuration.xml:618 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#. Tag: entry +#: configuration.xml:620 +#, fuzzy, no-c-format +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC. *system-level " +"property*" +msgstr "" +"Utilise des flux lorsque l'on écrit/lit des types ou " +" vers et à partir de JDBC (propriété de niveau système). " +"" + +#. Tag: property +#: configuration.xml:631 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#. Tag: entry +#: configuration.xml:633 +#, fuzzy, no-c-format +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"Active l'utilisation de de JDBC3 pour récupérer nativement " +"les clés générées après insertion. Nécessite un pilote JDBC3+, le mettre à " +"false si votre pilote a des problèmes avec les générateurs d'identifiant " +"Hibernate. Par défaut, essaie de déterminer les possibilités du pilote en " +"utilisant les meta données de connexion. " + +#. Tag: para +#: configuration.xml:639 configuration.xml:769 configuration.xml:781 +#: configuration.xml:795 configuration.xml:833 +#, fuzzy, no-c-format +msgid "eg. true|false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:647 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#. Tag: entry +#: configuration.xml:649 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom org.hibernate.connection." +"ConnectionProvider which provides JDBC connections to " +"Hibernate." +msgstr "" +"Le nom de la classe d'un personnalisé qui fournit des " +"connexions JDBC à Hibernate " + +#. Tag: para +#: configuration.xml:652 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:660 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#. Tag: entry +#: configuration.xml:662 +#, fuzzy, no-c-format +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most " +"databases do not support all isolation levels and some define additional, " +"non-standard isolations." +msgstr "" +"Définit le niveau d'isolation des transactions JDBC. Regardez pour connaître le sens des différentes valeurs mais notez également que la " +"plupart des bases de données ne supportent pas tous les niveaux d'isolation. " +"" + +#. Tag: para +#: configuration.xml:666 +#, fuzzy, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: property +#: configuration.xml:674 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#. Tag: entry +#: configuration.xml:676 +#, fuzzy, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"Active le mode de commit automatique (autocommit) pour les connexions JDBC " +"du pool (non recommandé). " + +#. Tag: property +#: configuration.xml:686 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#. Tag: entry +#: configuration.xml:688 +#, fuzzy, no-c-format +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"Spécifie à quel moment Hibernate doit relacher les connexion JDBC. Par " +"défaut une connexion JDBC est conservée jusqu'à ce que la session soit " +"explicitement fermée ou déconnectée. Pour une source de données JTA d'un " +"serveur d'application, vous devriez utiliser pour libérer " +"les connexions de manière plus agressive après chaque appel JDBC. Pour une " +"connexion non JTA, il est souvent préférable de libérer la connexion à la " +"fin de chaque transaction en utilisant . " +"choisira pour des transactions JTA et CMT et pour des transactions JDBC. " + +#. Tag: para +#: configuration.xml:699 +#, fuzzy, no-c-format +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"ex.on_close " +"(default) | after_transaction | after_statement | auto" + +#. Tag: para +#: configuration.xml:704 +#, fuzzy, no-c-format +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See " + +#. Tag: entry +#: configuration.xml:715 +#, no-c-format +msgid "" +"hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:718 +#, no-c-format +msgid "" +"Pass the JDBC property <propertyName> to " +"DriverManager.getConnection()." +msgstr "" + +#. Tag: entry +#: configuration.xml:724 +#, no-c-format +msgid "" +"hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:727 +#, no-c-format +msgid "" +"Pass the property <propertyName> to the JNDI " +"InitialContextFactory." +msgstr "" + +#. Tag: title +#: configuration.xml:737 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "Propriétés du Cache d'Hibernate" + +#. Tag: literal +#: configuration.xml:750 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#. Tag: entry +#: configuration.xml:752 +#, fuzzy, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "Le nom de classe d'un spécifique. " + +#. Tag: para +#: configuration.xml:754 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:762 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#. Tag: entry +#: configuration.xml:764 +#, fuzzy, no-c-format +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"Optimise le cache de second niveau en minimisant les écritures, au prix de " +"plus de lectures. Ce paramètre est surtout utile pour les caches en cluster " +"et est activé par défaut dans hibernate3 pour les implémentations de cache " +"en cluster. " + +#. Tag: literal +#: configuration.xml:777 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#. Tag: entry +#: configuration.xml:779 +#, fuzzy, no-c-format +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "" +"Activer le cache de requête, les requêtes individuelles doivent tout de même " +"être déclarées comme pouvant être mise en cache. " + +#. Tag: literal +#: configuration.xml:789 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#. Tag: entry +#: configuration.xml:791 +#, fuzzy, no-c-format +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"Peut être utilisé pour désactiver complètement le cache de second niveau qui " +"est activé par défaut pour les classes qui spécifient un élément " +" dans leur mapping. " + +#. Tag: literal +#: configuration.xml:803 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#. Tag: entry +#: configuration.xml:805 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"Le nom de classe d'une interface , par défaut = built-in " +". " + +#. Tag: para +#: configuration.xml:808 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:816 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#. Tag: entry +#: configuration.xml:818 +#, fuzzy, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "" +"Un préfixe à utiliser pour le nom des régions du cache de second niveau. " +"" + +#. Tag: para +#: configuration.xml:820 +#, fuzzy, no-c-format +msgid "eg. prefix" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:828 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#. Tag: entry +#: configuration.xml:830 +#, fuzzy, no-c-format +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "" +"Force Hibernate à stocker les données dans le cache de second niveau dans un " +"format plus adapté à la visualisation par un humain. " + +#. Tag: title +#: configuration.xml:844 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "Propriétés des transactions Hibernate" + +#. Tag: literal +#: configuration.xml:857 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#. Tag: entry +#: configuration.xml:859 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"Le nom de classe d'une qui sera utilisée par l'API " +" d'Hibernate (la valeur par défaut est ). " +"" + +#. Tag: para +#: configuration.xml:863 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:871 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#. Tag: entry +#: configuration.xml:873 +#, fuzzy, no-c-format +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"Le nom JNDI utilisé par la pour obtenir la " +"JTA du serveur d'applications. " + +#. Tag: literal +#: configuration.xml:885 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#: configuration.xml:887 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +"Le nom de la classe du - requis lorsque le cache de niveau " +"JVM est activé ou lorsque l'on utilise un générateur hilo dans un " +"environnement JTA. " + +#. Tag: para +#: configuration.xml:891 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:899 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#. Tag: entry +#: configuration.xml:901 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"Si activé, la session sera automatiquement vidée durant la phase qui précède " +"la fin de la transaction (before completion). La gestion automatique de " +"contexte fourni par Hibernate est recommandée, voir . " + +#. Tag: literal +#: configuration.xml:914 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#. Tag: entry +#: configuration.xml:916 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"Si activé, la session sera automatiquement fermé pendant la phase qui suit " +"la fin de la transaction (after completion). La gestion automatique de " +"contexte fourni par Hibernate est recommandée, voir " + +#. Tag: title +#: configuration.xml:932 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "Propriétés diverses" + +#. Tag: literal +#: configuration.xml:945 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#. Tag: entry +#: configuration.xml:947 +#, fuzzy, no-c-format +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"Fournit une stratégie particulière pour contextualiser la " +"courante. Voir pour plus " +"d'informations sur les stratégies fournies. " + +#. Tag: para +#: configuration.xml:952 +#, fuzzy, no-c-format +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"eg.jta | " +"thread | custom.Class" + +#. Tag: literal +#: configuration.xml:961 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#. Tag: entry +#: configuration.xml:963 +#, fuzzy, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "Choisi l'implémentation du parseur de requête " + +#. Tag: para +#: configuration.xml:965 +#, fuzzy, no-c-format +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"ex.org.hibernate.hql.ast." +"ASTQueryTranslatorFactory ou org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#. Tag: literal +#: configuration.xml:974 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#. Tag: entry +#: configuration.xml:976 +#, fuzzy, no-c-format +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"Lien entre les tokens de requêtes Hibernate et les tokens SQL (les tokens " +"peuvent être des fonctions ou des noms littéraux par exemple). " + +#. Tag: para +#: configuration.xml:979 +#, fuzzy, no-c-format +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:987 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#. Tag: entry +#: configuration.xml:989 +#, fuzzy, no-c-format +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +"Valide ou exporte automatiquement le schéma DDL vers la base de données " +"lorsque la est créée. La valeur permet de " +"supprimer le schéma de base de données lorsque la est " +"fermée explicitement. " + +#. Tag: para +#: configuration.xml:995 +#, fuzzy, no-c-format +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"ex.validate | " +"update | create | create-" +"drop" + +#. Tag: literal +#: configuration.xml:1004 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#: configuration.xml:1006 +#, fuzzy, no-c-format +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"Active l'utilisation de CGLIB à la place de la réflexion à l'exécution " +"(Propriété de niveau système). La réflexion peut parfois être utile pour " +"résoudre des problèmes. Notez qu'Hibernate a tout de même toujours besoin de " +"CGLIB même si l'optimiseur est désactivé. Cette optimisation ne peut être " +"définie que dans le fichier . " + +#. Tag: title +#: configuration.xml:1022 +#, no-c-format +msgid "SQL Dialects" +msgstr "Dialectes SQL" + +#. Tag: para +#: configuration.xml:1024 +#, no-c-format +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"Vous devriez toujours positionner la propriété hibernate.dialect à la sous-classe de org.hibernate.dialect.Dialect appropriée à votre base de données. Si vous spécifiez un dialecte, " +"Hibernate utilisera des valeurs adaptées pour certaines autres propriétés " +"listées ci-dessus, vous évitant l'effort de le faire à la main." + +#. Tag: title +#: configuration.xml:1032 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Dialectes SQL d'Hibernate (hibernate.dialect)" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "RDBMS" +msgstr "SGBD" + +#. Tag: entry +#: configuration.xml:1041 +#, fuzzy, no-c-format +msgid "Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Dialect\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Dialecte" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "MySQL" +msgstr "MySQL" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "MySQL with InnoDB" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "MySQL with MyISAM" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Oracle (any version)" +msgstr "Oracle (any version)" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Sybase" +msgstr "Sybase" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "SAP DB" +msgstr "SAP DB" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Informix" +msgstr "Informix" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Ingres" +msgstr "Ingres" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#. Tag: entry +#: configuration.xml:1094 +#, no-c-format +msgid "Progress" +msgstr "Progress" + +#. Tag: literal +#: configuration.xml:1094 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#. Tag: entry +#: configuration.xml:1097 +#, no-c-format +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#. Tag: literal +#: configuration.xml:1097 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#. Tag: entry +#: configuration.xml:1100 +#, no-c-format +msgid "Interbase" +msgstr "Interbase" + +#. Tag: literal +#: configuration.xml:1100 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#. Tag: entry +#: configuration.xml:1103 +#, no-c-format +msgid "Pointbase" +msgstr "Pointbase" + +#. Tag: literal +#: configuration.xml:1103 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#. Tag: entry +#: configuration.xml:1106 +#, no-c-format +msgid "FrontBase" +msgstr "FrontBase" + +#. Tag: literal +#: configuration.xml:1106 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#. Tag: entry +#: configuration.xml:1109 +#, no-c-format +msgid "Firebird" +msgstr "Firebird" + +#. Tag: literal +#: configuration.xml:1109 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#. Tag: title +#: configuration.xml:1118 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "Chargement par Jointure Ouverte" + +#. Tag: para +#: configuration.xml:1120 +#, no-c-format +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"Si votre base de données supporte les outer joins de type ANSI, Oracle ou " +"Sybase, le chargement par jointure ouverte devrait " +"améliorer les performances en limitant le nombre d'aller-retour avec la base " +"de données (la base de données effectuant donc potentiellement plus de " +"travail). Le chargement par jointure ouverte permet à un graphe entier " +"d'objets connectés par une relation plusieurs-à-un, un-à-plusieurs ou un-à-" +"un d'être chargé en un seul SELECT SQL." + +#. Tag: para +#: configuration.xml:1129 +#, no-c-format +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"Le chargement par jointure ouverte peut être désactiver " +"globalement en mettant la propriété hibernate." +"max_fetch_depth à 0. Une valeur de 1 ou plus active le chargement par jointure ouverte pour les " +"associatiosn un-à-un et plusieurs-à-un qui ont été mappée avec " +"fetch=\"join\"." + +#. Tag: para +#: configuration.xml:1137 +#, no-c-format +msgid "See for more information." +msgstr "" +"Reportez vous à pour plus " +"d'information." + +#. Tag: title +#: configuration.xml:1144 +#, no-c-format +msgid "Binary Streams" +msgstr "Flux binaires" + +#. Tag: para +#: configuration.xml:1146 +#, no-c-format +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"Oracle limite la taille d'un tableau de byte qui peuvent " +"être passées à et vers son pilote JDBC. Si vous souhaitez utiliser des " +"instances larges de type binary ou serializable, vous devez activer la propriété hibernate.jdbc." +"use_streams_for_binary. C'est une fonctionalité de " +"niveau système uniquement." + +#. Tag: title +#: configuration.xml:1157 +#, no-c-format +msgid "Second-level and query cache" +msgstr "Cache de second niveau et cache de requêtes" + +#. Tag: para +#: configuration.xml:1159 +#, no-c-format +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"Les propriétés préfixées par hibernate.cache vous " +"permettent d'utiliser un système de cache de second niveau. Ce cache peut " +"avoir une portée dans le processus ou même être utilisable dans un système " +"distribué. Référez vous au chapitre " +"pour plus de détails." + +#. Tag: title +#: configuration.xml:1169 +#, no-c-format +msgid "Query Language Substitution" +msgstr "Substitution dans le langage de requêtage" + +#. Tag: para +#: configuration.xml:1171 +#, no-c-format +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"Vous pouvez définir de nouveaux tokens dans les requêtes Hibernate en " +"utilisant la propriété hibernate.query.substitutions. Par " +"exemple :" + +#. Tag: programlisting +#: configuration.xml:1176 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions vrai=1, faux=0" + +#. Tag: para +#: configuration.xml:1178 +#, no-c-format +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"remplacerait les tokens vrai et faux " +"par des entiers dans le SQL généré." + +#. Tag: programlisting +#: configuration.xml:1183 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#. Tag: para +#: configuration.xml:1185 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "" +"permettrait de renommer la fonction SQL LOWER en " +"toLowercase" + +#. Tag: title +#: configuration.xml:1192 +#, no-c-format +msgid "Hibernate statistics" +msgstr "Statistiques Hibernate" + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"Si vous activez hibernate.generate_statistics, Hibernate " +"va fournir un certains nombre de métriques utiles pour régler les " +"performances d'une application qui tourne via SessionFactory." +"getStatistics(). Hibernate peut aussi être configuré pour exposer " +"ces statistiques via JMX. Lisez les Javadoc des interfaces dans le package " +"org.hibernate.stats pour plus d'informations." + +#. Tag: title +#: configuration.xml:1206 +#, no-c-format +msgid "Logging" +msgstr "Tracer" + +#. Tag: para +#: configuration.xml:1208 +#, no-c-format +msgid "" +"Hibernate utilizes Simple Logging " +"Facade for Java (SLF4J) in order to log various system events. SLF4J " +"can direct your logging output to several logging frameworks (NOP, Simple, " +"log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your chosen " +"binding. In order to setup logging properly you will need slf4j-" +"api.jar in your classpath together with the jar file for your " +"preferred binding - slf4j-log4j12.jar in the case of " +"Log4J. See the SLF4J documentation for more detail. To use Log4j you will also need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" + +#. Tag: para +#: configuration.xml:1219 +#, no-c-format +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"Nous vous recommandons fortement de vous familiariser avec les messages des " +"traces d'Hibernate. Beaucoup de soins a été apporté pour donner le plus de " +"détails possible sans les rendre illisibles. C'est un outil essentiel en cas " +"de soucis. Les catégories de trace les plus intéressantes sont les " +"suivantes :" + +#. Tag: title +#: configuration.xml:1228 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "Catégories de trace d'Hibernate" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Category" +msgstr "Catégorie" + +#. Tag: entry +#: configuration.xml:1235 +#, no-c-format +msgid "Function" +msgstr "Fonction" + +#. Tag: literal +#: configuration.xml:1240 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#. Tag: entry +#: configuration.xml:1241 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "" +"Trace toutes les requêts SQL de type DML (gestion des données) qui sont " +"exécutées" + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "Trace tous les paramètres JDBC" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "" +"Trace toutes les requêts SQL de type DDL (gestion de la structure de la " +"base) qui sont exécutées" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "" +"Trace l'état de toutes les entités (20 entités maximum) qui sont associées " +"avec la session hibernate au moment du flush" + +#. Tag: literal +#: configuration.xml:1259 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#. Tag: entry +#: configuration.xml:1260 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "Trace toute l'activité du cache de second niveau" + +#. Tag: literal +#: configuration.xml:1263 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#. Tag: entry +#: configuration.xml:1264 +#, no-c-format +msgid "Log transaction related activity" +msgstr "Trace toute l'activité relative aux transactions" + +#. Tag: literal +#: configuration.xml:1267 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#. Tag: entry +#: configuration.xml:1268 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "Trace toute acquisition de ressource JDBC" + +#. Tag: literal +#: configuration.xml:1271 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.ast.AST" + +#. Tag: entry +#: configuration.xml:1272 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "" +"Trace l'arbre syntaxique des requêtes HQL et SQL durant l'analyse syntaxique " +"des requêtes" + +#. Tag: literal +#: configuration.xml:1277 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#. Tag: entry +#: configuration.xml:1278 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "Trace toutes les demandes d'autorisation JAAS" + +#. Tag: literal +#: configuration.xml:1281 +#, no-c-format +msgid "org.hibernate" +msgstr "org.hibernate" + +#. Tag: entry +#: configuration.xml:1282 +#, no-c-format +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "" +"Trace tout (beaucoupe d'informations, mais très utile pour résoudre les " +"problèmes)." + +#. Tag: para +#: configuration.xml:1291 +#, no-c-format +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"Lorsque vous développez des applications avec Hibernate, vous devriez " +"quasiment toujours travailler avec le niveau debug activé " +"pour la catégorie org.hibernate.SQL, ou sinon avec la " +"propriété hibernate.show_sql activée." + +#. Tag: title +#: configuration.xml:1301 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "Implémenter une NamingStrategy" + +#. Tag: para +#: configuration.xml:1303 +#, no-c-format +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"L'interface org.hibernate.cfg.NamingStrategy vous permet " +"de spécifier une \"stratégie de nommage\" des objets et éléments de la base " +"de données." + +#. Tag: para +#: configuration.xml:1308 +#, no-c-format +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"Vous pouvez fournir des règles pour automatiquement générer les identifiants " +"de base de données à partir des identifiants Java, ou transformer une " +"colonne ou table \"logique\" donnée dans le fichier de mapping en une " +"colonne ou table \"physique\". Cette fonctionnalité aide à réduire la " +"verbosité de documents de mapping, en éliminant le bruit répétitif (les " +"préfixes TBL_ par exemple). La stratégie par défaut " +"utilisée par Hibernate est minimale." + +#. Tag: para +#: configuration.xml:1317 +#, no-c-format +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"Vous pouvez définir une stratégie différente en appelant " +"Configuration.setNamingStrategy() avant d'ajouter des " +"mappings :" + +#. Tag: programlisting +#: configuration.xml:1322 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1324 +#, no-c-format +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"net.sf.hibernate.cfg.ImprovedNamingStrategy est une " +"stratégie fournie qui peut être utile comme point de départ de quelques " +"applications." + +#. Tag: title +#: configuration.xml:1332 +#, no-c-format +msgid "XML configuration file" +msgstr "Fichier de configuration XML" + +#. Tag: para +#: configuration.xml:1334 +#, no-c-format +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"Une approche alternative est de spécifier toute la configuration dans un " +"fichier nommé hibernate.cfg.xml. Ce fichier peut être " +"utilisé à la place du fichier hibernate.properties, voire " +"même peut servir à surcharger les propriétés si les deux fichiers sont " +"présents." + +#. Tag: para +#: configuration.xml:1341 +#, no-c-format +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"Le fichier de configuration XML doit par défaut se placer à la racine du " +"CLASSPATH. En voici un exemple :" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"Commme vous pouvez le voir, l'avantage de cette approche est " +"l'externalisation des noms des fichiers de mapping de la configuration. Le " +"fichier hibernate.cfg.xml est également plus pratique " +"quand on commence à régler le cache d'Hibernate. Notez que vous pouvez " +"choisir entre utiliser hibernate.properties ou " +"hibernate.cfg.xml, les deux sont équivalents, sauf en ce " +"qui concerne les bénéfices de l'utilisation de la syntaxe XML mentionnés ci-" +"dessus." + +#. Tag: para +#: configuration.xml:1357 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "" +"Avec la configuration XML, démarrer Hibernate devient donc aussi simple que " +"ceci :" + +#. Tag: programlisting +#: configuration.xml:1361 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1363 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "You can pick a different XML configuration file using" + +#. Tag: programlisting +#: configuration.xml:1367 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: configuration.xml:1372 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "Intégration à un serveur d'application J2EE" + +#. Tag: para +#: configuration.xml:1374 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "" +"Hibernate possède les points suivants d'intégration à l'infrastructure J2EE :" + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"Source de données gérée par le conteneur : Hibernate " +"peut utiliser des connexions JDBC gérées par le conteneur et fournie par " +"l'intermédiaire de JNDI. Souvent, un TransactionManager " +"compatible JTA et un ResourceManager s'occupent de la " +"gestion des transactions (CMT). Ils sont particulièrement prévus pour " +"pouvoir gérer des transactions distribuées sur plusieurs sources de données. " +"Vous pouvez bien sûr également définir vos limites de transaction dans votre " +"programme (BMT) ou vous pouvez sinon aussi utiliser l'API optionnelle " +"Transaction d'Hibernate qui vous garantira la portabilité " +"de votre code entre plusieurs serveurs d'application." + +#. Tag: para +#: configuration.xml:1395 +#, no-c-format +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"Association JNDI automatique: Hibernate peut associer " +"sa SessionFactory à JNDI après le démarrage." + +#. Tag: para +#: configuration.xml:1404 +#, no-c-format +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"Association de la Session à JTA: La Session Hibernate peut être associée automatiquement à une transaction JTA " +"si vous utilisez les EJBs. Vous avez juste à récupérer la " +"SessionFactory depuis JNDI et à récupérer la " +"Session courante. Hibernate s'occupe de vider et fermer " +"la Session lorsque le transaction JTA se termine. La " +"démarcation des transactions se fait de manière déclarative dans les " +"descripteurs de déploiement." + +#. Tag: para +#: configuration.xml:1417 +#, no-c-format +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"Déploiement JMX :Si vous avez un serveur d'application " +"compatible JMX (JBoss AS par exemple), vous pouvez choisir de déployer " +"Hibernate en temps que MBean géré par le serveur. Cela vous évite de coder " +"la ligne de démarrage qui permet de construire la SessionFactory depuis la Configuration. Le conteneur va " +"démarrer votre HibernateService, et va idéalement " +"s'occuper des dépendances entre les services (la source de données doit être " +"disponible avant qu'Hibernate ne démarre, etc)." + +#. Tag: para +#: configuration.xml:1428 +#, no-c-format +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"En fonction de votre environnement, vous devrez peut être mettre l'option de " +"configuration hibernate.connection.aggressive_release à " +"vrai si le serveur d'application affiche des exceptions de type \"connection " +"containment\"." + +#. Tag: title +#: configuration.xml:1435 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "Configuration de la stratégie transactionnelle" + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"L'API de la Session Hibernate est indépendante de tout " +"système de démarcation des transactions qui peut être présent dans votre " +"architecture. Si vous laissez Hibernate utiliser l'API JDBC directement via " +"un pool de connexion, vous devrez commencer et terminer vos transactions en " +"utilisant l'API JDBC. Si votre application tourne à l'intérieur d'un serveur " +"d'application J2EE, vous voudrez peut être utiliser les transactions gérées " +"par les beans (BMT) et appeller l'API JTA et UserTransaction lorsque cela est nécessaire." + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"Pour conserver votre code portable entre ces deux environnements (et " +"d'autres éventuels) nous vous recommandons d'utiliser l'API optionnelle " +"Transaction d'Hibernate, qui va encapsuler et masquer le " +"système de transaction sous-jacent. Pour cela, vous devez préciser une " +"classe de fabrique d'instances de Transaction en " +"positionnant la propriété hibernate.transaction.factory_class." + +#. Tag: para +#: configuration.xml:1452 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "Il existe trois choix standards (fournis) :" + +#. Tag: literal +#: configuration.xml:1458 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "net.sf.hibernate.transaction.JDBCTransactionFactory" + +#. Tag: para +#: configuration.xml:1460 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "" +"délègue aux transactions de la base de données (JDBC). Valeur par défaut." + +#. Tag: literal +#: configuration.xml:1464 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"délègue à CMT si une transaction existante est sous ce contexte (ex: méthode " +"d'un EJB session), sinon une nouvelle transaction est entamée et une " +"transaction gérée par le bean est utilisée." + +#. Tag: literal +#: configuration.xml:1474 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#. Tag: para +#: configuration.xml:1476 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "délègue à aux transactions JTA gérées par le conteneur" + +#. Tag: para +#: configuration.xml:1481 +#, no-c-format +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "" +"Vous pouvez également définir votre propre stratégie transactionnelle (pour " +"un service de transaction CORBA par exemple)." + +#. Tag: para +#: configuration.xml:1486 +#, no-c-format +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Certaines fonctionnalités d'Hibernate (i.e. le cache de second niveau, " +"l'association automatique des Session à JTA, etc.) nécessitent l'accès au " +"TransactionManager JTA dans un environnement \"managé\". " +"Dans un serveur d'application, vous devez indiquer comment Hibernate peut " +"obtenir une référence vers le TransactionManager, car " +"J2EE ne fournit pas un seul mécanisme standard." + +#. Tag: title +#: configuration.xml:1494 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "TransactionManagers JTA" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "Transaction Factory" +msgstr "Fabrique de Transaction" + +#. Tag: entry +#: configuration.xml:1501 +#, no-c-format +msgid "Application Server" +msgstr "Serveur d'application" + +#. Tag: literal +#: configuration.xml:1506 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1507 +#, no-c-format +msgid "JBoss" +msgstr "JBoss" + +#. Tag: literal +#: configuration.xml:1510 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1511 +#, no-c-format +msgid "Weblogic" +msgstr "Weblogic" + +#. Tag: literal +#: configuration.xml:1514 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1515 +#, no-c-format +msgid "WebSphere" +msgstr "WebSphere" + +#. Tag: literal +#: configuration.xml:1518 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#. Tag: entry +#: configuration.xml:1519 +#, no-c-format +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#. Tag: literal +#: configuration.xml:1522 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1523 +#, no-c-format +msgid "Orion" +msgstr "Orion" + +#. Tag: literal +#: configuration.xml:1526 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1527 +#, no-c-format +msgid "Resin" +msgstr "Resin" + +#. Tag: literal +#: configuration.xml:1530 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1531 +#, no-c-format +msgid "JOTM" +msgstr "JOTM" + +#. Tag: literal +#: configuration.xml:1534 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1535 +#, no-c-format +msgid "JOnAS" +msgstr "JOnAS" + +#. Tag: literal +#: configuration.xml:1538 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1539 +#, no-c-format +msgid "JRun4" +msgstr "JRun4" + +#. Tag: literal +#: configuration.xml:1542 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1543 +#, no-c-format +msgid "Borland ES" +msgstr "Borland ES" + +#. Tag: title +#: configuration.xml:1552 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "SessionFactory associée au JNDI" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"Une SessionFactory Hibernate associée au JNDI peut " +"simplifier l'accès à la fabrique et donc la création de nouvelles " +"Sessions. Notez que cela n'est pas lié avec les " +"Datasource associées au JNDI, elles utilisent juste le " +"même registre." + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"Si vous désirez associer la SessionFactory à un nom JNDI, " +"spécifiez un nom (ex. java:hibernate/SessionFactory) en " +"utilisant la propriété hibernate.session_factory_name. Si " +"cette propriété est omise, la SessionFactory ne sera pas " +"associée au JNDI (c'est particulièrement pratique dans les environnements " +"ayant une implémentation de JNDI en lecture seule, comme c'est le cas pour " +"Tomcat)." + +#. Tag: para +#: configuration.xml:1569 +#, no-c-format +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"Lorsqu'il associe la SessionFactory au JNDI, Hibernate " +"utilisera les valeurs de hibernate.jndi.url, " +"hibernate.jndi.class pour instancier un contexte " +"d'initialisation. S'ils ne sont pas spécifiés, l'InitialContext par défaut sera utilisé." + +#. Tag: para +#: configuration.xml:1576 +#, no-c-format +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"Hibernate va automatiquement placer la SessionFactory " +"dans JNDI après avoir appelé cfg.buildSessionFactory(). " +"Cela signifie que vous devez avoir cet appel dans un code de démarrage (ou " +"dans une classe utilitaire) dans votre application sauf si vous utilisez le " +"déploiement JMX avec le service HibernateService présenté " +"plus tard dans ce document." + +#. Tag: para +#: configuration.xml:1583 +#, no-c-format +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"Si vous utilisez SessionFactory JNDI, un EJB ou n'importe " +"quelle autre classe peut obtenir la SessionFactory en " +"utilisant un lookup JNDI." + +#. Tag: para +#: configuration.xml:1588 +#, no-c-format +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"Nous recommandons que vous liiez la SessionFactory à JNDI " +"dans les environnements managés et que vous utilisiez un singleton " +"static si ce n'est pas le cas. Pour isoler votre " +"application de ces détails, nous vous recommandons aussi de masquer le code " +"de lookup actuel pour une SessionFactory dans une classe " +"helper, comme HibernateUtil.getSessionFactory(). Notez " +"qu'une telle classe est aussi un moyen efficace de démarrer Hibernate—" +"voir chapitre 1." + +#. Tag: title +#: configuration.xml:1600 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "Association automatique de la Session à JTA" + +#. Tag: para +#: configuration.xml:1602 +#, no-c-format +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"Le moyen le plus simple de gérer les Sessions et " +"transactions est la gestion automatique de session \"courante\" offerte par " +"Hibernate. Voir détail à current sessions. En utilisant le contexte de session " +"\"jta\" session context, s'il n'y a pas de Session associée à la transaction JTA courante, une session sera démarrée " +"et associée à la transaction JTA courante la première fois que vous appelez " +"sessionFactory.getCurrentSession(). Les Sessions obtenue via getCurrentSession() dans une " +"contexte \"jta\" seront automatiquement flushées avant la " +"validation de la transaction, fermées une fois la transaction complétée, et " +"libéreront les connexions JDBC de manière aggressive après chaque statement. " +"Ceci permet aux Sessions d'être gérées par le cycle de " +"vie de la transaction JTA à la quelle est sont associées, laissant le code " +"de l'utilisateur propre de ce type de gestion. Votre code peut soit utiliser " +"JTA de manière programmatique via UserTransaction, ou (ce " +"qui est recommandé pour la portabilité du code) utiliser l'API " +"Transaction API pour marquer les limites. Si vous " +"exécutez sous un conteneur EJB, la démarcation déclarative des transactions " +"avec CMT est recommandée." + +#. Tag: title +#: configuration.xml:1625 +#, no-c-format +msgid "JMX deployment" +msgstr "Déploiement JMX" + +#. Tag: para +#: configuration.xml:1627 +#, no-c-format +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"La ligne cfg.buildSessionFactory() doit toujours être " +"exécutée quelque part pour avoir une SessionFactory dans " +"JNDI. Vous pouvez faire cela dans un bloc d'initialisation static (comme celui qui se trouve dans la classe HibernateUtil) ou vous pouvez déployer Hibernate en temps que service " +"managé." + +#. Tag: para +#: configuration.xml:1635 +#, no-c-format +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"Hibernate est distribué avec org.hibernate.jmx.HibernateService pour le déploiement sur un serveur d'application avec le support de " +"JMX comme JBoss AS. Le déploiement et la configuration sont spécifiques à " +"chaque vendeur. Voici un fichier jboss-service.xml " +"d'exemple pour JBoss 4.0.x:" + +#. Tag: programlisting +#: configuration.xml:1642 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1644 +#, no-c-format +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"Ce fichier est déployé dans un répertoire META-INF et est " +"packagé dans un fichier JAR avec l'extension .sar " +"(service archive). Vous devez également packager Hibernate, les librairies " +"tierces requises, vos classes persistantes compilées et vos fichiers de " +"mapping dans la même archive. Vos beans entreprise (souvent des EJBs " +"session) peuvent rester dans leur propre fichier JAR mais vous pouvez " +"inclure ce fichier JAR dans le jar principal du service pour avoir une seule " +"unité déployable à chaud. Vous pouvez consulter la documentation de JBoss AS " +"pour plus d'information sur les services JMX et le déploiement des EJBs." + +#~ msgid "Hibernate logs various events using Apache commons-logging." +#~ msgstr "" +#~ "Hibernate trace divers évènements en utilisant Apache commons-logging." + +#~ msgid "" +#~ "The commons-logging service will direct output to either Apache Log4j (if " +#~ "you include log4j.jar in your classpath) or JDK1.4 " +#~ "logging (if running under JDK1.4 or above). You may download Log4j from " +#~ "http://jakarta.apache.org. To use Log4j you will need " +#~ "to place a log4j.properties file in your classpath, an " +#~ "example properties file is distributed with Hibernate in the src/" +#~ " directory." +#~ msgstr "" +#~ "Le service commons-logging délèguera directement à Apache Log4j (si vous " +#~ "incluez log4j.jar dans votre classpath) ou le système " +#~ "de trace du JDK 1.4 (si vous tournez sous le JDK 1.4 et supérieur). Vous " +#~ "pouvez télécharger Log4j à partir de http://jakarta.apache.org. Pour utiliser Log4j, vous devrez placer dans votre classpath un " +#~ "fichier log4j.properties. Un exemple de fichier est " +#~ "distribué avec Hibernate dans le répertoire src/." + +#~ msgid " (optional)" +#~ msgstr " (optionnelle)" + +#~ msgid "InitialContextFactory" +#~ msgstr "InitialContextFactory" + +#~ msgid "class of the JNDI " +#~ msgstr "Classe de l' du JNDI" + +#, fuzzy +#~ msgid "eg." +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "eg.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "eg.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "ex." + +#~ msgid "full.classname.of.Dialect" +#~ msgstr "nom.complet.de.ma.classe.de.Dialect" + +#~ msgid "debug" +#~ msgstr "debug" + +#~ msgid "SCHEMA_NAME" +#~ msgstr "MON_SCHEMA" + +#~ msgid "CATALOG_NAME" +#~ msgstr "CATALOG_NAME" + +#~ msgid "SessionFactory" +#~ msgstr "SessionFactory" + +#, fuzzy +#~ msgid "jndi/composite/name" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "jndi/nom/hierarchique\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "jndi/nom/compose" + +#~ msgid "0" +#~ msgstr "0" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "Statement.setFetchSize()" +#~ msgstr "Statement.setFetchSize()" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "executeBatch()" +#~ msgstr "executeBatch()" + +#~ msgid "Batcher" +#~ msgstr "Batcher" + +#~ msgid "classname.of.BatcherFactory" +#~ msgstr "classname.of.BatcherFactory" + +#~ msgid "binary" +#~ msgstr "binary" + +#~ msgid "serializable" +#~ msgstr "serializable" + +#~ msgid "PreparedStatement.getGeneratedKeys()" +#~ msgstr "PreparedStatement.getGeneratedKeys()" + +#~ msgid "true|false" +#~ msgstr "true|false" + +#~ msgid "ConnectionProvider" +#~ msgstr "ConnectionProvider" + +#~ msgid "classname.of.ConnectionProvider" +#~ msgstr "classname.of.ConnectionProvider" + +#~ msgid "java.sql.Connection" +#~ msgstr "java.sql.Connection" + +#~ msgid "1, 2, 4, 8" +#~ msgstr "1, 2, 4, 8" + +#~ msgid "after_statement" +#~ msgstr "after_statement" + +#~ msgid "after_transaction" +#~ msgstr "after_transaction" + +#~ msgid "auto" +#~ msgstr "auto" + +#~ msgid "hibernate.connection." +#~ msgstr "hibernate.connection." + +#, fuzzy +#~ msgid "<propertyName>" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "<propertyName>\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "<propertyName>\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "<propertyName>\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName" + +#~ msgid "DriverManager.getConnection()" +#~ msgstr "DriverManager.getConnection()" + +#~ msgid "Pass the JDBC property to ." +#~ msgstr "Passe la propriété JDBC à ." + +#~ msgid "hibernate.jndi." +#~ msgstr "hibernate.jndi." + +#~ msgid "Pass the property to the JNDI ." +#~ msgstr "Passe la propriété à l' de JNDI." + +#~ msgid "CacheProvider" +#~ msgstr "CacheProvider" + +#~ msgid "classname.of.CacheProvider" +#~ msgstr "nom.de.classe.du.CacheProvider" + +#~ msgid "<cache>" +#~ msgstr "<cache>" + +#~ msgid "QueryCache" +#~ msgstr "QueryCacheFactory" + +#~ msgid "StandardQueryCache" +#~ msgstr "StandardQueryCacheFactory" + +#~ msgid "classname.of.QueryCache" +#~ msgstr "nom.de.la.classe.de.QueryCacheFactory" + +#~ msgid "prefix" +#~ msgstr "prefix" + +#~ msgid "TransactionFactory" +#~ msgstr "TransactionFactory" + +#~ msgid "Transaction" +#~ msgstr "Transaction" + +#~ msgid "JDBCTransactionFactory" +#~ msgstr "JDBCTransactionFactory" + +#~ msgid "classname.of.TransactionFactory" +#~ msgstr "nom.de.classe.d.une.TransactionFactory" + +#~ msgid "JTATransactionFactory" +#~ msgstr "JTATransactionFactory" + +#~ msgid "UserTransaction" +#~ msgstr "UserTransaction" + +#~ msgid "TransactionManagerLookup" +#~ msgstr "TransactionManagerLookup" + +#~ msgid "classname.of.TransactionManagerLookup" +#~ msgstr "nom.de.classe.du.TransactionManagerLookup" + +#~ msgid "Session" +#~ msgstr "Session" + +#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" + +#~ msgid "create-drop" +#~ msgstr "create-drop" + +#~ msgid "hibernate.cfg.xml" +#~ msgstr "hibernate.cfg.xml" + +#~ msgid "DB2" +#~ msgstr "DB2" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/events.po b/documentation/envers/src/main/docbook/fr-FR/content/events.po new file mode 100644 index 0000000000..0169f78807 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/events.po @@ -0,0 +1,480 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:29 +#, no-c-format +msgid "Interceptors and events" +msgstr "Les intercepteurs et les événements" + +#. Tag: para +#: events.xml:31 +#, no-c-format +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"Il est souvent utile pour l'application de réagir à certains événements qui " +"surviennent dans Hibernate. Cela autorise l'implémentation de certaines " +"sortes de fonctionnalités génériques, et d'extensions de fonctionnalités " +"d'Hibernate." + +#. Tag: title +#: events.xml:38 +#, no-c-format +msgid "Interceptors" +msgstr "Intercepteurs" + +#. Tag: para +#: events.xml:40 +#, no-c-format +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"L'interface Interceptor fournit des \"callbacks\" de la " +"session vers l'application et permettent à l'application de consulter et/ou " +"de manipuler des propriétés d'un objet persistant avant qu'il soit " +"sauvegardé, mis à jour, supprimé ou chargé. Une utilisation possible de " +"cette fonctionnalité est de tracer l'accès à l'information. Par exemple, " +"l'Interceptor suivant positionne " +"createTimestamp quand un Auditable est " +"créé et met à jour la propriété lastUpdateTimestamp quand " +"un Auditable est mis à jour." + +#. Tag: para +#: events.xml:51 +#, no-c-format +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"Vous pouvez soit implémenter Interceptor directement ou " +"(mieux) étendre EmptyInterceptor." + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:58 +#, no-c-format +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." + +#. Tag: programlisting +#: events.xml:69 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:71 +#, no-c-format +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." + +#. Tag: programlisting +#: events.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: events.xml:85 +#, no-c-format +msgid "Event system" +msgstr "Système d'événements" + +#. Tag: para +#: events.xml:87 +#, no-c-format +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"Si vous devez réagir à des événements particuliers dans votre couche de " +"persistance, vous pouvez aussi utiliser l'architecture " +"d'événements d'Hibernate3. Le système d'événements peut " +"être utilisé en supplément ou en remplacement des interceptors." + +#. Tag: para +#: events.xml:93 +#, no-c-format +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"Essentiellement toutes les méthodes de l'interface Session sont corrélées à un événement. Vous avez un LoadEvent, un FlushEvent, etc (consultez la DTD du fichier " +"de configuration XML ou le paquet org.hibernate.event " +"pour avoir la liste complète des types d'événement définis). Quand une " +"requête est faite à partir d'une de ces méthodes, la Session Hibernate génère un événement approprié et le passe au listener " +"configuré pour ce type. Par défaut, ces listeners implémentent le même " +"traitement dans lequel ces méthodes aboutissent toujours. Cependant, vous " +"êtes libre d'implémenter une version personnalisée d'une de ces interfaces " +"de listener (c'est-à-dire, le LoadEvent est traité par " +"l'implémentation de l'interface LoadEventListener " +"déclarée), dans quel cas leur implémentation devrait être responsable du " +"traitement des requêtes load() faites par la " +"Session." + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"Les listeners devraient effectivement être considérés comme des singletons ; " +"dans le sens où ils sont partagés entre des requêtes, et donc ne devraient " +"pas sauvegarder des états de variables d'instance." + +#. Tag: para +#: events.xml:113 +#, no-c-format +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"Un listener personnalisé devrait implémenter l'interface appropriée pour " +"l'événement qu'il veut traiter et/ou étendre une des classes de base (ou " +"même l'événement prêt à l'emploi utilisé par Hibernate comme ceux déclarés " +"non-finaux à cette intention). Les listeners personnalisés peuvent être soit " +"inscrits par programmation à travers l'objet Configuration, ou spécifiés la configuration XML d'Hibernate (la configuration " +"déclarative à travers le fichier de propriétés n'est pas supportée). Voici " +"un exemple de listener personnalisé pour l'événement de chargement :" + +#. Tag: programlisting +#: events.xml:123 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:125 +#, no-c-format +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "" +"Vous avez aussi besoin d'une entrée de configuration disant à Hibernate " +"d'utiliser ce listener en plus du listener par défaut :" + +#. Tag: programlisting +#: events.xml:130 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:132 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "Vous pouvez aussi l'inscrire par programmation :" + +#. Tag: programlisting +#: events.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:138 +#, no-c-format +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"Les listeners inscrits déclarativement ne peuvent pas partager d'instances. " +"Si le même nom de classe est utilisée dans plusieurs éléments <" +"listener/>, chaque référence sera une instance distincte de " +"cette classe. Si vous avez besoin de la faculté de partager des instances de " +"listener entre plusieurs types de listener, vous devez utiliser l'approche " +"d'inscription par programmation." + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"Pourquoi implémenter une interface et définir le type spécifique durant la " +"configuration ? Une implémentation de listener pourrait implémenter " +"plusieurs interfaces de listener d'événements. Avoir en plus le type défini " +"durant l'inscription rend plus facile l'activation ou la désactivation " +"pendant la configuration." + +#. Tag: title +#: events.xml:156 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "Sécurité déclarative d'Hibernate" + +#. Tag: para +#: events.xml:157 +#, no-c-format +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"Généralement, la sécurité déclarative dans les applications Hibernate est " +"gérée dans la couche de session. Maintenant, Hibernate3 permet à certaines " +"actions d'être approuvées via JACC, et autorisées via JAAS. Cette " +"fonctionnalité optionnelle est construite au dessus de l'architecture " +"d'événements." + +#. Tag: para +#: events.xml:163 +#, no-c-format +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"D'abord, vous devez configurer les listeners d'événements appropriés pour " +"permettre l'utilisation d'autorisations JAAS." + +#. Tag: programlisting +#: events.xml:168 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:170 +#, no-c-format +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"Notez que <listener type=\"...\" class=\"...\"/> " +"est juste un raccourci pour <event type=\"...\"><listener " +"class=\"...\"/></event> quand il y a exactement un " +"listener pour un type d'événement particulier." + +#. Tag: para +#: events.xml:176 +#, no-c-format +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"Ensuite, toujours dans hibernate.cfg.xml, lier les " +"permissions aux rôles :" + +#. Tag: programlisting +#: events.xml:180 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:182 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "Les noms de rôle sont les rôles compris par votre fournisseur JAAC." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/example_mappings.po b/documentation/envers/src/main/docbook/fr-FR/content/example_mappings.po new file mode 100644 index 0000000000..09063dc70b --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/example_mappings.po @@ -0,0 +1,795 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_mappings.xml:29 +#, no-c-format +msgid "Example: Various Mappings" +msgstr "Exemple : quelques mappings" + +#. Tag: para +#: example_mappings.xml:31 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "Ce chapitre montre quelques mappings plus complexes." + +#. Tag: title +#: example_mappings.xml:36 +#, no-c-format +msgid "Employer/Employee" +msgstr "Employeur/Employé (Employer/Employee)" + +#. Tag: para +#: example_mappings.xml:38 +#, no-c-format +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"Le modèle suivant de relation entre Employer et " +"Employee utilise une vraie classe entité " +"(Employment) pour représenter l'association. On a fait " +"cela parce 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 +#: example_mappings.xml:55 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "Voici un document de mapping possible :" + +#. Tag: programlisting +#: example_mappings.xml:59 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:61 +#, no-c-format +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "" +"Et voici le schéma des tables générées par SchemaExport." + +#. Tag: programlisting +#: example_mappings.xml:65 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:70 +#, no-c-format +msgid "Author/Work" +msgstr "Auteur/Travail (Author/Work)" + +#. Tag: para +#: example_mappings.xml:72 +#, no-c-format +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"Soit le modèle de la relation entre Work, " +"Author et Person. Nous représentons la " +"relation entre Work et Author comme " +"une association plusieurs-vers-plusieurs. Nous avons choisi de représenter " +"la relation entre Author et Person " +"comme une association un-vers-un. Une autre possibilité aurait été que " +"Author hérite de Person." + +#. Tag: para +#: example_mappings.xml:90 +#, no-c-format +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "Le mapping suivant représente exactement ces relations :" + +#. Tag: programlisting +#: example_mappings.xml:94 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:96 +#, no-c-format +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"Il y a quatre tables dans ce mapping. works, " +"authors et persons qui contiennent " +"respectivement les données de work, author et person. author_work est une table d'association qui lie authors à works. Voici le " +"schéma de tables, généré par SchemaExport." + +#. Tag: programlisting +#: example_mappings.xml:104 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:109 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "Client/Commande/Produit (Customer/Order/Product)" + +#. Tag: para +#: example_mappings.xml:111 +#, no-c-format +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"Imaginons maintenant le modèle de relation entre Customer, Order, LineItem et " +"Product. Il y a une association un-vers-plusieurs entre " +"Customer et Order, mais comment " +"devrions nous représenter Order / LineItem / Product? J'ai choisi de mapper " +"LineItem comme une classe d'association représentant " +"l'association plusieurs-vers-plusieurs entre Order et " +"Product. Dans Hibernate, on appelle cela un élément " +"composite." + +#. Tag: para +#: example_mappings.xml:131 +#, no-c-format +msgid "The mapping document:" +msgstr "Le document de mapping :" + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:137 +#, no-c-format +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers, orders, " +"line_items et products contiennent les " +"données de customer, order, order line item et product. line_items est aussi la table d'association liant orders à products." + +#. Tag: programlisting +#: example_mappings.xml:144 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:149 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "Divers mappings d'exemple" + +#. Tag: para +#: example_mappings.xml:151 +#, no-c-format +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"Ces exemples sont tous pris de la suite de tests d'Hibernate. Vous en " +"trouverez beaucoup d'autres. Regardez dans le dossier test de la distribution d'Hibernate." + +#. Tag: para +#: example_mappings.xml:157 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "TODO: put words around this stuff" + +#. Tag: title +#: example_mappings.xml:160 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "\"Typed\" one-to-one association" + +#. Tag: programlisting +#: example_mappings.xml:161 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:165 +#, no-c-format +msgid "Composite key example" +msgstr "Exemple de clef composée" + +#. Tag: programlisting +#: example_mappings.xml:166 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:170 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "Many-to-many avec une clef composée partagée" + +#. Tag: programlisting +#: example_mappings.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:175 +#, no-c-format +msgid "Content based discrimination" +msgstr "Contenu basé sur une discrimination" + +#. Tag: programlisting +#: example_mappings.xml:176 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:180 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "Associations sur des clefs alternées" + +#. Tag: programlisting +#: example_mappings.xml:181 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/example_parentchild.po b/documentation/envers/src/main/docbook/fr-FR/content/example_parentchild.po new file mode 100644 index 0000000000..2c495f0054 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/example_parentchild.po @@ -0,0 +1,617 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:29 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "Exemple : Père/Fils" + +#. Tag: para +#: example_parentchild.xml:31 +#, no-c-format +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"L'une des premières choses que les nouveaux utilisateurs essaient de faire " +"avec Hibernate est de modéliser une relation père/fils. Il y a deux " +"approches différentes pour cela. Pour un certain nombre de raisons, la " +"méthode la plus courante, en particulier pour les nouveaux utilisateurs, est " +"de modéliser les deux relations Père et Fils comme des classes entités liées par une association <" +"one-to-many> du Père vers le Fils (l'autre approche est de déclarer le Fils comme " +"un <composite-element>). Il est évident que le sens " +"de l'association un vers plusieurs (dans Hibernate) est bien moins proche du " +"sens habituel d'une relation père/fils que ne l'est celui d'un élément " +"cmposite. Nous allons vous expliquer comment utiliser une association " +"un vers plusieurs bidirectionnelle avec cascade afin de " +"modéliser efficacement et élégamment une relation père/fils, ce n'est " +"vraiment pas difficile !" + +#. Tag: title +#: example_parentchild.xml:45 +#, no-c-format +msgid "A note about collections" +msgstr "Une note à propos des collections" + +#. Tag: para +#: example_parentchild.xml:47 +#, no-c-format +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Les collections Hibernate sont considérées comme étant une partie logique de " +"l'entité dans laquelle elles sont contenues ; jamais des entités qu'elle " +"contient. C'est une distinction crutiale ! Les conséquences sont les " +"suivantes :" + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "" +"Quand nous ajoutons / retirons un objet d'une collection, le numéro de " +"version du propriétaire de la collection est incrémenté." + +#. Tag: para +#: example_parentchild.xml:60 +#, no-c-format +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"Si un objet qui a été enlevé d'une collection est une instance de type " +"valeur (ex : élément composite), cet objet cessera d'être persistant et son " +"état sera complètement effacé de la base de données. Par ailleurs, ajouter " +"une instance de type valeur dans une collection aura pour conséquence que " +"son état sera immédiatement persistant." + +#. Tag: para +#: example_parentchild.xml:68 +#, no-c-format +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"Si une entité est enlevée d'une collection (association un-vers-plusieurs ou " +"plusieurs-vers-plusieurs), par défaut, elle ne sera pas effacée. Ce " +"comportement est complètement logique - une modification de l'un des états " +"internes d'une entité ne doit pas causer la disparition de l'entité " +"associée ! De même, l'ajout d'une entité dans une collection n'engendre pas, " +"par défaut, la persistance de cette entité." + +#. Tag: para +#: example_parentchild.xml:78 +#, no-c-format +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"Le comportement par défaut est donc que l'ajout d'une entité dans une " +"collection créé simplement le lien entre les deux entités, et qu'effacer une " +"entité supprime ce lien. C'est le comportement le plus approprié dans la " +"plupart des cas. Ce comportement n'est cependant pas approprié lorsque la " +"vie du fils est liée au cycle de vie du père." + +#. Tag: title +#: example_parentchild.xml:88 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "un-vers-plusieurs bidirectionnel" + +#. Tag: para +#: example_parentchild.xml:90 +#, no-c-format +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "" +"Supposons que nous ayons une simple association <one-to-many>" +" de Parent vers Child." + +#. Tag: programlisting +#: example_parentchild.xml:95 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:97 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "Si nous executions le code suivant" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernate exécuterait deux ordres SQL:" + +#. Tag: para +#: example_parentchild.xml:109 +#, no-c-format +msgid "" +"an INSERT to create the record for c" +msgstr "" +"un INSERT pour créer l'enregistrement pour c" + +#. Tag: para +#: example_parentchild.xml:112 +#, no-c-format +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"un UPDATE pour créer le lien de p vers " +"c" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"Ceci est non seuleument inefficace, mais viole aussi toute contrainte " +"NOT NULL sur la colonne parent_id. " +"Nous pouvons réparer la contrainte de nullité en spécifiant not-" +"null=\"true\" dans le mapping de la collection :" + +#. Tag: programlisting +#: example_parentchild.xml:125 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:127 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "Cependant ce n'est pas la solution recommandée." + +#. Tag: para +#: example_parentchild.xml:130 +#, no-c-format +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"La cause sous jacente à ce comportement est que le lien (la clé étrangère " +"parent_id) de p vers c n'est pas considérée comme faisant partie de l'état de l'objet " +"Child et n'est donc pas créé par l'INSERT. La solution est donc que ce lien fasse partie du mapping de " +"Child." + +#. Tag: programlisting +#: example_parentchild.xml:137 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:139 +#, no-c-format +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(Nous avons aussi besoin d'ajouter la propriété parent " +"dans la classe Child)." + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"Maintenant que l'état du lien est géré par l'entité Child, nous spécifions à la collection de ne pas mettre à jour le lien. " +"Nous utilisons l'attribut inverse." + +#. Tag: programlisting +#: example_parentchild.xml:148 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:150 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "" +"Le code suivant serait utilisé pour ajouter un nouveau Child" + +#. Tag: programlisting +#: example_parentchild.xml:154 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:156 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "Maintenant, seul un INSERT SQL est nécessaire !" + +#. Tag: para +#: example_parentchild.xml:160 +#, no-c-format +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"Pour alléger encore un peu les choses, nous devrions créer une méthode " +"addChild() dans Parent." + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "Le code d'ajout d'un Child serait alors" + +#. Tag: programlisting +#: example_parentchild.xml:171 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:176 +#, no-c-format +msgid "Cascading life cycle" +msgstr "Cycle de vie en cascade" + +#. Tag: para +#: example_parentchild.xml:178 +#, no-c-format +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"L'appel explicite de save() est un peu fastidieux. Nous " +"pouvons simplifier cela en utilisant les cascades." + +#. Tag: programlisting +#: example_parentchild.xml:183 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:185 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "Simplifie le code précédent en" + +#. Tag: programlisting +#: example_parentchild.xml:189 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:191 +#, no-c-format +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"De la même manière, nous n'avons pas à itérer sur les fils lorsque nous " +"sauvons ou effacons un Parent. Le code suivant efface " +"p et tous ses fils de la base de données." + +#. Tag: programlisting +#: example_parentchild.xml:196 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:198 +#, no-c-format +msgid "However, this code" +msgstr "Par contre, ce code" + +#. Tag: programlisting +#: example_parentchild.xml:202 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:204 +#, no-c-format +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"n'effacera pas c de la base de données, il enlèvera " +"seulement le lien vers p (et causera une violation de " +"contrainte NOT NULL, dans ce cas). Vous devez " +"explicitement utiliser delete() sur Child." + +#. Tag: programlisting +#: example_parentchild.xml:210 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:212 +#, no-c-format +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"Dans notre cas, un Child ne peut pas vraiment exister " +"sans son père. Si nous effacons un Child de la " +"collection, nous voulons vraiment qu'il soit effacé. Pour cela, nous devons " +"utiliser cascade=\"all-delete-orphan\"." + +#. Tag: programlisting +#: example_parentchild.xml:218 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"A noter : même si le mapping de la collection spécifie inverse=" +"\"true\", les cascades sont toujours assurées par l'itération sur " +"les éléments de la collection. Donc, si vous avez besoin qu'un objet soit " +"enregistré, effacé ou mis à jour par cascade, vous devez l'ajouter dans la " +"colleciton. Il ne suffit pas d'appeler explicitement setParent()." + +#. Tag: title +#: example_parentchild.xml:230 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "Cascades et unsaved-value" + +#. Tag: para +#: example_parentchild.xml:232 +#, no-c-format +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"Supposons que nous ayons chargé un Parent dans une " +"Session, que nous l'ayons ensuite modifié et que voulions " +"persiter ces modifications dans une nouvelle session en appelant " +"update(). Le Parent contiendra une " +"collection de fils et, puisque la cascade est activée, Hibernate a besoin de " +"savoir quels fils viennent d'être instanciés et quels fils proviennent de la " +"base de données. Supposons aussi que Parent et " +"Child ont tous deux des identifiants du type " +"Long. Hibernate utilisera la propriété de l'identifiant " +"et la propriété de la version/horodatage pour déterminer quels fils sont " +"nouveaux (vous pouvez aussi utiliser la propriété version ou timestamp, voir " +"). Dans " +"Hibernate3, il n'est plus nécessaire de spécifier une unsaved-" +"value explicitement." + +#. Tag: para +#: example_parentchild.xml:244 +#, no-c-format +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"Le code suivant mettra à jour parent et child et insérera newChild." + +#. Tag: programlisting +#: example_parentchild.xml:249 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:251 +#, no-c-format +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"Ceci est très bien pour des identifiants générés, mais qu'en est-il des " +"identifiants assignés et des identifiants composés ? C'est plus difficile, " +"puisqu'Hibernate ne peut pas utiliser la propriété de l'identifiant pour " +"distinguer un objet nouvellement instancié (avec un identifiant assigné par " +"l'utilisateur) d'un objet chargé dans une session précédente. Dans ce cas, " +"Hibernate utilisera soit la propriété de version ou d'horodatage, soit " +"effectuera vraiment une requête au cache de second niveau, soit, dans le " +"pire des cas, à la base de données, pour voir si la ligne existe." + +#. Tag: title +#: example_parentchild.xml:284 +#, no-c-format +msgid "Conclusion" +msgstr "Conclusion" + +#. Tag: para +#: example_parentchild.xml:286 +#, no-c-format +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"Il y a quelques principes à maîtriser dans ce chapitre et tout cela peut " +"paraître déroutant la première fois. Cependant, dans la pratique, tout " +"fonctionne parfaitement. La plupart des applications Hibernate utilisent le " +"pattern père / fils." + +#. Tag: para +#: example_parentchild.xml:291 +#, no-c-format +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"Nous avons évoqué une alternative dans le premier paragraphe. Aucun des " +"points traités précédemment n'existe dans le cas d'un mapping <" +"composite-element> qui possède exactement la sémantique d'une " +"relation père / fils. Malheureusement, il y a deux grandes limitations pour " +"les classes éléments composites : les éléments composites ne peuvent " +"contenir de collections, et ils ne peuvent être les fils d'entités autres " +"que l'unique parent." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/example_weblog.po b/documentation/envers/src/main/docbook/fr-FR/content/example_weblog.po new file mode 100644 index 0000000000..82331c99a7 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/example_weblog.po @@ -0,0 +1,484 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:29 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "Exemple : application Weblog" + +#. Tag: title +#: example_weblog.xml:32 +#, no-c-format +msgid "Persistent Classes" +msgstr "Classes persistantes" + +#. Tag: para +#: example_weblog.xml:34 +#, no-c-format +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"Les classes persistantes representent un weblog, et un article posté dans un " +"weblog. Il seront modélisés comme une relation père/fils standard, mais nous " +"allons utiliser un \"bag\" trié au lieu d'un set." + +#. Tag: programlisting +#: example_weblog.xml:40 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:42 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_weblog.xml:47 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "Mappings Hibernate" + +#. Tag: para +#: example_weblog.xml:49 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "Le mapping XML doit maintenant être relativement simple à vos yeux." + +#. Tag: programlisting +#: example_weblog.xml:53 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:55 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:60 +#, no-c-format +msgid "Hibernate Code" +msgstr "Code Hibernate" + +#. Tag: para +#: example_weblog.xml:62 +#, no-c-format +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "" +"La classe suivante montre quelques utilisations que nous pouvons faire de " +"ces classes." + +#. Tag: programlisting +#: example_weblog.xml:67 +#, no-c-format +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/filters.po b/documentation/envers/src/main/docbook/fr-FR/content/filters.po new file mode 100644 index 0000000000..6ab25a4f18 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/filters.po @@ -0,0 +1,294 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:29 +#, no-c-format +msgid "Filtering data" +msgstr "Filtrer les données" + +#. Tag: para +#: filters.xml:31 +#, no-c-format +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"Hibernate3 fournit une nouvelle approche innovatrice pour gérer des données " +"avec des règles de \"visibilité\". Un filtre Hibernate " +"est un filtre global, nommé, paramétré qui peut être activé ou désactivé " +"pour une session Hibernate particulière." + +#. Tag: title +#: filters.xml:38 +#, no-c-format +msgid "Hibernate filters" +msgstr "Filtres Hibernate" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"Hibernate3 ajoute la capacité de prédéfinir des critères de filtre et " +"d'attacher ces filtres à une classe ou à une collection. Un critère de " +"filtre est la faculté de définir une clause de restriction très similaire à " +"l'attribut \"where\" existant disponible sur une classe et divers éléments " +"d'une collection. Mis à part que ces conditions de filtre peuvent être " +"paramétrées. L'application peut alors prendre la décision à l'exécution si " +"des filtres donnés devraient être activés et quels devraient être leurs " +"paramètres. Des filtres peuvent être utilisés comme des vues de base de " +"données, mais paramétrées dans l'application." + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"Afin d'utiliser des filtres, ils doivent d'abord être définis, puis attachés " +"aux éléments de mapping appropriés. Pour définir un filtre, utilisez " +"l'élément <filter-def/> dans un élément " +"<hibernate-mapping/> :" + +#. Tag: programlisting +#: filters.xml:56 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:58 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "Puis, ce filtre peut être attaché à une classe :" + +#. Tag: programlisting +#: filters.xml:62 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:64 +#, no-c-format +msgid "or, to a collection:" +msgstr "ou à une collection :" + +#. Tag: programlisting +#: filters.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:70 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "ou même aux deux (ou à plusieurs de chaque) en même temps." + +#. Tag: para +#: filters.xml:74 +#, fuzzy, no-c-format +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enableFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Les méthodes sur Session sont : enableFilter" +"(String filterName), getEnabledFilter(String filterName), et disableFilter(String filterName). Par " +"défaut, les filtres ne sont pas activés pour une " +"session donnée ; ils doivent être explicitement activés en appelant la " +"méthode Session.enableFilter(), laquelle retourne une " +"instance de l'interface Filter. Utiliser le simple filtre " +"défini au-dessus ressemblerait à :" + +#. Tag: programlisting +#: filters.xml:83 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: filters.xml:85 +#, no-c-format +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"Notez que des méthodes sur l'interface org.hibernate.Filter autorisent le " +"chaînage de beaucoup de méthodes communes d'Hibernate." + +#. Tag: para +#: filters.xml:89 +#, no-c-format +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "" +"Un exemple complet, utilisant des données temporelles avec une structure de " +"date d'enregistrement effectif :" + +#. Tag: programlisting +#: filters.xml:93 +#, no-c-format +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:95 +#, no-c-format +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"Puis, afin de s'assurer que vous pouvez toujours récupérer les " +"enregistrements actuellement effectifs, activez simplement le filtre sur la " +"session avant de récupérer des données des employés :" + +#. Tag: programlisting +#: filters.xml:100 +#, no-c-format +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:102 +#, no-c-format +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"Dans le HQL ci-dessus, bien que nous ayons seulement mentionné une " +"contrainte de salaire sur les resultats, à cause du filtre activé, la " +"requête retournera seulement les employés actuellement actifs qui ont un " +"salaire supérieur à un million de dollars." + +#. Tag: para +#: filters.xml:108 +#, no-c-format +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"A noter : si vous prévoyez d'utiliser des filtres avec des jointures " +"externes (soit à travers HQL, soit par le chargement) faites attention à la " +"direction de l'expression de condition. Il est plus sûr de la positionner " +"pour les jointures externes à gauche ; en général, placez le paramètre " +"d'abord, suivi du(des) nom(s) de colonne après l'opérateur." + +#. Tag: para +#: filters.xml:115 +#, no-c-format +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "translator-credits" + +#. Tag: programlisting +#: filters.xml:122 +#, no-c-format +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:124 +#, no-c-format +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/fr-FR/content/inheritance_mapping.po new file mode 100644 index 0000000000..bd14d21e78 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/inheritance_mapping.po @@ -0,0 +1,864 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:29 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "Mapping d'héritage de classe" + +#. Tag: title +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "The Three Strategies" +msgstr "Les trois stratégies" + +#. Tag: para +#: inheritance_mapping.xml:34 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "Hibernate supporte les trois stratégies d'héritage de base :" + +#. Tag: para +#: inheritance_mapping.xml:40 +#, no-c-format +msgid "table per class hierarchy" +msgstr "une table par hiérarchie de classe (table per class hierarchy)" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"une table par classe fille (table per subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"une table par classe fille" + +#. Tag: para +#: inheritance_mapping.xml:50 +#, no-c-format +msgid "table per concrete class" +msgstr "une table par classe concrète (table per concrete class)" + +#. Tag: para +#: inheritance_mapping.xml:56 +#, no-c-format +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "" +"Hibernate supporte en plus une quatrièmestratégie, légèrement différente, " +"qui supporte le polymorphisme :" + +#. Tag: para +#: inheritance_mapping.xml:63 +#, no-c-format +msgid "implicit polymorphism" +msgstr "le polymorphisme implicite" + +#. Tag: para +#: inheritance_mapping.xml:69 +#, no-c-format +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"Il est possible d'utiliser différentes stratégies de mapping pour " +"différentes branches d'une même hiérarchie d'héritage, et alors d'employer " +"le polymorphisme implicite pour réaliser le polymorphisme à travers toute la " +"hiérarchie. Pourtant, Hibernate ne supporte pas de mélanger des mappings " +"<subclass> et <joined-subclass> et <union-subclass> pour le même élément " +"<class> racine. Il est possible de mélanger " +"ensemble les stratégies d'une table par hiérarchie et d'une table par sous-" +"classe, pour le même élément <class>, en combinant " +"les éléments <subclass> et <join> (voir dessous)." + +#. Tag: para +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"Il est possible de définir des mappings de subclass, " +"union-subclass, et joined-subclass " +"dans des documents de mapping séparés, directement sous hibernate-" +"mapping. Ceci vous permet d'étendre une hiérarchie de classe juste " +"en ajoutant un nouveau fichier de mapping. Vous devez spécifier un attribut " +"extends dans le mapping de la sous-classe, en nommant une " +"super-classe précédemment mappée. Note : précédemment cette foncionnalité " +"rendait l'ordre des documents de mapping important. Depuis Hibernate3, " +"l'ordre des fichier de mapping n'importe plus lors de l'utilisation du mot-" +"clef \"extends\". L'ordre à l'intérieur d'un simple fichier de mapping " +"impose encore de définir les classes mères avant les classes filles." + +#. Tag: programlisting +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:98 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "Une table par hiérarchie de classe" + +#. Tag: para +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"Supposons que nous ayons une interface Payment, " +"implémentée par CreditCardPayment, CashPayment, ChequePayment. La stratégie une table par " +"hiérarchie serait :" + +#. Tag: programlisting +#: inheritance_mapping.xml:107 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:109 +#, no-c-format +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"Une seule table est requise. Une grande limitation de cette stratégie est " +"que les colonnes déclarées par les classes filles, telles que " +"CCTYPE, ne peuvent avoir de contrainte NOT NULL." + +#. Tag: title +#: inheritance_mapping.xml:118 +#, no-c-format +msgid "Table per subclass" +msgstr "Une table par classe fille" + +#. Tag: para +#: inheritance_mapping.xml:120 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "La stratégie une table par classe fille serait :" + +#. Tag: programlisting +#: inheritance_mapping.xml:124 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:126 +#, 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 "" +"Quatre tables sont requises. Les trois tables des classes filles ont une clé " +"primaire associée à la table classe mère (le modèle relationnel est une " +"association un-vers-un)." + +#. Tag: title +#: inheritance_mapping.xml:135 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "Une table par classe fille, en utilisant un discriminant" + +#. Tag: para +#: inheritance_mapping.xml:137 +#, no-c-format +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"Notez que l'implémentation Hibernate de la stratégie un table par classe " +"fille ne nécessite pas de colonne discriminante dans la table classe mère. " +"D'autres implémentations de mappers Objet/Relationnel utilisent une autre " +"implémentation de la stratégie une table par classe fille qui nécessite une " +"colonne de type discriminant dans la table de la classe mère. L'approche " +"prise par Hibernate est plus difficile à implémenter mais plus correcte " +"d'une point de vue relationnel. Si vous aimeriez utiliser une colonne " +"discriminante avec la stratégie d'une table par classe fille, vous pourriez " +"combiner l'utilisation de <subclass> et " +"<join>, comme suit :" + +#. Tag: programlisting +#: inheritance_mapping.xml:149 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"La déclaration optionnelle fetch=\"select\" indique à " +"Hibernate de ne pas récupérer les données de la classe fille " +"ChequePayment par une jointure externe lors des requêtes " +"sur la classe mère." + +#. Tag: title +#: inheritance_mapping.xml:160 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "" +"Mélange d'une table par hiérarchie de classe avec une table par classe fille" + +#. Tag: para +#: inheritance_mapping.xml:162 +#, no-c-format +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"Vous pouvez même mélanger les stratégies d'une table par hiérarchie de " +"classe et d'une table par classe fille en utilisant cette approche :" + +#. Tag: programlisting +#: inheritance_mapping.xml:167 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:169 +#, no-c-format +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"Pour importe laquelle de ces stratégies, une association polymorphique vers " +"la classe racine Payment est mappée en utilisant " +"<many-to-one>." + +#. Tag: programlisting +#: inheritance_mapping.xml:175 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:180 +#, no-c-format +msgid "Table per concrete class" +msgstr "Une table par classe concrète" + +#. Tag: para +#: inheritance_mapping.xml:182 +#, no-c-format +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"Il y a deux manières d'utiliser la stratégie d'une table par classe " +"concrète. La première est d'employer <union-subclass>." + +#. Tag: programlisting +#: inheritance_mapping.xml:187 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:189 +#, 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 "" +"Trois tables sont nécessaires pour les classes filles. Chaque table définit " +"des colonnes pour toutes les propriétés de la classe, incluant les " +"propriétés héritéés." + +#. Tag: para +#: inheritance_mapping.xml:194 +#, 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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"La limitation de cette approche est que si une propriété est mappée sur la " +"classe mère, le nom de la colonne doit être le même pour toutes les classes " +"filles. (Nous pourrions être plus souple dans une future version " +"d'Hibernate). La stratégie du générateur d'identifiant n'est pas permise " +"dans l'héritage de classes filles par union, en effet la valeur (NdT : seed) " +"de la clef primaire doit être partagée par toutes les classes filles \"union" +"\" d'une hiérarchie." + +#. Tag: para +#: inheritance_mapping.xml:203 +#, no-c-format +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"Si votre classe mère est abstraite, mappez la avec abstract=\"true" +"\". Bien sûr, si elle n'est pas abstraite, une table " +"supplémentaire (par défaut, PAYMENT dans l'exemple ci-" +"dessus) est requise pour contenir des instances de la classe mère." + +#. Tag: title +#: inheritance_mapping.xml:213 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "Une table par classe concrète, en utilisant le polymorphisme implicite" + +#. Tag: para +#: inheritance_mapping.xml:215 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "Une approche alternative est l'emploi du polymorphisme implicite :" + +#. Tag: programlisting +#: inheritance_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:221 +#, no-c-format +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"Notez que nulle part nous ne mentionnons l'interface Payment explicitement. Notez aussi que des propriétés de Payment sont mappées dans chaque classe fille. Si vous voulez éviter des " +"duplications, considérez l'utilisation des entités XML (cf. [ <!" +"ENTITY allproperties SYSTEM \"allproperties.xml\"> ] dans la " +"déclaration du DOCTYPE et &allproperties; dans le mapping)." + +#. Tag: para +#: inheritance_mapping.xml:231 +#, no-c-format +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"L'inconvénient de cette approche est qu'Hibernate ne génère pas " +"d'UNIONs SQL lors de l'exécution des requêtes " +"polymorphiques." + +#. Tag: para +#: inheritance_mapping.xml:236 +#, no-c-format +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"Pour cette stratégie de mapping, une association polymorphique pour " +"Payment est habituellement mappée en utilisant " +"<any>." + +#. Tag: programlisting +#: inheritance_mapping.xml:241 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:246 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "Mélange du polymorphisme implicite avec d'autres mappings d'héritage" + +#. Tag: para +#: inheritance_mapping.xml:248 +#, no-c-format +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"Il y a une chose supplémentaire à noter à propos de ce mapping. Puisque les " +"classes filles sont chacune mappées avec leur propre élément <" +"class> (et puisque Payment est juste une " +"interface), chaque classe fille pourrait facilement faire partie d'une autre " +"hiérarchie d'héritage ! (Et vous pouvez encore faire des requêtes " +"polymorphiques pour l'interface Payment)." + +#. Tag: programlisting +#: inheritance_mapping.xml:256 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, no-c-format +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"Encore une fois, nous ne mentionnons pas explicitement Payment. Si nous exécutons une requête sur l'interface Payment - par exemple, from Payment - Hibernate " +"retournera automatiquement les instances de CreditCardPayment (et ses classes filles puisqu'elles implémentent aussi " +"Payment), CashPayment et " +"ChequePayment mais pas les instances de " +"NonelectronicTransaction." + +#. Tag: title +#: inheritance_mapping.xml:273 +#, no-c-format +msgid "Limitations" +msgstr "Limitations" + +#. Tag: para +#: inheritance_mapping.xml:275 +#, no-c-format +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"Il y a certaines limitations à l'approche du \"polymorphisme implicite\" " +"pour la stratégie de mapping d'une table par classe concrète. Il y a plutôt " +"moins de limitations restrictives aux mappings <union-" +"subclass>." + +#. Tag: para +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "" +"The following table shows the limitations of table per concrete-class " +"mappings, and of implicit polymorphism, in Hibernate." +msgstr "" +"La table suivante montre les limitations des mappings d'une table par classe " +"concrète, et du polymorphisme implicite, dans Hibernate." + +#. Tag: title +#: inheritance_mapping.xml:288 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "Caractéristiques du mapping d'héritage" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, no-c-format +msgid "Inheritance strategy" +msgstr "Stratégie d'héritage" + +#. Tag: entry +#: inheritance_mapping.xml:301 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "many-to-one polymorphique" + +#. Tag: entry +#: inheritance_mapping.xml:302 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "one-to-one polymorphique" + +#. Tag: entry +#: inheritance_mapping.xml:303 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "one-to-many polymorphique" + +#. Tag: entry +#: inheritance_mapping.xml:304 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "many-to-many polymorphique" + +#. Tag: entry +#: inheritance_mapping.xml:305 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:306 +#, no-c-format +msgid "Polymorphic queries" +msgstr "Requêtes polymorphiques" + +#. Tag: entry +#: inheritance_mapping.xml:307 +#, no-c-format +msgid "Polymorphic joins" +msgstr "Jointures polymorphiques" + +#. Tag: entry +#: inheritance_mapping.xml:308 +#, no-c-format +msgid "Outer join fetching" +msgstr "Récupération par jointure externe" + +#. Tag: entry +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "une table par hiérarchie de classe" + +#. Tag: literal +#: inheritance_mapping.xml:314 inheritance_mapping.xml:325 +#: inheritance_mapping.xml:336 +#, no-c-format +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:315 inheritance_mapping.xml:326 +#: inheritance_mapping.xml:337 +#, no-c-format +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:316 inheritance_mapping.xml:327 +#, no-c-format +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 +#: inheritance_mapping.xml:339 +#, no-c-format +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:318 inheritance_mapping.xml:329 +#: inheritance_mapping.xml:340 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#. Tag: literal +#: inheritance_mapping.xml:319 inheritance_mapping.xml:330 +#: inheritance_mapping.xml:341 inheritance_mapping.xml:352 +#, no-c-format +msgid "from Payment p" +msgstr "from Payment p" + +#. Tag: literal +#: inheritance_mapping.xml:320 inheritance_mapping.xml:331 +#: inheritance_mapping.xml:342 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#. Tag: emphasis +#: inheritance_mapping.xml:321 inheritance_mapping.xml:332 +#: inheritance_mapping.xml:343 +#, no-c-format +msgid "supported" +msgstr "supportée" + +#. Tag: entry +#: inheritance_mapping.xml:324 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"une table par classe fille (table per subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"une table par classe fille" + +#. Tag: entry +#: inheritance_mapping.xml:335 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "une table par classe concrète (union-subclass)" + +#. Tag: entry +#: inheritance_mapping.xml:338 +#, no-c-format +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:346 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "une table par classe concrète (polymorphisme implicite)" + +#. Tag: literal +#: inheritance_mapping.xml:347 +#, no-c-format +msgid "<any>" +msgstr "<any>" + +#. Tag: emphasis +#: inheritance_mapping.xml:348 inheritance_mapping.xml:349 +#: inheritance_mapping.xml:353 inheritance_mapping.xml:354 +#, fuzzy, no-c-format +msgid "not supported" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"non supporté\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"non supporté\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"non supportées\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"non supportée" + +#. Tag: literal +#: inheritance_mapping.xml:350 +#, no-c-format +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#. Tag: literal +#: inheritance_mapping.xml:351 +#, no-c-format +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +#~ msgid "load()/get()" +#~ msgstr "load()/get()" + +#~ msgid "Polymorphic " +#~ msgstr " polymorphique" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid " (for only)" +#~ msgstr " (pour seulement)" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/performance.po b/documentation/envers/src/main/docbook/fr-FR/content/performance.po new file mode 100644 index 0000000000..f48ffca9d9 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/performance.po @@ -0,0 +1,2686 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:29 +#, no-c-format +msgid "Improving performance" +msgstr "Améliorer les performances" + +#. Tag: title +#: performance.xml:32 +#, no-c-format +msgid "Fetching strategies" +msgstr "Stratégies de chargement" + +#. Tag: para +#: performance.xml:34 +#, no-c-format +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"Une stratégie de chargement est une stratégie " +"qu'Hibernate va utiliser pour récupérer des objets associés si l'application " +"à besoin de naviguer à travers une association. Les stratégies de chargement " +"peuvent être déclarées dans les méta-données de l'outil de mapping objet " +"relationnel ou surchargées par une requête de type HQL ou Criteria particulière." + +#. Tag: para +#: performance.xml:41 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3 définit les stratégies de chargement suivantes :" + +#. Tag: para +#: performance.xml:47 +#, no-c-format +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"Chargement par jointure - Hibernate récupère l'instance " +"associée ou la collection dans un même SELECT, en " +"utilisant un OUTER JOIN." + +#. Tag: para +#: performance.xml:54 +#, no-c-format +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"Chargement par select - Un second SELECT est utilisé pour récupérer l'instance associée ou la collection. A " +"moins que vous ne désactiviez explicitement le chargement tardif en " +"spécifiant lazy=\"false\", ce second select ne sera " +"exécuté que lorsque vous accéderez réellement à l'association." + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"Chargement par sous-select - Un second SELECT est utilisé pour récupérer les associations pour toutes les entités " +"récupérées dans une requête ou un chargement préalable. A moins que vous ne " +"désactiviez explicitement le chargement tardif en spécifiant lazy=" +"\"false\", ce second select ne sera exécuté que lorsque vous " +"accéderez réellement à l'association." + +#. Tag: para +#: performance.xml:72 +#, no-c-format +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"Chargement par lot - Il s'agit d'une stratégie " +"d'optimisation pour le chargement par select - Hibernate récupère un lot " +"d'instances ou de collections en un seul SELECT en " +"spécifiant une liste de clé primaire ou de clé étrangère." + +#. Tag: para +#: performance.xml:81 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "Hibernate fait également la distinction entre :" + +#. Tag: para +#: performance.xml:87 +#, no-c-format +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"Chargement immédiat - Une association, une collection " +"ou un attribut est chargé immédiatement lorsque l'objet auquel appartient " +"cet élément est chargé." + +#. Tag: para +#: performance.xml:93 +#, no-c-format +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"Chargement tardif d'une collection - Une collection est " +"chargée lorque l'application invoque une méthode sur cette collection (il " +"s'agit du mode de chargement par défaut pour les collections)." + +#. Tag: para +#: performance.xml:100 +#, no-c-format +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"Chargement \"super tardif\" d'une collection - les " +"éléments de la collection sont récupérés individuellement depuis la base de " +"données lorsque nécessaire. Hibernate essaie de ne pas charger toute la " +"collection en mémoire sauf si cela est absolument nécessaire (bien adapté " +"aux très grandes collections)." + +#. Tag: para +#: performance.xml:108 +#, no-c-format +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"Chargement par proxy - une association vers un seul " +"objet est chargée lorsqu'une méthode autre que le getter sur l'identifiant " +"est appelée sur l'objet associé." + +#. Tag: para +#: performance.xml:115 +#, no-c-format +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"Chargement \"sans proxy\" - une association vers un " +"seul objet est chargée lorsque l'on accède à cet objet. Par rapport au " +"chargement par proxy, cette approche est moins tardif (l'association est " +"quand même chargée même si on n'accède qu'à l'identifiant) mais plus " +"transparente car il n'y a pas de proxy visible dans l'application. Cette " +"approche requiert une instrumentation du bytecode à la compilation et est " +"rarement nécessaire." + +#. Tag: para +#: performance.xml:125 +#, no-c-format +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"Chargement tardif des attributs - Un attribut ou un " +"objet associé seul est chargé lorsque l'on y accède. Cette approche requiert " +"une instrumentation du bytecode à la compilation et est rarement nécessaire." + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"Nous avons ici deux notions orthogonales : quand " +"l'association est chargée et comment (quelle requête " +"SQL est utilisée). Il ne faut pas confondre les deux. Le mode de chargement " +"est utilisé pour améliorer les performances. On peut utiliser le mode tardif " +"pour définir un contrat sur quelles données sont toujours accessibles sur " +"une instance détachée d'une classe particulière." + +#. Tag: title +#: performance.xml:143 +#, no-c-format +msgid "Working with lazy associations" +msgstr "Travailler avec des associations chargées tardivement" + +#. Tag: para +#: performance.xml:145 +#, no-c-format +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"Par défaut, Hibernate3 utilise le chargement tardif par select pour les " +"collections et le chargement tardif par proxy pour les associations vers un " +"seul objet. Ces valeurs par défaut sont valables pour la plupart des " +"associations dans la plupart des applications." + +#. Tag: para +#: performance.xml:151 +#, no-c-format +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"Note : si vous définissez hibernate." +"default_batch_fetch_size, Hibernate va utiliser l'optimisation du " +"chargement par lot pour le chargement tardif (cette optimisation peut aussi " +"être activée à un niveau de granularité plus fin)." + +#. Tag: para +#: performance.xml:158 +#, no-c-format +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"Cependant, le chargement tardif pose un problème qu'il faut connaitre. " +"L'accès à une association définie comme \"tardive\", hors du contexte d'une " +"session hibernate ouverte, va conduire à une exception. Par exemple :" + +#. Tag: programlisting +#: performance.xml:164 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:166 +#, no-c-format +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"Etant donné que la collection des permissions n'a pas été initialisée avant " +"que la Session soit fermée, la collection n'est pas " +"capable de se charger. Hibernate ne supporte pas le chargement " +"tardif pour des objets détachés. La solution à ce problème est de " +"déplacer le code qui lit la collection avant le \"commit\" de la transaction." + +#. Tag: para +#: performance.xml:174 +#, no-c-format +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"Une autre alternative est d'utiliser une collection ou une association non " +"\"tardive\" en spécifiant lazy=\"false\" dans le mapping " +"de l'association. Cependant il est prévu que le chargement tardif soit " +"utilisé pour quasiment toutes les collections ou associations. Si vous " +"définissez trop d'associtions non \"tardives\" dans votre modèle objet, " +"Hibernate va finir par devoir charger toute la base de données en mémoire à " +"chaque transaction !" + +#. Tag: para +#: performance.xml:183 +#, no-c-format +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"D'un autre côté, on veut souvent choisir un chargement par jointure (qui est " +"par défaut non tardif) à la place du chargement par select dans une " +"transaction particulière. Nous allons maintenant voir comment adapter les " +"stratégies de chargement. Dans Hibernate3 les mécanismes pour choisir une " +"stratégie de chargement sont identiques que l'on ait une association vers un " +"objet simple ou vers une collection." + +#. Tag: title +#: performance.xml:194 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "Personnalisation des stratégies de chargement" + +#. Tag: para +#: performance.xml:196 +#, no-c-format +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"Le chargement par select (mode par défaut) est très vulnérable au problème " +"du N+1 selects, du coup vous pouvez avoir envie d'activer le chargement par " +"jointure dans les fichiers de mapping :" + +#. Tag: programlisting +#: performance.xml:201 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:203 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:205 +#, no-c-format +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"La stratégie de chargement définie à l'aide du mot fetch " +"dans les fichiers de mapping affecte :" + +#. Tag: para +#: performance.xml:211 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "" +"La récupération via get() ou load()" + +#. Tag: para +#: performance.xml:216 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "" +"La récupération implicite lorsque l'on navigue à travers une association" + +#. Tag: para +#: performance.xml:221 +#, no-c-format +msgid "Criteria queries" +msgstr "Les requêtes de type Criteria" + +#. Tag: para +#: performance.xml:226 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "" +"Les requêtes HQL si l'on utilise le chargement par subselect" + +#. Tag: para +#: performance.xml:232 +#, no-c-format +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"Quelle que soit la stratégie de chargement que vous utilisez, la partie du " +"graphe d'objets qui est définie comme non \"tardive\" sera chargée en " +"mémoire. Cela peut mener à l'exécution de plusieurs selects successifs pour " +"une seule requête HQL." + +#. Tag: para +#: performance.xml:238 +#, no-c-format +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"On n'utilise pas souvent les documents de mapping pour adapter le " +"chargement. Au lieu de cela, on conserve le comportement par défaut et on le " +"surcharge pour une transaction particulière en utilisant left join " +"fetch dans les requêtes HQL. Cela indique à hibernate à Hibernate " +"de charger l'association de manière agressive lors du premier select en " +"utilisant une jointure externe. Dans l'API Criteria vous pouvez utiliser la " +"méthode setFetchMode(FetchMode.JOIN)" + +#. Tag: para +#: performance.xml:247 +#, no-c-format +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"Si vous ne vous sentez pas prêt à modifier la stratégie de chargement " +"utilisé par get() ou load(), vous " +"pouvez juste utiliser une requête de type Criteria comme " +"par exemple :" + +#. Tag: programlisting +#: performance.xml:253 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:255 +#, no-c-format +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(Il s'agit de l'équivalent pour Hibernate de ce que d'autres outils de " +"mapping appellent un \"fetch plan\" ou \"plan de chargement\")" + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "" +"Une autre manière complètement différente d'éviter le problème des N+1 " +"selects est d'utiliser le cache de second niveau." + +#. Tag: title +#: performance.xml:267 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "Proxys pour des associations vers un seul objet" + +#. Tag: para +#: performance.xml:269 +#, no-c-format +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"Le chargement tardif des collections est implémenté par Hibernate en " +"utilisant ses propres implémentations pour des collections persistantes. Si " +"l'on veut un chargement tardif pour des associations vers un seul objet " +"métier il faut utiliser un autre mécanisme. L'entité qui est pointée par " +"l'association doit être masquée derrière un proxy. Hibernate implémente " +"l'initialisation tardive des proxys sur des objets persistents via une mise " +"à jour à chaud du bytecode (à l'aide de l'excellente librairie CGLIB)." + +#. Tag: para +#: performance.xml:277 +#, no-c-format +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"Par défaut, Hibernate génère des proxys (au démarrage) pour toutes les " +"classes persistantes et les utilise pour activer le chargement tardif des " +"associations many-to-one et one-to-one." + +#. Tag: para +#: performance.xml:283 +#, no-c-format +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"Le fichier de mapping peut déclarer une interface qui sera utilisée par le " +"proxy d'interfaçage pour cette classe à l'aide de l'attribut proxy. Par défaut Hibernate utilises une sous classe de la classe " +"persistante. Il faut que les classes pour lesquelles on ajoute un " +"proxy implémentent un constructeur par défaut de visibilité au moins " +"package. Ce constructeur est recommandé pour toutes les classes " +"persistantes !" + +#. Tag: para +#: performance.xml:290 +#, no-c-format +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "" +"Il y a quelques précautions à prendre lorsque l'on étend cette approche à " +"des classes polymorphiques, exemple :" + +#. Tag: programlisting +#: performance.xml:295 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:297 +#, no-c-format +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"Tout d'abord, les instances de Cat ne pourront jamais " +"être \"castées\" en DomesticCat, même si l'instance sous " +"jacente est une instance de DomesticCat :" + +#. Tag: programlisting +#: performance.xml:303 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "" +"Deuxièmement, il est possible de casser la notion d'== " +"des proxy." + +#. Tag: programlisting +#: performance.xml:309 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:311 +#, no-c-format +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"Cette situation n'est pas si mauvaise qu'il n'y parait. Même si nous avons " +"deux références à deux objets proxys différents, l'instance de base sera " +"quand même le même objet :" + +#. Tag: programlisting +#: performance.xml:316 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:318 +#, no-c-format +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "" +"Troisièmement, vous ne pourrez pas utiliser un proxy CGLIB pour une classe " +"final ou pour une classe contenant la moindre méthode " +"final." + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"Enfin, si votre objet persistant obtient une ressource à l'instanciation " +"(par example dans les initialiseurs ou dans le contructeur par défaut), " +"alors ces ressources seront aussi obtenues par le proxy. La classe proxy est " +"vraiment une sous classe de la classe persistante." + +#. Tag: para +#: performance.xml:329 +#, no-c-format +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"Ces problèmes sont tous dus aux limitations fondamentales du modèle " +"d'héritage unique de Java. Si vous souhaitez éviter ces problèmes, vos " +"classes persistantes doivent chacune implémenter une interface qui déclare " +"ses méthodes métier. Vous devriez alors spécifier ces interfaces dans le " +"fichier de mapping :" + +#. Tag: programlisting +#: performance.xml:335 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:337 +#, no-c-format +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"où CatImpl implémente l'interface Cat " +"et DomesticCatImpl implémente l'interface " +"DomesticCat. Ainsi, des proxys pour les instances de " +"Cat et DomesticCat pourraient être " +"retournées par load() ou iterate() " +"(Notez que list() ne retourne généralement pas de proxy)." + +#. Tag: programlisting +#: performance.xml:345 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:347 +#, no-c-format +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"Les relations sont aussi initialisées tardivement. Ceci signifie que vous " +"devez déclarer chaque propriété comme étant de type Cat, " +"et non CatImpl." + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "" +"Certain operations do not require proxy initialization" +msgstr "Certaines opérations ne nécessitent pas l'initialisation du proxy" + +#. Tag: para +#: performance.xml:358 +#, no-c-format +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals(), si la classe persistante ne surcharge pas " +"equals()" + +#. Tag: para +#: performance.xml:364 +#, no-c-format +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode(), si la classe persistante ne surcharge pas " +"hashCode()" + +#. Tag: para +#: performance.xml:370 +#, no-c-format +msgid "The identifier getter method" +msgstr "Le getter de l'identifiant" + +#. Tag: para +#: performance.xml:376 +#, no-c-format +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"Hibernate détectera les classes qui surchargent equals() " +"ou hashCode()." + +#. Tag: para +#: performance.xml:381 +#, no-c-format +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"Eh choisissant lazy=\"no-proxy\" au lieu de lazy=" +"\"proxy\" qui est la valeur par défaut, il est possible d'éviter " +"les problèmes liés au transtypage. Il faudra alors une instrumentation du " +"bytecode à la compilation et toutes les opérations résulterons immédiatement " +"en une initialisation du proxy." + +#. Tag: title +#: performance.xml:391 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "Initialisation des collections et des proxys" + +#. Tag: para +#: performance.xml:393 +#, no-c-format +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"Une exception de type LazyInitializationException sera " +"renvoyée par hibernate si une collection ou un proxy non initialisé est " +"accédé en dehors de la portée de la Session, e.g. lorsque " +"l'entité à laquelle appartient la collection ou qui a une référence vers le " +"proxy est dans l'état \"détachée\"." + +#. Tag: para +#: performance.xml:399 +#, no-c-format +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"Parfois, nous devons nous assurer qu'un proxy ou une collection est " +"initialisée avant de fermer la Session. Bien sûr, nous " +"pouvons toujours forcer l'initialisation en appelant par exemple " +"cat.getSex() ou cat.getKittens().size(). Mais ceci n'est pas très lisible pour les personnes parcourant le " +"code et n'est pas très générique." + +#. Tag: para +#: performance.xml:406 +#, no-c-format +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"Les méthodes statiques Hibernate.initialize() et " +"Hibernate.isInitialized() fournissent à l'application un " +"moyen de travailler avec des proxys ou des collections initialisés. " +"Hibernate.initialize(cat) forcera l'initialisation d'un " +"proxy de cat, si tant est que sa Session est ouverte. Hibernate.initialize( cat.getKittens() ) a le même effet sur la collection kittens." + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"Une autre option est de conserver la Session ouverte " +"jusqu'à ce que toutes les collections et tous les proxys aient été chargés. " +"Dans certaines architectures applicatives, particulièrement celles ou le " +"code d'accès aux données via hiberante et le code qui utilise ces données " +"sont dans des couches applicatives différentes ou des processus physiques " +"différents, il peut devenir problématique de garantir que la " +"Session est ouverte lorsqu'une collection est " +"initialisée. Il y a deux moyens de traiter ce problème :" + +#. Tag: para +#: performance.xml:426 +#, no-c-format +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"Dans une application web, un filtre de servlet peut être utilisé pour fermer " +"la Session uniquement lorsque la requête a été " +"entièrement traitée, lorsque le rendu de la vue est fini (il s'agit du " +"pattern Open Session in View). Bien sûr, cela demande " +"plus d'attention à la bonne gestion des exceptions de l'application. Il est " +"d'une importance vitale que la Session soit fermée et la " +"transaction terminée avant que l'on rende la main à l'utilisateur même si " +"une exception survient durant le traitement de la vue. Voir le wiki " +"Hibernate pour des exemples sur le pattern \"Open Session in View\"." + +#. Tag: para +#: performance.xml:439 +#, no-c-format +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"Dans une application avec une couche métier séparée, la couche contenant la " +"logique métier doit \"préparer\" toutes les collections qui seront " +"nécessaires à la couche web avant de retourner les données. Cela signifie " +"que la couche métier doit charger toutes les données et retourner toutes les " +"données déjà initialisées à la couche de présentation/web pour un cas " +"d'utilisation donné. En général l'application appelle la méthode " +"Hibernate.initialize() pour chaque collection nécessaire " +"dans la couche web (cet appel doit être fait avant la fermeture de la " +"session) ou bien récupère les collections de manière agressive à l'aide " +"d'une requête HQL avec une clause FETCH ou à l'aide du " +"mode FetchMode.JOIN pour une requête de type " +"Criteria. Cela est en général plus facile si vous " +"utilisez le pattern Command plutôt que " +"Session Facade." + +#. Tag: para +#: performance.xml:454 +#, no-c-format +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"Vous pouvez également attacher à une Session un objet " +"chargé au préalable à l'aide des méthodes merge() ou " +"lock() avant d'accéder aux collections (ou aux proxys) " +"non initialisés. Non, Hibernate ne fait pas, et ne doit pas faire, cela " +"automatiquement car cela pourrait introduire une sémantique transactionnelle " +"ad hoc." + +#. Tag: para +#: performance.xml:464 +#, no-c-format +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"Parfois, vous ne voulez pas initialiser une grande collection mais vous avez " +"quand même besoin d'informations sur elle (comme sa taille) ou un sous " +"ensemble de ses données" + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "" +"Vous pouvez utiliser un filtre de collection pour récupérer sa taille sans " +"l'initialiser :" + +#. Tag: programlisting +#: performance.xml:473 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:475 +#, no-c-format +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"La méthode createFilter() est également utilisée pour " +"récupérer de manière efficace des sous ensembles d'une collection sans avoir " +"besoin de l'initialiser dans son ensemble." + +#. Tag: programlisting +#: performance.xml:480 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:485 +#, no-c-format +msgid "Using batch fetching" +msgstr "Utiliser le chargement par lot" + +#. Tag: para +#: performance.xml:487 +#, no-c-format +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"Pour améliorer les performances, Hibernate peut utiliser le chargement par " +"lot ce qui veut dire qu'Hibernate peut charger plusieurs proxys (ou " +"collections) non initialisés en une seule requête lorsque l'on accède à l'un " +"de ces proxys. Le chargement par lot est une optimisation intimement liée à " +"la stratégie de chargement tardif par select. Il y a deux moyens d'activer " +"le chargement par lot : au niveau de la classe et au niveau de la collection." + +#. Tag: para +#: performance.xml:493 +#, no-c-format +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"Le chargement par lot pour les classes/entités est plus simple à comprendre. " +"Imaginez que vous ayez la situation suivante à l'exécution : vous avez 25 " +"instances de Cat chargées dans une Session, chaque Cat a une référence à son " +"owner, une Person. La classe " +"Person est mappée avec un proxy, lazy=\"true\". Si vous itérez sur tous les cats et appelez getOwner() sur chacun d'eux, Hibernate exécutera par défaut 25 " +"SELECT, pour charger les owners (initialiser le proxy). " +"Vous pouvez paramétrer ce comportement en spécifiant une batch-" +"size (taille du lot) dans le mapping de Person :" + +#. Tag: programlisting +#: performance.xml:503 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:505 +#, no-c-format +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" +"Hibernate exécutera désormais trois requêtes, en chargeant respectivement " +"10, 10, et 5 entités." + +#. Tag: para +#: performance.xml:509 +#, fuzzy, no-c-format +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Session, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"Vous pouvez aussi activer le chargement par lot pour les collections. Par " +"exemple, si chaque Person a une collection chargée " +"tardivement de Cats, et que 10 personnes sont " +"actuellement chargées dans la Session, itérer sur toutes " +"les persons générera 10 SELECTs, un pour chaque appel de " +"getCats(). Si vous activez le chargement par lot pour la " +"collection cats dans le mapping de Person, Hibernate pourra précharger les collections :" + +#. Tag: programlisting +#: performance.xml:518 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:520 +#, no-c-format +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"Avec une taille de lot (batch-size) de 3, Hibernate " +"chargera respectivement 3, 3, 3, et 1 collections en quatre SELECTs. Encore une fois, la valeur de l'attribut dépend du nombre de " +"collections non initialisées dans une Session " +"particulière." + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"Le chargement par lot de collections est particulièrement utile si vous avez " +"des arborescenses récursives d'éléments (typiquement, le schéma facture de " +"matériels). (Bien qu'un sous ensemble ou un " +"chemin matérialisé est sans doute une meilleure option " +"pour des arbres principalement en lecture.)" + +#. Tag: title +#: performance.xml:535 +#, no-c-format +msgid "Using subselect fetching" +msgstr "Utilisation du chargement par sous select" + +#. Tag: para +#: performance.xml:537 +#, no-c-format +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"Si une collection ou un proxy vers un objet doit être chargé, Hibernate va " +"tous les charger en ré-exécutant la requête orignial dans un sous select. " +"Cela fonctionne de la même manière que le chargement par lot sans la " +"possibilité de fragmenter le chargement." + +#. Tag: title +#: performance.xml:548 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "Utiliser le chargement tardif des propriétés" + +#. Tag: para +#: performance.xml:550 +#, no-c-format +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"Hibernate3 supporte le chargement tardif de propriétés individuelles. La " +"technique d'optimisation est également connue sous le nom de fetch " +"groups (groupes de chargement). Il faut noter qu'il s'agit " +"principalement d'une fonctionnalité marketing car en pratique l'optimisation " +"de la lecture d'un enregistrement est beaucoup plus importante que " +"l'optimisation de la lecture d'une colonne. Cependant, la restriction du " +"chargement à certaines colonnes peut être pratique dans des cas extrèmes, " +"lorsque des tables \"legacy\" possèdent des centaines de colonnes et que le " +"modèle de données ne peut pas être amélioré." + +#. Tag: para +#: performance.xml:559 +#, no-c-format +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"Pour activer le chargement tardif d'une propriété, il faut mettre l'attribut " +"lazy sur une propriété particulière du mapping :" + +#. Tag: programlisting +#: performance.xml:564 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:566 +#, no-c-format +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"Le chargement tardif des propriétés requiert une instrumentation du bytecode " +"lors de la compilation ! Si les classes persistantes ne sont pas " +"instrumentées, Hibernate ignorera de manière silencieuse le mode tardif et " +"retombera dans le mode de chargement immédiat." + +#. Tag: para +#: performance.xml:572 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "" +"Pour l'instrumentation du bytecode vous pouvez utiliser la tâche Ant " +"suivante :" + +#. Tag: programlisting +#: performance.xml:576 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:578 +#, fuzzy, no-c-format +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a preferred solution." +msgstr "" +"Une autre façon (meilleure ?) pour éviter de lire plus de colonnes que " +"nécessaire au moins pour des transactions en lecture seule est d'utiliser " +"les fonctionnalités de projection des requêtes HQL ou Criteria. Cela évite " +"de devoir instrumenter le bytecode à la compilation et est certainement une " +"solution préférable." + +#. Tag: para +#: performance.xml:585 +#, no-c-format +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"Vous pouvez forcer le mode de chargement agressif des propriétés en " +"utilisant fetch all properties dans les requêts HQL." + +#. Tag: title +#: performance.xml:595 +#, no-c-format +msgid "The Second Level Cache" +msgstr "Le cache de second niveau" + +#. Tag: para +#: performance.xml:597 +#, no-c-format +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"Une Session Hibernate est un cache de niveau " +"transactionnel des données persistantes. Il est possible de configurer un " +"cache de cluster ou de JVM (de niveau SessionFactory pour " +"être exact) défini classe par classe et collection par collection. Vous " +"pouvez même utiliser votr choix de cache en implémentant le pourvoyeur " +"(provider) associé. Faites attention, les caches ne sont jamais avertis des " +"modifications faites dans la base de données par d'autres applications (ils " +"peuvent cependant être configurés pour régulièrement expirer les données en " +"cache)." + +#. Tag: para +#: performance.xml:605 +#, no-c-format +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"Par défaut, Hibernate utilise EHCache comme cache de niveau JVM (le support " +"de JCS est désormais déprécié et sera enlevé des futures versions " +"d'Hibernate). Vous pouvez choisir une autre implémentation en spécifiant le " +"nom de la classe qui implémente org.hibernate.cache.CacheProvider en utilisant la propriété hibernate.cache.provider_class." + +#. Tag: title +#: performance.xml:616 +#, no-c-format +msgid "Cache Providers" +msgstr "Fournisseur de cache" + +#. Tag: entry +#: performance.xml:625 performance.xml:813 +#, no-c-format +msgid "Cache" +msgstr "Cache" + +#. Tag: entry +#: performance.xml:626 +#, no-c-format +msgid "Provider class" +msgstr "Classe pourvoyeuse" + +#. Tag: entry +#: performance.xml:627 +#, no-c-format +msgid "Type" +msgstr "Type" + +#. Tag: entry +#: performance.xml:628 +#, no-c-format +msgid "Cluster Safe" +msgstr "Support en Cluster" + +#. Tag: entry +#: performance.xml:629 +#, no-c-format +msgid "Query Cache Supported" +msgstr "Cache de requêtes supporté" + +#. Tag: entry +#: performance.xml:634 performance.xml:822 +#, fuzzy, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Hashtable (ne pas utiliser en production)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Hashtable (ne pas utilser en production)" + +#. Tag: literal +#: performance.xml:635 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#. Tag: entry +#: performance.xml:636 +#, no-c-format +msgid "memory" +msgstr "mémoire" + +#. Tag: entry +#: performance.xml:638 performance.xml:645 performance.xml:652 +#: performance.xml:823 performance.xml:824 performance.xml:825 +#: performance.xml:830 performance.xml:831 performance.xml:832 +#: performance.xml:837 performance.xml:838 performance.xml:839 +#: performance.xml:844 performance.xml:845 performance.xml:851 +#: performance.xml:854 performance.xml:858 performance.xml:861 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:641 performance.xml:829 +#, no-c-format +msgid "EHCache" +msgstr "EHCache" + +#. Tag: literal +#: performance.xml:642 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:643 performance.xml:650 +#, no-c-format +msgid "memory, disk" +msgstr "mémoire, disque" + +#. Tag: entry +#: performance.xml:648 performance.xml:836 +#, no-c-format +msgid "OSCache" +msgstr "OSCache" + +#. Tag: literal +#: performance.xml:649 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#. Tag: entry +#: performance.xml:655 performance.xml:843 +#, no-c-format +msgid "SwarmCache" +msgstr "SwarmCache" + +#. Tag: literal +#: performance.xml:656 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#. Tag: entry +#: performance.xml:657 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "en cluster (multicast ip)" + +#. Tag: entry +#: performance.xml:658 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "oui (invalidation de cluster)" + +#. Tag: entry +#: performance.xml:662 performance.xml:850 +#, fuzzy, no-c-format +msgid "JBoss Cache 1.x" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:663 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#. Tag: entry +#: performance.xml:664 performance.xml:671 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "en cluster (multicast ip), transactionnel" + +#. Tag: entry +#: performance.xml:665 +#, no-c-format +msgid "yes (replication)" +msgstr "oui (replication)" + +#. Tag: entry +#: performance.xml:666 performance.xml:673 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "oui (horloge sync. nécessaire)" + +#. Tag: entry +#: performance.xml:669 performance.xml:857 +#, fuzzy, no-c-format +msgid "JBoss Cache 2" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:670 +#, fuzzy, no-c-format +msgid "org.hibernate.cache.jbc2.JBossCacheRegionFactory" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:672 +#, fuzzy, no-c-format +msgid "yes (replication or invalidation)" +msgstr "oui (invalidation de cluster)" + +#. Tag: title +#: performance.xml:680 +#, no-c-format +msgid "Cache mappings" +msgstr "Mapping de Cache" + +#. Tag: para +#: performance.xml:682 +#, no-c-format +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "" +"L'élément <cache> d'une classe ou d'une collection " +"à la forme suivante :" + +#. Tag: programlisting +#: performance.xml:693 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage (requis) spécifie la stratégie de cache : " +"transactionel, lecture-écriture, " +"lecture-écriture non stricte ou lecture seule" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (optionnel, par défaut il s'agit du nom de la " +"classe ou du nom de role de la collection) spécifie le nom de la région du " +"cache de second niveau" + +#. Tag: para +#: performance.xml:712 +#, no-c-format +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (optionnel, par défaut all) " +"non-lazy spécifie que les propriétés des entités mappées " +"avec lazy=\"true\" ne doivent pas être mises en cache " +"lorsque le chargement tardif des attributs est activé." + +#. Tag: para +#: performance.xml:722 +#, fuzzy, no-c-format +msgid "" +"Alternatively (preferably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"Alternativement (voir préférentiellement), vous pouvez spécifier les " +"éléments <class-cache> et <collection-" +"cache> dans hibernate.cfg.xml." + +#. Tag: para +#: performance.xml:727 +#, no-c-format +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"L'attribut usage spécifie une stratégie de " +"concurrence d'accès au cache." + +#. Tag: title +#: performance.xml:734 +#, no-c-format +msgid "Strategy: read only" +msgstr "Strategie : lecture seule" + +#. Tag: para +#: performance.xml:736 +#, no-c-format +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"Si votre application a besoin de lire mais ne modifie jamais les instances " +"d'une classe, un cache read-only peut être utilisé. C'est " +"la stratégie la plus simple et la plus performante. Elle est même " +"parfaitement sûre dans un cluster." + +#. Tag: programlisting +#: performance.xml:742 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:748 +#, no-c-format +msgid "Strategy: read/write" +msgstr "Stratégie : lecture/écriture" + +#. Tag: para +#: performance.xml:750 +#, no-c-format +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"Si l'application a besoin de mettre à jour des données, un cache " +"read-write peut être approprié. Cette stratégie ne " +"devrait jamais être utilisée si votre application nécessite un niveau " +"d'isolation transactionnelle sérialisable. Si le cache est utilisé dans un " +"environnement JTA, vous devez spécifier hibernate.transaction." +"manager_lookup_class, fournissant une stratégie pour obtenir le " +"TransactionManager JTA. Dans d'autres environnements, " +"vous devriez vous assurer que la transation est terminée à l'appel de " +"Session.close() ou Session.disconnect(). Si vous souhaitez utiliser cette stratégie dans un cluster, vous " +"devriez vous assurer que l'implémentation de cache utilisée supporte le " +"vérrouillage. Ce que ne font pas les pourvoyeurs caches " +"fournis." + +#. Tag: programlisting +#: performance.xml:761 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:766 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "Stratégie : lecture/écriture non stricte" + +#. Tag: para +#: performance.xml:768 +#, no-c-format +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"Si l'application besoin de mettre à jour les données de manière " +"occasionnelle (qu'il est très peu probable que deux transactions essaient de " +"mettre à jour le même élément simultanément) et qu'une isolation " +"transactionnelle stricte n'est pas nécessaire, un cache nonstrict-" +"read-write peut être approprié. Si le cache est utilisé dans un " +"environnement JTA, vous devez spécifier hibernate.transaction." +"manager_lookup_class. Dans d'autres environnements, vous devriez " +"vous assurer que la transation est terminée à l'appel de Session." +"close() ou Session.disconnect()" + +#. Tag: title +#: performance.xml:780 +#, no-c-format +msgid "Strategy: transactional" +msgstr "Stratégie : transactionelle" + +#. Tag: para +#: performance.xml:782 +#, no-c-format +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"La stratégie de cache transactional supporte un cache " +"complètement transactionnel comme, par exemple, JBoss TreeCache. Un tel " +"cache ne peut être utilisé que dans un environnement JTA et vous devez " +"spécifier hibernate.transaction.manager_lookup_class." + +#. Tag: title +#: performance.xml:791 +#, fuzzy, no-c-format +msgid "Cache-provider/concurrency-strategy compatibility" +msgstr "Stratégie de concurrence du cache" + +#. Tag: para +#: performance.xml:794 +#, fuzzy, no-c-format +msgid "" +"None of the cache providers support all of the cache concurrency strategies." +msgstr "" +"Aucun des caches livrés ne supporte toutes les stratégies de concurrence. Le " +"tableau suivant montre quels caches sont compatibles avec quelles stratégies " +"de concurrence." + +#. Tag: para +#: performance.xml:799 +#, fuzzy, no-c-format +msgid "" +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"Aucun des caches livrés ne supporte toutes les stratégies de concurrence. Le " +"tableau suivant montre quels caches sont compatibles avec quelles stratégies " +"de concurrence." + +#. Tag: title +#: performance.xml:804 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "Stratégie de concurrence du cache" + +#. Tag: entry +#: performance.xml:814 +#, no-c-format +msgid "read-only" +msgstr "read-only (lecture seule)" + +#. Tag: entry +#: performance.xml:815 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "nonstrict-read-write (lecture-écriture non stricte)" + +#. Tag: entry +#: performance.xml:816 +#, no-c-format +msgid "read-write" +msgstr "read-write (lecture-ériture)" + +#. Tag: entry +#: performance.xml:817 +#, no-c-format +msgid "transactional" +msgstr "transactional (transactionnel)" + +#. Tag: title +#: performance.xml:872 +#, no-c-format +msgid "Managing the caches" +msgstr "Gérer les caches" + +#. Tag: para +#: performance.xml:874 +#, no-c-format +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"A chaque fois que vous passez un objet à la méthode save(), update() ou saveOrUpdate() " +"et à chaque fois que vous récupérez un objet avec load(), " +"get(), list(), iterate() or scroll(), cet objet est ajouté au cache " +"interne de la Session." + +#. Tag: para +#: performance.xml:881 +#, no-c-format +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"Lorsqu'il y a un appel à la méthode flush(), l'état de " +"cet objet va être synchronisé avec la base de données. Si vous ne voulez pas " +"que cette synchronisation ait lieu ou si vous traitez un grand nombre " +"d'objets et que vous avez besoin de gérer la mémoire de manière efficace, " +"vous pouvez utiliser la méthode evict() pour supprimer " +"l'objet et ses collections dépendantes du cache de la session" + +#. Tag: programlisting +#: performance.xml:889 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:891 +#, no-c-format +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"La Session dispose aussi de la méthode contains()" +" pour déterminer si une instance appartient au cache de la session." + +#. Tag: para +#: performance.xml:896 +#, no-c-format +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"Pour retirer tous les objets du cache session, appelez Session.clear" +"()" + +#. Tag: para +#: performance.xml:900 +#, no-c-format +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"Pour le cache de second niveau, il existe des méthodes définies dans " +"SessionFactory pour retirer des instances du cache, la " +"classe entière, une instance de collection ou le rôle entier d'une " +"collection." + +#. Tag: programlisting +#: performance.xml:906 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:908 +#, no-c-format +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"Le CacheMode contrôle comme une session particulière " +"interragit avec le cache de second niveau" + +#. Tag: para +#: performance.xml:915 +#, no-c-format +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "" +"CacheMode.NORMAL - lit et écrit les items dans le cache " +"de second niveau" + +#. Tag: para +#: performance.xml:920 +#, no-c-format +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - lit les items dans le cache de second " +"niveau mais ne les écrit pas sauf dans le cache d'une mise à jour d'une " +"donnée" + +#. Tag: para +#: performance.xml:926 +#, no-c-format +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - écrit les items dans le cache de second " +"niveau mais ne les lit pas dans le cache de second niveau" + +#. Tag: para +#: performance.xml:932 +#, no-c-format +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - écrit les items dans le cache de " +"second niveau mais ne les lit pas dans le cache de second niveau, outrepasse " +"l'effet dehibernate.cache.use_minimal_puts, en forçant un " +"rafraîchissement du cache de second niveau pour chaque item lu dans la base" + +#. Tag: para +#: performance.xml:940 +#, no-c-format +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"Pour parcourir le contenu du cache de second niveau ou la région du cache " +"dédiée au requêtes, vous pouvez utiliser l'API Statistics " +"API:" + +#. Tag: programlisting +#: performance.xml:945 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:947 +#, no-c-format +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"Vous devez pour cela activer les statistiques et optionnellement forcer " +"Hibernate à conserver les entrées dans le cache sous un format plus " +"compréhensible pour l'utilisateur :" + +#. Tag: programlisting +#: performance.xml:952 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:957 +#, no-c-format +msgid "The Query Cache" +msgstr "Le cache de requêtes" + +#. Tag: para +#: performance.xml:959 +#, no-c-format +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"Les résultats d'une requête peuvent aussi être placés en cache. Ceci n'est " +"utile que pour les requêtes qui sont exécutées avec les mêmes paramètres. " +"Pour utiliser le cache de requêtes, vous devez d'abord l'activer :" + +#. Tag: programlisting +#: performance.xml:964 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"Ce paramètre amène la création de deux nouvelles régions dans le cache, une " +"qui va conserver le résultat des requêtes mises en cache (org." +"hibernate.cache.StandardQueryCache) et l'autre qui va conserver " +"l'horodatage des mises à jour les plus récentes effectuées sur les tables " +"requêtables (org.hibernate.cache.UpdateTimestampsCache). " +"Il faut noter que le cache de requête ne conserve pas l'état des entités, il " +"met en cache uniquement les valeurs de l'identifiant et les valeurs de types " +"de base (?). Le cache de requête doit toujours être utilisé avec le cache de " +"second niveau pour être efficace." + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"La plupart des requêtes ne retirent pas de bénéfice pas du cache, donc par " +"défaut les requêtes ne sont pas mises en cache. Pour activer le cache, " +"appelez Query.setCacheable(true). Cet appel permet de " +"vérifier si les résultats sont en cache ou non, voire d'ajouter ces " +"résultats si la requête est exécutée." + +#. Tag: para +#: performance.xml:983 +#, no-c-format +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"Si vous avez besoin de contrôler finement les délais d'expiration du cache, " +"vous pouvez spécifier une région de cache nommée pour une requête " +"particulière en appelant Query.setCacheRegion()." + +#. Tag: programlisting +#: performance.xml:989 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"Si une requête doit forcer le rafraîchissement de sa région de cache, vous " +"devez appeler Query.setCacheMode(CacheMode.REFRESH). " +"C'est particulièrement utile lorsque les données peuvent avoir été mises à " +"jour par un processus séparé (e.g. elles n'ont pas été modifiées par " +"Hibernate). Cela permet à l'application de rafraîchir de manière sélective " +"les résultats d'une requête particulière. Il s'agit d'une alternative plus " +"efficace à l'éviction d'une région du cache à l'aide de la méthode " +"SessionFactory.evictQueries()." + +#. Tag: title +#: performance.xml:1003 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "Comprendre les performances des Collections" + +#. Tag: para +#: performance.xml:1005 +#, no-c-format +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"Nous avons déjà passé du temps à discuter des collections. Dans cette " +"section, nous allons traiter du comportement des collections à l'exécution." + +#. Tag: title +#: performance.xml:1012 +#, no-c-format +msgid "Taxonomy" +msgstr "Classification" + +#. Tag: para +#: performance.xml:1014 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernate définit trois types de collections :" + +#. Tag: para +#: performance.xml:1018 +#, no-c-format +msgid "collections of values" +msgstr "les collections de valeurs" + +#. Tag: para +#: performance.xml:1021 +#, no-c-format +msgid "one to many associations" +msgstr "les associations un-vers-plusieurs" + +#. Tag: para +#: performance.xml:1024 +#, no-c-format +msgid "many to many associations" +msgstr "les associations plusieurs-vers-plusieurs" + +#. Tag: para +#: performance.xml:1028 +#, no-c-format +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"Cette classification distingue les différentes relations entre les tables et " +"les clés étrangères mais ne nous apprend rien de ce que nous devons savoir " +"sur le modèle relationnel. Pour comprendre parfaitement la structure " +"relationnelle et les caractéristiques des performances, nous devons " +"considérer la structure de la clé primaire qui est utilisée par Hibernate " +"pour mettre à jour ou supprimer les éléments des collections. Celà nous " +"amène aux classifications suivantes :" + +#. Tag: para +#: performance.xml:1039 +#, no-c-format +msgid "indexed collections" +msgstr "collections indexées" + +#. Tag: para +#: performance.xml:1042 +#, no-c-format +msgid "sets" +msgstr "sets" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "bags" +msgstr "bags" + +#. Tag: para +#: performance.xml:1049 +#, no-c-format +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"Toutes les collections indexées (maps, lists, arrays) ont une clé primaire " +"constituée des colonnes clé (<key>) et <" +"index>. Avec ce type de clé primaire, la mise à jour de " +"collection est en général très performante - la clé primaire peut être " +"indexées efficacement et un élément particulier peut être localisé " +"efficacement lorsqu'Hibernate essaie de le mettre à jour ou de le supprimer." + +#. Tag: para +#: performance.xml:1057 +#, fuzzy, no-c-format +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficiently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"Les Sets ont une clé primaire composée de <key> et " +"des colonnes représentant l'élément. Elle est donc moins efficace pour " +"certains types de collections d'éléments, en particulier les éléments " +"composites, les textes volumineux ou les champs binaires ; la base de " +"données peut ne pas être capable d'indexer aussi efficacement une clé " +"primaire aussi complexe. Cependant, pour les associations un-vers-plusieurs " +"ou plusieurs-vers-plusieurs, spécialement lorsque l'on utilise des entités " +"ayant des identifiants techniques, il est probable que cela soit aussi " +"efficace (note : si vous voulez que SchemaExport créé " +"effectivement la clé primaire d'un <set> pour vous, " +"vous devez déclarer toutes les colonnes avec not-null=\"true\")." + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"Le mapping à l'aide d'<idbag> définit une clé de " +"substitution ce qui leur permet d'être très efficaces lors de la mise à " +"jour. En fait il s'agit du meilleur cas de mise à jour d'une collection" + +#. Tag: para +#: performance.xml:1073 +#, no-c-format +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"Le pire cas intervient pour les Bags. Dans la mesure où un bag permet la " +"duplications des éléments et n'a pas de colonne d'index, aucune clé primaire " +"ne peut être définie. Hibernate n'a aucun moyen de distinguer des " +"enregistrements dupliqués. Hibernate résout ce problème en supprimant " +"complètement les enregistrements (via un simple DELETE), " +"puis en recréant la collection chaque fois qu'elle change. Ce qui peut être " +"très inefficace." + +#. Tag: para +#: performance.xml:1081 +#, no-c-format +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"Notez que pour une relation un-vers-plusieurs, la \"clé primaire\" peut ne " +"pas être la clé primaire de la table en base de données - mais même dans ce " +"cas, la classification ci-dessus reste utile (Elle explique comment " +"Hibernate \"localise\" chaque enregistrement de la collection)." + +#. Tag: title +#: performance.xml:1091 +#, no-c-format +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "" +"Les lists, les maps, les idbags et les sets sont les collections les plus " +"efficaces pour la mise à jour" + +#. Tag: para +#: performance.xml:1093 +#, no-c-format +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"La discussion précédente montre clairement que les collections indexées et " +"(la plupart du temps) les sets, permettent de réaliser le plus efficacement " +"les opérations d'ajout, de suppression ou de modification d'éléments." + +#. Tag: para +#: performance.xml:1099 +#, no-c-format +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"Il existe un autre avantage qu'ont les collections indexées sur les Sets " +"dans le cadre d'une association plusieurs vers plusieurs ou d'une collection " +"de valeurs. A cause de la structure inhérente d'un Set, " +"Hibernate n'effectue jamais d'UPDATE quand un " +"enregistrement est modifié. Les modifications apportées à un Set se font via un INSERT et DELETE (de chaque enregistrement). Une fois de plus, ce cas ne s'applique " +"pas aux associations un vers plusieurs." + +#. Tag: para +#: performance.xml:1108 +#, no-c-format +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"Après s'être rappelé que les tableaux ne peuvent pas être chargés " +"tardivement, nous pouvons conclure que les lists, les maps et les idbags " +"sont les types de collections (non inversées) les plus performants, avec les " +"sets pas loin derrières. Les sets son le type de collection le plus courant " +"dans les applications Hibernate. Cela est du au fait que la sémantique des " +"\"set\" est la plus naturelle dans le modèle relationnel." + +#. Tag: para +#: performance.xml:1116 +#, no-c-format +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"Cependant, dans des modèles objet bien conçus avec Hibernate, on voit " +"souvent que la plupart des collections sont en fait des associations \"un-" +"vers-plusieurs\" avec inverse=\"true\". Pour ces " +"associations, les mises à jour sont gérées au niveau de l'association " +"\"plusieurs-vers-un\" et les considérations de performance de mise à jour " +"des collections ne s'appliquent tout simplement pas dans ces cas là." + +#. Tag: title +#: performance.xml:1126 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "" +"Les Bags et les lists sont les plus efficaces pour les collections inverse" + +#. Tag: para +#: performance.xml:1128 +#, no-c-format +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"Avant que vous n'oubliez les bags pour toujours, il y a un cas précis où les " +"bags (et les lists) sont bien plus performants que les sets. Pour une " +"collection marquée comme inverse=\"true\" (le choix le " +"plus courant pour un relation un vers plusieurs bidirectionnelle), nous " +"pouvons ajouter des éléments à un bag ou une list sans avoir besoin de " +"l'initialiser (fetch) les éléments du sac! Ceci parce que " +"Collection.add() ou Collection.addAll() doit toujours retourner vrai pour un bag ou une List (contrairement au Set). Cela peut rendre le code " +"suivant beaucoup plus rapide." + +#. Tag: programlisting +#: performance.xml:1138 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:1143 +#, no-c-format +msgid "One shot delete" +msgstr "Suppression en un coup" + +#. Tag: para +#: performance.xml:1145 +#, no-c-format +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"Parfois, effacer les éléments d'une collection un par un peut être " +"extrêmement inefficace. Hibernate n'est pas totalement stupide, il sait " +"qu'il ne faut pas le faire dans le cas d'une collection complètement vidée " +"(lorsque vous appellez list.clear(), par exemple). Dans " +"ce cas, Hibernate fera un simple DELETE et le travail est " +"fait !" + +#. Tag: para +#: performance.xml:1152 +#, no-c-format +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"Supposons que nous ajoutions un élément dans une collection de taille vingt " +"et que nous enlevions ensuite deux éléments. Hibernate effectuera un " +"INSERT puis deux DELETE (à moins que " +"la collection ne soit un bag). Ce qui est souhaitable." + +#. Tag: para +#: performance.xml:1158 +#, no-c-format +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"Cependant, supposons que nous enlevions dix huit éléments, laissant ainsi " +"deux éléments, puis que nous ajoutions trois nouveaux éléments. Il y a deux " +"moyens de procéder." + +#. Tag: para +#: performance.xml:1165 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "effacer dix huit enregistrements un à un puis en insérer trois" + +#. Tag: para +#: performance.xml:1168 +#, no-c-format +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "" +"effacer la totalité de la collection (en un DELETE SQL) " +"puis insérer les cinq éléments restant un à un" + +#. Tag: para +#: performance.xml:1173 +#, no-c-format +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernate n'est pas assez intelligent pour savoir que, dans ce cas, la " +"seconde méthode est plus rapide (Il plutôt heureux qu'Hibernate ne soit pas " +"trop intelligent ; un tel comportement pourrait rendre l'utilisation de " +"triggers de bases de données plutôt aléatoire, etc...)." + +#. Tag: para +#: performance.xml:1179 +#, no-c-format +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"Heureusement, vous pouvez forcer ce comportement lorsque vous le souhaitez, " +"en liberant (c'est-à-dire en déréférençant) la collection initiale et en " +"retournant une collection nouvellement instanciée avec les éléments " +"restants. Ceci peut être très pratique et très puissant de temps en temps." + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"Bien sûr, la suppression en un coup ne s'applique pas pour les collections " +"qui sont mappées avec inverse=\"true\"." + +#. Tag: title +#: performance.xml:1194 +#, no-c-format +msgid "Monitoring performance" +msgstr "Moniteur de performance" + +#. Tag: para +#: performance.xml:1196 +#, no-c-format +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"L'optimisation n'est pas d'un grand intérêt sans le suivi et l'accès aux " +"données de performance. Hibernate fournit toute une panoplie de rapport sur " +"ses opérations internes. Les statistiques dans Hibernate sont fournies par " +"SessionFactory." + +#. Tag: title +#: performance.xml:1203 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "Suivi d'une SessionFactory" + +#. Tag: para +#: performance.xml:1205 +#, no-c-format +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"Vous pouvez accéder au métriques d'une SessionFactory de " +"deux manières. La première option est d'appeler sessionFactory." +"getStatistics() et de lire ou d'afficher les Statistics vous même." + +#. Tag: para +#: performance.xml:1211 +#, no-c-format +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"Hibernate peut également utiliser JMX pour publier les métriques si vous " +"activez le MBean StatisticsService. Vous pouvez activer " +"un seul MBean pour toutes vos SessionFactory ou un par " +"factory. Voici un code qui montre un exemple de configuration minimaliste :" + +#. Tag: programlisting +#: performance.xml:1218 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1221 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"TODO: Cela n'a pas de sens : dans le premier cs on récupère et on utilise le " +"MBean directement. Dans le second, on doit fournir le nom JNDI sous lequel " +"est retenu la fabrique de session avant de l'utiliser. Pour cela il faut " +"utiliser hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name" +"\")" + +#. Tag: para +#: performance.xml:1228 +#, no-c-format +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"Vous pouvez (dés)activer le suivi pour une SessionFactory" + +#. Tag: para +#: performance.xml:1233 +#, no-c-format +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"au moment de la configuration en mettant hibernate." +"generate_statistics à false" + +#. Tag: para +#: performance.xml:1240 +#, no-c-format +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"à chaud avec sf.getStatistics().setStatisticsEnabled(true) ou hibernateStatsBean.setStatisticsEnabled(true)" + +#. Tag: para +#: performance.xml:1247 +#, fuzzy, no-c-format +msgid "" +"Statistics can be reset programmatically using the clear() method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"Les statistiques peuvent être remises à zéro de manière programmatique à " +"l'aide de la méthode clear() Un résumé peut être envoyé à " +"un logger (niveau info) à l'aide de la méthode logSummary()" + +#. Tag: title +#: performance.xml:1256 +#, no-c-format +msgid "Metrics" +msgstr "Métriques" + +#. Tag: para +#: performance.xml:1258 +#, no-c-format +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"Hibernate fournit un certain nombre de métriques, qui vont des informations " +"très basiques aux informations très spécialisées qui ne sont appropriées que " +"dans certains scenarii. Tous les compteurs accessibles sont décrits dans " +"l'API de l'interface Statistics dans trois catégories :" + +#. Tag: para +#: performance.xml:1265 +#, no-c-format +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"Les métriques relatives à l'usage général de la Session " +"comme le nombre de sessions ouvertes, le nombre de connexions JDBC " +"récupérées, etc..." + +#. Tag: para +#: performance.xml:1271 +#, no-c-format +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "" +"Les métriques relatives aux entités, collections, requêtes et caches dans " +"leur ensemble (métriques globales)," + +#. Tag: para +#: performance.xml:1277 +#, no-c-format +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "" +"Les métriques détaillées relatives à une entité, une collection, une requête " +"ou une région de cache particulière." + +#. Tag: para +#: performance.xml:1284 +#, fuzzy, no-c-format +msgid "" +"For example, you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"Par exemple, vous pouvez vérifier l'accès au cache ainsi que le taux " +"d'éléments manquants et de mise à jour des entités, collections et requêtes " +"et le temps moyen que met une requête. Il faut faire attention au fait que " +"le nombre de millisecondes est sujet à approximation en Java. Hibernate est " +"lié à la précision de la machine virtuelle, sur certaines plateformes, cela " +"n'offre qu'une précision de l'ordre de 10 secondes." + +#. Tag: para +#: performance.xml:1291 +#, no-c-format +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"Des accesseurs simples sont utilisés pour accéder aux métriques globales (e." +"g. celles qui ne sont pas liées à une entité, collection ou région de cache " +"particulière). Vous pouvez accéder aux métriques d'une entité, collection, " +"région de cache particulière à l'aide de son nom et à l'aide de sa " +"représentation HQL ou SQL pour une requête. Référez vous à la javadoc des " +"APIS Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics pour plus d'informations. Le code ci-dessous montre un exemple " +"simple :" + +#. Tag: programlisting +#: performance.xml:1301 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1303 +#, no-c-format +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"Pour travailler sur toutes les entités, collections, requêtes et régions de " +"cache, vous pouvez récupérer la liste des noms des entités, collections, " +"requêtes et régions de cache avec les méthodes : getQueries(), getEntityNames(), " +"getCollectionRoleNames(), et " +"getSecondLevelCacheRegionNames()." + +#~ msgid "yes" +#~ msgstr "oui" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/persistent_classes.po b/documentation/envers/src/main/docbook/fr-FR/content/persistent_classes.po new file mode 100644 index 0000000000..2b65ec40ac --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/persistent_classes.po @@ -0,0 +1,889 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:29 +#, no-c-format +msgid "Persistent Classes" +msgstr "Classes persistantes" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"Les classes persistantes sont les classes d'une application qui implémentent " +"les entités d'un problème métier (ex. Client et Commande dans une " +"application de commerce électronique). Toutes les instances d'une classe " +"persistante ne sont pas forcément dans l'état persistant - au lieu de cela, " +"une instance peut être éphémère (NdT : transient) ou détachée." + +#. Tag: para +#: persistent_classes.xml:38 +#, no-c-format +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"Hibernate fonctionne de manière optimale lorsque ces classes suivent " +"quelques règles simples, aussi connues comme le modèle de programmation " +"Plain Old Java Object (POJO). Cependant, aucune de ces règles ne sont des " +"besoins absolus. En effet, Hibernate3 suppose très peu de choses à propos de " +"la nature de vos objets persistants. Vous pouvez exprimer un modèle de " +"domaine par d'autres moyens : utiliser des arbres d'instances de " +"Map, par exemple." + +#. Tag: title +#: persistent_classes.xml:47 +#, no-c-format +msgid "A simple POJO example" +msgstr "Un exemple simple de POJO" + +#. Tag: para +#: persistent_classes.xml:49 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "" +"Toute bonne application Java nécessite une classe persistante représentant " +"les félins." + +#. Tag: programlisting +#: persistent_classes.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:55 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "Il y a quatre règles à suivre ici :" + +#. Tag: title +#: persistent_classes.xml:61 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "Implémenter un constructeur sans argument" + +#. Tag: para +#: persistent_classes.xml:63 +#, no-c-format +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat a un constructeur sans argument. Toutes les classes " +"persistantes doivent avoir un constructeur par défaut (lequel peut ne pas " +"être public) pour qu'Hibernate puissent les instancier en utilisant " +"Constructor.newInstance(). Nous recommandons fortement " +"d'avoir un constructeur par défaut avec au moins une visibilité " +"paquet pour la génération du proxy à l'exécution dans " +"Hibernate." + +#. Tag: title +#: persistent_classes.xml:73 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "Fournir une propriété d'indentifiant (optionnel)" + +#. Tag: para +#: persistent_classes.xml:75 +#, no-c-format +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Cat possède une propriété appelée id. " +"Cette propriété mappe la valeur de la colonne de clé primaire de la table " +"d'une base de données.La propriété aurait pu s'appeler complètement " +"autrement, et son type aurait pu être n'importe quel type primitif, " +"n'importe quel \"encapsuleur\" de type primitif, java.lang.String ou java.util.Date. (Si votre base de données " +"héritée possède des clés composites, elles peuvent être mappées en utilisant " +"une classe définie par l'utilisateur et possédant les propriétés associées " +"aux types de la clé composite - voir la section concernant les identifiants " +"composites plus tard)." + +#. Tag: para +#: persistent_classes.xml:84 +#, no-c-format +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"La propriété d'identifiant est strictement optionnelle. Vous pouver " +"l'oublier et laisser Hibernate s'occuper des identifiants de l'objet en " +"interne. Toutefois, nous ne le recommandons pas." + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "" +"En fait, quelques fonctionnalités ne sont disponibles que pour les classes " +"déclarant un identifiant de propriété :" + +#. Tag: para +#: persistent_classes.xml:96 +#, fuzzy, no-c-format +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"Les réattachements transitifs pour les objets détachés (mise à jour en " +"cascade ou fusion en cascade) - voir " + +#. Tag: literal +#: persistent_classes.xml:103 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#. Tag: literal +#: persistent_classes.xml:108 +#, no-c-format +msgid "Session.merge()" +msgstr "Session.merge()" + +#. Tag: para +#: persistent_classes.xml:113 +#, no-c-format +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"Nous recommandons que vous déclariez les propriétés d'identifiant de manière " +"uniforme. Nous recommandons également que vous utilisiez un type nullable " +"(ie. non primitif)." + +#. Tag: title +#: persistent_classes.xml:120 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "Favoriser les classes non finales (optionnel)" + +#. Tag: para +#: persistent_classes.xml:121 +#, no-c-format +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"Une fonctionnalité clef d'Hibernate, les proxies, " +"nécessitent que la classe persistente soit non finale ou qu'elle soit " +"l'implémentation d'une interface qui déclare toutes les méthodes publiques." + +#. Tag: para +#: persistent_classes.xml:126 +#, no-c-format +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"Vous pouvez persister, grâce à Hibernate, les classes final qui n'implémentent pas d'interface, mais vous ne pourrez pas " +"utiliser les proxies pour les chargements d'associations paresseuses - ce " +"qui limitera vos possibilités d'ajustement des performances." + +#. Tag: para +#: persistent_classes.xml:131 +#, no-c-format +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"Vous devriez aussi éviter de déclarer des méthodes public final sur des classes non-finales. Si vous voulez utiliser une classe " +"avec une méthode public final, vous devez explicitement " +"désactiver les proxies en paramétrant lazy=\"false\"." + +#. Tag: title +#: persistent_classes.xml:139 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "" +"Déclarer les accesseurs et mutateurs des attributs persistants (optionnel)" + +#. Tag: para +#: persistent_classes.xml:141 +#, no-c-format +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat déclare des mutateurs pour toutes ses champs " +"persistants. Beaucoup d'autres solutions de mapping Objet/relationnel " +"persistent directement les variables d'instance. Nous pensons qu'il est bien " +"mieux de fournir une indirection entre le schéma relationnel et les " +"structures de données internes de la classe. Par défaut, Hibernate persiste " +"les propriétés suivant le style JavaBean, et reconnaît les noms de méthodes " +"de la forme getFoo, isFoo et " +"setFoo. Nous pouvons changer pour un accès direct aux " +"champs pour des propriétés particulières, si besoin est." + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"Les propriétés n'ont pas à être déclarées publiques - " +"Hibernate peut persister une propriété avec un paire de getter/setter de " +"visibilité par défault, protected ou private." + +#. Tag: title +#: persistent_classes.xml:162 +#, no-c-format +msgid "Implementing inheritance" +msgstr "Implémenter l'héritage" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"Une sous-classe doit également suivre la première et la seconde règle. Elle " +"hérite sa propriété d'identifiant de Cat." + +#. Tag: programlisting +#: persistent_classes.xml:169 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:173 +#, no-c-format +msgid "" +"Implementing equals() and hashCode()" +msgstr "" +"Implémenter equals() et hashCode()" + +#. Tag: para +#: persistent_classes.xml:175 +#, no-c-format +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"Vous devez surcharger les méthodes equals() et " +"hashCode() si vous" + +#. Tag: para +#: persistent_classes.xml:181 +#, no-c-format +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"avez l'intention de mettre des instances de classes persistantes dans un " +"Set (la manière recommandée pour représenter des " +"associations pluri-valuées) et" + +#. Tag: para +#: persistent_classes.xml:188 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "avez l'intention d'utiliser le réattachement d'instances détachées" + +#. Tag: para +#: persistent_classes.xml:194 +#, no-c-format +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernate garantit l'équivalence de l'identité persistante (ligne de base de " +"données) et l'identité Java seulement à l'intérieur de la portée d'une " +"session particulière. Donc dès que nous mélangeons des instances venant de " +"différentes sessions, nous devons implémenter equals() et " +"hashCode() si nous souhaitons avoir une sémantique " +"correcte pour les Sets." + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"La manière la plus évidente est d'implémenter equals()/" +"hashCode() en comparant la valeur de l'identifiant des " +"deux objets. Si cette valeur est identique, les deux doivent représenter la " +"même ligne de base de données, ils sont donc égaux (si les deux sont ajoutés " +"à un Set, nous n'aurons qu'un seul élément dans le " +"Set). Malheureusement, nous ne pouvons pas utiliser cette " +"approche avec des identifiants générés ! Hibernate n'assignera de valeur " +"d'identifiant qu'aux objets qui sont persistants, une instance nouvellement " +"créée n'aura donc pas de valeur d'identifiant ! De plus, si une instance est " +"non sauvegardée et actuellement dans un Set, le " +"sauvegarder assignera une valeur d'identifiant à l'objet. Si equals" +"() et hashCode() sont basées sur la valeur de " +"l'identifiant, le code de hachage devrait changer, rompant le contrat du " +"Set. Regardez sur le site web d'Hibernate pour une " +"discussion complète de ce problème. Notez que ceci n'est pas un problème " +"d'Hibernate, mais la sémantique normale de Java pour l'identité d'un objet " +"et l'égalité." + +#. Tag: para +#: persistent_classes.xml:216 +#, no-c-format +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"Nous recommandons donc d'implémenter equals() et " +"hashCode() en utilisant l'égalité par clé " +"métier.L'égalité par clé métier signifie que la méthode " +"equals() compare uniquement les propriétés qui forment " +"une clé métier, une clé qui identifierait notre instance dans le monde réel " +"(une clé candidate naturelle) :" + +#. Tag: programlisting +#: persistent_classes.xml:224 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:226 +#, no-c-format +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"Notez qu'une clef métier ne doit pas être solide comme une clef primaire de " +"base de données (voir ). Les " +"propriétés immuables ou uniques sont généralement de bonnes candidates pour " +"une clef métier." + +#. Tag: title +#: persistent_classes.xml:236 +#, no-c-format +msgid "Dynamic models" +msgstr "Modèles dynamiques" + +#. Tag: emphasis +#: persistent_classes.xml:239 +#, no-c-format +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "" +"Notez que la fonctionnalités suivantes sont actuellement considérées comme " +"expérimentales et peuvent changer dans un futur proche." + +#. Tag: para +#: persistent_classes.xml:243 +#, no-c-format +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"Les entités persistantes ne doivent pas nécessairement être représentées " +"comme des classes POJO ou des objets JavaBean à l'exécution. Hibernate " +"supporte aussi les modèles dynamiques (en utilisant des Maps de Maps à l'exécution) et la représentation des " +"entités comme des arbres DOM4J. Avec cette approche, vous n'écrivez pas de " +"classes persistantes, seulement des fichiers de mapping." + +#. Tag: para +#: persistent_classes.xml:251 +#, no-c-format +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"Par défaut, Hibernate fonctionne en mode POJO normal. Vous pouvez paramétrer " +"un mode de représentation d'entité par défaut pour une " +"SessionFactory particulière en utilisant l'option de " +"configuration default_entity_mode (voir )." + +#. Tag: para +#: persistent_classes.xml:258 +#, no-c-format +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"Les exemples suivants démontrent la représentation utilisant des " +"Maps. D'abord, dans le fichier de mapping, un " +"entity-name doit être déclaré au lieu (ou en plus) d'un " +"nom de classe :" + +#. Tag: programlisting +#: persistent_classes.xml:264 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:266 +#, no-c-format +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"Notez que même si des associations sont déclarées en utilisant des noms de " +"classe cible, le type de cible d'une association peut aussi être une entité " +"dynamique au lieu d'un POJO." + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"Après avoir configuré le mode d'entité par défaut à dynamic-map pour la SessionFactory, nous pouvons lors de " +"l'exécution fonctionner avec des Maps de Maps :" + +#. Tag: programlisting +#: persistent_classes.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:281 +#, no-c-format +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"Les avantages d'un mapping dynamique sont un gain de temps pour le " +"prototypage sans la nécessité d'implémenter les classes d'entité. Pourtant, " +"vous perdez la vérification du typage au moment de la compilation et aurez " +"plus d'exceptions à gérer lors de l'exécution. Grâce au mapping d'Hibernate, " +"le schéma de la base de données peut facilement être normalisé et solidifié, " +"permettant de rajouter une implémentation propre du modèle de domaine plus " +"tard." + +#. Tag: para +#: persistent_classes.xml:289 +#, no-c-format +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "" +"Les modes de représentation d'une entité peut aussi être configuré par " +"Session :" + +#. Tag: programlisting +#: persistent_classes.xml:294 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:297 +#, no-c-format +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"Veuillez noter que l'appel à getSession() en utilisant un " +"EntityMode se fait sur l'API Session, " +"pas SessionFactory. De cette manière, la nouvelle " +"Session partage les connexions JDBC, transactions et " +"autres informations de contexte sous-jacentes. Cela signifie que vous n'avez " +"pas à appeler flush() et close() sur " +"la Session secondaire, et laissez aussi la gestion de la " +"transaction et de la connexion à l'unité de travail primaire." + +#. Tag: para +#: persistent_classes.xml:307 +#, no-c-format +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "" +"Plus d'informations à propos de la représentation XML peuvent être trouvées " +"dans ." + +#. Tag: title +#: persistent_classes.xml:315 +#, no-c-format +msgid "Tuplizers" +msgstr "Tuplizers" + +#. Tag: para +#: persistent_classes.xml:317 +#, no-c-format +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer, et ses sous-interfaces, " +"sont responsables de la gestion d'une représentation particulière d'un " +"morceau de données, en fonction du org.hibernate.EntityMode de réprésentation. Si un morceau donné de données est pensé comme " +"une structure de données, alors un tuplizer est la chose qui sait comment " +"créer une telle structure de données, comment extraire des valeurs et " +"injecter des valeurs dans une telle structure de données. Par exemple, pour " +"le mode d'entité POJO, le tuplizer correspondant sait comment créer le POJO " +"à travers son constructeur et comment accéder aux propriétés du POJO " +"utilisant les accesseurs de la propriété définie. Il y a deux types de " +"Tuplizers haut niveau, représenté par les interfaces org.hibernate." +"tuple.EntityTuplizer et org.hibernate.tuple." +"ComponentTuplizer. Les EntityTuplizers sont " +"responsables de la gestion des contrats mentionnés ci-dessus pour les " +"entités, alors que les ComponentTuplizers s'occupent des " +"composants." + +#. Tag: para +#: persistent_classes.xml:332 +#, no-c-format +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"Les utilisateurs peuvent aussi brancher leurs propres tuplizers. Peut-être " +"vous est-il nécessaire qu'une implémentation de java.util.Map autre que java.util.HashMap soit utilisée dans " +"le mode d'entité dynamic-map ; ou peut-être avez-vous besoin de définir une " +"statégie de génération de proxy différente de celle utilisée par défaut. Les " +"deux devraient être effectuées en définissant une implémentation de tuplizer " +"utilisateur. Les définitions de tuplizers sont attachées au mapping de " +"l'entité ou du composant qu'ils sont censés gérer. Retour à l'exemple de " +"notre entité utilisateur :" + +#. Tag: programlisting +#: persistent_classes.xml:341 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:347 +#, no-c-format +msgid "Extentsions" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:348 +#, no-c-format +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "" +"TODO: Document user-extension framework in the property and proxy packages" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/preface.po b/documentation/envers/src/main/docbook/fr-FR/content/preface.po new file mode 100644 index 0000000000..a3f9212c25 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/preface.po @@ -0,0 +1,206 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:29 +#, no-c-format +msgid "Preface" +msgstr "Préface" + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"Travailler dans les deux univers que sont l'orienté objet et la base de " +"données relationnelle peut être lourd et consommateur en temps dans le monde " +"de l'entreprise d'aujourd'hui. Hibernate est un outil de mapping objet/" +"relationnel pour le monde Java. Le terme mapping objet/relationnel (ORM) " +"décrit la technique consistant à faire le lien entre la représentation objet " +"des données et sa représentation relationnelle basée sur un schéma SQL." + +#. Tag: para +#: preface.xml:39 +#, no-c-format +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"Non seulement, Hibernate s'occupe du transfert des classes Java dans les " +"tables de la base de données (et des types de données Java dans les types de " +"données SQL), mais il permet de requêter les données et propose des moyens " +"de les récupérer. Il peut donc réduire de manière significative le temps de " +"développement qui aurait été autrement perdu dans une manipulation manuelle " +"des données via SQL et JDBC." + +#. Tag: para +#: preface.xml:46 +#, no-c-format +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"Le but d'Hibernate est de libérer le développeur de 95 pourcent des tâches " +"de programmation liées à la persistance des données communes. Hibernate " +"n'est probablement pas la meilleure solution pour les applications centrées " +"sur les données qui n'utilisent que les procédures stockées pour implémenter " +"la logique métier dans la base de données, il est le plus utile dans les " +"modèles métier orientés objets dont la logique métier est implémentée dans " +"la couche Java dite intermédiaire. Cependant, Hibernate vous aidera à " +"supprimer ou à encapsuler le code SQL spécifique à votre base de données et " +"vous aidera sur la tâche commune qu'est la transformation des données d'une " +"représentation tabulaire à une représentation sous forme de graphe d'objets." + +#. Tag: para +#: preface.xml:56 +#, no-c-format +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"Si vous êtes nouveau dans Hibernate et le mapping Objet/Relationnel voire " +"même en Java, suivez ces quelques étapes :" + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +"Lisez pour un didacticiel plus long avec plus " +"d'instructions étape par étape." + +#. Tag: para +#: preface.xml:71 +#, no-c-format +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "" +"Lisez pour comprendre les environnements " +"dans lesquels Hibernate peut être utilisé." + +#. Tag: para +#: preface.xml:77 +#, no-c-format +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"Regardez le répertoire eg de la distribution Hibernate, " +"il contient une application simple et autonome. Copiez votre pilote JDBC " +"dans le répertoire lib/ et éditez src/hibernate." +"properties, en positionnant correctement les valeurs pour votre " +"base de données. A partir d'une invite de commande dans le répertoire de la " +"distribution, tapez ant eg (cela utilise Ant), ou sous " +"Windows tapez build eg." + +#. Tag: para +#: preface.xml:88 +#, no-c-format +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "" +"Faîtes de cette documentation de référence votre principale source " +"d'information. Pensez à lire Java Persistence with Hibernate (http://www.manning.com/bauer2) si vous avez besoin de plus d'aide " +"avec le design d'applications ou si vous préférez un tutoriel pas à pas. " +"Visitez aussi http://caveatemptor.hibernate.org et téléchargez l'application " +"exemple pour Java Persistence with Hibernate." + +#. Tag: para +#: preface.xml:98 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "" +"Les questions les plus fréquemment posées (FAQs) trouvent leur réponse sur " +"le site web Hibernate." + +#. Tag: para +#: preface.xml:103 +#, no-c-format +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "" +"Des démos, exemples et tutoriaux de tierces personnes sont référencés sur le " +"site web Hibernate." + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"La zone communautaire (Community Area) du site web Hibernate est une bonne " +"source d'information sur les design patterns et sur différentes solutions " +"d'intégration d'Hibernate (Tomcat, JBoss, Spring Framework, Struts, EJB, " +"etc)." + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"Si vous avez des questions, utilisez le forum utilisateurs du site web " +"Hibernate. Nous utilisons également l'outil de gestion des incidents JIRA " +"pour tout ce qui est rapports de bogue et demandes d'évolution. Si vous êtes " +"intéressé par le développement d'Hibernate, joignez-vous à la liste de " +"diffusion de développement." + +#. Tag: para +#: preface.xml:125 +#, no-c-format +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"Le développement commercial, le support de production et les formations à " +"Hibernate sont proposés par JBoss Inc (voir http://www.hibernate.org/" +"SupportTraining/). Hibernate est un projet Open Source professionnel et un " +"composant critique de la suite de produits JBoss Enterprise Middleware " +"System (JEMS)." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/query_criteria.po b/documentation/envers/src/main/docbook/fr-FR/content/query_criteria.po new file mode 100644 index 0000000000..fc0c55813d --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/query_criteria.po @@ -0,0 +1,785 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:29 +#, no-c-format +msgid "Criteria Queries" +msgstr "Requêtes par critères" + +#. Tag: para +#: query_criteria.xml:31 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "" +"Hibernate offre une API d'interrogation par critères intuitive et extensible." + +#. Tag: title +#: query_criteria.xml:36 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "Créer une instance de Criteria" + +#. Tag: para +#: query_criteria.xml:38 +#, no-c-format +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"L'interface net.sf.hibernate.Criteria représente une " +"requête sur une classe persistente donnée. La Session " +"fournit les instances de Criteria." + +#. Tag: programlisting +#: query_criteria.xml:44 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:49 +#, no-c-format +msgid "Narrowing the result set" +msgstr "Restriction du résultat" + +#. Tag: para +#: query_criteria.xml:51 +#, no-c-format +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"Un criterion (critère de recherche) est une instance de l'interface " +"org.hibernate.criterion.Criterion. La classe org." +"hibernate.criterion.Restrictions définit des méthodes pour obtenir " +"des types de Criterion pré-définis." + +#. Tag: programlisting +#: query_criteria.xml:59 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:61 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "Les restrictions peuvent être goupées de manière logique." + +#. Tag: programlisting +#: query_criteria.xml:65 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:67 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:69 +#, no-c-format +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"Il y a plusieurs types de criterion pré-définis (sous classes de " +"Restriction), mais l'une d'entre elle particulièrement " +"utile vous permet de spécifier directement du SQL." + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:76 +#, no-c-format +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "" +"La zone {alias} sera remplacée par l'alias de colonne de " +"l'entité que l'on souhaite intérroger." + +#. Tag: para +#: query_criteria.xml:81 +#, no-c-format +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"Une autre approche pour obtenir un criterion est de le récupérer d'une " +"instance de Property. Vous pouvez créer une " +"Property en appelant Property.forName()." + +#. Tag: programlisting +#: query_criteria.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:92 +#, no-c-format +msgid "Ordering the results" +msgstr "Trier les résultats" + +#. Tag: para +#: query_criteria.xml:94 +#, no-c-format +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"Vous pouvez trier les résultats en utilisant org.hibernate." +"criterion.Order." + +#. Tag: programlisting +#: query_criteria.xml:98 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:105 +#, no-c-format +msgid "Associations" +msgstr "Associations" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"Vous pouvez facilement spécifier des contraintes sur des entités liées, par " +"des associations en utilisant createCriteria()." + +#. Tag: programlisting +#: query_criteria.xml:112 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:114 +#, no-c-format +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"Notez que la seconde createCriteria() retourne une " +"nouvelle instance de Criteria, qui se rapporte aux " +"éléments de la collection kittens." + +#. Tag: para +#: query_criteria.xml:120 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "La forme alternative suivante est utile dans certains cas." + +#. Tag: programlisting +#: query_criteria.xml:124 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:126 +#, no-c-format +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias() ne crée pas de nouvelle instance de " +"Criteria.)" + +#. Tag: para +#: query_criteria.xml:131 +#, no-c-format +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"Notez que les collections kittens contenues dans les instances de " +"Cat retournées par les deux précédentes requêtes ne sont " +"pas pré-filtrées par les critères ! Si vous souhaitez " +"récupérer uniquement les kittens qui correspondent à la criteria, vous devez " +"utiliser ResultTransformer." + +#. Tag: programlisting +#: query_criteria.xml:138 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:143 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "Peuplement d'associations de manière dynamique" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"Vous pouvez spéficier au moment de l'exécution le peuplement d'une " +"association en utilisant setFetchMode() (c'est-à-dire le " +"chargement de celle-ci). Cela permet de surcharger les valeurs \"lazy\" et " +"\"outer-join\" du mapping." + +#. Tag: programlisting +#: query_criteria.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:152 +#, no-c-format +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"Cette requête recherchera mate et kittens via les jointures externes. Voir pour plus d'informations." + +#. Tag: title +#: query_criteria.xml:160 +#, no-c-format +msgid "Example queries" +msgstr "Requêtes par l'exemple" + +#. Tag: para +#: query_criteria.xml:162 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"La classe org.hibernate.criterion.Example vous permet de " +"construire un critère suivant une instance d'objet donnée." + +#. Tag: programlisting +#: query_criteria.xml:167 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:169 +#, no-c-format +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "" +"Les propriétés de type version, identifiant et association sont ignorées. " +"Par défaut, les valeurs null sont exclues." + +#. Tag: para +#: query_criteria.xml:174 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "" +"Vous pouvez ajuster la stratégie d'utilisation de valeurs de " +"l'Exemple." + +#. Tag: programlisting +#: query_criteria.xml:178 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:180 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "" +"Vous pouvez utiliser les \"exemples\" pour des critères sur les objets " +"associés." + +#. Tag: programlisting +#: query_criteria.xml:184 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:189 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "Projections, agrégation et regroupement" + +#. Tag: para +#: query_criteria.xml:190 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"La classe org.hibernate.criterion.Projections est une " +"fabrique d'instances de Projection. Nous appliquons une " +"projection sur une requête en appelant setProjection()." + +#. Tag: programlisting +#: query_criteria.xml:196 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:198 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:200 +#, no-c-format +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"Il n'y a pas besoin de \"group by\" explicite dans une requête par critère. " +"Certains types de projection sont définis pour être des " +"projections de regroupement, lesquels apparaissent " +"aussi dans la clause group by SQL." + +#. Tag: para +#: query_criteria.xml:206 +#, no-c-format +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"Un alias peut optionnellement être assigné à une projection, ainsi la valeur " +"projetée peut être référencée dans des restrictions ou des tris. Voici deux " +"façons différentes de faire ça :" + +#. Tag: programlisting +#: query_criteria.xml:212 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:214 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:216 +#, no-c-format +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"Les méthodes alias() et as() enveloppe " +"simplement une instance de projection dans une autre instance (aliasée) de " +"Projection. Comme un raccourci, vous pouvez assignez un " +"alias lorsque vous ajoutez la projection à la liste de projections :" + +#. Tag: programlisting +#: query_criteria.xml:223 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:227 +#, no-c-format +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "" +"Vous pouvez aussi utiliser Property.forName() pour " +"formuler des projections :" + +#. Tag: programlisting +#: query_criteria.xml:231 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:238 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "Requêtes et sous-requêtes détachées" + +#. Tag: para +#: query_criteria.xml:239 +#, no-c-format +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"La classe DetachedCriteria vous laisse créer une requête " +"en dehors de la portée de la session, et puis l'exécuter plus tard en " +"utilisant n'importe quelle Session arbitraire." + +#. Tag: programlisting +#: query_criteria.xml:244 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:246 +#, no-c-format +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"Une DetachedCriteria peut aussi être utilisée pour " +"exprimer une sous-requête. Des instances de criterion impliquant des sous-" +"requêtes peuvent être obtenues via Subqueries ou " +"Property." + +#. Tag: programlisting +#: query_criteria.xml:252 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:254 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:256 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "Même des requêtes corrélées sont possibles :" + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:269 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "Requêtes par identifiant naturel" + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"Pour la plupart des requêtes, incluant les requêtes par critère, le cache de " +"requêtes n'est pas très efficace, parce que l'invalidation du cache de " +"requêtes arrive trop souvent. Cependant, il y a une sorte spéciale de " +"requête où nous pouvons optimiser l'algorithme d'invalidation du cache : les " +"recherches sur une clef naturelle constante. Dans certaines applications, " +"cette sorte de requête se produit fréquemment. L'API de critère fournit une " +"provision spéciale pour ce cas d'utilisation." + +#. Tag: para +#: query_criteria.xml:279 +#, no-c-format +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"D'abord vous devriez mapper la clef naturelle de votre entité en utilisant " +"<natural-id>, et activer l'utilisation du cache de " +"second niveau." + +#. Tag: programlisting +#: query_criteria.xml:284 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:286 +#, no-c-format +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "" +"Notez que cette fonctionnalité n'est pas prévue pour l'utilisation avec des " +"entités avec des clefs naturelles mutables." + +#. Tag: para +#: query_criteria.xml:291 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "Ensuite, activez le cache de requête d'Hibernate." + +#. Tag: para +#: query_criteria.xml:295 +#, no-c-format +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"Maintenant Restrictions.naturalId() nous permet de rendre " +"l'utilisation de l'algorithme de cache plus efficace." + +#. Tag: programlisting +#: query_criteria.xml:300 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/query_hql.po b/documentation/envers/src/main/docbook/fr-FR/content/query_hql.po new file mode 100644 index 0000000000..c87293c8af --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/query_hql.po @@ -0,0 +1,2451 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:29 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: Langage de requêtage d'Hibernate" + +#. Tag: para +#: query_hql.xml:31 +#, no-c-format +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"Hibernate fourni un langage d'interrogation extrêmement puissant qui " +"ressemble (et c'est voulu) au SQL. Mais ne soyez pas distraits par la " +"syntaxe ; HQL est totalement orienté objet, comprenant des notions " +"d'héritage, de polymorphisme et d'association." + +#. Tag: title +#: query_hql.xml:38 +#, no-c-format +msgid "Case Sensitivity" +msgstr "Sensibilité à la casse" + +#. Tag: para +#: query_hql.xml:40 +#, no-c-format +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"Les requêtes sont insensibles à la casse, à l'exception des noms des classes " +"Java et des propriétés. Ainsi, SeLeCT est identique à " +"sELEct et à SELECT mais net." +"sf.hibernate.eg.FOO n'est pas identique net.sf.hibernate." +"eg.Foo et foo.barSet n'est pas identique à " +"foo.BARSET." + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"Ce guide utilise les mots clés HQL en minuscule. Certains utilisateurs " +"trouvent les requêtes écrites avec les mots clés en majuscule plus lisibles, " +"mais nous trouvons cette convention pénible lorsqu'elle est lue dans du code " +"Java." + +#. Tag: title +#: query_hql.xml:59 +#, no-c-format +msgid "The from clause" +msgstr "La clause from" + +#. Tag: para +#: query_hql.xml:61 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "La requête Hibernate la plus simple est de la forme :" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"qui retourne simplement toutes les instances de la classe eg.Cat. Nous n'avons pas besoin d'habitude de qualifier le nom de la " +"classe, puisque auto-import est la valeur par défaut. " +"Donc nous écrivons presque toujours :" + +#. Tag: programlisting +#: query_hql.xml:73 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:75 +#, no-c-format +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"La plupart du temps, vous devrez assigner un alias " +"puisque vous voudrez faire référence à Cat dans d'autres " +"parties de la requête." + +#. Tag: programlisting +#: query_hql.xml:81 query_hql.xml:396 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:83 +#, no-c-format +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"Cette requête assigne l'alias cat à l'instance " +"Cat, nous pouvons donc utiliser cet alias ailleurs dans " +"la requête. Le mot clé as est optionnel ; nous aurions pu " +"écrire :" + +#. Tag: programlisting +#: query_hql.xml:89 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:91 +#, no-c-format +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "" +"Plusieurs classes peuvent apparaître, ce qui conduira à un produit cartésien " +"(encore appelé jointures croisées)." + +#. Tag: programlisting +#: query_hql.xml:95 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:96 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:98 +#, no-c-format +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"C'est une bonne pratique que de nommer les alias dans les requêtes en " +"utilisant l'initiale en miniscule, ce qui a le mérite d'être en phase avec " +"les standards de nommage Java pour les variables locales " +"(domesticCat)." + +#. Tag: title +#: query_hql.xml:107 +#, no-c-format +msgid "Associations and joins" +msgstr "Associations et jointures" + +#. Tag: para +#: query_hql.xml:109 +#, no-c-format +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"On peut aussi assigner des alias à des entités associées, ou même aux " +"éléments d'une collection de valeurs, en utilisant un join (jointure)." + +#. Tag: programlisting +#: query_hql.xml:114 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:116 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:118 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:120 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "Les types de jointures supportées sont celles de ANSI SQL" + +#. Tag: literal +#: query_hql.xml:127 +#, no-c-format +msgid "inner join" +msgstr "inner join (jointure fermée)" + +#. Tag: literal +#: query_hql.xml:132 +#, no-c-format +msgid "left outer join" +msgstr "left outer join (jointure ouverte par la gauche)" + +#. Tag: literal +#: query_hql.xml:137 +#, no-c-format +msgid "right outer join" +msgstr "right outer join (jointure ouverte par la droite)" + +#. Tag: para +#: query_hql.xml:141 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "" +"full join (jointure ouverte totalement - généralement " +"inutile)" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"Les constructions des jointures inner join, left " +"outer join et right outer join peuvent être " +"abbrégées." + +#. Tag: programlisting +#: query_hql.xml:152 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:154 +#, no-c-format +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "" +"Nous pouvons soumettre des conditions de jointure supplémentaires en " +"utilisant le mot-clef HQL with." + +#. Tag: programlisting +#: query_hql.xml:159 +#, no-c-format +msgid "" +" 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:161 +#, no-c-format +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"Par ailleurs, une jointure \"fetchée\" (rapportée) permet d'initialiser les " +"associations ou collections de valeurs en même temps que leur objet parent, " +"le tout n'utilisant qu'un seul Select. Ceci est particulièrement utile dans " +"le cas des collections. Ce système permet de surcharger les déclarations " +"\"lazy\" et \"outer-join\" des fichiers de mapping pour les associations et " +"collections. Voir pour plus " +"d'informations." + +#. Tag: programlisting +#: query_hql.xml:169 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:171 +#, no-c-format +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"Une jointure \"fetchée\" (rapportée) n'a généralement pas besoin de se voir " +"assigner un alias puisque les objets associés n'ont pas à être utilisés dans " +"les autres clauses. Notez aussi que les objets associés ne sont pas " +"retournés directement dans le résultat de la requête mais l'on peut y " +"accéder via l'objet parent. La seule raison pour laquelle nous pourrions " +"avoir besoin d'un alias est si nous récupérions récursivement une collection " +"supplémentaire :" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:181 +#, no-c-format +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"Notez que la construction de fetch ne peut pas être " +"utilisée dans les requêtes appelées par scroll() ou " +"iterate(). fetch ne devrait pas non " +"plus être utilisé avec setMaxResults() ou " +"setFirstResult(). fetch ne peut pas " +"non plus être utilisé avec une condition with ad hoc. Il " +"est possible de créer un produit cartésien par jointure en récupérant plus " +"d'une collection dans une requête, donc faites attention dans ce cas. " +"Récupérer par jointure de multiples collections donne aussi parfois des " +"résultats inattendus pour des mappings de bag, donc soyez prudent lorsque " +"vous formulez vos requêtes dans de tels cas. Finalement, notez que " +"full join fetch et right join fetch ne " +"sont pas utiles en général." + +#. Tag: para +#: query_hql.xml:196 +#, no-c-format +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"Si vous utilisez un chargement retardé pour les propriétés (avec une " +"instrumentation par bytecode), il est possible de forcer Hibernate à " +"récupérer les propriétés non encore chargées immédiatement (dans la première " +"requête) en utilisant fetch all properties." + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:203 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:208 +#, no-c-format +msgid "Forms of join syntax" +msgstr "Formes de syntaxes pour les jointures" + +#. Tag: para +#: query_hql.xml:210 +#, no-c-format +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"HQL supporte deux formes pour joindre les associations: implicite et explicite." + +#. Tag: para +#: query_hql.xml:214 +#, no-c-format +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"Les requêtes présentes dans la section précédente utilisent la forme " +"explicite où le mode clé join est explicitement utilisé " +"dans la clause from. C'est la forme recommandée." + +#. Tag: para +#: query_hql.xml:219 +#, no-c-format +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"La forme implicite n'utilise pas le mot clé join. A la " +"place, les associations sont \"déréférencées\" en utilisant le notation '.'. " +"Ces jointures peuvent apparaitre dans toutes les clauses. Les jointures " +"implicites résultent en des inner join dans le SQL généré." + +#. Tag: programlisting +#: query_hql.xml:226 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:230 +#, no-c-format +msgid "Refering to identifier property" +msgstr "Refering to identifier property" + +#. Tag: para +#: query_hql.xml:232 +#, no-c-format +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" + +#. Tag: para +#: query_hql.xml:237 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"If the entity defines a named identifier property, you may use that property " +"name." + +#. Tag: para +#: query_hql.xml:250 +#, no-c-format +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." + +#. Tag: para +#: query_hql.xml:257 +#, fuzzy, no-c-format +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, idalways referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." + +#. Tag: title +#: query_hql.xml:266 +#, no-c-format +msgid "The select clause" +msgstr "La clause select" + +#. Tag: para +#: query_hql.xml:268 +#, no-c-format +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"La clause select sélectionne les objets et propriétés qui " +"doivent être retournés dans le résultat de la requête. Soit :" + +#. Tag: programlisting +#: query_hql.xml:273 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:275 +#, no-c-format +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"La requête recherchera les mates liés aux Cats. Vous pouvez explimer la requête d'une manière plus compacte :" + +#. Tag: programlisting +#: query_hql.xml:280 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:282 +#, no-c-format +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"Les requêtes peuvent retourner des propriétés de n'importe quel type, même " +"celles de type composant (component) :" + +#. Tag: programlisting +#: query_hql.xml:286 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:288 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:290 +#, no-c-format +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"Les requêtes peuvent retourner plusieurs objets et/ou propriétés sous la " +"forme d'un tableau du type Object[]," + +#. Tag: programlisting +#: query_hql.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:297 +#, no-c-format +msgid "or as a List," +msgstr "ou sous la forme d'une List," + +#. Tag: programlisting +#: query_hql.xml:301 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:303 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "ou sous la forme d'un objet Java typé," + +#. Tag: programlisting +#: query_hql.xml:307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:309 +#, no-c-format +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "" +"à condition que la classe Family possède le constructeur " +"approprié." + +#. Tag: para +#: query_hql.xml:313 +#, no-c-format +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "" +"Vous pouvez assigner des alias aux expressions sélectionnées en utilisant " +"as :" + +#. Tag: programlisting +#: query_hql.xml:317 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:319 +#, no-c-format +msgid "" +"This is most useful when used together with select new map:" +msgstr "" +"C'est surtout utile lorsque c'est utilisé avec select new map :" + +#. Tag: programlisting +#: query_hql.xml:323 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "" +"Cette requête retourne une Map à partir des alias vers " +"les valeurs sélectionnées." + +#. Tag: title +#: query_hql.xml:332 +#, no-c-format +msgid "Aggregate functions" +msgstr "Fonctions d'aggrégation" + +#. Tag: para +#: query_hql.xml:334 +#, no-c-format +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "" +"Les requêtes HQL peuvent aussi retourner le résultat de fonctions " +"d'aggrégation sur les propriétés :" + +#. Tag: programlisting +#: query_hql.xml:338 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:349 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "Les fonctions supportées sont" + +#. Tag: literal +#: query_hql.xml:356 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#. Tag: literal +#: query_hql.xml:361 +#, no-c-format +msgid "count(*)" +msgstr "count(*)" + +#. Tag: literal +#: query_hql.xml:366 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#. Tag: para +#: query_hql.xml:371 +#, no-c-format +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "" +"Vous pouvez utiliser des opérateurs arithmétiques, la concaténation, et des " +"fonctions SQL reconnues dans la clause select :" + +#. Tag: programlisting +#: query_hql.xml:376 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:378 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:380 +#, no-c-format +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"Les mots clé distinct et all peuvent " +"être utilisés et ont la même signification qu'en SQL." + +#. Tag: programlisting +#: query_hql.xml:385 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:390 +#, no-c-format +msgid "Polymorphic queries" +msgstr "Requêtes polymorphiques" + +#. Tag: para +#: query_hql.xml:392 +#, no-c-format +msgid "A query like:" +msgstr "Une requête comme:" + +#. Tag: para +#: query_hql.xml:398 +#, no-c-format +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"retourne non seuleument les instances de Cat, mais aussi " +"celles des sous classes comme DomesticCat. Les requêtes " +"Hibernate peuvent nommer n'importe quelle classe ou interface Java dans la " +"clause from. La requête retournera les instances de " +"toutes les classes persistantes qui étendent cette classe ou implémente " +"cette interface. La requête suivante retournera tous les objets persistants :" + +#. Tag: programlisting +#: query_hql.xml:406 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:408 +#, no-c-format +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "" +"L'interface Named peut être implémentée par plusieurs " +"classes persistantes :" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"Notez que ces deux dernières requêtes nécessitent plus d'un SELECT SQL. Ce qui signifie que la clause order by ne " +"trie pas correctement la totalité des résultats (cela signifie aussi que " +"vous ne pouvez exécuter ces requêtes en appelant Query.scroll())." + +#. Tag: title +#: query_hql.xml:424 +#, no-c-format +msgid "The where clause" +msgstr "La clause where" + +#. Tag: para +#: query_hql.xml:426 +#, no-c-format +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"La clause where vous permet de réduire la liste des " +"instances retournées. Si aucun alias n'existe, vous pouvez vous référer aux " +"propriétés par leur nom :" + +#. Tag: programlisting +#: query_hql.xml:431 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:433 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "S'il y a un alias, utilisez un nom de propriété qualifié :" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "" +"retourne les instances de Cat dont name est égale à " +"'Fritz'." + +#. Tag: programlisting +#: query_hql.xml:443 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:445 +#, no-c-format +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"retournera les instances de Foo pour lesquelles il existe " +"une instance de bar avec la propriété date est égale à la propriété startDate de " +"Foo. Les expressions utilisant la navigation rendent la " +"clause where extrêmement puissante. Soit :" + +#. Tag: programlisting +#: query_hql.xml:454 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:456 +#, no-c-format +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"Cette requête se traduit en SQL par une jointure interne à une table. Si " +"vous souhaitez écrire quelque chose comme :" + +#. Tag: programlisting +#: query_hql.xml:461 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:463 +#, no-c-format +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "" +"vous finiriez avec une requête qui nécessiterait quatre jointures en SQL." + +#. Tag: para +#: query_hql.xml:467 +#, no-c-format +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"L'opérateur = peut être utilisé pour comparer aussi bien " +"des propriétés que des instances :" + +#. Tag: programlisting +#: query_hql.xml:472 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:474 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:476 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"La propriété spéciale (en minuscule) id peut être " +"utilisée pour faire référence à l'identifiant d'un objet (vous pouvez aussi " +"utiliser le nom de cette propriété)." + +#. Tag: programlisting +#: query_hql.xml:482 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:484 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "" +"La seconde requête est particulièrement efficace. Aucune jointure n'est " +"nécessaire !" + +#. Tag: para +#: query_hql.xml:488 +#, no-c-format +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"Les propriétés d'un identifiant composé peuvent aussi être utilisées. " +"Supposez que Person ait un identifiant composé de " +"country et medicareNumber." + +#. Tag: programlisting +#: query_hql.xml:495 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:497 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:499 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "Une fois de plus, la seconde requête ne nécessite pas de jointure." + +#. Tag: para +#: query_hql.xml:503 +#, no-c-format +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"De même, la propriété spéciale class interroge la valeur " +"discriminante d'une instance dans le cas d'une persistance polymorphique. Le " +"nom d'une classe Java incorporée dans la clause where sera traduite par sa " +"valeur discriminante." + +#. Tag: programlisting +#: query_hql.xml:509 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:511 +#, no-c-format +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"Vous pouvez aussi spécifier les propriétés des composants ou types " +"utilisateurs composés (components, composite user types etc). N'essayez " +"jamais d'utiliser un expression de navigation qui se terminerait par une " +"propriété de type composant (qui est différent d'une propriété d'un " +"composant). Par exemple, si store.owner est une entité " +"avec un composant address" + +#. Tag: para +#: query_hql.xml:516 +#, no-c-format +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"Un type \"any\" possède les propriétés spéciales id et " +"class, qui nous permettent d'exprimer une jointure de la " +"manière suivante (où AuditLog.item est une propriété " +"mappée avec <any>)." + +#. Tag: programlisting +#: query_hql.xml:522 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:524 +#, no-c-format +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"Dans la requête précédente, notez que log.item.class et " +"payment.class feraient référence à des valeurs de " +"colonnes de la base de données complètement différentes." + +#. Tag: title +#: query_hql.xml:532 +#, no-c-format +msgid "Expressions" +msgstr "Expressions" + +#. Tag: para +#: query_hql.xml:534 +#, no-c-format +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"Les expressions permises dans la clause where incluent la " +"plupart des choses que vous pouvez utiliser en SQL :" + +#. Tag: para +#: query_hql.xml:541 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "opérateurs mathématiques +, -, *, /" + +#. Tag: para +#: query_hql.xml:546 +#, no-c-format +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "" +"opérateur de comparaison binaire =, >=, <=, <>, !=, " +"like" + +#. Tag: para +#: query_hql.xml:551 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "opérateurs logiques and, or, not" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "Parenthèses ( ), indiquant un regroupement" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"concatenation de chaîne de caractères ...||... ou " +"concat(...,...)" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#. Tag: para +#: query_hql.xml:598 +#, no-c-format +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"N'importe quel fonction ou opérateur défini par EJB-QL 3.0 : " +"substring(), trim(), lower(), upper(), length(), locate(), abs(), " +"sqrt(), bit_length(), mod()" + +#. Tag: para +#: query_hql.xml:604 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "coalesce() et nullif()" + +#. Tag: para +#: query_hql.xml:609 +#, no-c-format +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "" +"str() pour convertir des valeurs numériques ou " +"temporelles vers une chaîne de caractères lisible" + +#. Tag: para +#: query_hql.xml:615 +#, no-c-format +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"cast(... as ...), où le second argument est le nom d'un " +"type Hibernate, et extract(... from ...) si le " +"cast() ANSI et extract() sont " +"supportés par la base de données sous-jacente" + +#. Tag: para +#: query_hql.xml:623 +#, no-c-format +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "" +"La fonction HQL index(), qui s'applique aux alias d'une " +"collection indexée jointe" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"Les fonctions HQL qui s'appliquent expressions représentant des " +"collections : size(), minelement(), maxelement(), minindex(), " +"maxindex(), ainsi que les fonctions spéciales elements() et indices qui peuvent être quantifiées en " +"utilisant some, all, exists, any, in." + +#. Tag: para +#: query_hql.xml:637 +#, no-c-format +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"N'importe quelle fonction scalaire supportée par la base de données comme " +"sign(), trunc(), rtrim(), sin()" + +#. Tag: para +#: query_hql.xml:643 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "Les paramètres positionnels de JDBC ?" + +#. Tag: para +#: query_hql.xml:648 +#, no-c-format +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"paramètres nommés :name, :start_date, " +":x1" + +#. Tag: para +#: query_hql.xml:653 +#, no-c-format +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"littéral SQL 'foo', 69, '1970-" +"01-01 10:00:01.0'" + +#. Tag: para +#: query_hql.xml:659 +#, no-c-format +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"Constantes Java public static finaleg.Color." +"TABBY" + +#. Tag: para +#: query_hql.xml:665 +#, no-c-format +msgid "" +"in and between may be used as follows:" +msgstr "" +"in et between peuvent être utilisés " +"comme suit :" + +#. Tag: programlisting +#: query_hql.xml:669 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:671 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:673 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "et la forme négative peut être écrite" + +#. Tag: programlisting +#: query_hql.xml:677 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:679 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:681 +#, no-c-format +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"De même, is null et is not null " +"peuvent être utilisés pour tester les valeurs nulle." + +#. Tag: para +#: query_hql.xml:686 +#, no-c-format +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"Les booléens peuvent être facilement utilisés en déclarant les substitutions " +"de requêtes dans la configuration Hibernate :" + +#. Tag: programlisting +#: query_hql.xml:691 +#, no-c-format +msgid "" +"true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:693 +#, no-c-format +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"Ce qui remplacera les mots clés true et false par 1 et 0 dans la traduction " +"SQL du HQL suivant :" + +#. Tag: programlisting +#: query_hql.xml:698 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:700 +#, no-c-format +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"Vous pouvez tester la taille d'une collection par la propriété spéciale " +"size, ou la fonction spéciale size()." + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:709 +#, no-c-format +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"Pour les collections indexées, vous pouvez faire référence aux indices " +"minimum et maximum en utilisant les fonctions minindex " +"and maxindex. De manière similaire, vous pouvez faire " +"référence aux éléments minimum et maximum d'une collection de type basiques " +"en utilisant les fonctions minelement et " +"maxelement." + +#. Tag: programlisting +#: query_hql.xml:717 +#, no-c-format +msgid "" +" current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:719 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:721 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:723 +#, no-c-format +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"Les fonctions SQL any, some, all, exists, in supportent " +"que leur soient passées l'élément, l'index d'une collection (fonctions " +"elements et indices) ou le résultat " +"d'une sous requête (voir ci dessous)." + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:735 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:737 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:739 +#, no-c-format +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"Notez que l'écriture de - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - peuvent seulement être utilisée dans la " +"clause where dans Hibernate3." + +#. Tag: para +#: query_hql.xml:746 +#, no-c-format +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"Les éléments de collections indexées (arrays, lists, maps) peuvent être " +"référencés via index (dans une clause where seulement) :" + +#. Tag: programlisting +#: query_hql.xml:751 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:753 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:755 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:757 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:759 +#, no-c-format +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "" +"L'expression entre [] peut même être une expression " +"arithmétique." + +#. Tag: programlisting +#: query_hql.xml:763 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:765 +#, no-c-format +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"HQL propose aussi une fonction index() interne, pour les " +"éléments d'une association one-to-many ou d'une collections de valeurs." + +#. Tag: programlisting +#: query_hql.xml:770 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "" +"Les fonctions SQL scalaires supportées par la base de données utilisée " +"peuvent être utilisées" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"Si vous n'êtes pas encore convaincu par tout cela, imaginez la taille et " +"l'illisibilité qui caractériseraient la transformation SQL de la requête HQL " +"suivante :" + +#. Tag: programlisting +#: query_hql.xml:783 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:785 +#, no-c-format +msgid "Hint: something like" +msgstr "Un indice : cela donnerait quelque chose comme" + +#. Tag: programlisting +#: query_hql.xml:789 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:794 +#, no-c-format +msgid "The order by clause" +msgstr "La clause order by" + +#. Tag: para +#: query_hql.xml:796 +#, no-c-format +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"La liste retounée par la requête peut être triée par n'importe quelle " +"propriété de la classe ou du composant retourné :" + +#. Tag: programlisting +#: query_hql.xml:800 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:802 +#, no-c-format +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"Le mot optionnel asc ou desc indique " +"respectivement si le tri doit être croissant ou décroissant." + +#. Tag: title +#: query_hql.xml:809 +#, no-c-format +msgid "The group by clause" +msgstr "La clause group by" + +#. Tag: para +#: query_hql.xml:811 +#, no-c-format +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"Si la requête retourne des valeurs aggrégées, celles ci peuvent être " +"groupées par propriété ou composant :" + +#. Tag: programlisting +#: query_hql.xml:815 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:817 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:819 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "Une clause having est aussi permise." + +#. Tag: programlisting +#: query_hql.xml:823 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:825 +#, no-c-format +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"Les fonctions SQL et les fonctions d'aggrégations sont permises dans les " +"clauses having et order by, si elles " +"sont supportées par la base de données (ce que ne fait pas MySQL par " +"exemple)." + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:833 +#, no-c-format +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"Notez que ni la clause group by ni la clause " +"order by ne peuvent contenir d'expressions arithmétiques." + +#. Tag: title +#: query_hql.xml:845 +#, no-c-format +msgid "Subqueries" +msgstr "Sous-requêtes" + +#. Tag: para +#: query_hql.xml:847 +#, no-c-format +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"Pour les bases de données le supportant, Hibernate supporte les sous " +"requêtes dans les requêtes. Une sous requête doit être entre parenthèses " +"(souvent pour un appel à une fonction d'agrégation SQL) Même les sous " +"requêtes corrélées (celles qui font référence à un alias de la requête " +"principale) sont supportées." + +#. Tag: programlisting +#: query_hql.xml:853 +#, no-c-format +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:855 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:857 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:859 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:863 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" +"Notez que les sous-requêtes HQL peuvent arriver seulememnt dans les clauses " +"select ou where." + +#. Tag: para +#: query_hql.xml:867 +#, no-c-format +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." + +#. Tag: title +#: query_hql.xml:875 +#, no-c-format +msgid "HQL examples" +msgstr "Exemples HQL" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"Les requêtes Hibernate peuvent être relativement puissantes et complexes. En " +"fait, la puissance du langage de requêtage est l'un des avantages principaux " +"d'Hibernate. Voici quelques exemples très similaires aux requêtes que nous " +"avons utilisées lors d'un récent projet. Notez que la plupart des requêtes " +"que vous écrirez seront plus simples que les exemples suivantes !" + +#. Tag: para +#: query_hql.xml:883 +#, no-c-format +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"La requête suivante retourne l'id de commande (order), le nombre d'articles " +"(items) et la valeur totale de la commande (order) pour toutes les commandes " +"non payées d'un client (customer) particulier pour un total minimum donné, " +"le tout trié par la valeur totale. La requête SQL générée sur les tables " +"ORDER, ORDER_LINE, PRODUCT, CATALOG et PRICE est " +"composée de quatre jointures interne ainsi que d'une sous-requête (non " +"corrélée)." + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"Quel monstre ! En principe, nous ne sommes pas très fan des sous-requêtes, " +"la requête ressemblait donc plutôt à cela :" + +#. Tag: programlisting +#: query_hql.xml:899 +#, no-c-format +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:901 +#, no-c-format +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"La requête suivante compte le nombre de paiements (payments) pour chaque " +"status, en excluant les paiements dans le status AWAITING_APPROVAL où le changement de status le plus récent à été fait par " +"l'utilisateur courant. En SQL, cette requête effectue deux jointures " +"internes et des sous requêtes corrélées sur les tables PAYMENT, PAYMENT_STATUS et " +"PAYMENT_STATUS_CHANGE." + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:911 +#, no-c-format +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"Si nous avions mappé la collection statusChanges comme " +"une liste, au lieu d'un ensemble, la requête aurait été plus facile à écrire." + +#. Tag: programlisting +#: query_hql.xml:916 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:918 +#, no-c-format +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"La requête qui suit utilise la fonction de MS SQL isNull() pour retourner tous les comptes (accounts) et paiements (payments) " +"impayés pour l'organisation à laquelle l'uilisateur (user) courant " +"appartient. Elle est traduite en SQL par trois jointures internes, une " +"jointure externe ainsi qu'une sous requête sur les tables ACCOUNT, PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION et " +"ORG_USER." + +#. Tag: programlisting +#: query_hql.xml:927 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:929 +#, no-c-format +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "" +"Pour d'autres base de données, nous aurions dû faire sans la sous-requête " +"(corrélée)." + +#. Tag: programlisting +#: query_hql.xml:933 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:938 +#, no-c-format +msgid "Bulk update and delete" +msgstr "Mise à jour et suppression" + +#. Tag: para +#: query_hql.xml:940 +#, no-c-format +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"HQL supporte maintenant les expressions update, " +"delete et insert ... select .... Voir " +" pour les détails." + +#. Tag: title +#: query_hql.xml:948 +#, no-c-format +msgid "Tips & Tricks" +msgstr "Trucs & Astuces" + +#. Tag: para +#: query_hql.xml:950 +#, no-c-format +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "" +"Vous pouvez compter le nombre de résultats d'une requête sans les retourner :" + +#. Tag: programlisting +#: query_hql.xml:954 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:956 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" +"Pour trier les résultats par la taille d'une collection, utilisez la requête " +"suivante :" + +#. Tag: programlisting +#: query_hql.xml:960 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:962 +#, no-c-format +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"Si votre base de données supporte les sous-requêtes, vous pouvez placer des " +"conditions sur la taille de la sélection dans la clause where de votre " +"requête:" + +#. Tag: programlisting +#: query_hql.xml:967 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:969 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "" +"Si votre base de données ne supporte pas les sous-requêtes, utilisez la " +"requête suivante :" + +#. Tag: programlisting +#: query_hql.xml:973 +#, no-c-format +msgid "" +"= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:975 +#, no-c-format +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"Cette solution ne peut pas retourner un User avec zéro " +"message à cause de la jointure interne, la forme suivante peut donc être " +"utile :" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:982 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" +"Les propriétés d'un JavaBean peuvent être injectées dans les paramètres " +"nommés d'un requête :" + +#. Tag: programlisting +#: query_hql.xml:986 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:988 +#, no-c-format +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"Les collections sont paginables via l'utilisation de l'interface " +"Query avec un filtre :" + +#. Tag: programlisting +#: query_hql.xml:992 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:994 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"Les éléments d'une collection peuvent être triés ou groupés en utilisant un " +"filtre de requête :" + +#. Tag: programlisting +#: query_hql.xml:998 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1000 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "Vous pouvez récupérer la taille d'une collection sans l'initialiser :" + +#. Tag: programlisting +#: query_hql.xml:1004 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:1009 +#, no-c-format +msgid "Components" +msgstr "translator-credits" + +#. Tag: para +#: query_hql.xml:1011 +#, no-c-format +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1016 query_hql.xml:1062 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1017 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1019 +#, no-c-format +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1024 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1031 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1040 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:1042 +#, no-c-format +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1049 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1051 +#, no-c-format +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1056 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1058 +#, no-c-format +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" + +#. Tag: para +#: query_hql.xml:1064 +#, no-c-format +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1069 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1071 +#, no-c-format +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/query_sql.po b/documentation/envers/src/main/docbook/fr-FR/content/query_sql.po new file mode 100644 index 0000000000..92eb252494 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/query_sql.po @@ -0,0 +1,1498 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:29 +#, no-c-format +msgid "Native SQL" +msgstr "SQL natif" + +#. Tag: para +#: query_sql.xml:31 +#, no-c-format +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"Vous pouvez aussi écrire vos requêtes dans le dialecte SQL natif de votre " +"base de données. Ceci est utile si vous souhaitez utiliser les " +"fonctionnalités spécifiques de votre base de données comme le mot clé " +"CONNECT d'Oracle. Cette fonctionnalité offre par ailleurs " +"un moyen de migration plus propre et doux d'une application basée sur SQL/" +"JDBC vers une application Hibernate." + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3 vous permet de spécifier du SQL écrit à la main (incluant les " +"procédures stockées) pour toutes les opérations de création, mise à jour, " +"suppression et chargement." + +#. Tag: title +#: query_sql.xml:41 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "Utiliser une SQLQuery" + +#. Tag: para +#: query_sql.xml:43 +#, no-c-format +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"L'exécution des requêtes en SQL natif est contrôlée par l'interface " +"SQLQuery, laquelle est obtenue en appelant " +"Session.createSQLQuery(). Dans des cas extrêmement " +"simples, nous pouvons utiliser la forme suivante :" + +#. Tag: title +#: query_sql.xml:49 +#, no-c-format +msgid "Scalar queries" +msgstr "Scalar queries" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "The most basic SQL query is to get a list of scalars (values)." + +#. Tag: programlisting +#: query_sql.xml:54 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:56 +#, no-c-format +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." + +#. Tag: para +#: query_sql.xml:61 +#, no-c-format +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." + +#. Tag: programlisting +#: query_sql.xml:65 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:67 query_sql.xml:113 query_sql.xml:194 query_sql.xml:345 +#, no-c-format +msgid "This query specified:" +msgstr "This query specified:" + +#. Tag: para +#: query_sql.xml:71 query_sql.xml:117 query_sql.xml:349 +#, no-c-format +msgid "the SQL query string" +msgstr "the SQL query string" + +#. Tag: para +#: query_sql.xml:75 +#, no-c-format +msgid "the columns and types to return" +msgstr "the columns and types to return" + +#. Tag: para +#: query_sql.xml:79 +#, fuzzy, no-c-format +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetadata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." + +#. Tag: para +#: query_sql.xml:87 +#, no-c-format +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "" +"It is possible to leave out the type information for all or some of the " +"scalars." + +#. Tag: programlisting +#: query_sql.xml:90 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:92 +#, no-c-format +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." + +#. Tag: para +#: query_sql.xml:96 +#, no-c-format +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." + +#. Tag: title +#: query_sql.xml:104 +#, no-c-format +msgid "Entity queries" +msgstr "Entity queries" + +#. Tag: para +#: query_sql.xml:106 +#, no-c-format +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." + +#. Tag: programlisting +#: query_sql.xml:111 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "the entity returned by the query" +msgstr "the entity returned by the query" + +#. Tag: para +#: query_sql.xml:125 +#, no-c-format +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." + +#. Tag: para +#: query_sql.xml:129 +#, no-c-format +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" + +#. Tag: programlisting +#: query_sql.xml:137 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:139 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "This will allow cat.getDog() to function properly." + +#. Tag: title +#: query_sql.xml:143 +#, no-c-format +msgid "Handling associations and collections" +msgstr "Handling associations and collections" + +#. Tag: para +#: query_sql.xml:145 +#, no-c-format +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." + +#. Tag: programlisting +#: query_sql.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:152 +#, no-c-format +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." + +#. Tag: programlisting +#: query_sql.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:162 +#, no-c-format +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." + +#. Tag: title +#: query_sql.xml:170 +#, no-c-format +msgid "Returning multiple entities" +msgstr "Returning multiple entities" + +#. Tag: para +#: query_sql.xml:172 +#, no-c-format +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." + +#. Tag: para +#: query_sql.xml:177 +#, no-c-format +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" + +#. Tag: programlisting +#: query_sql.xml:180 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:182 +#, fuzzy, no-c-format +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specified in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." + +#. Tag: para +#: query_sql.xml:189 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "The following form is not vulnerable to column name duplication:" + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:198 +#, no-c-format +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" + +#. Tag: para +#: query_sql.xml:203 +#, no-c-format +msgid "the entities returned by the query" +msgstr "the entities returned by the query" + +#. Tag: para +#: query_sql.xml:207 +#, fuzzy, no-c-format +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicitly, but even " +"in this case we let Hibernate inject the SQL column aliases for each " +"property. The placeholder for a column alias is just the property name " +"qualified by the table alias. In the following example, we retrieve Cats and " +"their mothers from a different table (cat_log) to the one declared in the " +"mapping metadata. Notice that we may even use the property aliases in the " +"where clause if we like." +msgstr "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." + +#. Tag: programlisting +#: query_sql.xml:216 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:219 +#, no-c-format +msgid "Alias and property references" +msgstr "Alias and property references" + +#. Tag: para +#: query_sql.xml:221 +#, no-c-format +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." + +#. Tag: para +#: query_sql.xml:226 +#, no-c-format +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." + +#. Tag: title +#: query_sql.xml:232 +#, no-c-format +msgid "Alias injection names" +msgstr "Alias injection names" + +#. Tag: entry +#: query_sql.xml:243 +#, no-c-format +msgid "Description" +msgstr "Description" + +#. Tag: entry +#: query_sql.xml:245 +#, no-c-format +msgid "Syntax" +msgstr "Syntax" + +#. Tag: entry +#: query_sql.xml:247 +#, no-c-format +msgid "Example" +msgstr "Example" + +#. Tag: entry +#: query_sql.xml:253 +#, no-c-format +msgid "A simple property" +msgstr "A simple property" + +#. Tag: literal +#: query_sql.xml:255 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]" + +#. Tag: literal +#: query_sql.xml:257 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#. Tag: entry +#: query_sql.xml:261 +#, no-c-format +msgid "A composite property" +msgstr "A composite property" + +#. Tag: literal +#: query_sql.xml:263 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:265 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "Discriminator of an entity" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "All properties of an entity" +msgstr "All properties of an entity" + +#. Tag: literal +#: query_sql.xml:280 query_sql.xml:328 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "{item.*}" +msgstr "{item.*}" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "A collection key" +msgstr "A collection key" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "The id of an collection" +msgstr "The id of an collection" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "The element of an collection" +msgstr "The element of an collection" + +#. Tag: literal +#: query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#. Tag: entry +#: query_sql.xml:310 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "roperty of the element in the collection" + +#. Tag: literal +#: query_sql.xml:312 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#. Tag: literal +#: query_sql.xml:314 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#. Tag: entry +#: query_sql.xml:318 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "All properties of the element in the collection" + +#. Tag: literal +#: query_sql.xml:320 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#. Tag: literal +#: query_sql.xml:322 +#, no-c-format +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#. Tag: entry +#: query_sql.xml:326 +#, no-c-format +msgid "All properties of the the collection" +msgstr "All properties of the the collection" + +#. Tag: literal +#: query_sql.xml:330 +#, no-c-format +msgid "{coll.*}" +msgstr "{coll.*}" + +#. Tag: title +#: query_sql.xml:339 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "Returning non-managed entities" + +#. Tag: para +#: query_sql.xml:341 +#, no-c-format +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." + +#. Tag: programlisting +#: query_sql.xml:343 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:353 +#, no-c-format +msgid "a result transformer" +msgstr "a result transformer" + +#. Tag: para +#: query_sql.xml:357 +#, no-c-format +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." + +#. Tag: title +#: query_sql.xml:364 +#, no-c-format +msgid "Handling inheritance" +msgstr "Handling inheritance" + +#. Tag: para +#: query_sql.xml:366 +#, no-c-format +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." + +#. Tag: title +#: query_sql.xml:372 +#, no-c-format +msgid "Parameters" +msgstr "Parameters" + +#. Tag: para +#: query_sql.xml:374 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "Native sql queries support positional as well as named parameters:" + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:385 +#, no-c-format +msgid "Named SQL queries" +msgstr "Requêtes SQL nommées" + +#. Tag: para +#: query_sql.xml:387 +#, no-c-format +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"Les requêtes SQL nommées peuvent être définies dans le document de mapping " +"et appelées exactement de la même manière qu'un requête HQL nommée. Dans ce " +"cas, nous n'avons pas besoin d'appeler " +"addEntity()." + +#. Tag: programlisting +#: query_sql.xml:392 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:394 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:396 +#, no-c-format +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"Les éléments <return-join> et <load-" +"collection> sont respectivement utilisés pour lier des " +"associations et définir des requêtes qui initialisent des collections." + +#. Tag: programlisting +#: query_sql.xml:401 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:403 +#, no-c-format +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"Une requête SQL nommée peut retourner une valeur scalaire. Vous devez " +"spécifier l'alias de colonne et le type Hibernate utilisant l'élément " +"<return-scalar> :" + +#. Tag: programlisting +#: query_sql.xml:407 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:409 +#, fuzzy, no-c-format +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them across several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"Vous pouvez externaliser les informations de mapping des résultats dans un " +"élément <resultset> pour soit les réutiliser dans " +"différentes requêtes nommées, soit à travers l'API " +"setResultSetMapping()." + +#. Tag: programlisting +#: query_sql.xml:414 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:416 +#, no-c-format +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." + +#. Tag: programlisting +#: query_sql.xml:419 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:422 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "" +"Utilisation de return-property pour spécifier explicitement les noms des " +"colonnes/alias" + +#. Tag: para +#: query_sql.xml:425 +#, no-c-format +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"Avec <return-property> vous pouvez explicitement " +"dire à Hibernate quels alias de colonne utiliser, plutot que d'employer la " +"syntaxe {} pour laisser Hibernate injecter ses propres " +"alias." + +#. Tag: programlisting +#: query_sql.xml:430 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:432 +#, no-c-format +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property> fonctionne aussi avec de multiple " +"colonnes. Cela résout une limitation de la syntaxe {} qui " +"ne peut pas permettre une bonne granularité des propriétés multi-colonnes." + +#. Tag: programlisting +#: query_sql.xml:437 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:439 +#, no-c-format +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"Notez que dans cet exemple nous avons utilisé <return-" +"property> en combinaison avec la syntaxe {} " +"pour l'injection. Cela autorise les utilisateurs à choisir comment ils " +"veulent référencer les colonnes et les propriétés." + +#. Tag: para +#: query_sql.xml:444 +#, no-c-format +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"Si votre mapping a un discriminant vous devez utiliser <return-" +"discriminator> pour spécifier la colonne discriminante." + +#. Tag: title +#: query_sql.xml:450 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "Utilisation de procédures stockées pour les requêtes" + +#. Tag: para +#: query_sql.xml:452 +#, no-c-format +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernate 3 introduit le support des requêtes via procédures stockées et les " +"fonctions. La documentation suivante est valable pour les deux. Les " +"procédures stockées/fonctions doivent retourner l'ensemble de résultats en " +"tant que premier paramètre sortant (NdT: \"out-parameter\") pour être " +"capable de fonctionner avec Hibernate. Un exemple d'une telle procédure " +"stockée en Oracle 9 et version supérieure :" + +#. Tag: programlisting +#: query_sql.xml:458 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:460 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "" +"Pour utiliser cette requête dans Hibernate vous avez besoin de la mapper via " +"une requête nommée." + +#. Tag: programlisting +#: query_sql.xml:463 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:465 +#, no-c-format +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"Notez que les procédures stockées retournent, pour le moment, seulement des " +"scalaires et des entités. <return-join> et " +"<load-collection> ne sont pas supportés." + +#. Tag: title +#: query_sql.xml:470 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "Règles/limitations lors de l'utilisation des procédures stockées" + +#. Tag: para +#: query_sql.xml:472 +#, no-c-format +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"Pur utiliser des procédures stockées avec Hibernate, les procédures doivent " +"suivre certaines règles. Si elles ne suivent pas ces règles, elles ne sont " +"pas utilisables avec Hibernate. Si vous voulez encore utiliser ces " +"procédures vous devez les exécuter via session.connection(). Les règles sont différentes pour chaque base de données, puisque " +"les vendeurs de base de données ont des sémantiques/syntaxes différentes " +"pour les procédures stockées." + +#. Tag: para +#: query_sql.xml:479 +#, no-c-format +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"Les requêtes de procédures stockées ne peuvent pas être paginées avec " +"setFirstResult()/setMaxResults()." + +#. Tag: para +#: query_sql.xml:482 +#, no-c-format +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." + +#. Tag: para +#: query_sql.xml:487 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "Pour Oracle les règles suivantes s'appliquent :" + +#. Tag: para +#: query_sql.xml:491 +#, no-c-format +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"La procédure doit retourner un ensemble de résultats. Le prmeier paramètre " +"d'une procédure doit être un OUT qui retourne un ensemble " +"de résultats. Ceci est fait en retournant un SYS_REFCURSOR dans Oracle 9 ou 10. Dans Oracle vous avez besoin de définir un " +"type REF CURSOR." + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "Pour Sybase ou MS SQL server les règles suivantes s'appliquent :" + +#. Tag: para +#: query_sql.xml:504 +#, no-c-format +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"La procédure doit retourner un ensemble de résultats. Notez que comme ces " +"serveurs peuvent retourner de multiples ensembles de résultats et mettre à " +"jour des compteurs, Hibernate itérera les résultats et prendra le premier " +"résultat qui est un ensemble de résultat comme valeur de retour. Tout le " +"reste sera ignoré." + +#. Tag: para +#: query_sql.xml:512 +#, no-c-format +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"Si vous pouvez activer SET NOCOUNT ON dans votre " +"procédure, elle sera probablement plus efficace, mais ce n'est pas une " +"obligation." + +#. Tag: title +#: query_sql.xml:522 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "SQL personnalisé pour créer, mettre à jour et effacer" + +#. Tag: para +#: query_sql.xml:524 +#, no-c-format +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3 peut utiliser des expression SQL personnalisées pour des " +"opérations de création, de mise à jour, et de suppression. Les objets " +"persistants les classes et les collections dans Hibernate contiennent déjà " +"un ensemble de chaînes de caractères générées lors de la configuration " +"(insertsql, deletesql, updatesql, etc). Les tages de mapping <" +"sql-insert>, <sql-delete>, et " +"<sql-update> surchargent ces chaînes de caractères :" + +#. Tag: programlisting +#: query_sql.xml:532 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:534 +#, no-c-format +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"Le SQL est directement exécuté dans votre base de données, donc vous êtes " +"libre d'utiliser le dialecte que vous souhaitez. Cela réduira bien sûr la " +"portabilité de votre mapping si vous utilisez du SQL spécifique à votre base " +"de données." + +#. Tag: para +#: query_sql.xml:538 +#, no-c-format +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "" +"Les procédures stockées sont supportées si l'attribut callable est paramétré :" + +#. Tag: programlisting +#: query_sql.xml:541 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:543 +#, no-c-format +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "" +"L'ordre des paramètres positionnels est actuellement vital, car ils doivent " +"être dans la même séquence qu'Hibernate les attend." + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"Vous pouvez voir l'ordre attendu en activant les journaux de debug pour le " +"niveau org.hibernate.persister.entity level. Avec ce " +"niveau activé, Hibernate imprimera le SQL statique qui est utilisé pour " +"créer, mettre à jour, supprimer, etc. des entités. (Pour voir la séquence " +"attendue, rappelez-vous de ne pas inclure votre SQL personnalisé dans les " +"fichiers de mapping de manière à surcharger le SQL statique généré par " +"Hibernate.)" + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"Les procédures stockées sont dans la plupart des cas (lire : il vaut mieux " +"le faire) requises pour retourner le nombre de lignes insérées/mises à jour/" +"supprimées, puisque Hibernate fait quelques vérifications de succès lors de " +"l'exécution de l'expression. Hibernate inscrit toujours la première " +"expression comme un paramètre de sortie numérique pour les opérations CUD :" + +#. Tag: programlisting +#: query_sql.xml:559 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:563 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "SQL personnalisé pour le chargement" + +#. Tag: para +#: query_sql.xml:565 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" +"Vous pouvez aussi déclarer vos propres requêtes SQL (ou HQL) pour le " +"chargement d'entité :" + +#. Tag: programlisting +#: query_sql.xml:568 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:570 +#, no-c-format +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "" +"Ceci est juste une déclaration de requête nommée, comme vu plus tôt. Vous " +"pouvez référencer cette requête nommée dans un mapping de classe :" + +#. Tag: programlisting +#: query_sql.xml:573 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:575 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "Ceci fonctionne même avec des procédures stockées." + +#. Tag: para +#: query_sql.xml:577 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "" +"Vous pouvez même définir une requête pour le chargement d'une collection :" + +#. Tag: programlisting +#: query_sql.xml:579 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:581 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:583 +#, no-c-format +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "" +"Vous pourriez même définir un chargeur d'entité qui charge une collection " +"par jointure :" + +#. Tag: programlisting +#: query_sql.xml:586 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/quickstart.po b/documentation/envers/src/main/docbook/fr-FR/content/quickstart.po new file mode 100644 index 0000000000..cd14d33057 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/quickstart.po @@ -0,0 +1,12 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/fr-FR/content/session_api.po b/documentation/envers/src/main/docbook/fr-FR/content/session_api.po new file mode 100644 index 0000000000..b83000799a --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/session_api.po @@ -0,0 +1,2267 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:29 +#, no-c-format +msgid "Working with objects" +msgstr "Travailler avec des objets" + +#. Tag: para +#: session_api.xml:31 +#, no-c-format +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"Hibernate est une solution de mapping objet/relationnel complète qui ne " +"masque pas seulement au développpeur les détails du système de gestion de " +"base de données sous-jacent, mais offre aussi la gestion d'état des objets. C'est, contrairement à la gestion de " +"statements SQL dans les couches de persistance " +"habituelles JDBC/SQL, une vue orientée objet très naturelle de la " +"persistance dans les applications Java." + +#. Tag: para +#: session_api.xml:40 +#, no-c-format +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"En d'autres mots, les développeurs d'applications Hibernate devrait toujours " +"réfléchir à l'état de leurs objets, et pas " +"nécessairement à l'exécution des expressions SQL. Cette part est prise en " +"charge pas Hibernate et seulement importante pour les développeurs " +"d'applications lors du réglage de la performance de leur système." + +#. Tag: title +#: session_api.xml:48 +#, no-c-format +msgid "Hibernate object states" +msgstr "États des objets Hibernate" + +#. Tag: para +#: session_api.xml:50 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "Hibernate définit et comprend les états suivants :" + +#. Tag: para +#: session_api.xml:56 +#, no-c-format +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +"Éphémère (NdT : transient) - un objet est éphémère s'il " +"a juste été instancié en utilisant l'opérateur new. Il " +"n'a aucune représentation persistante dans la base de données et aucune " +"valeur d'identifiant n'a été assignée. Les instances éphémères seront " +"détruites par le ramasse-miettes si l'application n'en conserve aucune " +"référence. Utilisez la Session d'Hibernate pour rendre un " +"objet persistant (et laisser Hibernate s'occuper des expressions SQL qui ont " +"besoin d'être exécutées pour cette transistion)." + +#. Tag: para +#: session_api.xml:68 +#, no-c-format +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"Persistant - une instance persistante a une " +"représentation dans la base de données et une valeur d'identifiant. Elle " +"pourrait avoir juste été sauvegardée ou chargée, pourtant, elle est par " +"définition dans la portée d'une Session. Hibernate " +"détectera n'importe quels changements effectués sur un objet dans l'état " +"persistant et synchronisera l'état avec la base de données lors de la fin " +"l'unité de travail. Les développeurs n'exécutent pas d'expressions " +"UPDATE ou DELETE manuelles lorsqu'un " +"objet devrait être rendu éphémère." + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"Détaché - une instance détachée est un objet qui a été " +"persistant, mais dont sa Session a été fermée. La " +"référence à l'objet est encore valide, bien sûr, et l'instance détachée " +"pourrait même être modifiée dans cet état. Une instance détachée peut être " +"réattachée à une nouvelle Session plus tard dans le " +"temps, la rendant (et toutes les modifications avec) de nouveau persistante. " +"Cette fonctionnalité rend possible un modèle de programmation pour de " +"longues unités de travail qui requièrent un temps de réflexion de " +"l'utilisateur. Nous les appelons des conversations, " +"c'est-à-dire une unité de travail du point de vue de l'utilisateur." + +#. Tag: para +#: session_api.xml:93 +#, no-c-format +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"Nous alons maintenant dicuster des états et des transitions d'état (et des " +"méthodes d'Hibernate qui déclenchent une transition) plus en détails." + +#. Tag: title +#: session_api.xml:101 +#, no-c-format +msgid "Making objects persistent" +msgstr "Rendre des objets persistants" + +#. Tag: para +#: session_api.xml:103 +#, no-c-format +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"Les instances nouvellement instanciées d'une classe persistante sont " +"considérées éphémères par Hibernate. Nous pouvons " +"rendre une instance éphémère persistante en l'associant " +"avec une session :" + +#. Tag: programlisting +#: session_api.xml:110 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:112 +#, no-c-format +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"Si Cat a un identifiant généré, l'identifiant est généré " +"et assigné au cat lorsque save() est " +"appelée. Si Cat a un identifiant assigned, ou une clef composée, l'identifiant devrait être assigné à " +"l'instance de cat avant d'appeler save(). Vous pouvez aussi utiliser persist() à la place " +"desave(), avec la sémantique définie plus tôt dans le " +"brouillon d'EJB3." + +#. Tag: para +#: session_api.xml:124 +#, no-c-format +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." + +#. Tag: para +#: session_api.xml:135 +#, no-c-format +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#. Tag: para +#: session_api.xml:145 +#, no-c-format +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "" +"Alternativement, vous pouvez assigner l'identifiant en utilisant une version " +"surchargée de save()." + +#. Tag: programlisting +#: session_api.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:152 +#, no-c-format +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"Si l'objet que vous rendez persistant a des objets associés (par exemple, la " +"collection kittens dans l'exemple précédent), ces objets " +"peuvent être rendus persistants dans n'importe quel ordre que vous souhaitez " +"à moins que vous ayez une contrainte NOT NULL sur la " +"colonne de la clef étrangère. Il n'y a jamais de risque de violer une " +"contrainte de clef étrangère. Cependant, vous pourriez violer une contrainte " +"NOT NULL si vous appeliez save() sur " +"les objets dans le mauvais ordre." + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"Habituellement, vous ne vous préoccupez pas de ce détail, puisque vous " +"utiliserez très probablement la fonctionnalité de persistance " +"transitive d'Hibernate pour sauvegarder les objets associés " +"automatiquement. Alors, même les violations de contrainte NOT NULL n'ont plus lieu - Hibernate prendra soin de tout. La persistance " +"transitive est traitée plus loin dans ce chapitre." + +#. Tag: title +#: session_api.xml:173 +#, no-c-format +msgid "Loading an object" +msgstr "Chargement d'un objet" + +#. Tag: para +#: session_api.xml:175 +#, no-c-format +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"Les méthodes load() de Session vous " +"donnent un moyen de récupérer une instance persistante si vous connaissez " +"déjà son identifiant. load() prend un objet de classe et " +"chargera l'état dans une instance nouvellement instanciée de cette classe, " +"dans un état persistant." + +#. Tag: programlisting +#: session_api.xml:182 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:184 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:186 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "" +"Alternativement, vous pouvez charger un état dans une instance donnée :" + +#. Tag: programlisting +#: session_api.xml:190 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:192 +#, no-c-format +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"Notez que load() lèvera une exception irrécupérable s'il " +"n'y a pas de ligne correspondante dans la base de données. Si la classe est " +"mappée avec un proxy, load() retourne juste un proxy non " +"initialisé et n'accède en fait pas à la base de données jusqu'à ce que vous " +"invoquiez une méthode du proxy. Ce comportement est très utile si vous " +"souhaitez créer une association vers un objet sans réellement le charger à " +"partir de la base de données. Cela permet aussi à de multiples instances " +"d'être chargées comme un lot si batch-size est défini " +"pour le mapping de la classe." + +#. Tag: para +#: session_api.xml:203 +#, no-c-format +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"Si vous n'êtes pas certain qu'une ligne correspondante existe, vous devriez " +"utiliser la méthode get(), laquelle accède à la base de " +"données immédiatement et retourne null s'il n'y a pas de ligne " +"correspondante." + +#. Tag: programlisting +#: session_api.xml:209 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:211 +#, no-c-format +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"Vous pouvez même charger un objet en employant un SELECT ... FOR " +"UPDATE SQL, en utilisant un LockMode. Voir la " +"documentation de l'API pour plus d'informations." + +#. Tag: programlisting +#: session_api.xml:216 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:218 +#, no-c-format +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"Notez que n'importe quelles instances associées ou collections contenues " +"ne sont pas sélectionnées par FOR UPDATE, à moins que vous ne décidiez de spécifier lock " +"ou all en tant que style de cascade pour l'association." + +#. Tag: para +#: session_api.xml:225 +#, no-c-format +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"Il est possible de re-charger un objet et toutes ses collections à n'importe " +"quel moment, en utilisant la méthode refresh(). C'est " +"utile lorsque des \"triggers\" de base de données sont utilisés pour " +"initiliser certains propriétés de l'objet." + +#. Tag: programlisting +#: session_api.xml:231 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"Une question importante apparaît généralement à ce point : combien (NdT : de " +"données) Hibernate charge-t-il de la base de données et combient de " +"SELECTs utilisera-t-il ? Cela dépent de la " +"stratégie de récupération et cela est expliqué dans " +"." + +#. Tag: title +#: session_api.xml:243 +#, no-c-format +msgid "Querying" +msgstr "Requêtage" + +#. Tag: para +#: session_api.xml:245 +#, no-c-format +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"Si vous ne connaissez par les identifiants des objets que vous recherchez, " +"vous avez besoin d'une requête. Hibernate supporte un langage de requêtes " +"orientées objet facile à utiliser mais puissant. Pour la création de " +"requêtes par programmation, Hibernate supporte une fonction de requêtage " +"sophistiqué Criteria et Example (QBC et QBE). Vous pouvez aussi exprimez " +"votre requête dans le SQL natif de votre base de données, avec un support " +"optionnel d'Hibernate pour la conversion des ensembles de résultats en " +"objets." + +#. Tag: title +#: session_api.xml:255 +#, no-c-format +msgid "Executing queries" +msgstr "Exécution de requêtes" + +#. Tag: para +#: session_api.xml:257 +#, no-c-format +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"Les requêtes HQL et SQL natives sont représentées avec une instance de " +"org.hibernate.Query. L'interface offre des méthodes pour " +"la liaison des paramètres, la gestion des ensembles de resultats, et pour " +"l'exécution de la requête réelle. Vous obtenez toujours une Query en utilisant la Session courante :" + +#. Tag: programlisting +#: session_api.xml:264 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:266 +#, no-c-format +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"Une requête est généralement exécutée en invoquant list(), le résultat de la requête sera chargée complètement dans une " +"collection en mémoire. Les intances d'entités recupérées par une requête " +"sont dans un état persistant. La méthode uniqueResult() " +"offre un raccourci si vous savez que votre requête retournera seulement un " +"seul objet." + +#. Tag: title +#: session_api.xml:278 +#, no-c-format +msgid "Iterating results" +msgstr "Itération de résultats" + +#. Tag: para +#: session_api.xml:280 +#, no-c-format +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"Occasionnellement, vous pourriez être capable d'obtenir de meilleures " +"performances en exécutant la requête avec la méthode iterate(). Ce sera généralement seulement le cas si vous espérez que les " +"intances réelles d'entité retournées par la requête soient déjà chargées " +"dans la session ou le cache de second niveau. Si elles ne sont pas cachées, " +"iterate() sera plus lent que list() et " +"pourrait nécessiter plusieurs accès à la base de données pour une simple " +"requête, généralement 1 pour le select initial qui " +"retourne seulement les identifiants, et n selects " +"supplémentaires pour initialiser les instances réelles." + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:296 +#, no-c-format +msgid "Queries that return tuples" +msgstr "Requêtes qui retournent des tuples" + +#. Tag: para +#: session_api.xml:298 +#, no-c-format +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"Les requêtes d'Hibernate retournent parfois des tuples d'objets, auquel cas " +"chaque tuple est retourné comme un tableau :" + +#. Tag: programlisting +#: session_api.xml:303 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:308 +#, no-c-format +msgid "Scalar results" +msgstr "Résultats scalaires" + +#. Tag: para +#: session_api.xml:310 +#, no-c-format +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"Des requêtes peuvent spécifier une propriété d'une classe dans la clause " +"select. Elles peuvent même appeler des fonctions " +"d'aggrégat SQL. Les propriétés ou les aggrégats sont considérés comme des " +"résultats \"scalaires\" (et pas des entités dans un état persistant)." + +#. Tag: programlisting +#: session_api.xml:316 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:321 +#, no-c-format +msgid "Bind parameters" +msgstr "Lier des paramètres" + +#. Tag: para +#: session_api.xml:323 +#, no-c-format +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"Des méthodes de Query sont fournies pour lier des valeurs " +"à des paramètres nommés ou à des paramètres de style JDBC ?. Contrairement à JDBC, les numéros des paramètres " +"d'Hibernate commencent à zéro. Les paramètres nommés sont des " +"identifiants de la forme :nom dans la chaîne de " +"caractères de la requête. Les avantages des paramètres nommés sont :" + +#. Tag: para +#: session_api.xml:333 +#, no-c-format +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "" +"les paramètres nommés sont insensibles à l'ordre de leur place dans la " +"chaîne de la requête" + +#. Tag: para +#: session_api.xml:339 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "ils peuvent apparaître plusieurs fois dans la même requête" + +#. Tag: para +#: session_api.xml:344 +#, no-c-format +msgid "they are self-documenting" +msgstr "ils sont auto-documentés" + +#. Tag: programlisting +#: session_api.xml:350 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:354 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:359 +#, no-c-format +msgid "Pagination" +msgstr "Pagination" + +#. Tag: para +#: session_api.xml:361 +#, no-c-format +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"Si vous avez besoin de spécifier des liens sur votre ensemble de résultats " +"(le nombre maximum de lignes que vous voulez récupérez et/ou la première " +"ligne que vous voulez récupérer) vous devriez utiliser des méthodes de " +"l'interface Query :" + +#. Tag: programlisting +#: session_api.xml:367 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:369 +#, no-c-format +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"Hibernate sait comment traduite cette requête de limite en SQL natif pour " +"votre SGBD." + +#. Tag: title +#: session_api.xml:377 +#, no-c-format +msgid "Scrollable iteration" +msgstr "Itération \"scrollable\"" + +#. Tag: para +#: session_api.xml:379 +#, no-c-format +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"Si votre connecteur JDBC supporte les ResultSets " +"\"scrollables\", l'interface Query peut être utilisée " +"pour obtenir un objet ScrollableResults, lequel permet " +"une navigation flexible dans les résultats de la requête." + +#. Tag: programlisting +#: session_api.xml:386 +#, no-c-format +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:388 +#, no-c-format +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"Notez qu'une connexion ouverte (et un curseur) est requise pour cette " +"fonctionnalité, utilisez setMaxResult()/" +"setFirstResult() si vous avez besoin d'une fonctionnalité " +"de pagination hors ligne." + +#. Tag: title +#: session_api.xml:397 +#, no-c-format +msgid "Externalizing named queries" +msgstr "Externaliser des requêtes nommées" + +#. Tag: para +#: session_api.xml:399 +#, no-c-format +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"Vous pouvez aussi définir des requêtes nommées dans le document de mapping. " +"(Souvenez-vous d'utiliser une section CDATA si votre " +"requête contient des caractères qui pourraient être interprétés comme des " +"éléments XML.)" + +#. Tag: programlisting +#: session_api.xml:405 +#, no-c-format +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:407 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "La liaison de paramètres et l'exécution sont fait par programmation :" + +#. Tag: programlisting +#: session_api.xml:411 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:413 +#, no-c-format +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"Notez que le code réel du programme est indépendant du langage de requête " +"qui est utilisé, vous pouvez aussi définir des requêtes SQL nativez dans les " +"méta-données, ou migrer des requêtes existantes vers Hibernate en les " +"plaçant dans les fichiers de mapping." + +#. Tag: para +#: session_api.xml:419 +#, no-c-format +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"UNTRANSLATED! Also note that a query declaration inside a <" +"hibernate-mapping> element requires a global unique name for " +"the query, while a query declaration inside a <class> element is made unique automatically by prepending the fully " +"qualified name of the class, for example eg.Cat." +"ByNameAndMaximumWeight." + +#. Tag: title +#: session_api.xml:432 +#, no-c-format +msgid "Filtering collections" +msgstr "Filtrer des collections" + +#. Tag: para +#: session_api.xml:433 +#, no-c-format +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"Un filtre de collection est un type spécial de requête " +"qui peut être appliqué à une collection persistante ou à un tableau. La " +"chaîne de requête peut se référer à this, correspondant à " +"l'élément de la collection courant." + +#. Tag: programlisting +#: session_api.xml:439 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:441 +#, no-c-format +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"La collection retournée est considérée comme un bag, et c'est une copie de " +"la collection donnée. La collection originale n'est pas modifiée (c'est " +"contraire à l'implication du nom \"filtre\"; mais cohérent avec le " +"comportement attendu)." + +#. Tag: para +#: session_api.xml:447 +#, no-c-format +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"Observez que les filtres ne nécessitent pas une clause from (bien qu'ils puissent en avoir une si besoin est). Les filtres ne " +"sont pas limités à retourner des éléments de la collection eux-mêmes." + +#. Tag: programlisting +#: session_api.xml:452 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:454 +#, no-c-format +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"Même une requête de filtre vide est utile, par exemple pour charger un sous-" +"ensemble d'éléments dans une énorme collection :" + +#. Tag: programlisting +#: session_api.xml:459 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:464 +#, no-c-format +msgid "Criteria queries" +msgstr "Requêtes Criteria" + +#. Tag: para +#: session_api.xml:466 +#, no-c-format +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQL est extrêmement puissant mais certains développeurs préfèrent construire " +"des requêtes dynamiquement, en utilisant l'API orientée objet, plutôt que " +"construire des chaînes de requêtes. Hibernate fournit une API intuitive de " +"requête Criteria pour ces cas :" + +#. Tag: programlisting +#: session_api.xml:472 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:474 +#, no-c-format +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"Les APIs Criteria et Example associé " +"sont traitées plus en détail dans ." + +#. Tag: title +#: session_api.xml:482 +#, no-c-format +msgid "Queries in native SQL" +msgstr "Requêtes en SQL natif" + +#. Tag: para +#: session_api.xml:484 +#, no-c-format +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"Vous pouvez exprimer une requête en SQL, en utilisant createSQLQuery" +"() et laisser Hibernate s'occuper du mapping des résultats vers " +"des objets. Notez que vous pouvez n'importe quand appeler session." +"connection() et utiliser directement la Connection JDBC. Si vous choisissez d'utiliser l'API Hibernate, vous devez " +"mettre les alias SQL entre accolades :" + +#. Tag: programlisting +#: session_api.xml:492 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:496 +#, no-c-format +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"Les requêtes SQL peuvent contenir des paramètres nommés et positionnels, " +"comme des requêtes Hibernate. Plus d'informations à propos des requêtes SQL " +"natives dans Hibernate peuvent être trouvées dans ." + +#. Tag: title +#: session_api.xml:507 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "Modifier des objets persistants" + +#. Tag: para +#: session_api.xml:509 +#, no-c-format +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"Les instances persistantes transactionnelles (c'est-à-" +"dire des objets chargés, sauvegardés, créés ou requêtés par la " +"Session) peuvent être manipulées par l'application et " +"n'importe quel changement vers l'état persistant sera persisté lorsque la " +"Session est \"flushée\" (traité plus " +"tard dans ce chapitre). Il n'y a pas besoin d'appeler une méthode " +"particulière (comme update(), qui a un but différent) " +"pour rendre vos modifications persistantes. Donc la manière la plus directe " +"de mettre à jour l'état d'un objet est de le charger avec load(), et puis le manipuler directement, tant que la Session est ouverte :" + +#. Tag: programlisting +#: session_api.xml:520 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:522 +#, no-c-format +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"Parfois ce modèle de programmation est inefficace puisqu'il nécessiterait un " +"SELECT SQL (pour charger l'objet) et un UPDATE SQL (pour persister son état mis à jour) dans la même session. " +"Aussi Hibernate offre une autre approche, en utilisant des instances " +"détachées." + +#. Tag: emphasis +#: session_api.xml:530 +#, fuzzy, no-c-format +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"Notez que Hibernate n'offre par sa propre API pour l'exécution directe " +"d'expressions ou . Hibernate est un service " +"de , vous n'avez pas à penser aux pour " +"l'utiliser. JDBC est une API parfaite pour exécuter des expressions SQL, " +"vous pouvez obtenir une JDBC n'importe quand en appelant " +". En outre, la notion d'opérations de masse entre en conflit " +"avec le mapping objet/relationnel pour les applications orientées processus " +"de transactions en ligne. Les futures versions d'Hibernate peuvent cependant " +"fournir des fonctions d'opération de masse. Voir " +"pour les astuces possibles d'opérations groupées." + +#. Tag: title +#: session_api.xml:545 +#, no-c-format +msgid "Modifying detached objects" +msgstr "Modifier des objets détachés" + +#. Tag: para +#: session_api.xml:547 +#, no-c-format +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"Beaucoup d'applications ont besoin de récupérer un objet dans une " +"transaction, l'envoyer à la couche interfacée avec l'utilisateur pour les " +"manipulations, puis sauvegarder les changements dans une nouvelle " +"transaction. Les applications qui utilisent cette approche dans un " +"environnement à haute concurrence utilisent généralement des données " +"versionnées pour assurer l'isolation pour les \"longues\" unités de travail." + +#. Tag: para +#: session_api.xml:554 +#, no-c-format +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernate supporte ce modèle en permettant pour le réattachement d'instances " +"détachées l'utilisation des méthodes Session.update() ou " +"Session.merge() :" + +#. Tag: programlisting +#: session_api.xml:560 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:562 +#, no-c-format +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"Si le Cat avec l'identifiant catId " +"avait déjà été chargé par secondSession lorsque " +"l'application a essayé de le réattacher, une exception aurait été levée." + +#. Tag: para +#: session_api.xml:568 +#, no-c-format +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"Utilisez update() si vous êtes sure que la session ne " +"contient pas déjà une instance persistante avec le même identifiant, et " +"merge() si vous voulez fusionner vos modifications " +"n'importe quand sans considérer l'état de la session. En d'autres mots, " +"update() est généralement la première méthode que vous " +"devriez appeler dans une session fraîche, pour s'assurer que le " +"réattachement de vos instances détachées est la première opération qui est " +"exécutée." + +#. Tag: para +#: session_api.xml:577 +#, no-c-format +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"L'application devrait individuellement update() (NdT : " +"mettre à jour) les instances détachées accessibles depuis l'instance " +"détachée donnée si et seulement si elle veut que leur " +"état soit aussi mis à jour. Ceci peut être automatisé bien sûr, en utilisant " +"la persistance transitive, voir ." + +#. Tag: para +#: session_api.xml:584 +#, no-c-format +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"La méthode lock() permet aussi à une application de " +"réassocier un objet avec une nouvelle session. Pourtant, l'instance détachée " +"doit être non modifiée !" + +#. Tag: programlisting +#: session_api.xml:589 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:591 +#, no-c-format +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"Notez que lock() peut être utilisé avec différents " +"LockModes, voir la documentation de l'API documentation " +"et le chapitre sur la gestion des transactions pour plus d'informations. Le " +"réattachement n'est pas le seul cas d'utilisation pour lock()." + +#. Tag: para +#: session_api.xml:598 +#, no-c-format +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"D'autres modèles pour de longues unités de travail sont traités dans ." + +#. Tag: title +#: session_api.xml:605 +#, no-c-format +msgid "Automatic state detection" +msgstr "Détection automatique d'un état" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Les utilisateurs d'Hibernate ont demandé une méthode dont l'intention " +"générale serait soit de sauvegarder une instance éphémère en générant un " +"nouvel identifiant, soit mettre à jour/réattacher les instances détachées " +"associées à l'identifiant courant. La méthode saveOrUpdate() implémente cette fonctionnalité." + +#. Tag: programlisting +#: session_api.xml:614 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:616 +#, no-c-format +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"L'usage et la sémantique de saveOrUpdate() semble être " +"confuse pour les nouveaux utilisateurs. Premièrement, aussi longtemps que " +"vous n'essayez pas d'utiliser des instances d'une session dans une autre, " +"vous ne devriez pas avoir besoin d'utiliser update(), " +"saveOrUpdate(), ou merge(). Certaines " +"applications n'utiliseront jamais ces méthodes." + +#. Tag: para +#: session_api.xml:624 +#, no-c-format +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"Généralement update() ou saveOrUpdate() sont utilisées dans le scénario suivant :" + +#. Tag: para +#: session_api.xml:631 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "l'application charge un objet dans la première session" + +#. Tag: para +#: session_api.xml:636 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "l'objet est passé à la couche utilisateur" + +#. Tag: para +#: session_api.xml:641 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "certaines modifications sont effectuées sur l'objet" + +#. Tag: para +#: session_api.xml:646 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "l'objet est retourné à la couche logique métier" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "" +"l'application persiste ces modifications en appelant update() dans une seconde sessin" + +#. Tag: para +#: session_api.xml:658 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate() s'utilise dans le cas suivant :" + +#. Tag: para +#: session_api.xml:664 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "si l'objet est déjà persistant dans cette session, ne rien faire" + +#. Tag: para +#: session_api.xml:669 +#, no-c-format +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"si un autre objet associé à la session a le même identifiant, lever une " +"exception" + +#. Tag: para +#: session_api.xml:675 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "" +"si l'objet n'a pas de propriété d'identifiant, appeler save()" + +#. Tag: para +#: session_api.xml:680 +#, no-c-format +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"si l'identifiant de l'objet a une valeur assignée à un objet nouvellement " +"instancié, appeler save()" + +#. Tag: para +#: session_api.xml:686 +#, no-c-format +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"si l'objet est versionné (par <version> ou " +"<timestamp>), et la valeur de la propriété de " +"version est la même valeur que celle assignée à un objet nouvellement " +"instancié, appeler save()" + +#. Tag: para +#: session_api.xml:694 +#, no-c-format +msgid "otherwise update() the object" +msgstr "sinon mettre à jour l'objet avec update()" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "and merge() is very different:" +msgstr "et merge() est très différent :" + +#. Tag: para +#: session_api.xml:706 +#, no-c-format +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"s'il y a une instance persistante avec le même identifiant couramment " +"associée à la session, copier l'état de l'objet donné dans l'instance " +"persistante" + +#. Tag: para +#: session_api.xml:713 +#, no-c-format +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"s'il n'y a pas d'instance persistante associée à cette session, essayer de " +"le charger à partir de la base de données, ou créer une nouvelle instance " +"persistante" + +#. Tag: para +#: session_api.xml:719 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "l'instance persistante est retournée" + +#. Tag: para +#: session_api.xml:724 +#, no-c-format +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "" +"l'instance donnée ne devient pas associée à la session, elle reste détachée" + +#. Tag: title +#: session_api.xml:734 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "Suppression d'objets persistants" + +#. Tag: para +#: session_api.xml:736 +#, no-c-format +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"Session.delete() supprimera l'état d'un objet de la base " +"de données. Bien sûr, votre application pourrait encore conserver une " +"référence vers un objet effacé. Il est mieux de penser à delete() comme rendant une instance persistante éphémère." + +#. Tag: programlisting +#: session_api.xml:743 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:745 +#, no-c-format +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"Vous pouvez effacer des objets dans l'ordre que vous voulez, sans risque de " +"violations de contrainte de clef étrangère. Il est encore possible de violer " +"une contrainte NOT NULL sur une colonne de clef étrangère " +"en effaçant des objets dans le mauvais ordre, par exemple si vous effacer le " +"parent, mais oubliez d'effacer les enfants." + +#. Tag: title +#: session_api.xml:756 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "Réplication d'objets entre deux entrepôts de données" + +#. Tag: para +#: session_api.xml:758 +#, no-c-format +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"Il est occasionnellement utile de pouvoir prendre un graphe d'instances " +"persistantes et de les rendre persistantes dans un entrepôt différent, sans " +"regénérer les valeurs des identifiants." + +#. Tag: programlisting +#: session_api.xml:764 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:766 +#, no-c-format +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"Le ReplicationMode détermine comment replicate()" +" traitera les conflits avec les lignes existantes dans la base de " +"données." + +#. Tag: para +#: session_api.xml:773 +#, no-c-format +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "" +"ReplicationMode.IGNORE - ignore l'objet s'il y a une " +"ligne existante dans la base de données avec le même identifiant" + +#. Tag: para +#: session_api.xml:779 +#, no-c-format +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "" +"ReplicationMode.OVERWRITE - écrase n'importe quelle ligne " +"existante dans la base de données avec le même identifiant" + +#. Tag: para +#: session_api.xml:785 +#, no-c-format +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "" +"ReplicationMode.EXCEPTION - lève une exception s'il y une " +"ligne dans la base de données avec le même identifiant" + +#. Tag: para +#: session_api.xml:791 +#, no-c-format +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - écrase la ligne si son " +"numéro de version est plus petit que le numéro de version de l'objet, ou " +"ignore l'objet sinon" + +#. Tag: para +#: session_api.xml:799 +#, no-c-format +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"Les cas d'utilisation de cette fonctionnalité incluent la réconciliation de " +"données entrées dans différentes base de données, l'extension des " +"informations de configuration du système durant une mise à jour du produit, " +"retour en arrière sur les changements effectués durant des transactions non-" +"ACID, et plus." + +#. Tag: title +#: session_api.xml:808 +#, no-c-format +msgid "Flushing the Session" +msgstr "Flush de la session" + +#. Tag: para +#: session_api.xml:810 +#, no-c-format +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"De temps en temps la Session exécutera les expressions " +"SQL requises pour syncrhoniser l'état de la connexion JDBC avec l'état des " +"objets retenus en mémoire. Ce processus, flush, arrive " +"par défaut aux points suivants :" + +#. Tag: para +#: session_api.xml:819 +#, no-c-format +msgid "before some query executions" +msgstr "lors de certaines exécutions de requête" + +#. Tag: para +#: session_api.xml:824 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "" +"lors d'un appel à org.hibernate.Transaction.commit()" + +#. Tag: para +#: session_api.xml:829 +#, no-c-format +msgid "from Session.flush()" +msgstr "lors d'un appel à Session.flush()" + +#. Tag: para +#: session_api.xml:835 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "Les expressions SQL sont effectuées dans l'ordre suivant :" + +#. Tag: para +#: session_api.xml:841 +#, no-c-format +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"insertion des entités, dans le même ordre que celui des objets " +"correspondants sauvegardés par l'appel à Session.save()" + +#. Tag: para +#: session_api.xml:847 +#, no-c-format +msgid "all entity updates" +msgstr "mise à jours des entités" + +#. Tag: para +#: session_api.xml:852 +#, no-c-format +msgid "all collection deletions" +msgstr "suppression des collections" + +#. Tag: para +#: session_api.xml:857 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "suppression, mise à jour et insertion des éléments des collections" + +#. Tag: para +#: session_api.xml:862 +#, no-c-format +msgid "all collection insertions" +msgstr "insertion des collections" + +#. Tag: para +#: session_api.xml:867 +#, no-c-format +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"suppression des entités, dans le même ordre que celui des objets " +"correspondants qui ont été supprimés par l'appel à Session.delete()" +"" + +#. Tag: para +#: session_api.xml:874 +#, no-c-format +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(Une exception est que des objets utilisant la génération native d'identifiants sont insérés lorsqu'ils sont sauvegardés.)" + +#. Tag: para +#: session_api.xml:879 +#, no-c-format +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"Excepté lorsque vous appelez flush() explicitement, il " +"n'y absolument aucune garantie à propos de quand la " +"Session exécute les appels JDBC, seulement sur " +"l'ordre dans lequel ils sont exécutés. Cependant, " +"Hibernate garantit que Query.list(..) ne retournera " +"jamais de données périmées, ni des données fausses." + +#. Tag: para +#: session_api.xml:887 +#, no-c-format +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"Il est possible de changer le comportement par défaut, donc que le flush se " +"produise moins fréquemment. La classe FlushMode définit " +"trois modes différents : flush seulement lors du commit (et seulement quand " +"l'API Transaction d'Hibernate est utilisée), flush " +"automatiquement en utilisant la procédure expliquée, ou jamais de flush à " +"moins que flush() soit appelée explicitement. Le dernier " +"mode est utile pour l'exécution de longues unités de travail, où une " +"Session est gardée ouverte et déconnectée pour un long " +"moment (voir )." + +#. Tag: programlisting +#: session_api.xml:897 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:899 +#, no-c-format +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"Durant le flush, une exception peut se produire (par exemple, si une " +"opération de la DML viole une contrainte). Puisque les exceptions de gestion " +"impliquent une certaine compréhension du comportement transactionnel " +"d'Hibernate, nous le traitons dans ." + +#. Tag: title +#: session_api.xml:908 +#, no-c-format +msgid "Transitive persistence" +msgstr "Persistance transitive" + +#. Tag: para +#: session_api.xml:910 +#, no-c-format +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"Il est assez pénible de sauvegarder, supprimer, ou réattacher des objets un " +"par un, surtout si vous traitez un graphe d'objets associés. Un cas habituel " +"est une relation parent/enfant. Considérez l'exemple suivant :" + +#. Tag: para +#: session_api.xml:916 +#, no-c-format +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"Si les enfants de la relation parent/enfant étaient des types de valeur (par " +"exemple, une collection d'adresses ou de chaînes de caractères), leur cycle " +"de vie dépendraient du parent et aucune action ne serait requise pour " +"\"cascader\" facilement les changements d'état. Si le parent est sauvegardé, " +"les objets enfants de type de valeur sont sauvegardés également, si le " +"parent est supprimé, les enfants sont supprimés, etc. Ceci fonctionne même " +"pour des opérations telles que la suppression d'un enfant de la collection ; " +"Hibernate détectera cela et, puisque les objets de type de valeur ne peuvent " +"pas avoir des références partagées, supprimera l'enfant de la base de " +"données." + +#. Tag: para +#: session_api.xml:927 +#, no-c-format +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"Maintenant considérez le même scénario avec un parent et dont les objets " +"enfants sont des entités, et non des types de valeur (par exemple, des " +"catégories et des objets, ou un parent et des chatons). Les entités ont leur " +"propre cycle de vie, supportent les références partagées (donc supprimer une " +"entité de la collection ne signifie pas qu'elle peut être supprimée), et il " +"n'y a par défaut pas de cascade d'état d'une entité vers n'importe quelle " +"entité associée. Hibernate n'implémente pas la persistance par " +"accessibilité par défaut." + +#. Tag: para +#: session_api.xml:936 +#, no-c-format +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"Pour chaque opération basique de la session d'Hibernate - incluant " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - il y a un style de cascade correspondant. " +"Respectivement, les styles de cascade s'appellent persist, merge, " +"save-update, delete, lock, refresh, evict, replicate. Si vous " +"voulez qu'une opération soit cascadée le long d'une association, vous devez " +"l'indiquer dans le document de mapping. Par exemple :" + +#. Tag: programlisting +#: session_api.xml:945 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:947 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "Les styles de cascade peuvent être combinés :" + +#. Tag: programlisting +#: session_api.xml:951 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:953 +#, no-c-format +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"Vous pouvez même utiliser cascade=\"all\" pour spécifier " +"que toutes les opérations devraient être cascadées le " +"long de l'association. La valeur par défaut cascade=\"none\" spécifie qu'aucune opération ne sera cascadée." + +#. Tag: para +#: session_api.xml:959 +#, no-c-format +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"Une style de cascade spécial, delete-orphan, s'applique " +"seulement aux associations un-vers-plusieurs, et indique que l'opération " +"delete() devrait être appliquée à n'importe quel enfant " +"qui est supprimé de l'association." + +#. Tag: para +#: session_api.xml:966 +#, no-c-format +msgid "Recommendations:" +msgstr "Recommandations :" + +#. Tag: para +#: session_api.xml:972 +#, no-c-format +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"Cela n'a généralement aucun sens d'activer la cascade sur une association " +"<many-to-one> ou <many-to-many>. Les cascades sont souvent utiles pour des associations " +"<one-to-one> et <one-to-many>." + +#. Tag: para +#: session_api.xml:980 +#, no-c-format +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"Si la durée de vie de l'objet enfant est liée à la durée de vie de l'objet " +"parent, faites en un objet du cycle de vie en " +"spécifiant cascade=\"all,delete-orphan\"." + +#. Tag: para +#: session_api.xml:987 +#, no-c-format +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +"Sinon, vous pourriez ne pas avoir besoin de cascade du tout. Mais si vous " +"pensez que vous travaillerez souvent avec le parent et les enfants ensemble " +"dans la même transaction, et que vous voulez vous éviter quelques frappes, " +"considérez l'utilisation de cascade=\"persist,merge,save-update\"." + +#. Tag: para +#: session_api.xml:995 +#, no-c-format +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"Mapper une association (soit une simple association valuée, soit une " +"collection) avec cascade=\"all\" marque l'association " +"comme une relation de style parent/enfant où la " +"sauvegarde/mise à jour/suppression du parent entraîne la sauvegarde/mise à " +"jour/suppression de l'enfant ou des enfants." + +#. Tag: para +#: session_api.xml:1001 +#, no-c-format +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"En outre, une simple référence à un enfant d'un parent persistant aura pour " +"conséquence la sauvegarde/mise à jour de l'enfant. Cette métaphore est " +"cependant incomplète. Un enfant qui devient non référencé par son parent " +"n'est pas automatiquement supprimée, excepté dans le " +"cas d'une association <one-to-many> mappée avec " +"cascade=\"delete-orphan\". La sémantique précise des " +"opérations de cascade pour une relation parent/enfant est la suivante :" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"Si un parent est passé à persist(), tous les enfant sont " +"passés à persist()" + +#. Tag: para +#: session_api.xml:1018 +#, no-c-format +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"Si un parent est passé à merge(), tous les enfants sont " +"passés à merge()" + +#. Tag: para +#: session_api.xml:1024 +#, no-c-format +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"Si un parent est passé à save(), update() ou saveOrUpdate(), tous les enfants sont passés " +"à saveOrUpdate()" + +#. Tag: para +#: session_api.xml:1030 +#, no-c-format +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"Si un enfant détaché ou éphémère devient référencé par un parent persistant, " +"il est passé à saveOrUpdate()" + +#. Tag: para +#: session_api.xml:1036 +#, no-c-format +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "" +"Si un parent est supprimé, tous les enfants sont passés à delete()" + +#. Tag: para +#: session_api.xml:1041 +#, no-c-format +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"Si un enfant est déréférencé par un parent persistant, rien de " +"spécial n'arrive - l'application devrait explicitement supprimer " +"l'enfant si nécessaire - à moins que cascade=\"delete-orphan\" soit paramétré, au quel cas l'enfant \"orphelin\" est supprimé." + +#. Tag: para +#: session_api.xml:1050 +#, no-c-format +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"Enfin, la cascade des opérations peut être effectuée sur un graphe donné " +"lors de l'appel de l'opération or lors du " +"flush suivant. Toutes les opérations, lorsque " +"cascadées, le sont sur toutes les entités associées atteignables lorsque " +"l'opétation est exécutée. Cependant save-upate et " +"delete-orphan sont cascadées à toutes les entités " +"associées atteignables lors du flush de la Session." + +#. Tag: title +#: session_api.xml:1062 +#, no-c-format +msgid "Using metadata" +msgstr "Utilisation des méta-données" + +#. Tag: para +#: session_api.xml:1064 +#, no-c-format +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"Hibernate requiert un modèle de méta-niveau très riche de toutes les entités " +"et types valués. De temps en temps, ce modèle est très utile à l'application " +"elle même. Par exemple, l'application pourrait utiliser les méta-données " +"d'Hibernate pour implémenter un algorithme de copie en profondeur " +"\"intelligent\" qui comprendrait quels objets devraient copiés (par exemple " +"les types de valeur mutables) et lesquels ne devraient pas l'être (par " +"exemple les types de valeurs immutables et, possiblement, les entités " +"associées)." + +#. Tag: para +#: session_api.xml:1071 +#, no-c-format +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"Hibernate expose les méta-données via les interfaces ClassMetadata et CollectionMetadata et la hiérarchie " +"Type. Les instances des interfaces de méta-données " +"peuvent être obtenues à partir de la SessionFactory." + +#. Tag: programlisting +#: session_api.xml:1078 +#, no-c-format +msgid "" +"" +msgstr "" + +#~ msgid "UPDATE" +#~ msgstr "UPDATE" + +#~ msgid "DELETE" +#~ msgstr "DELETE" + +#~ msgid "state management" +#~ msgstr "gestion d'état" + +#~ msgid "statements" +#~ msgstr "expressions" + +#~ msgid "Connection" +#~ msgstr "Connection" + +#~ msgid "session.connection()" +#~ msgstr "session.connection()" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/toolset_guide.po b/documentation/envers/src/main/docbook/fr-FR/content/toolset_guide.po new file mode 100644 index 0000000000..7654896164 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/toolset_guide.po @@ -0,0 +1,1234 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:29 +#, no-c-format +msgid "Toolset Guide" +msgstr "Guide des outils" + +#. Tag: para +#: toolset_guide.xml:31 +#, no-c-format +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"Des outils en ligne de commande, des plugins Eclipse ainsu que des tâches " +"Ant permettent de gérer de cycles de développement complet de projets " +"utilisant Hibernate." + +#. Tag: para +#: toolset_guide.xml:36 +#, no-c-format +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"Les outils Hibernate actuels incluent des plugins pour " +"l'IDE Eclipse ainsi que des tâches Ant pour l'ingénierie inverse de bases de " +"données existantes :" + +#. Tag: para +#: toolset_guide.xml:42 +#, no-c-format +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"Mapping Editor : un éditeur pour les fichiers de " +"mapping XML Hibernate, supportant l'auto-complétion et la mise en valeur de " +"la syntaxe. Il supporte aussi l'auto-complétion automatique pour les noms de " +"classes et les noms de propriété/champ, le rendant beaucoup plus polyvalent " +"qu'un éditeurXML normal." + +#. Tag: para +#: toolset_guide.xml:47 +#, no-c-format +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"Console : la console est une nouvelle vue d'Eclipse. En " +"plus de la vue d'ensemble arborescente de vos configurations de console, " +"vous obtenez aussi une vue interactive de vos classes persistantes et de " +"leurs relations. La console vous permet d'exécuter des requête HQL dans " +"votre base de données et de parcourir les résultats directement dans Eclipse." + +#. Tag: para +#: toolset_guide.xml:54 +#, no-c-format +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"Development Wizards : plusieurs assistants sont fournis " +"avec les outils d'Hibernate pour Eclipse ; vous pouvez utiliser un assistant " +"pour générer rapidement les fichiers de configuration d'Hibernate (cfg.xml), " +"ou vous pouvez même complètement générer les fichiers de mapping Hibernate " +"et les sources des POJOs à partir d'un schéma de base de données existant. " +"L'assistant d'ingénierie inverse supporte les modèles utilisateur." + +#. Tag: emphasis +#: toolset_guide.xml:62 +#, no-c-format +msgid "Ant Tasks:" +msgstr "Tâches Ant :" + +#. Tag: para +#: toolset_guide.xml:67 +#, no-c-format +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"Veuillez-vous référer au paquet outils Hibernate et sa " +"documentation pour plus d'informations." + +#. Tag: para +#: toolset_guide.xml:72 +#, no-c-format +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"Pourtant, le paquet principal d'Hibernate arrive avec un lot d'outils " +"intégrés (il peut même être utilisé de \"l'intérieur\" d'Hibernate à la " +"volée) : SchemaExport aussi connu comme " +"hbm2ddl." + +#. Tag: title +#: toolset_guide.xml:79 +#, no-c-format +msgid "Automatic schema generation" +msgstr "Génération automatique du schéma" + +#. Tag: para +#: toolset_guide.xml:81 +#, no-c-format +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"La DDL peut être générée à partir de vos fichiers de mapping par un " +"utilitaire d'Hibernate. Le schéma généré inclut les contraintes d'intégrité " +"référentielle (clefs primaires et étrangères) pour les tables d'entités et " +"de collections. Les tables et les séquences sont aussi créées pour les " +"générateurs d'identifiant mappés." + +#. Tag: para +#: toolset_guide.xml:88 +#, no-c-format +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"Vous devez spécifier un Dialect SQL " +"via la propriété hibernate.dialect lors de l'utilisation " +"de cet outils, puisque la DDL est fortement dépendante de la base de données." + +#. Tag: para +#: toolset_guide.xml:94 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "" +"D'abord, personnalisez vos fichiers de mapping pour améliorer le schéma " +"généré." + +#. Tag: title +#: toolset_guide.xml:99 +#, no-c-format +msgid "Customizing the schema" +msgstr "Personnaliser le schéma" + +#. Tag: para +#: toolset_guide.xml:101 +#, no-c-format +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"Plusieurs éléments du mapping hibernate définissent des attributs optionnels " +"nommés length, precision et " +"scale. Vous pouvez paramétrer la longueur, la " +"précision,... d'une colonne avec ces attributs." + +#. Tag: programlisting +#: toolset_guide.xml:108 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:109 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:111 +#, no-c-format +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"Certains éléments acceptent aussi un attribut not-null " +"(utilisé pour générer les contraintes de colonnes NOT NULL) et un attribut unique (pour générer une " +"contrainte de colonne UNIQUE)." + +#. Tag: programlisting +#: toolset_guide.xml:117 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:119 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:121 +#, no-c-format +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"Un attribut unique-key peut être utilisé pour grouper les " +"colonnes en une seule contrainte d'unicité. Actuellement, la valeur " +"spécifiée par l'attribut unique-key n'est pas utilisée pour nommer la contrainte dans le DDL généré, elle sert " +"juste à grouper les colonnes dans le fichier de mapping." + +#. Tag: programlisting +#: toolset_guide.xml:129 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:131 +#, no-c-format +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"Un attribut index indique le nom d'un index qui sera créé " +"en utilisant la ou les colonnes mappées. Plusieurs colonnes peuvent être " +"groupées dans un même index, en spécifiant le même nom d'index." + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"Un attribut foreign-key peut être utilisé pour surcharger " +"le nom des clés étrangères générées." + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"Plusieurs éléments de mapping acceptent aussi un élément fils <" +"column>. Ceci est utile pour les type multi-colonnes:" + +#. Tag: programlisting +#: toolset_guide.xml:151 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:153 +#, no-c-format +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"L'attribut default vous laisse spécifier une valeur par " +"défaut pour une colonnes (vous devriez assigner la même valeur à la " +"propriété mappée avant de sauvegarder une nouvelle instance de la classe " +"mappée)." + +#. Tag: programlisting +#: toolset_guide.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:161 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:163 +#, no-c-format +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"L'attribut sql-type laisse l'utilisateur surcharger le " +"mapping par défaut du type Hibernate vers un type SQL." + +#. Tag: programlisting +#: toolset_guide.xml:168 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:170 +#, no-c-format +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "" +"L'attribut check permet de spécifier une contrainte de " +"vérification." + +#. Tag: programlisting +#: toolset_guide.xml:174 +#, no-c-format +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:176 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:180 +#, no-c-format +msgid "Summary" +msgstr "Summary" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "Attribute" +msgstr "Attribut" + +#. Tag: entry +#: toolset_guide.xml:188 +#, no-c-format +msgid "Values" +msgstr "Valeur" + +#. Tag: entry +#: toolset_guide.xml:189 +#, no-c-format +msgid "Interpretation" +msgstr "Interprétation" + +#. Tag: literal +#: toolset_guide.xml:194 +#, no-c-format +msgid "length" +msgstr "length" + +#. Tag: entry +#: toolset_guide.xml:195 toolset_guide.xml:200 toolset_guide.xml:205 +#, no-c-format +msgid "number" +msgstr "numérique" + +#. Tag: entry +#: toolset_guide.xml:196 +#, no-c-format +msgid "column length" +msgstr "taille d'une colonne" + +#. Tag: literal +#: toolset_guide.xml:199 +#, no-c-format +msgid "precision" +msgstr "precision" + +#. Tag: entry +#: toolset_guide.xml:201 +#, no-c-format +msgid "column decimal precision" +msgstr "précision décimale de la colonne" + +#. Tag: literal +#: toolset_guide.xml:204 +#, no-c-format +msgid "scale" +msgstr "scale" + +#. Tag: entry +#: toolset_guide.xml:206 +#, no-c-format +msgid "column decimal scale" +msgstr "scale décimale de la colonne" + +#. Tag: literal +#: toolset_guide.xml:209 +#, no-c-format +msgid "not-null" +msgstr "not-null" + +#. Tag: literal +#: toolset_guide.xml:210 toolset_guide.xml:215 +#, no-c-format +msgid "true|false" +msgstr "true|false" + +#. Tag: entry +#: toolset_guide.xml:211 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "spécifie que la colonne doit être non-nulle" + +#. Tag: literal +#: toolset_guide.xml:214 +#, no-c-format +msgid "unique" +msgstr "unique" + +#. Tag: entry +#: toolset_guide.xml:216 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "spécifie que la colonne doit avoir une contrainte d'unicité" + +#. Tag: literal +#: toolset_guide.xml:219 +#, no-c-format +msgid "index" +msgstr "index" + +#. Tag: literal +#: toolset_guide.xml:220 +#, no-c-format +msgid "index_name" +msgstr "index_name" + +#. Tag: entry +#: toolset_guide.xml:221 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "spécifie le nom d'un index (multi-colonnes)" + +#. Tag: literal +#: toolset_guide.xml:224 +#, no-c-format +msgid "unique-key" +msgstr "unique-key" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "unique_key_name" +msgstr "unique_key_name" + +#. Tag: entry +#: toolset_guide.xml:226 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "spécifie le nom d'une contrainte d'unicité multi-colonnes" + +#. Tag: literal +#: toolset_guide.xml:229 +#, no-c-format +msgid "foreign-key" +msgstr "foreign-key" + +#. Tag: literal +#: toolset_guide.xml:230 +#, no-c-format +msgid "foreign_key_name" +msgstr "foreign_key_name" + +#. Tag: entry +#: toolset_guide.xml:231 +#, fuzzy, no-c-format +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"spécifie le nom d'une contrainte de clé étrangère générée pour une " +"association, utilisez-la avec les éléments de mapping , " +", , or Notez que les " +"extrêmités se seront pas prises en compte par ." + +#. Tag: literal +#: toolset_guide.xml:241 +#, no-c-format +msgid "sql-type" +msgstr "sql-type" + +#. Tag: literal +#: toolset_guide.xml:242 +#, no-c-format +msgid "SQL column type" +msgstr "SQL column_type" + +#. Tag: entry +#: toolset_guide.xml:243 +#, fuzzy, no-c-format +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "" +"surcharge le type par défaut (attribut de l'élément " +"uniquement)" + +#. Tag: literal +#: toolset_guide.xml:249 +#, no-c-format +msgid "default" +msgstr "default" + +#. Tag: entry +#: toolset_guide.xml:250 toolset_guide.xml:257 +#, fuzzy, no-c-format +msgid "SQL expression" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"expression SQL\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"SQL expression" + +#. Tag: entry +#: toolset_guide.xml:251 +#, no-c-format +msgid "specify a default value for the column" +msgstr "spécifie une valeur par défaut pour la colonne" + +#. Tag: literal +#: toolset_guide.xml:256 +#, no-c-format +msgid "check" +msgstr "check" + +#. Tag: entry +#: toolset_guide.xml:258 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "crée une contrainte de vérification sur la table ou la colonne" + +#. Tag: para +#: toolset_guide.xml:266 +#, no-c-format +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"L'élément <comment> vous permet de spécifier un " +"commentaire pour le schéma généré." + +#. Tag: programlisting +#: toolset_guide.xml:271 +#, no-c-format +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:273 +#, no-c-format +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:275 +#, no-c-format +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"Ceci a pour résultat une expression comment on table ou " +"comment on column dans la DDL générée (où supportée)." + +#. Tag: title +#: toolset_guide.xml:284 +#, no-c-format +msgid "Running the tool" +msgstr "Exécuter l'outil" + +#. Tag: para +#: toolset_guide.xml:286 +#, no-c-format +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"L'outil SchemaExport génère un script DDL vers la sortie " +"standard et/ou exécute les ordres DDL." + +#. Tag: para +#: toolset_guide.xml:291 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:297 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "SchemaExport Options de la ligne de commande" + +#. Tag: entry +#: toolset_guide.xml:303 toolset_guide.xml:453 toolset_guide.xml:522 +#, no-c-format +msgid "Option" +msgstr "Option" + +#. Tag: entry +#: toolset_guide.xml:304 toolset_guide.xml:391 toolset_guide.xml:454 +#: toolset_guide.xml:523 +#, no-c-format +msgid "Description" +msgstr "Description" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:459 +#, no-c-format +msgid "--quiet" +msgstr "--quiet" + +#. Tag: entry +#: toolset_guide.xml:310 toolset_guide.xml:460 +#, fuzzy, no-c-format +msgid "don't output the script to stdout" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ne pas écrire le script vers la sortie standard\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ne pas écrire vers la sortie standard" + +#. Tag: literal +#: toolset_guide.xml:313 +#, no-c-format +msgid "--drop" +msgstr "--drop" + +#. Tag: entry +#: toolset_guide.xml:314 +#, no-c-format +msgid "only drop the tables" +msgstr "supprime seuleument les tables" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--create" +msgstr "--create" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "only create the tables" +msgstr "ne créé que les tables" + +#. Tag: literal +#: toolset_guide.xml:321 toolset_guide.xml:463 +#, no-c-format +msgid "--text" +msgstr "--text" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "don't export to the database" +msgstr "ne pas exécuter sur la base de données" + +#. Tag: literal +#: toolset_guide.xml:325 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#. Tag: entry +#: toolset_guide.xml:326 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "écrit le script ddl vers un fichier" + +#. Tag: literal +#: toolset_guide.xml:329 toolset_guide.xml:467 toolset_guide.xml:528 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#. Tag: entry +#: toolset_guide.xml:330 toolset_guide.xml:468 toolset_guide.xml:529 +#, fuzzy, no-c-format +msgid "select a NamingStrategy" +msgstr "dans hibernate.properties" + +#. Tag: literal +#: toolset_guide.xml:333 toolset_guide.xml:475 toolset_guide.xml:536 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#. Tag: entry +#: toolset_guide.xml:334 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "lit la configuration Hibernate à partir d'un fichier XML" + +#. Tag: literal +#: toolset_guide.xml:337 toolset_guide.xml:471 toolset_guide.xml:532 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#. Tag: entry +#: toolset_guide.xml:338 toolset_guide.xml:472 toolset_guide.xml:533 +#, fuzzy, no-c-format +msgid "read database properties from a file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lit les propriétés de la base de données à partir d'un fichier\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lire les propriétés de la base de données à partir d'un fichier\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lit les propriétés dela base de données depuis un fichier de propriétés" + +#. Tag: literal +#: toolset_guide.xml:341 +#, no-c-format +msgid "--format" +msgstr "--format" + +#. Tag: entry +#: toolset_guide.xml:342 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "formatte proprement le SQL généré dans le script" + +#. Tag: literal +#: toolset_guide.xml:345 +#, no-c-format +msgid "--delimiter=;" +msgstr "--delimiter=x" + +#. Tag: entry +#: toolset_guide.xml:346 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "paramètre un délimiteur de fin de ligne pour le script" + +#. Tag: para +#: toolset_guide.xml:352 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "" +"Vous pouvez même intégrer SchemaExport dans votre " +"application :" + +#. Tag: programlisting +#: toolset_guide.xml:356 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:361 +#, no-c-format +msgid "Properties" +msgstr "Propriétés" + +#. Tag: para +#: toolset_guide.xml:363 +#, no-c-format +msgid "Database properties may be specified" +msgstr "Les propriétés de la base de données peuvent être spécifiées" + +#. Tag: para +#: toolset_guide.xml:369 +#, no-c-format +msgid "" +"as system properties with -D<property>" +msgstr "" +"comme propriétés système avec -D<property>" +"" + +#. Tag: para +#: toolset_guide.xml:372 +#, no-c-format +msgid "in hibernate.properties" +msgstr "dans hibernate.properties" + +#. Tag: para +#: toolset_guide.xml:375 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "" +"dans un fichier de propriétés déclaré avec --properties" + +#. Tag: para +#: toolset_guide.xml:379 +#, no-c-format +msgid "The needed properties are:" +msgstr "Les propriétés nécessaires sont :" + +#. Tag: title +#: toolset_guide.xml:384 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "SchemaExport Connection Properties" + +#. Tag: entry +#: toolset_guide.xml:390 +#, no-c-format +msgid "Property Name" +msgstr "Nom de la propriété" + +#. Tag: literal +#: toolset_guide.xml:396 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: entry +#: toolset_guide.xml:397 +#, no-c-format +msgid "jdbc driver class" +msgstr "classe du driver JDBC" + +#. Tag: literal +#: toolset_guide.xml:400 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: entry +#: toolset_guide.xml:401 +#, no-c-format +msgid "jdbc url" +msgstr "URL JDBC" + +#. Tag: literal +#: toolset_guide.xml:404 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: entry +#: toolset_guide.xml:405 +#, no-c-format +msgid "database user" +msgstr "utilisateur de la base de données" + +#. Tag: literal +#: toolset_guide.xml:408 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: entry +#: toolset_guide.xml:409 +#, no-c-format +msgid "user password" +msgstr "mot de passe de l'utilisateur" + +#. Tag: literal +#: toolset_guide.xml:412 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: toolset_guide.xml:413 +#, no-c-format +msgid "dialect" +msgstr "dialecte" + +#. Tag: title +#: toolset_guide.xml:422 +#, no-c-format +msgid "Using Ant" +msgstr "Utiliser Ant" + +#. Tag: para +#: toolset_guide.xml:424 +#, no-c-format +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "" +"Vous pouvez appeler SchemaExport depuis votre script de " +"construction Ant :" + +#. Tag: programlisting +#: toolset_guide.xml:428 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:433 +#, no-c-format +msgid "Incremental schema updates" +msgstr "Mises à jour incrémentales du schéma" + +#. Tag: para +#: toolset_guide.xml:435 +#, no-c-format +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"L'outil SchemaUpdate mettra à jour un schéma existant en " +"effectuant les changement par \"incrément\". Notez que " +"SchemaUpdate dépends beaucoup de l'API JDBC metadata, il " +"ne fonctionnera donc pas avec tous les drivers JDBC." + +#. Tag: para +#: toolset_guide.xml:441 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:447 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "SchemaUpdate Options de ligne de commande" + +#. Tag: entry +#: toolset_guide.xml:464 +#, no-c-format +msgid "don't export the script to the database" +msgstr "ne pas exporter vers la base de données" + +#. Tag: entry +#: toolset_guide.xml:476 toolset_guide.xml:537 +#, fuzzy, no-c-format +msgid "specify a .cfg.xml file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"specify a file\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"indique un fichier " + +#. Tag: para +#: toolset_guide.xml:482 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "" +"Vous pouvez intégrer SchemaUpdate dans votre application :" + +#. Tag: programlisting +#: toolset_guide.xml:486 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:491 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "Utiliser Ant pour des mises à jour de schéma par incrément" + +#. Tag: para +#: toolset_guide.xml:493 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "" +"Vous pouvez appeler SchemaUpdate depuis le script Ant :" + +#. Tag: programlisting +#: toolset_guide.xml:497 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:502 +#, no-c-format +msgid "Schema validation" +msgstr "Validation du schéma" + +#. Tag: para +#: toolset_guide.xml:504 +#, no-c-format +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"L'outil SchemaValidator validera que le schéma existant " +"correspond à vos documents de mapping. Notez que le " +"SchemaValidator dépends de l'API metadata de JDBC, il ne " +"fonctionnera donc pas avec tous les drivers JDBC. Cet outil est extrêmement " +"utile pour tester." + +#. Tag: para +#: toolset_guide.xml:510 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:516 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator Options de ligne de commande" + +#. Tag: para +#: toolset_guide.xml:543 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "" +"Vous pouvez inclure SchemaValidator dans votre " +"application:" + +#. Tag: programlisting +#: toolset_guide.xml:547 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:552 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "Utiliser Ant pour la validation du Schéma" + +#. Tag: para +#: toolset_guide.xml:554 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "" +"Vous pouvez appeler SchemaValidator depuis le script Ant:" + +#. Tag: programlisting +#: toolset_guide.xml:558 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "<one-to-one>" +#~ msgstr "<one-to-one>" + +#~ msgid "<many-to-one>" +#~ msgstr "<many-to-one>" + +#~ msgid "<key>" +#~ msgstr "<key>" + +#~ msgid "<many-to-many>" +#~ msgstr "<many-to-many>" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid "SchemaExport" +#~ msgstr "SchemaExport" + +#~ msgid "<column>" +#~ msgstr "<column>" + +#~ msgid "java -cp" +#~ msgstr "java -cp" + +#, fuzzy +#~ msgid "hibernate_classpaths" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "classpath_hibernate\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate_classpaths\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate_classpaths" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#~ msgstr "net.sf.hibernate.tool.hbm2ddl.SchemaExport" + +#, fuzzy +#~ msgid "options mapping_files" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "options fichiers_de_mapping\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "options mapping_files\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "options mapping_files" + +#~ msgid "NamingStrategy" +#~ msgstr "NamingStrategy" + +#, fuzzy +#~ msgid "select a " +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "sélectionne une \n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "choisit une \n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Indique une " + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate" + +#~ msgid ".cfg.xml" +#~ msgstr ".cfg.xml" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/transactions.po b/documentation/envers/src/main/docbook/fr-FR/content/transactions.po new file mode 100644 index 0000000000..38704106da --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/transactions.po @@ -0,0 +1,2173 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:29 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "Transactions et accès concurrents" + +#. Tag: para +#: transactions.xml:31 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"L'un des principaux avantages du mécanisme de contrôle des accès concurrents " +"d'Hibernate est qu'il est très facile à comprendre. Hibernate utilise " +"directement les connexions JDBC ainsi que les ressources JTA sans y ajouter " +"davantage de mécanisme de blocage. Nous vous recommandons de vous " +"familiariser avec les spécifications JDBC, ANSI et d'isolement de " +"transaction de la base de données que vous utilisez." + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"Hibernate ne vérouille pas vos objets en mémoire. Votre application peut " +"suivre le comportement défini par le niveau d'isolation de vos transactions " +"de base de données. Notez que grâce à la Session, qui est " +"aussi un cache de scope transaction, Hibernate fournit des lectures répétées " +"pour les récupération par identifiants et les requêtes d'entités (pas celle " +"de valeurs scalaires)." + +#. Tag: para +#: transactions.xml:46 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"En addition au versionning pour le controle automatique de concurrence, " +"Hibernate fournit une API (mineure) pour le verrouillage perssimiste des " +"enregistrements, en générant une syntaxe SELECT FOR UPDATE. Le controle de concurrence optimiste et cette API seront détaillés " +"plus tard dans ce chapitre." + +#. Tag: para +#: transactions.xml:53 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"Nous aborderons la gestion des accès concurrents en discutant de la " +"granularité des objets Configuration, " +"SessionFactory, et Session, ainsi que " +"de certains concepts relatifs à la base de données et aux longues " +"transactions applicatives." + +#. Tag: title +#: transactions.xml:60 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "Gestion de session et délimitation de transactions" + +#. Tag: para +#: transactions.xml:62 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"Il est important de savoir qu'un objet SessionFactory est " +"un objet complexe et optimisé pour fonctionner avec les threads(thread- " +"safe). Il est coûteux à créer et est ainsi prévu pour n'être instancié qu?" +"une seule fois via un objet Configuration au démarrage de " +"l'application, et être partagé par tous les threads d'une application." + +#. Tag: para +#: transactions.xml:68 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Un objet Session est relativement simple et n'est " +"threadsafe. Il est également peu coûteux à créer. Il devrait n'être utilisé " +"qu'une seule fois, pour un processus d'affaire ou une unité de travail ou " +"une conversation et ensuite être relâché. Un objet Session ne tentera pas d'obtenir de connexion ( Connection ) JDBC (ou de Datasource ) si ce n'est pas " +"nécessaire." + +#. Tag: para +#: transactions.xml:76 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"Afin de compléter ce tableau, vous devez également penser aux transactions " +"de base de données. Une transaction de base de données se doit d'être la " +"plus courte possible afin de réduire les risques de collision sur des " +"enregistrements verrouillés. De longues transactions à la base de données " +"nuiront à l'extensibilité de vos applications lorsque confrontées à de hauts " +"niveaux de charge. Par conséquent, il n'est jamais bon de maintenir une " +"transaction ouverte pendant la durée de reflexion de l'utilisateur, jusqu'a " +"ce que l'unité de travail soit achevée." + +#. Tag: para +#: transactions.xml:85 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"Maintenant, comment délimiter une unité de travail? Est-ce qu'une instance " +"de Session peut avoir une durée de vie dépassant " +"plusieurs transactions à la base de données, ou bien est-ce que celles-ci " +"doivent être liées une à une? Quand faut-il ouvrir et fermer une " +"Session ? Comment définir la démarcation de vos " +"transactions à la base de données?" + +#. Tag: title +#: transactions.xml:93 +#, no-c-format +msgid "Unit of work" +msgstr "Unité de travail" + +#. Tag: para +#: transactions.xml:95 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"Il est important de mentionner que d'utiliser un paradigme session-" +"par-operation est un anti-pattern. Autrement dit: n'ouvrez et ne " +"fermez pas la Session à chacun de vos accès simples à la " +"base de données dans un même thread! Bien sûr, le même raisonnement " +"s'applique sur la gestion des transactions à la base de données. Les appels " +"à la base de données devraient être faits en ordre et selon une séquence " +"définie. Ils devraient également être regroupés en des unités de travail " +"atomiques. (Notez que l?utilisation d?une connexion auto-commit constitue le " +"même anti-pattern. Ce mode de fonctionnement existe pour les applications " +"émettant des commandes SQL à partir d?une console. Hibernate désengage le " +"mode auto-commit et s'attend à ce qu'un serveur d'applications le fasse " +"également.) Les transactions avec la base de données ne sont jamais " +"optionnelles, toute communication avec une base de données doit se dérouler " +"dans une transaction, peu importe si vous lisez ou écrivez des données. " +"Comme évoqué, le comportement auto-commit pour lire les données devrait être " +"évité, puisque plusieurs petites transactions ne seront jamais aussi " +"efficaces qu'une seule plus grosse clairement définie comme unité de " +"travail. Ce dernier choix et en plus beaucoup plus facile a maintenir et à " +"faire évoluer." + +#. Tag: para +#: transactions.xml:111 +#, fuzzy, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is sent to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"Le pattern d'utilisation le plus fréquemment rencontré dans des applications " +"clients serveur multi-usagers est le session-per-request (littéralement : Session par requête). Dans ce modèle, la requête " +"d'un client est envoyée à un serveur (Où la couche de persistance est " +"implémentée via Hibernate), une nouvelle Session est " +"ouverte et toutes les opérations d'accès à la base de données sont exécutées " +"à l'intérieur de celle-ci. Lorsque le travail est terminé (et que les " +"réponses à envoyer au client ont été préparées), la session est flushée et " +"fermée. Une seule transaction à la base de données peut être utilisée pour " +"répondre à la requête du client. La transaction est démarrée et validée au " +"même moment où la Session est ouverte et fermée. La relation entre la " +"Session et la Transaction est donc one-" +"to-one. Ce modèle permet de répondre parfaitement aux attentes de la grande " +"majorité des applications." + +#. Tag: para +#: transactions.xml:123 +#, fuzzy, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is sent to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"Le défi réside dans l'implémentation. Hibernate fournit une fonction de " +"gestion de la \"session courante\" pour simplifier ce pattern. Tout ce que " +"vous devez faire est démarrer une transaction lorsqu'une requête est traitée " +"par le serveur, et la terminer avant que la réponse ne soit envoyée au " +"client. Vous pouvez le faire de la manière que vous voulez, les solutions " +"communes sont un ServletFilter, l'interception via AOP " +"avec une pointcut sur les méthodes de type \"service\", ou un conteneur avec " +"interception/proxy. Un conteneur EJB est un moyen standard d'implémenter ce " +"genre d'acpect tranverse comme la démarcation des transactions sur les EJBs " +"session, de manière déclarative avec CMT. Si vous décidez d'utiliser la " +"démarcation programmatique des transactions, préferrez l'API Hibernate " +"Transaction détaillée plus tard dans ce chapitre, afin de " +"facilité l'utilisation et la portabilité du code." + +#. Tag: para +#: transactions.xml:136 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"Votre application peut accéder la \"session courante\" pour exécuter une " +"requête en invoquant simplement sessionFactory.getCurrentSession() n'importe où et autant de fois que souhaité. Vous obtiendrez " +"toujours une Session dont le scope est la transaction " +"courante avec la base de données. Ceci doit être configuré soit dans les " +"ressources local ou dans l'environnement JTA, voir ." + +#. Tag: para +#: transactions.xml:144 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"Il est parfois utile d'étendre le scope d'une Session et " +"d'une transaction à la base de données jusqu'à ce que \"la vue soit rendue" +"\". Ceci est particulièrement utile dans des applications à base de servlet " +"qui utilisent une phase de rendue séparée une fois que la réponse a été " +"préparée. Etendre la transaction avec la base de données jusqu'à la fin du " +"rendering de la vue est aisé si vous implémentez votre propre intercepteur. " +"Cependant, ce n'est pas facile si vous vous appuyez sur les EJBs avec CMT, " +"puisqu'une transaction sera achevée au retour de la méthode EJB, avant le " +"rendu de la vue. Rendez vous sur le site Hibernate et sur le forum pour des " +"astuces et des exemples sur le pattern Open Session in View pattern.." + +#. Tag: title +#: transactions.xml:159 +#, no-c-format +msgid "Long conversations" +msgstr "Longue conversation" + +#. Tag: para +#: transactions.xml:161 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"Le paradigme session-per-request n'est pas le seul " +"élément à utiliser dans le design de vos unités de travail. Plusieurs " +"processus d'affaire requièrent toute une série d'interactions avec " +"l'utilisateur, entrelacées d'accès à la base de donnée. Dans une application " +"Web ou une application d'entreprise, il serait inacceptable que la durée de " +"vie d'une transaction s'étale sur plusieurs interactions avec l'usager. " +"Considérez l'exemple suivant:" + +#. Tag: para +#: transactions.xml:171 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"Un écran s'affiche. Les données vues par l'usager ont été chargées dans " +"l'instance d'un objet Session , dans le cadre d'une " +"transaction de base de données. L'usager est libre de modifier ces objets." + +#. Tag: para +#: transactions.xml:178 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"L'usager clique \"Sauvegarder\" après 5 minutes et souhaite persister les " +"modifications qu'il a apportées. Il s'attend à être la seule personne a " +"avoir modifié ces données et qu'aucune modification conflictuelle ne se soit " +"produite durant ce laps de temps." + +#. Tag: para +#: transactions.xml:186 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"Ceci s'appelle une unité de travail. Du point de vue de l'utilisateur: une " +"conversation (ou transaction d'application). Il y a plusieurs façon de mettre ceci en place dans votre " +"application." + +#. Tag: para +#: transactions.xml:192 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"Une première implémentation naïve pourrait consister à garder la " +"Session et la transaction à la base de données ouvertes " +"durant le temps de travail de l'usager, à maintenir les enregistrements " +"verrouillés dans la base de données afin d'éviter des modifications " +"concurrentes et de maintenir l'isolation et l'atomicité de la transaction de " +"l'usager. Ceci est un anti-pattern à éviter, puisque le verrouillage des " +"enregistrements dans la base de données ne permettrait pas à l'application " +"de gérer un grand nombre d'usagers concurrents." + +#. Tag: para +#: transactions.xml:200 +#, fuzzy, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"conversation. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"Il apparaît donc évident qu'il faille utiliser plusieurs transactions BDD " +"afin d'implémenter la conversation. Dans ce cas, maintenir l'isolation des " +"processus d'affaire devient partiellement la responsabilité de la couche " +"applicative. Ainsi, la durée de vie d'une conversation devrait englober " +"celle d'une ou de plusieurs transactions de base de données. Celle-ci sera " +"atomique seulement si l'écriture des données mises à jour est faite " +"exclusivement par la dernière transaction BDD la composant. Toutes les " +"autres sous transactions BD ne doivent faire que la lecture de données. Ceci " +"est relativement facile à mettre en place, surtout avec l'utilisation de " +"certaines fonctionnalités d'Hibernate:" + +#. Tag: para +#: transactions.xml:213 +#, fuzzy, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occurred during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"Versionnage Automatique - Hibernate peut gérer " +"automatiquement les accès concurrents de manière optimiste et détecter si " +"une modification concurrente s'est produite durant le temps de réflexion " +"d'un usager." + +#. Tag: para +#: transactions.xml:221 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"Objets Détachés - Si vous décidez d'utiliser le " +"paradigme session-par-requête discuté plus haut, toutes " +"les entités chargées en mémoire deviendront des objets détachés durant le " +"temps de réflexion de l'usager. Hibernate vous permet de rattacher ces " +"objets et de persister les modifications y ayant été apportées. Ce pattern " +"est appelé: session-per- request-with-detached-objects " +"(littéralement: session- par-requête-avec-objets-détachés). Le versionnage " +"automatique est utilisé afin d'isoler les modifications concurrentes." + +#. Tag: para +#: transactions.xml:231 +#, fuzzy, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitly." +msgstr "" +"Session Longues (conversation) - Une Session Hibernate peut être déconnectée de la couche JDBC sous-jacente " +"après que commit() ait été appelé sur une transaction à la base de données " +"et reconnectée lors d'une nouvelle requête-client. Ce pattern s'appelle: " +"session-per-conversation (Littéralement: session-par- " +"conversation) et rend superflu le rattachement des objets. Le versionnage " +"automatique est utilisé afin d'isoler les modifications concurrentes." + +#. Tag: para +#: transactions.xml:244 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"Les deux patterns session-per-request-with- detached- objects (session-par-requête-avec-objets- détachés) et session-" +"per-conversation (session-par-conversation) ont chacun leurs " +"avantages et désavantages qui seront exposés dans ce même chapitre, dans la " +"section au sujet du contrôle optimiste de concurrence." + +#. Tag: title +#: transactions.xml:253 +#, no-c-format +msgid "Considering object identity" +msgstr "L'identité des objets" + +#. Tag: para +#: transactions.xml:255 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"Une application peut accéder à la même entité persistante de manière " +"concurrente dans deux Session s différentes. Toutefois, " +"une instance d'une classe persistante n'est jamais partagée par deux " +"instances distinctes de la classe Session . Il existe " +"donc deux notions de l'identité d'un objet:" + +#. Tag: term +#: transactions.xml:264 +#, no-c-format +msgid "Database Identity" +msgstr "Identité BD" + +#. Tag: literal +#: transactions.xml:267 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:272 +#, no-c-format +msgid "JVM Identity" +msgstr "Identité JVM" + +#. Tag: literal +#: transactions.xml:275 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:281 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"Ainsi, pour des objets attachés à une Sessionprécise (dans la cadre d'exécution (scope) " +"d'une instance de Session ), ces deux notions d'identité " +"sont équivalentes et garanties par Hibernate. Par contre, si une application " +"peut accéder de manière concurrente à la même entité persistante dans deux " +"sessions différentes, les deux instances seront en fait différentes (en ce " +"qui a trait à l'identité JVM). Les conflits sont résolus automatiquement par " +"approche optimiste grâce au système de versionnage automatique lorsque " +"Session.flush() ou Transaction.commit() est appelé." + +#. Tag: para +#: transactions.xml:290 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"Cette approche permet de reléguer à Hibernate et à la base de données sous-" +"jacente le soin de gérer les problèmes d'accès concurrents. Cette manière de " +"faire assure également une meilleure extensibilité de l'application puisque " +"assurer l'identité JVM dans un thread ne nécessite pas de mécanismes de " +"verrouillage coûteux ou d'autres dispositifs de synchronisation. Une " +"application n'aura jamais le besoin de synchroniser des objets d'affaire " +"tant qu'elle peut garantir qu'un seul thread aura accès à une instance de " +"Session . Dans le cadre d'exécution d'un objet " +"Session , l'application peut utiliser en toute sécurité " +"== pour comparer des objets." + +#. Tag: para +#: transactions.xml:299 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"Une application qui utiliserait == à l'extérieur du cadre " +"d'exécution d'une Session pourrait obtenir des résultats " +"inattendus et causer certains effets de bords. Par exemple, si vous mettez 2 " +"objets dans le même Set , ceux-ci pourraient avoir la " +"même identité BD (i.e. ils représentent le même enregistrement), mais leur " +"identité JVM pourrait être différente (elle ne peut, par définition, pas " +"être garantie sur deux objets détachés). Le développeur doit donc redéfinir " +"l'implémentation des méthodes equals() et " +"hashcode() dans les classes persistantes et y adjoindre " +"sa propre notion d'identité. Il existe toutefois une restriction: Il ne faut " +"jamais utiliser uniquement l'identifiant de la base de données dans " +"l'implémentation de l'égalité; Il faut utiliser une clé d'affaire, " +"généralement une combinaison de plusieurs attributs uniques, si possible " +"immuables. Les identifiants de base de données vont changer si un objet " +"transitoire (transient) devient persistant. Si une instance transitoire est " +"contenue dans un Set , changer le hashcode brisera le " +"contrat du Set . Les attributs pour les clés d'affaire " +"n'ont pas à être aussi stables que des clés primaires de bases de données. " +"Il suffit simplement qu'elles soient stables tant et aussi longtemps que les " +"objets sont dans le même Set . Veuillez consulter le site " +"web Hibernate pour des discussions plus pointues à ce sujet. Notez que ce " +"concept n'est pas propre à Hibernate mais bien général à l'implémentation de " +"l'identité et de l'égalité en Java." + +#. Tag: title +#: transactions.xml:320 +#, no-c-format +msgid "Common issues" +msgstr "Problèmes communs" + +#. Tag: para +#: transactions.xml:322 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"Bien qu'il puisse y avoir quelques rares exceptions à cette règle, il est " +"recommandé de ne jamais utiliser les anti-patterns session-per- " +"user-session et session-per-application . " +"Vous trouverez ici- bas quelques problèmes que vous risquez de rencontrer si " +"vous en faite l?utilisation. (Ces problèmes pourraient quand même survenir " +"avec des patterns recommandés) Assurez-vous de bien comprendre les " +"implications de chacun des patterns avant de prendre votre décision." + +#. Tag: para +#: transactions.xml:331 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"L'objet Session n?est pas conçu pour être utilisé par de " +"multiples threads. En conséquence, les objets potentiellement multi-thread " +"comme les requêtes HTTP, les EJB Session et Swing Worker, risquent de " +"provoquer des conditions de course dans la Session si " +"celle-ci est partagée. Dans un environnement web classique, il serait " +"préférable de synchroniser les accès à la session http afin d?éviter qu?un " +"usager ne recharge une page assez rapidement pour que deux requêtes s?" +"exécutant dans des threads concurrents n?utilisent la même Session ." + +#. Tag: para +#: transactions.xml:342 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"Lorsque Hibernate lance une exception, le roll back de la transaction en " +"cours doit être effectué et la Session doit être " +"immédiatement fermée. (Ceci sera exploré plus tard dans le chapitre.) Si la " +"Session est directement associée à une application, il " +"faut arrêter l?application. Le roll back de la transaction ne remettra pas " +"les objets dans leur état du début de la transaction. Ainsi, ceux-ci " +"pourraient être désynchronisés d?avec les enregistrements. (Généralement, " +"cela ne cause pas de réels problèmes puisque la plupart des exceptions sont " +"non traitables et requièrent la reprise du processus d?affaire ayant échoué.)" + +#. Tag: para +#: transactions.xml:354 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"La Session met en mémoire cache tous les objets " +"persistants (les objets surveillés et dont l'état est géré par Hibernate.) " +"Si la Session est ouverte indéfiniment ou si une trop " +"grande quantité d'objets y est chargée, l?utilisation de la mémoire peut " +"potentiellement croître jusqu?à atteindre le maximum allouable à l?" +"application (java.lang.OutOfMemoryError.) Une solution à ce problème est d?" +"appeler les méthodes Session.clear() et Session." +"evict() pour gérer la mémoire cache de la Session . Vous pouvez également utiliser des stored procedures si vous " +"devez lancer des traitements sur de grandes quantités d?informations. " +"Certaines solutions sont décrites ici : . Garder " +"une Session ouverte pour toute la durée d?une session " +"usager augmente également considérablement le risque de travailler avec de l?" +"information périmée." + +#. Tag: title +#: transactions.xml:372 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "Démarcation des transactions" + +#. Tag: para +#: transactions.xml:374 +#, fuzzy, no-c-format +msgid "" +"Database (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"La démarcation des transactions est importante dans le design d?une " +"application. Aucune communication avec la base de données ne peut être " +"effectuée à l?extérieur du cadre d?une transaction. (Il semble que ce " +"concept soit mal compris par plusieurs développeurs trop habitués à utiliser " +"le mode auto-commit.) Même si certains niveaux d'isolation et certaines " +"possibilités offertes par les bases de données permettent de l?éviter, il " +"n'est jamais désavantageux de toujours explicitement indiquer les bornes de " +"transaction pour les opérations complexes comme pour les opérations simples " +"de lecture." + +#. Tag: para +#: transactions.xml:384 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"Une application utilisant Hibernate peut s'exécuter dans un environnement " +"léger n?offrant pas la gestion automatique des transactions (application " +"autonome, application web simple ou applications Swing) ou dans un " +"environnement J2EE offrant des services de gestion automatique des " +"transactions JTA. Dans un environnement simple, Hibernate a généralement la " +"responsabilité de la gestion de son propre pool de connexions à la base de " +"données. Le développeur de l'application doit manuellement délimiter les " +"transactions. En d'autres mots, il appartient au développeur de gérer les " +"appels à Transaction.begin() , Transaction.commit" +"() et Transaction.rollback() . Un environnement " +"transactionnel J2EE (serveur d'application J2EE) doit offrir la gestion des " +"transactions au niveau du container J2EE. Les bornes de transaction peuvent " +"normalement être définies de manière déclarative dans les descripteurs de " +"déploiement d'EJB Session, par exemple. La gestion programmatique des " +"transactions n'y est donc pas nécessaire. Même les appels à Session." +"flush() sont faits automatiquement." + +#. Tag: para +#: transactions.xml:394 +#, fuzzy, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demarcation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"Il peut être requis d'avoir une couche de persistance portable. Hibernate " +"offre donc une API appelée Transaction qui sert " +"d'enveloppe pour le système de transaction natif de l'environnement de " +"déploiement. Il n'est pas obligatoire d'utiliser cette API mais il est " +"fortement conseillé de le faire, sauf lors de l'utilisation de CMT Session " +"Bean (EJB avec transactions gérées automatiquement par le container EJB)." + +#. Tag: para +#: transactions.xml:403 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "" +"Il existe quatre étapes disctinctes lors de la fermeture d'une " +"Session" + +#. Tag: para +#: transactions.xml:409 +#, no-c-format +msgid "flush the session" +msgstr "flush de la session" + +#. Tag: para +#: transactions.xml:414 +#, no-c-format +msgid "commit the transaction" +msgstr "commit de la transaction" + +#. Tag: para +#: transactions.xml:419 +#, no-c-format +msgid "close the session" +msgstr "Fermeture de la session (Close)" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "handle exceptions" +msgstr "Gestion des exceptions" + +#. Tag: para +#: transactions.xml:430 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"La synchronisation de bdd depuis la session (flush) a déjà été expliqué, " +"nous nous attarderons maintenant à la démarcation des transactions et à la " +"gestion des exceptions dans les environnements légers et les environnements " +"J2EE." + +#. Tag: title +#: transactions.xml:437 +#, no-c-format +msgid "Non-managed environment" +msgstr "Environnement non managé" + +#. Tag: para +#: transactions.xml:439 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"Si la couche de persistance Hibernate s'exécute dans un environnement non " +"managé, les connexions à la base de données seront généralement prises en " +"charge par le mécanisme de pool d'Hibernate. La gestion de la session et de " +"la transaction se fera donc de la manière suivante:" + +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:448 +#, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"Vous n'avez pas à invoquer flush() explicitement sur la " +"Session - l'appel de commit() " +"déclenchera automatiquement la synchronisation (selon le FlushMode de la session. Un appel à " +"close() marque la fin de la session. La conséquence " +"directe est que la connexion à la base de données sera relachée par la " +"session. Ce code est portable est fonctionne dans les environnements non " +"managé ET les environnements JTA." + +#. Tag: para +#: transactions.xml:457 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"Une solution plus flexible est la gestion par contexte fourni par Hibernate " +"que nous avons déjà rencontré:" + +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"Vous ne verrez probablement jamais ces exemples de code dans les " +"applications; les exceptions fatales (exceptions du système) ne devraient " +"être traitées que dans la couche la plus \"haute\". En d'autres termes, le " +"code qui exécute les appels à Hibernate (à la couche de persistance) et le " +"code qui gère les RuntimeException (qui ne peut " +"généralement effectuer qu'un nettoyage et une sortie) sont dans des couches " +"différentes. La gestion du contexte courant par Hibernate peut simplifier " +"notablement ce design, puisque vous devez accéder à la gestion des " +"exceptions de la SessionFactory, ce qui est décrit plus " +"tard dans ce chapitre." + +#. Tag: para +#: transactions.xml:474 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"Notez que vous devriez sélectionner org.hibernate.transaction." +"JDBCTransactionFactory (le défaut), pour le second exemple " +"\"thread\" comme hibernate." +"current_session_context_class." + +#. Tag: title +#: transactions.xml:483 +#, no-c-format +msgid "Using JTA" +msgstr "Utilisation de JTA" + +#. Tag: para +#: transactions.xml:485 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"Si votre couche de persistance s'exécute dans un serveur d'application (par " +"exemple, derrière un EJB Session Bean), toutes les datasource utilisées par " +"Hibernate feront automatiquement partie de transactions JTA globales. " +"Hibernate propose deux stratégies pour réussir cette intégration." + +#. Tag: para +#: transactions.xml:492 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"Si vous utilisez des transactions gérées par un EJB (bean managed " +"transactions - BMT), Hibernate informera le serveur d'application du début " +"et de la fin des transactions si vous utilisez l'API Transaction . Ainsi, le code de gestion des transactions sera identique dans " +"les deux types d'environnements." + +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "Ou encore, avec la gestion automatique de contexte:" + +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:508 +#, fuzzy, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" +"Avec CMT, la démarcation des transactions est faite dans les descripteurs de " +"déploiement des Beans Sessions et non de manière programmmatique, ceci " +"réduit le code:" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"Dans un EJB CMT même le rollback intervient automatiquement, puisqu'une " +"RuntimeException non traitée et soulevée par une méthode " +"d'un bean session indique au conteneur d'annuler la transaction globale. " +"Ceci veut donc dire que vous n'avez pas à utiliser l'API " +"Transaction d'Hibernate dans CMT." + +#. Tag: para +#: transactions.xml:523 +#, fuzzy, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatibility), or set to \"jta\"." +msgstr "" +"Notez que le fichier de configuration Hibernate devrait contenir les valeurs " +"org.hibernate.transaction.JTATransactionFactory dans un " +"environnement BMT ou org.hibernate.transaction." +"CMTTransactionFactory dans un environnement CMT là où vous " +"configurez votre transaction factory Hibernate. N'oubliez pas non plus de " +"spécifier le paramètre org.hibernate.transaction." +"manager_lookup_class . De plus, assurez vous de fixez votre " +"hibernate.current_session_context_class soit à " +"\"jta\" ou de ne pas le configurer (compatibilité avec les " +"versions précédentes)." + +#. Tag: para +#: transactions.xml:532 +#, fuzzy, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicitly " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"La méthode getCurrentSession() a un inconvénient dans les " +"environnement JTA. Il y a une astuce qui est d'utiliser un mode de " +"libération de connexion after_statement , qui est alors " +"utilisé par défaut. Du à une étrange limitation de la spec JTA, il n'est pas " +"possible pour Hibernate de nettoyer et ferme automatiquement un " +"ScrollableResults ouvert ou une instance " +"d'Iterator retournés scroll() ou " +"iterate(). Vous devez libérer le " +"curseur base de données sous jacent ou invoquer Hibernate.close" +"(Iterator) explicitement depuis un bloc finally. (Bien sur, la plupart des applications peuvent éviter d'uiliser " +"scroll() ou iterate() dans un code " +"CMT.)" + +#. Tag: title +#: transactions.xml:548 +#, no-c-format +msgid "Exception handling" +msgstr "Gestion des exceptions" + +#. Tag: para +#: transactions.xml:550 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"Si une Session lance une exception (incluant les " +"exceptions du type SQLException ou d'un sous-type), vous " +"devez immédiatement faire le rollback de la transaction, appeler " +"Session.close() et relâcher les références sur l'objet " +"Session . La Session contient des " +"méthodes pouvant la mettre dans un état inutilisable. Vous devez considérer " +"qu'aucune exception lancée par Hibernate n'est " +"traitable. Assurez-vous de fermer la session en faisant l'appel à " +"close() dans un bloc finally ." + +#. Tag: para +#: transactions.xml:561 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"L'exception HibernateException , qui englobe la plupart " +"des exceptions pouvant survenir dans la couche de persistance Hibernate, est " +"une exception non vérifiée (Ceci n'était pas le cas dans certaines versions " +"antérieures de Hibernate.) Il est de notre avis que nous ne devrions pas " +"forcer un développeur à gérer une exception qu'il ne peut de toute façon pas " +"traiter dans une couche technique. Dans la plupart des applications, les " +"exceptions non vérifiées et les exceptions fatales sont gérées en amont du " +"processus (dans les couches hautes) et un message d'erreur est alors affiché " +"à l'usager (ou un traitement alternatif est invoqué.) Veuillez noter " +"qu'Hibernate peut également lancer des exceptions non vérifiées d'un autre " +"type que HibernateException . Celles-ci sont également " +"non traitables et vous devez les traiter comme telles." + +#. Tag: para +#: transactions.xml:573 +#, fuzzy, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the exception into a more meaningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"Hibernate englobe les SQLException s lancées lors des " +"interactions directes avec la base de données dans des exceptions de type: " +"JDBCException . En fait, Hibernate essaiera de convertir " +"l'exception dans un sous-type plus significatif de JDBCException . L'exception SQLException sous-jacente est " +"toujours disponible via la méthode JDBCException.getCause() . Cette conversion est faite par un objet de type " +"SQLExceptionConverter , qui est rattaché à l'objet " +"SessionFactory . Par défaut, le " +"SQLExceptionConverter est associé au dialecte de BD " +"configuré dans Hibernate. Toutefois, il est possible de fournir sa propre " +"implémentation de l'interface. (Veuillez vous référer à la javadoc sur la " +"classe SQLExceptionConverterFactory pour plus de détails. " +"Les sous-types standard de JDBCException sont:" + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - Indique une erreur de " +"communication avec la couche JDBC sous-jacente." + +#. Tag: para +#: transactions.xml:595 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - Indique un problème de grammaire ou " +"de syntaxe avec la requête SQL envoyée." + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - Indique une violation de " +"contrainte d'intégrité." + +#. Tag: para +#: transactions.xml:607 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - Indique une erreur de " +"verrouillage lors de l'éxécution de la requête." + +#. Tag: para +#: transactions.xml:613 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "" +"GenericJDBCException - Indique une erreur générique JDBC " +"d'une autre catégorie." + +#. Tag: title +#: transactions.xml:623 +#, no-c-format +msgid "Transaction timeout" +msgstr "Timeout de transaction" + +#. Tag: para +#: transactions.xml:625 +#, fuzzy, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functionality is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"L'un des avantages fournis par les environnements transactionnels JTA (tels " +"les containers EJB) est la gestion du timeout de transaction. La gestion des " +"dépassements de temps de transaction vise à s'assurer qu'une transaction " +"agissant incorrectement ne viendra pas bloquer indéfiniment les ressources " +"de l'application. Hibernate ne peut fournir cette fonctionnalité dans un " +"environnement transactionnel non-JTA. Par contre, Hibernate gère les " +"opérations d'accès aux données en allouant un temps maximal aux requêtes " +"pour s'exécuter. Ainsi, une requête créant de l'inter blocage ou retournant " +"de très grandes quantités d'information pourrait être interrompue. Dans un " +"environnement transactionnel JTA, Hibernate peut déléguer au gestionnaire de " +"transaction le soin de gérer les dépassements de temps. Cette fonctionnalité " +"est abstraite par l'objet Transaction ." + +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"Notez que setTimeout() ne peut pas être appelé d'un EJB " +"CMT, puisque le timeout des transaction doit être spécifié de manière " +"déclarative." + +#. Tag: title +#: transactions.xml:650 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "Contrôle de consurrence optimiste" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"La gestion optimiste des accès concurrents avec versionnage est la seule " +"approche pouvant garantir l'extensibilité des applications à haut niveau de " +"charge. Le système de versionnage utilise des numéros de version ou " +"l'horodatage pour détecter les mises à jour causant des conflits avec " +"d'autres actualisations antérieures. Hibernate propose trois approches pour " +"l'écriture de code applicatif utilisant la gestion optimiste d'accès " +"concurrents. Le cas d'utilisation décrit plus bas fait mention de " +"conversation, mais le versionnage peut également améliorer la qualité d'une " +"application en prévenant la perte de mises à jour." + +#. Tag: title +#: transactions.xml:663 +#, no-c-format +msgid "Application version checking" +msgstr "Gestion du versionnage au niveau applicatif" + +#. Tag: para +#: transactions.xml:665 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"Dans cet exemple d'implémentation utilisant peu les fonctionnalités " +"d'Hibernate, chaque interaction avec la base de données se fait en utilisant " +"une nouvelle Session et le développeur doit recharger les " +"données persistantes à partir de la BD avant de les manipuler. Cette " +"implémentation force l'application à vérifier la version des objets afin de " +"maintenir l'isolation transactionnelle. Cette approche, semblable à celle " +"retrouvée pour les EJB, est la moins efficace de celles présentées dans ce " +"chapitre." + +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"Le mapping de la propriété version est fait via " +"<version> et Hibernate l'incrémentera " +"automatiquement à chaque flush() si l'entité doit être mise à jour." + +#. Tag: para +#: transactions.xml:682 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"Bien sûr, si votre application ne fait pas face à beaucoup d'accès " +"concurrents et ne nécessite pas l'utilisation du versionnage, cette approche " +"peut également être utilisée, il n'y a qu'à ignorer le code relié au " +"versionnage. Dans ce cas, la stratégie du last commit wins (littéralement: le dernier commit l'emporte) sera utilisée pour " +"les conversations (longues transactions applicatives). Gardez à l'esprit que " +"cette approche pourrait rendre perplexe les utilisateurs de l'application " +"car ils pourraient perdre des données mises à jour sans qu'aucun message " +"d'erreur ne leur soit présenté et sans avoir la possibilité de fusionner les " +"données." + +#. Tag: para +#: transactions.xml:691 +#, fuzzy, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified objects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"Il est clair que la gestion manuelle de la vérification du versionnage des " +"objets ne peut être effectuée que dans certains cas triviaux et que cette " +"approche n'est pas valable pour la plupart des applications. De manière " +"générale, les applications ne cherchent pas à actualiser de simples objets " +"sans relations, elles le font généralement pour de larges graphes d'objets. " +"Pour toute application utilisant le paradigme des conversations ou des " +"objets détachés, Hibernate peut gérer automatiquement la vérification des " +"versions d'objets." + +#. Tag: title +#: transactions.xml:702 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "Les sessions longues et le versionnage automatique." + +#. Tag: para +#: transactions.xml:704 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"Dans ce scénario, une seule instance de Session et des " +"objets persistants est utilisée pour toute l'application. Hibernate vérifie " +"la version des objets persistants avant d'effectuer le flush() et lance une " +"exception si une modification concurrente est détectée. Il appartient alors " +"au développeur de gérer l'exception. Les traitements alternatifs " +"généralement proposés sont alors de permettre à l'usager de faire la fusion " +"des données ou de lui offrir de recommencer son travail à partie des données " +"les plus récentes dans la BD." + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"Il est à noter que lorsqu'une application est en attente d'une action de la " +"part de l?usager, La Session n'est pas connectée à la " +"couche JDBC sous-jacente. C'est la manière la plus efficace de gérer les " +"accès à la base de données. L'application ne devrait pas se préoccuper du " +"versionnage des objets, de la réassociation des objets détachés, ni du " +"rechargement de tous les objets à chaque transaction." + +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"L'objet foo sait quel objet Session " +"l'a chargé. Session.reconnect() obtient une nouvelle " +"connexion (celle-ci peut être également fournie) et permet à la session de " +"continuer son travail. La méthode Session.disconnect() " +"déconnecte la session de la connexion JDBC et retourne celle-ci au pool de " +"connexion (à moins que vous ne lui ayez fourni vous même la connexion.) " +"Après la reconnexion, afin de forcer la vérification du versionnage de " +"certaines entités que vous ne cherchez pas à actualiser, vous pouvez faire " +"un appel à Session.lock() en mode LockMode.READ pour tout objet ayant pu être modifié par une autre transaction. Il " +"n'est pas nécessaire de verrouiller les données que vous désirez mettre à " +"jour." + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"Si des appels implicites aux méthodes disconnect() et " +"reconnect() sont trop coûteux, vous pouvez les éviter en " +"utilisant hibernate.connection.release_mode ." + +#. Tag: para +#: transactions.xml:747 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"Ce pattern peut présenter des problèmes si la Session est " +"trop volumineuse pour être stockée entre les actions de l'usager. Plus " +"spécifiquement, une session HttpSession se doit d'être la " +"plus petite possible. Puisque la Session joue " +"obligatoirement le rôle de mémoire cache de premier niveau et contient à ce " +"titre tous les objets chargés, il est préférable de n'utiliser cette " +"stratégie que pour quelques cycles de requêtes car les objets risquent d'y " +"être rapidement périmés." + +#. Tag: para +#: transactions.xml:753 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"Notez que la Session déconnectée devrait être conservée " +"près de la couche de persistance. Autrement dit, utilisez un EJB stateful " +"pour conserver la Session et évitez de la sérialiser et " +"de la transférer à la couche de présentation (i.e. Il est préférable de ne " +"pas la conserver dans la session HttpSession .)" + +#. Tag: para +#: transactions.xml:761 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." + +#. Tag: title +#: transactions.xml:771 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "Les objets détachés et le versionnage automatique" + +#. Tag: para +#: transactions.xml:773 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"Chaque interaction avec le système de persistance se fait via une nouvelle " +"Session . Toutefois, les mêmes instances d'objets " +"persistants sont réutilisées pour chacune de ces interactions. L'application " +"doit pouvoir manipuler l'état des instances détachées ayant été chargées " +"antérieurement via une autre session. Pour ce faire, ces objets persistants " +"doivent être rattachés à la Session courante en utilisant " +"Session.update() , Session.saveOrUpdate() , ou Session.merge() ." + +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:783 +#, fuzzy, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occurred." +msgstr "" +"Encore une fois, Hibernate vérifiera la version des instances devant être " +"actualisées durant le flush(). Une exception sera lancée si des conflits " +"sont détectés." + +#. Tag: para +#: transactions.xml:788 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"Vous pouvez également utiliser lock() au lieu de " +"update() et utiliser le mode LockMode.READ (qui lancera une vérification de version, en ignorant tous les " +"niveaux de mémoire cache) si vous êtes certain que l'objet n'a pas été " +"modifié." + +#. Tag: title +#: transactions.xml:797 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "Personnaliser le versionnage automatique" + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"Vous pouvez désactiver l'incrémentation automatique du numéro de version de " +"certains attributs et collections en mettant la valeur du paramètre de " +"mapping optimistic-lock à false. Hibernate cessera ainsi " +"d'incrémenter leur numéro de version s'ils sont mis à jour." + +#. Tag: para +#: transactions.xml:806 +#, fuzzy, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this conceptually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"Certaines entreprises possèdent de vieux systèmes dont les schémas de bases " +"de données sont statiques et ne peuvent être modifiés. Il existe aussi des " +"cas où plusieurs applications doivent accéder à la même base de données, " +"mais certaines d'entre elles ne peuvent gérer les numéros de version ou les " +"champs horodatés. Dans les deux cas, le versionnage ne peut être implanté " +"par le rajout d'une colonne dans la base de données. Afin de forcer la " +"vérification de version dans un système sans en faire le mapping, mais en " +"forçant une comparaison des états de tous les attributs d'une entité, vous " +"pouvez utiliser l'attribut optimistic- lock=\"all\" sous " +"l'élément <class> . Veuillez noter que cette " +"manière de gérer le versionnage ne peut être utilisée que si l'application " +"utilises de longues sessions, lui permettant de comparer l'ancien état et le " +"nouvel état d'une entité. L'utilisation d'un pattern session-per-" +"request-with-detached- objects devient alors impossible." + +#. Tag: para +#: transactions.xml:817 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"Il peut être souhaitable de permettre les modifications concurrentes lorsque " +"des champs distincts sont modifiés. En mettant la propriété " +"optimistic-lock=\"dirty\" dans l'élément <" +"class> , Hibernate ne fera la comparaison que des champs devant " +"être actualisés lors du flush()." + +#. Tag: para +#: transactions.xml:823 +#, fuzzy, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute unnecessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"Dans les deux cas: en utilisant une colonne de version/horodatée ou via la " +"comparaison de l'état complet de l'objet ou de ses champs modifiés, " +"Hibernate ne créera qu'une seule commande d'UPDATE par entité avec la clause " +"WHERE appropriée pour mettre à jour l'entité ET en " +"vérifier la version. Si vous utilisez la persistance transitive pour " +"propager l'évènement de rattachement à des entités associées, il est " +"possible qu'Hibernate génère des commandes d'UPDATE inutiles. Ceci n'est " +"généralement pas un problème, mais certains déclencheurs on " +"update dans la base de données pourraient être activés même si " +"aucun changement n'était réellement persisté sur des objets associés. Vous " +"pouvez personnaliser ce comportement en indiquant select-before- " +"update=\"true\" dans l'élément de mapping <class> . Ceci forcera Hibernate à faire le SELECT de l'instance afin de " +"s'assurer que l'entité doit réellement être actualisée avant de lancer la " +"commande d'UPDATE." + +#. Tag: title +#: transactions.xml:841 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "Verouillage pessimiste" + +#. Tag: para +#: transactions.xml:843 +#, fuzzy, no-c-format +msgid "" +"It is not intended that users spend much time worrying about locking " +"strategies. It's usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"Il n'est nécessaire de s'attarder à la stratégie de verrouillage des entités " +"dans une application utilisant Hibernate. Il est généralement suffisant de " +"définir le niveau d'isolation pour les connexions JDBC et de laisser ensuite " +"la base de donnée effectuer son travail. Toutefois, certains utilisateurs " +"avancés peuvent vouloir obtenir un verrouillage pessimiste exclusif sur un " +"enregistrement et le réobtenir au lancement d'une nouvelle transaction." + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "" +"Hibernate utilisera toujours le mécanisme de verrouillage de la base de " +"données et ne verrouillera jamais les objets en mémoire!" + +#. Tag: para +#: transactions.xml:855 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"La classe LockMode définit les différents niveaux de " +"verrouillage pouvant être obtenus par Hibernate. Le verrouillage est obtenu " +"par les mécanismes suivants:" + +#. Tag: para +#: transactions.xml:862 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"LockMode.WRITE est obtenu automatiquement quand Hibernate " +"actualise ou insert un enregistrement." + +#. Tag: para +#: transactions.xml:868 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"LockMode.UPGRADE peut être obtenu de manière explicite " +"via la requête en utilisant SELECT ... FOR UPDATE sur une " +"base de données supportant cette syntaxe." + +#. Tag: para +#: transactions.xml:874 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"LockMode.UPGRADE_NOWAIT peut être obtenu de manière " +"explicite en utilisant SELECT ... FOR UPDATE NOWAIT sur " +"Oracle." + +#. Tag: para +#: transactions.xml:880 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"LockMode.READ est obtenu automatiquement quand Hibernate " +"lit des données dans un contexte d'isolation Repeatable Read ou Serializable . Peut être réobtenu " +"explicitement via une requête." + +#. Tag: para +#: transactions.xml:887 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE représente l'absence de verouillage. Tous " +"les objets migrent vers ce mode a la fin d'une Transaction . Les objets associés à une session via un appel à " +"saveOrUpdate() commencent également leur cycle de vie " +"dans cet état." + +#. Tag: para +#: transactions.xml:896 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "" +"Les niveaux de verrouillage peuvent être explicitement obtenus de l'une des " +"manières suivantes:" + +#. Tag: para +#: transactions.xml:902 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"Un appel à Session.load() , en spécifiant un niveau " +"verrouillage LockMode ." + +#. Tag: para +#: transactions.xml:907 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "Un appel à Session.lock() ." + +#. Tag: para +#: transactions.xml:912 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "Une appel à Query.setLockMode() ." + +#. Tag: para +#: transactions.xml:918 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"Si Session.load() est appelé avec le paramètre de niveau " +"de verouillage UPGRADE ou UPGRADE_NOWAIT et que l'objet demandé n'est pas présent dans la session, celui-ci " +"sera chargé à l'aide d'une requête SELECT ... FOR UPDATE . Si la méthode load() est appelée pour un objet " +"déjà en session avec un verrouillage moindre que celui demandé, Hibernate " +"appellera la méthode lock() pour cet objet." + +#. Tag: para +#: transactions.xml:927 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"Session.lock() effectue une vérification de version si le " +"niveau de verrouillage est READ , UPGRADE ou UPGRADE_NOWAIT . (Dans le cas des niveaux " +"UPGRADE ou UPGRADE_NOWAIT , une " +"requête SELECT ... FOR UPDATE sera utilisée.)" + +#. Tag: para +#: transactions.xml:934 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"Si une base de données ne supporte pas le niveau de verrouillage demandé, " +"Hibernate utilisera un niveau alternatif convenable au lieux de lancer une " +"exception. Ceci assurera la portabilité de votre application." + +#. Tag: title +#: transactions.xml:943 +#, no-c-format +msgid "Connection Release Modes" +msgstr "Mode de libération de Connection" + +#. Tag: para +#: transactions.xml:945 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" +"Le comportement original (2.x) d'Hibernate pour la gestion des connexions " +"JDBC était que la Session obtenait une connexion dès " +"qu'elle en avait besoin et la libérait une fois la session fermée. Hibernate " +"3 a introduit les modes de libération de connexion pour indiquer à la " +"session comment gérer les transactions JDBC. Notez que la discussion " +"suivante n'est pertinente que pour des connexions fournies par un " +"ConnectionProvider, celles gérées par l'utilisateur sont " +"en dehors du scope de cette discussion. Les différents modes sont définies " +"par org.hibernate.ConnectionReleaseMode:" + +#. Tag: para +#: transactions.xml:959 +#, fuzzy, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obtains a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" +"ON_CLOSE - est essentiellement le comportement passé. La " +"session Hibernate obtient une connexion lorsqu'elle en a besoin et la garde " +"jusqu'à ce que la session se ferme." + +#. Tag: para +#: transactions.xml:966 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" +"AFTER_TRANSACTION - indique de relacher la connexion " +"après qu'une org.hibernate.Transaction se soit achevée." + +#. Tag: para +#: transactions.xml:972 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" +"AFTER_STATEMENT (aussi appelé libération brutale) - " +"indique de relacher les connexions après chaque exécution d'un statement. Ce " +"relachement aggressif est annulé si ce statement laisse des ressources " +"associées à une session donnée ouvertes, actuellement ceci n'arrive que lors " +"de l'utilisation de org.hibernate.ScrollableResults." + +#. Tag: para +#: transactions.xml:982 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" +"Le paramètre de configuration hibernate.connection.release_mode est utilisé pour spécifier quel mode de libération doit être " +"utiliser. Les valeurs possibles sont:" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" +"auto (valeur par défaut) - ce choix délègue le choix de " +"libération à la méthode org.hibernate.transaction." +"TransactionFactory.getDefaultReleaseMode() Pour la " +"JTATransactionFactory, elle retourne ConnectionReleaseMode.AFTER_STATEMENT; " +"pour JDBCTransactionFactory, elle retourne ConnectionReleaseMode." +"AFTER_TRANSACTION. C'est rarement une bonne idée de changer ce comportement " +"par défaut puisque les erreurs soulevées par ce paramétrage tend à prouver " +"une erreur dans le code de l'utilisateur." + +#. Tag: para +#: transactions.xml:999 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" +"on_close - indique d'utiliser ConnectionReleaseMode." +"ON_CLOSE. Ce paramétrage existe pour garantir la compatibilité avec les " +"versions précédentes, mais ne devrait plus être utilisé." + +#. Tag: para +#: transactions.xml:1005 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" +"after_transaction - indique d'utiliser " +"ConnectionReleaseMode.AFTER_TRANSACTION. Ne devrait pas être utilisé dans " +"les environnements JTA. Notez aussi qu'avec ConnectionReleaseMode." +"AFTER_TRANSACTION, si une session est considérée comme étant en mode auto-" +"commit les connexions seront relachées comme si le mode était " +"AFTER_STATEMENT." + +#. Tag: para +#: transactions.xml:1013 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" +"after_statement - indique d'utiliser " +"ConnectionReleaseMode.AFTER_STATEMENT. Additonnellement, le " +"ConnectionProvider utilisé est consulté pour savoir s'il " +"supporte ce paramétrage (supportsAggressiveRelease()). Si " +"ce n'est pas le cas, le mode de libération est ré initialisé à " +"ConnectionReleaseMode.AFTER_TRANSACTION. Ce paramétrage n'est sûr que dans " +"les environnements où il est possible d'obtenir à nouveau la même connexion " +"JDBC à chaque fois que l'on fait un appel de ConnectionProvider." +"getConnection() ou dans les envrionnements auto-commit où il n'est " +"pas important d'obtenir plusieurs fois la même connexion." diff --git a/documentation/envers/src/main/docbook/fr-FR/content/tutorial.po b/documentation/envers/src/main/docbook/fr-FR/content/tutorial.po new file mode 100644 index 0000000000..e544a4b7b5 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/tutorial.po @@ -0,0 +1,2919 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:33 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "Introduction à Hibernate" + +#. Tag: title +#: tutorial.xml:36 +#, no-c-format +msgid "Preface" +msgstr "Préface" + +#. Tag: para +#: tutorial.xml:38 +#, no-c-format +msgid "" +"This chapter is an introduction to Hibernate by way of a tutorial, intended " +"for new users of Hibernate. We start with a simple application using an in-" +"memory database. We build the application in small, easy to understand " +"steps. The tutorial is based on another, earlier one developed by Michael " +"Gloegl. All code is contained in the tutorials/web " +"directory of the project source." +msgstr "" + +#. Tag: para +#: tutorial.xml:51 +#, no-c-format +msgid "" +"This tutorial expects the user have knowledge of both Java and SQL. If you " +"are new or uncomfortable with either, it is advised that you start with a " +"good introduction to that technology prior to attempting to learn Hibernate. " +"It will save time and effort in the long run." +msgstr "" + +#. Tag: para +#: tutorial.xml:61 +#, no-c-format +msgid "" +"There is another tutorial/example application in the /tutorials/" +"eg directory of the project source. That example is console based " +"and as such would not have the dependency on a servlet container to execute. " +"The basic setup is the same as the instructions below." +msgstr "" + +#. Tag: title +#: tutorial.xml:71 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "Partie 1 - Première application Hibernate" + +#. Tag: para +#: tutorial.xml:73 +#, no-c-format +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the host(s) of these events. We will " +"use an in-memory, Java database named HSQLDB to avoid describing " +"installation/setup of any particular database servers. Feel free to tweak " +"this tutorial to use whatever database you feel comfortable using." +msgstr "" + +#. Tag: para +#: tutorial.xml:82 +#, no-c-format +msgid "" +"The first thing we need to do is set up our development environment, and " +"specifically to setup all the required dependencies to Hibernate as well as " +"other libraries. Hibernate is built using Maven which amongst other features " +"provides dependecy management; moreover it provides " +"transitive dependecy management " +"which simply means that to use Hibernate we can simply define our dependency " +"on Hibernate, Hibernate itself defines the dependencies it needs which then " +"become transitive dependencies of our project." +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:94 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" ${groupId}\n" +" hibernate-core\n" +" \n" +"\n" +" \n" +" \n" +" javax.servlet\n" +" servlet-api\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:97 +#, no-c-format +msgid "" +"Essentially we are describing here the /tutorials/web/pom.xml file. See the Maven site " +"for more information." +msgstr "" + +#. Tag: para +#: tutorial.xml:105 +#, no-c-format +msgid "" +"While not strictly necessary, most IDEs have integration with Maven to read " +"these POM files and automatically set up a project for you which can save " +"lots of time and effort." +msgstr "" + +#. Tag: para +#: tutorial.xml:112 +#, no-c-format +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "" +"Ensuite, nous créons une classe qui réprésente l'événement que nous voulons " +"stocker dans notre base de données." + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The first class" +msgstr "La première classe" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "" +"Notre première classe persistante est une simple classe JavaBean avec " +"quelques propriétés :" + +#. Tag: programlisting +#: tutorial.xml:123 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:125 +#, no-c-format +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"Vous pouvez voir que cette classe utilise les conventions de nommage " +"standard JavaBean pour les méthodes getter/setter des propriétés, ainsi " +"qu'une visibilité privée pour les champs. Ceci est la conception recommandée " +"- mais pas obligatoire. Hibernate peut aussi accéder aux champs directement, " +"le bénéfice des méthodes d'accès est la robustesse pour la refonte de code. " +"Le constructeur sans argument est requis pour instancier un objet de cette " +"classe via reflexion." + +#. Tag: para +#: tutorial.xml:133 +#, no-c-format +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"La propriété id contient la valeur d'un identifiant " +"unique pour un événement particulier. Toutes les classes d'entités " +"persistantes (ainsi que les classes dépendantes de moindre importance) " +"auront besoin d'une telle propriété identifiante si nous voulons utiliser " +"l'ensemble complet des fonctionnalités d'Hibernate. En fait, la plupart des " +"applications (surtout les applications web) ont besoin de distinguer des " +"objets par des identifiants, donc vous devriez considérer ça comme une " +"fonctionnalité plutôt que comme une limitation. Cependant, nous ne " +"manipulons généralement pas l'identité d'un objet, dorénavant la méthode " +"setter devrait être privée. Seul Hibernate assignera les identifiants " +"lorsqu'un objet est sauvegardé. Vous pouvez voir qu'Hibernate peut accéder " +"aux méthodes publiques, privées et protégées, ainsi qu'aux champs (publics, " +"privés, protégés) directement. Le choix vous est laissé, et vous pouvez " +"l'ajuster à la conception de votre application." + +#. Tag: para +#: tutorial.xml:145 +#, no-c-format +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"Le constructeur sans argument est requis pour toutes les classes " +"persistantes ; Hibernate doit créer des objets pour vous en utilisant la " +"réflexion Java. Le constructeur peut être privé, cependant, la visibilité du " +"paquet est requise pour la génération de proxy à l'exécution et une " +"récupération des données efficaces sans instrumentation du bytecode." + +#. Tag: para +#: tutorial.xml:152 +#, no-c-format +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"Placez ce fichier source Java dans un répertoire appelé src dans le dossier de développement. Ce répertoire devrait maintenant " +"ressembler à ça :" + +#. Tag: programlisting +#: tutorial.xml:157 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:159 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "" +"Dans la prochaine étape, nous informons Hibernate de cette classe " +"persistante." + +#. Tag: title +#: tutorial.xml:166 +#, no-c-format +msgid "The mapping file" +msgstr "Le fichier de mapping" + +#. Tag: para +#: tutorial.xml:168 +#, no-c-format +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"Hibernate a besoin de savoir comment charger et stocker des objets d'une " +"classe persistante. C'est là qu'intervient le fichier de mapping Hibernate. " +"Le fichier de mapping indique à Hibernate à quelle table dans la base de " +"données il doit accéder, et quelles colonnes de cette table il devra " +"utiliser." + +#. Tag: para +#: tutorial.xml:175 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "La structure basique de ce fichier de mapping ressemble à ça :" + +#. Tag: programlisting +#: tutorial.xml:179 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:181 +#, no-c-format +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"Notez que la DTD Hibernate est très sophistiquée. Vous pouvez l'utiliser " +"pour l'auto-complétement des éléments et des attributs de mapping XML dans " +"votre éditeur ou votre IDE. Vous devriez aussi ouvrir le fichier DTD dans " +"votre éditeur de texte - c'est le moyen le plus facile d'obtenir une vue " +"d'ensemble de tous les éléments et attributs, et de voir les valeurs par " +"défaut, ainsi que quelques commentaires. Notez qu'Hibernate ne chargera pas " +"le fichier DTD à partir du web, mais regardera d'abord dans le classpath de " +"l'application. Le fichier DTD est inclus dans hibernate3.jar ainsi que dans le répertoire src de la " +"distribution Hibernate." + +#. Tag: para +#: tutorial.xml:192 +#, no-c-format +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"Nous omettrons la déclaration de la DTD dans les exemples futurs pour " +"raccourcir le code. Bien sûr il n'est pas optionnel." + +#. Tag: para +#: tutorial.xml:197 +#, no-c-format +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"Entre les deux balises hibernate-mapping, incluez un " +"élément class. Toutes les classes d'entités persistantes " +"(encore une fois, il pourrait y avoir des classes dépendantes plus tard, qui " +"ne sont pas des entités mère) ont besoin d'un mapping vers une table de la " +"base de données SQL :" + +#. Tag: programlisting +#: tutorial.xml:204 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:206 +#, no-c-format +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"Plus loin, nous disons à Hibernate comment persister et charger un objet de " +"la classe Event dans la table EVENTS, " +"chaque instance est représentée par une ligne dans cette table. Maintenant " +"nous continuons avec le mapping de la propriété de l'identifiant unique vers " +"la clef primaire de la table. De plus, comme nous ne voulons pas nous " +"occuper de la gestion de cet identifiant, nous utilisons une stratégie de " +"génération d'identifiant d'Hibernate pour la colonne de la clef primaire " +"subrogée :" + +#. Tag: programlisting +#: tutorial.xml:214 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:216 +#, fuzzy, no-c-format +msgid "" +"The id element is the declaration of the identifier " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"L'élément id est la déclaration de la propriété de " +"l'identifiant, name=\"id\" déclare le nom de la propriété " +"Java - Hibernate utilisera les méthodes getter et setter pour accéder à la " +"propriété. L'attribut column indique à Hibernate quelle " +"colonne de la table EVENTS nous utilisons pour cette clef " +"primaire. L'élément generator imbriqué spécifie la " +"stratégie de génération de l'identifiant, dans ce cas nous avons utilisé " +"increment, laquelle est une méthode très simple utile " +"surtout pour les tests (et didacticiels). Hibernate supporte aussi les " +"identifiants générés par les bases de données, globalement uniques, ainsi " +"que les identifiants assignés par l'application (ou n'importe quelle " +"stratégie que vous avez écrit en extension)." + +#. Tag: para +#: tutorial.xml:229 +#, no-c-format +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"Finalement nous incluons des déclarations pour les propriétés persistantes " +"de la classe dans le fichier de mapping. Par défaut, aucune propriété de la " +"classe n'est considérée comme persistante :" + +#. Tag: programlisting +#: tutorial.xml:235 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:237 +#, no-c-format +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"Comme avec l'élément id, l'attribut name de l'élément property indique à Hibernate quels " +"getters/setters utiliser." + +#. Tag: para +#: tutorial.xml:244 +#, no-c-format +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"Pourquoi le mapping de la propriété date inclut " +"l'attribut column, mais pas title ? " +"Sans l'attribut column Hibernate utilise par défaut le " +"nom de la propriété comme nom de colonne. Ca fonctionne bien pour " +"title. Cependant, date est un mot clef " +"réservé dans la plupart des bases de données, donc nous utilisons un nom " +"différent pour le mapping." + +#. Tag: para +#: tutorial.xml:253 +#, no-c-format +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"La prochaine chose intéressante est que le mapping de title manque aussi d'un attribut type. Les types que " +"nous déclarons et utilisons dans les fichiers de mapping ne sont pas, comme " +"vous pourriez vous y attendre, des types de données Java. Ce ne sont pas, " +"non plus, des types de base de données SQL. Ces types sont donc appelés des " +"types de mapping Hibernate, des convertisseurs qui " +"peuvent traduire des types Java en types SQL et vice versa. De plus, " +"Hibernate tentera de déterminer la bonne conversion et le type de mapping " +"lui-même si l'attribut type n'est pas présent dans le " +"mapping. Dans certains cas, cette détection automatique (utilisant la " +"réflexion sur la classe Java) pourrait ne pas donner la valeur attendue ou " +"dont vous avez besoin. C'est le cas avec la propriété date. Hibernate ne peut pas savoir si la propriété \"mappera\" une " +"colonne SQL de type date, timestamp ou " +"time. Nous déclarons que nous voulons conserver des " +"informations avec une date complète et l'heure en mappant la propriété avec " +"un timestamp." + +#. Tag: para +#: tutorial.xml:269 +#, no-c-format +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"Ce fichier de mapping devrait être sauvegardé en tant que Event.hbm." +"xml, juste dans le répertoire à côté du fichier source de la " +"classe Java Event. Le nommage des fichiers de mapping " +"peut être arbitraire, cependant le suffixe hbm.xml est " +"devenu une convention dans la communauté des développeurs Hibernate. La " +"structure du répertoire devrait ressembler à ça :" + +#. Tag: programlisting +#: tutorial.xml:277 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:279 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "Nous poursuivons avec la configuration principale d'Hibernate." + +#. Tag: title +#: tutorial.xml:286 +#, no-c-format +msgid "Hibernate configuration" +msgstr "Configuration d'Hibernate" + +#. Tag: para +#: tutorial.xml:288 +#, no-c-format +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"Nous avons maintenant une classe persistante et son fichier de mapping. Il " +"est temps de configurer Hibernate. Avant ça, nous avons besoin d'une base de " +"données. HSQL DB, un SGBD SQL basé sur Java et travaillant en mémoire, peut " +"être téléchargé à partir du site web de HSQL. En fait, vous avez seulement " +"besoin de hsqldb.jar. Placez ce fichier dans le " +"répertoire lib/ du dossier de développement." + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"Créez un répertoire appelé data à la racine du répertoire " +"de développement - c'est là que HSQL DB stockera ses fichiers de données. " +"Démarrez maintenant votre base de données en exécutant java -" +"classpath lib/hsqldb.jar org.hsqldb.Server dans votre répertoire " +"de travail. Vous observez qu'elle démarre et ouvre une socket TCP/IP, c'est " +"là que notre application se connectera plus tard. Si vous souhaitez démarrez " +"à partir d'une nouvelle base de données pour ce tutoriel (faites " +"CTRL + C dans la fenêtre the window), effacez le " +"répertoire data/ et redémarrez HSQL DB à nouveau." + +#. Tag: para +#: tutorial.xml:306 +#, no-c-format +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"Hibernate est la couche de votre application qui se connecte à cette base de " +"données, donc il a besoin des informations de connexion. Les connexions sont " +"établies à travers un pool de connexions JDBC, que nous devons aussi " +"configurer. La distribution Hibernate contient différents outils de gestion " +"de pools de connexions JDBC open source, mais pour ce didacticiel nous " +"utiliserons le pool de connexions intégré à Hibernate. Notez que vous devez " +"copier les bibliothèques requises dans votre classpath et utiliser une " +"configuration de pool de connexions différente si vous voulez utiliser un " +"logiciel de gestion de pools JDBC tiers avec une qualité de production." + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"Pour la configuration d'Hibernate, nous pouvons utiliser un simple fichier " +"hibernate.properties, un fichier hibernate.cfg." +"xml légèrement plus sophistiqué, ou même une configuration " +"complète par programmation. La plupart des utilisateurs préfèrent le fichier " +"de configuration XML :" + +#. Tag: programlisting +#: tutorial.xml:322 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:324 +#, no-c-format +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"Notez que cette configuration XML utilise une DTD différente. Nous " +"configurons une SessionFactory d'Hibernate - une fabrique " +"globale responsable d'une base de données particulière. Si vous avez " +"plusieurs base de données, utilisez plusieurs configurations <" +"session-factory>, généralement dans des fichiers de " +"configuration différents (pour un démarrage plus facile)." + +#. Tag: para +#: tutorial.xml:332 +#, no-c-format +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"Les quatre premiers éléments property contiennent la " +"configuration nécessaire pour la connexion JDBC. L'élément " +"property du dialecte spécifie quelle variante du SQL " +"Hibernate va générer. La gestion automatique des sessions d'Hibernate pour " +"les contextes de persistance sera détaillée très vite. L'option " +"hbm2ddl.auto active la génération automatique des schémas " +"de base de données - directement dans la base de données. Cela peut bien sûr " +"aussi être désactivé (en supprimant l'option de configuration) ou redirigé " +"vers un fichier avec l'aide de la tâche Ant SchemaExport. " +"Finalement, nous ajoutons le(s) fichier(s) de mapping pour les classes " +"persistantes." + +#. Tag: para +#: tutorial.xml:345 +#, no-c-format +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"Copiez ce fichier dans le répertoire source, il terminera dans la racine du " +"classpath. Hibernate cherchera automatiquement, au démarrage, un fichier " +"appelé hibernate.cfg.xml dans la racine du classpath." + +#. Tag: title +#: tutorial.xml:354 +#, no-c-format +msgid "Building with Ant" +msgstr "Construction avec Ant" + +#. Tag: para +#: tutorial.xml:356 +#, no-c-format +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"Nous allons maintenant construire le didacticiel avec Ant. Vous aurez besoin " +"d'avoir Ant d'installé - récupérez-le à partir de la page de téléchargement de Ant. " +"Comment installer Ant ne sera pas couvert ici. Référez-vous au manuel d'Ant. Après que " +"vous aurez installé Ant, nous pourrons commencer à créer le fichier de " +"construction. Il s'appellera build.xml et sera placé " +"directement dans le répertoire de développement." + +#. Tag: para +#: tutorial.xml:365 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "Un fichier de construction basique ressemble à ça :" + +#. Tag: programlisting +#: tutorial.xml:369 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:371 +#, no-c-format +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" +"Cela dira à Ant d'ajouter tous les fichiers du répertoire lib finissant par " +".jar dans le classpath utilisé pour la compilation. Cela " +"copiera aussi tous les fichiers source non Java dans le répertoire cible, " +"par exemple les fichiers de configuration et de mapping d'Hibernate. Si vous " +"lancez Ant maintenant, vous devriez obtenir cette sortie :" + +#. Tag: programlisting +#: tutorial.xml:378 +#, no-c-format +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:383 +#, no-c-format +msgid "Startup and helpers" +msgstr "Démarrage et aides" + +#. Tag: para +#: tutorial.xml:385 +#, no-c-format +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"Il est temps de charger et de stocker quelques objets Event, mais d'abord nous devons compléter la configuration avec du code " +"d'infrastructure. Nous devons démarrer Hibernate. Ce démarrage inclut la " +"construction d'un objet SessionFactory global et le " +"stocker quelque part facile d'accès dans le code de l'application. Une " +"SessionFactory peut ouvrir des nouvelles " +"Sessions. Une Session représente une " +"unité de travail simplement \"threadée\", la SessionFactory est un objet global \"thread-safe\", instancié une seule fois." + +#. Tag: para +#: tutorial.xml:395 +#, no-c-format +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "" +"Nous créerons une classe d'aide HibernateUtil qui " +"s'occupe du démarrage et rend la gestion des Sessions " +"plus facile. Regardons l'implémentation :" + +#. Tag: programlisting +#: tutorial.xml:401 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:403 +#, no-c-format +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"Cette classe ne produit pas seulement la SessionFactory " +"globale dans un initialiseur statique (appelé une seule fois par la JVM " +"lorsque la classe est chargée), elle masque le fait qu'elle exploite un " +"singleton. Elle pourrait aussi obtenir la SessionFactory " +"depuis JNDI dans un serveur d'applications." + +#. Tag: para +#: tutorial.xml:410 +#, no-c-format +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"Si vous nommez la SessionFactory dans votre fichier de " +"configuration, Hibernate tentera la récupération depuis JNDI. Pour éviter ce " +"code, vous pouvez aussi utiliser un déploiement JMX et laisser le conteneur " +"(compatible JMX) instancier et lier un HibernateService à " +"JNDI. Ces options avancées sont détaillées dans la documentation de " +"référence Hibernate." + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"Placez HibernateUtil.java dans le répertoire source de " +"développement, et ensuite Event.java :" + +#. Tag: programlisting +#: tutorial.xml:424 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:426 +#, no-c-format +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"Cela devrait encore compiler sans problème. Nous avons finalement besoin de " +"configurer le système de \"logs\" - Hibernate utilise commons-logging et " +"vous laisse le choix entre log4j et le système de logs du JDK 1.4. La " +"plupart des développeurs préfèrent log4j : copiez log4j.properties de la distribution d'Hibernate (il est dans le répertoire " +"etc/) dans votre répertoire src, puis " +"faites de même avec hibernate.cfg.xml. Regardez la " +"configuration d'exemple et changez les paramètres si vous voulez une sortie " +"plus verbeuse. Par défaut, seul le message de démarrage d'Hibernate est " +"affiché sur la sortie standard." + +#. Tag: para +#: tutorial.xml:436 +#, no-c-format +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "" +"L'infrastructure de ce didacticiel est complète - et nous sommes prêts à " +"effectuer un travail réel avec Hibernate." + +#. Tag: title +#: tutorial.xml:444 +#, no-c-format +msgid "Loading and storing objects" +msgstr "Charger et stocker des objets" + +#. Tag: para +#: tutorial.xml:446 +#, no-c-format +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"Finalement nous pouvons utiliser Hibernate pour charger et stocker des " +"objets. Nous écrivons une classe EventManager avec une " +"méthode main() :" + +#. Tag: programlisting +#: tutorial.xml:451 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:453 +#, no-c-format +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"Nous créons un nouvel objet Event, et le remettons à " +"Hibernate. Hibernate s'occupe maintenant du SQL et exécute les " +"INSERTs dans la base de données. Regardons le code de " +"gestion de la Session et de la Transaction avant de lancer ça." + +#. Tag: para +#: tutorial.xml:460 +#, no-c-format +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"Une Session est une unité de travail. Pour le moment, " +"nous allons faire les choses simplement et assumer une granularité un-un " +"entre une Session hibernate et une transaction à la base " +"de données. Pour isoler notre code du système de transaction sous-jacent " +"(dans notre cas, du pure JDBC, mais cela pourrait être JTA), nous utilisons " +"l'API Transaction qui est disponible depuis la " +"Session Hibernate." + +#. Tag: para +#: tutorial.xml:468 +#, no-c-format +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"Que fait sessionFactory.getCurrentSession() ? " +"Premièrement, vous pouvez l'invoquer autant de fois que vous le voulez et " +"n'importe où du moment que vous avez votre SessionFactory " +"(facile grâce à HibernateUtil). La méthode " +"getCurrentSession() renvoie toujours l'unité de travail " +"courante. Souvenez vous que nous avons basculé notre option de configuration " +"au mécanisme basé sur le \"thread\" dans hibernate.cfg.xml. Par conséquent, le scope de l'unité de travail courante est le " +"thread java courant d'exécution. Ceci n'est pas totalement vrai." + +#. Tag: para +#: tutorial.xml:479 +#, no-c-format +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"Une Session commence lorsqu'elle est vraiment utilisée la " +"première fois, Lorsque nous appelons pour la première fois " +"getCurrentSession(). Ensuite, elle est liée, par " +"Hibernate, au thread courant. Lorsque la transaction s'achève (commit ou " +"rollback), Hibernate délie la Session du thread et la " +"ferme pour vous. Si vous invoquez getCurrentSession() une " +"autre fois, vous obtenez une nouvelle Session et pouvez " +"entamer une nouvelle unité de travail. Ce modèle de programmation " +"\"thread-bound\" est le moyen le plus populaire " +"d'utiliser Hibernate." + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"UNTRANSLATED ! Related to the unit of work scope, should the Hibernate " +"Session be used to execute one or several database " +"operations? The above example uses one Session for one " +"operation. This is pure coincidence, the example is just not complex enough " +"to show any other approach. The scope of a Hibernate Session is flexible but you should never design your application to use a " +"new Hibernate Session for every " +"database operation. So even if you see it a few more times in the following " +"(very trivial) examples, consider session-per-operation " +"an anti-pattern. A real (web) application is shown later in this tutorial." + +#. Tag: para +#: tutorial.xml:501 +#, no-c-format +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"Lisez pour plus d'informations sur la " +"gestion des transactions et leur démarcations. Nous n'avons pas géré les " +"erreurs et rollback sur l'exemple précédent." + +#. Tag: para +#: tutorial.xml:507 +#, no-c-format +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"Pour lancer cette première routine, nous devons ajouter une cible appelable " +"dans le fichier de construction de Ant :" + +#. Tag: programlisting +#: tutorial.xml:511 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:513 +#, no-c-format +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"La valeur de l'argument action correspond à la ligne de " +"commande qui appelle la cible :" + +#. Tag: programlisting +#: tutorial.xml:518 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:520 +#, no-c-format +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "" +"Vous devriez voir, après la compilation, Hibernate démarrer et, en fonction " +"de votre configuration, beaucoup de traces sur la sortie. À la fin vous " +"trouverez la ligne suivante :" + +#. Tag: programlisting +#: tutorial.xml:525 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:527 +#, no-c-format +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"C'est l'INSERT exécuté par Hibernate, les points " +"d'interrogation représentent les paramètres JDBC liés. Pour voir les valeurs " +"liées aux arguments, ou pour réduire la verbosité des traces, vérifier votre " +"log4j.properties." + +#. Tag: para +#: tutorial.xml:533 +#, no-c-format +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"Maintenant nous aimerions aussi lister les événements stockés, donc nous " +"ajoutons une option à la méthode principale :" + +#. Tag: programlisting +#: tutorial.xml:537 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:539 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "" +"Nous ajoutons aussi une nouvelle méthode listEvents() :" + +#. Tag: programlisting +#: tutorial.xml:543 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:545 +#, no-c-format +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"Ce que nous faisons ici c'est utiliser une requête HQL (Hibernate Query " +"Language) pour charger tous les objets Event existants de " +"la base de données. Hibernate générera le SQL approprié, l'enverra à la base " +"de données et peuplera des objets Event avec les données. " +"Vous pouvez créer des requêtes plus complexes avec HQL, bien sûr." + +#. Tag: para +#: tutorial.xml:552 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "Maintenant, pour exécuter et tester tout ça, suivez ces étapes :" + +#. Tag: para +#: tutorial.xml:558 +#, no-c-format +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "" +"Exécutez ant run -Daction=store pour stocker quelque " +"chose dans la base de données et, bien sûr, pour générer, avant, le schéma " +"de la base de données grâce à hbm2ddl." + +#. Tag: para +#: tutorial.xml:564 +#, fuzzy, no-c-format +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continuous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"Maintenant désactivez hbm2ddl en commentant la propriété dans votre fichier " +"hibernate.cfg.xml. Généralement vous la laissez seulement " +"activée dans des tests unitaires en continu, mais une autre exécution de " +"hbm2ddl effacerait tout ce que vous avez stocké - le " +"paramètre de configuration create se traduit en fait par " +"\"supprimer toutes les tables du schéma, puis re-créer toutes les tables, " +"lorsque la SessionFactory est construite\"." + +#. Tag: para +#: tutorial.xml:574 +#, no-c-format +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"Si maintenant vous appelez Ant avec -Daction=list, vous " +"devriez voir les événements que vous avez stockés jusque là. Vous pouvez " +"bien sûr aussi appeler l'action store plusieurs fois." + +#. Tag: para +#: tutorial.xml:580 +#, no-c-format +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"UNTRANSLATED! Note: Most new Hibernate users fail at this point and we see " +"questions about Table not found error messages " +"regularly. However, if you follow the steps outlined above you will not have " +"this problem, as hbm2ddl creates the database schema on the first run, and " +"subsequent application restarts will use this schema. If you change the " +"mapping and/or database schema, you have to re-enable hbm2ddl once again." + +#. Tag: title +#: tutorial.xml:593 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "Partie 2 - Mapper des associations" + +#. Tag: para +#: tutorial.xml:595 +#, no-c-format +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "" +"Nous avons mappé une classe d'une entité persistante vers une table. Partons " +"de là et ajoutons quelques associations de classe. D'abord nous ajouterons " +"des gens à notre application, et stockerons une liste d'événements auxquels " +"ils participent." + +#. Tag: title +#: tutorial.xml:601 +#, no-c-format +msgid "Mapping the Person class" +msgstr "Mapper la classe Person" + +#. Tag: para +#: tutorial.xml:603 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "" +"La première version de la classe Person est simple :" + +#. Tag: programlisting +#: tutorial.xml:607 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:609 +#, no-c-format +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"Créez un nouveau fichier de mapping appelé Person.hbm.xml " +"(n'oubliez pas la référence à la DTD)" + +#. Tag: programlisting +#: tutorial.xml:614 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:616 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "" +"Finalement, ajoutez la nouveau mapping à la configuration d'Hibernate :" + +#. Tag: programlisting +#: tutorial.xml:620 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:622 +#, no-c-format +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"Nous allons maintenant créer une association entre ces deux entités. " +"Évidemment, des personnes peuvent participer aux événements, et des " +"événements ont des participants. Les questions de conception que nous devons " +"traiter sont : direction, cardinalité et comportement de la collection." + +#. Tag: title +#: tutorial.xml:632 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "Une association unidirectionnelle basée sur Set" + +#. Tag: para +#: tutorial.xml:634 +#, no-c-format +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "" +"Nous allons ajouter une collection d'événements à la classe Person. De cette manière nous pouvons facilement naviguer dans les " +"événements d'une personne particulière, sans exécuter une requête explicite " +"- en appelant aPerson.getEvents(). Nous utilisons une " +"collection Java, un Set, parce que la collection ne " +"contiendra pas d'éléments dupliqués et l'ordre ne nous importe pas." + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "" +"Nous avons besoin d'une association unidirectionnelle, pluri-valuée, " +"implémentée avec un Set. Écrivons le code pour ça dans " +"les classes Java et mappons les :" + +#. Tag: programlisting +#: tutorial.xml:646 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:648 +#, no-c-format +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"D'abord nous mappons cette association, mais pensez à l'autre côté. " +"Clairement, nous pouvons la laisser unidirectionnelle. Ou alors, nous " +"pourrions créer une autre collection sur Event, si nous " +"voulons être capable de la parcourir de manière bidirectionnelle, c'est-à-" +"dire avoir anEvent.getParticipants(). Ce n'est pas " +"nécessaire d'un point de vue fonctionnel. Vous pourrez toujours exécuter une " +"requête explicite pour récupérer les participants d'un \"event\" " +"particulier. Ce choix de conception vous est laissé, mais ce qui reste " +"certains est la cardinalité de l'association: \"plusieurs\" des deux côtés, " +"nous appelons cela une association many-to-many. Par " +"conséquent nous utilisons un mapping Hibernate many-to-many:" + +#. Tag: programlisting +#: tutorial.xml:659 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:661 +#, no-c-format +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"Hibernate supporte toutes sortes de mapping de collection, un <" +"set> étant le plus commun. Pour une association many-to-many " +"(ou une relation d'entité n:m), une table d'association " +"est requise. Chaque ligne dans cette table représente un lien entre une " +"personne et un événement. Le nom de la table est configuré avec l'attribut " +"table de l'élément set. Le nom de la " +"colonne identifiant dans l'association, du côté de la personne, est défini " +"avec l'élément <key>, et le nom de la colonne pour " +"l'événement dans l'attribut column de <many-" +"to-many>. Vous devez aussi donner à Hibernate la classe des " +"objets de votre collection (c'est-à-dire : la classe de l'autre côté de la " +"collection)." + +#. Tag: para +#: tutorial.xml:673 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "Le schéma de base de données pour ce mapping est donc :" + +#. Tag: programlisting +#: tutorial.xml:677 +#, no-c-format +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:682 +#, no-c-format +msgid "Working the association" +msgstr "Travailler avec l'association" + +#. Tag: para +#: tutorial.xml:684 +#, no-c-format +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "" +"Réunissons quelques personnes et quelques événements dans une nouvelle " +"méthode dans EventManager :" + +#. Tag: programlisting +#: tutorial.xml:688 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:690 +#, no-c-format +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"Après le chargement d'une Person et d'un Event, modifiez simplement la collection en utilisant les méthodes " +"normales de la collection. Comme vous pouvez le voir, il n'y a pas d'appel " +"explicite à update() ou save(), " +"Hibernate détecte automatiquement que la collection a été modifiée et a " +"besoin d'être mise à jour. Ceci est appelé la vérification sale " +"automatique (NdT : \"automatic dirty checking\"), et vous pouvez " +"aussi l'essayer en modifiant le nom ou la propriété date de n'importe lequel " +"de vos objets. Tant qu'ils sont dans un état persistant, c'est-à-dire, liés à une Session Hibernate " +"particulière (c-à-d qu'ils ont juste été chargés ou sauvegardés dans une " +"unité de travail), Hibernate surveille les changements et exécute le SQL " +"correspondant. Le processus de synchronisation de l'état de la mémoire avec " +"la base de données, généralement seulement à la fin d'une unité de travail, " +"est appelé flushing. Dans notre code, l'unité de " +"travail s'achève par un commit (ou rollback) de la transaction avec la base " +"de données - comme défini par notre option thread de " +"configuration pour la classe CurrentSessionContext." + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"Vous pourriez bien sûr charger une personne et un événement dans différentes " +"unités de travail. Ou vous modifiez un objet à l'extérieur d'une " +"Session, s'il n'est pas dans un état persistant (s'il " +"était persistant avant, nous appelons cet état détaché). Vous pouvez même modifier une collection lorsqu'elle est " +"détachée:" + +#. Tag: programlisting +#: tutorial.xml:712 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:714 +#, no-c-format +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"L'appel à update rend un objet détaché à nouveau " +"persistant, vous pourriez dire qu'il le lie à une unité de travail, ainsi " +"toutes les modifications (ajout, suppression) que vous avez faites pendant " +"qu'il était détaché peuvent être sauvegardées dans la base de données (il se " +"peut que vous ayez besoin de modifier quelques unes des méthodes précédentes " +"pour retourner cet identifiant)." + +#. Tag: para +#: tutorial.xml:721 +#, no-c-format +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"Ce n'est pas très utile dans notre situation actuelle, mais c'est un concept " +"important que vous pouvez mettre dans votre propre application. Pour le " +"moment, complétez cet exercice en ajoutant une nouvelle action à la méthode " +"principale des EventManagers et appelez la à partir de la " +"ligne de commande. Si vous avez besoin des identifiants d'une personne et " +"d'un événement - la méthode save() les retourne." + +#. Tag: programlisting +#: tutorial.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:731 +#, no-c-format +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"C'était un exemple d'une association entre deux classes de même importance, " +"deux entités. Comme mentionné plus tôt, il y a d'autres classes et d'autres " +"types dans un modèle typique, généralement \"moins importants\". Vous en " +"avez déjà vu certains, comme un int ou une " +"String. Nous appelons ces classes des types de " +"valeur, et leurs instances dépendent d'une " +"entité particulière. Des instances de ces types n'ont pas leur propre " +"identité, elles ne sont pas non plus partagées entre des entités (deux " +"personnes ne référencent pas le même objet firstname, " +"même si elles ont le même prénom). Bien sûr, des types de valeur ne peuvent " +"pas seulement être trouvés dans le JDK (en fait, dans une application " +"Hibernate toutes les classes du JDK sont considérées comme des types de " +"valeur), vous pouvez aussi écrire vous-même des classes dépendantes, " +"Address ou MonetaryAmount, par exemple." + +#. Tag: para +#: tutorial.xml:744 +#, no-c-format +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"Vous pouvez aussi concevoir une collection de types de valeur. C'est " +"conceptuellement très différent d'une collection de références vers d'autres " +"entités, mais très ressemblant en Java." + +#. Tag: title +#: tutorial.xml:752 +#, no-c-format +msgid "Collection of values" +msgstr "Collection de valeurs" + +#. Tag: para +#: tutorial.xml:754 +#, no-c-format +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"Nous ajoutons une collection d'objets de type de valeur à l'entité " +"Person. Nous voulons stocker des adresses email, donc le " +"type que nous utilisons est String, et la collection est " +"encore un Set :" + +#. Tag: programlisting +#: tutorial.xml:759 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:761 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "Le mapping de ce Set :" + +#. Tag: programlisting +#: tutorial.xml:765 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"La différence comparée au mapping vu plus tôt est la partie " +"element, laquelle dit à Hibernate que la collection ne " +"contient pas de références vers une autre entité, mais une collection " +"d'éléments de type String (le nom en minuscule vous " +"indique que c'est un type/convertisseur du mapping Hibernate). Une fois " +"encore, l'attribut table de l'élément set détermine le nom de la table pour la collection. L'élément " +"key définit le nom de la colonne de la clef étrangère " +"dans la table de la collection. L'attribut column dans " +"l'élément element définit le nom de la colonne où les " +"valeurs de String seront réellement stockées." + +#. Tag: para +#: tutorial.xml:777 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "Regardons le schéma mis à jour :" + +#. Tag: programlisting +#: tutorial.xml:781 +#, no-c-format +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:783 +#, no-c-format +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"Vous pouvez voir que la clef primaire de la table de la collection est en " +"fait une clef composée, utilisant deux colonnes. Ceci implique aussi qu'il " +"ne peut pas y avoir d'adresses email dupliquées par personne, ce qui est " +"exactement la sémantique dont nous avons besoin pour un ensemble en Java." + +#. Tag: para +#: tutorial.xml:789 +#, no-c-format +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"Vous pouvez maintenant tester et ajouter des éléments à cette collection, " +"juste comme nous l'avons fait avant en liant des personnes et des " +"événements. C'est le même code en Java." + +#. Tag: programlisting +#: tutorial.xml:794 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:796 +#, fuzzy, no-c-format +msgid "" +"This time we didn't use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"Cette fois ci, nous n'avons pas utilisé une requête de chargement agressif " +"(fetch) pour initialiser la collection. Par conséquent, " +"l'invocation du getter déclenchera un select supplémentaire pour " +"l'initialiser. Traquez les logs SQL et tentez d'optimiser ce cas avec un " +"chargement aggressif." + +#. Tag: title +#: tutorial.xml:806 +#, no-c-format +msgid "Bi-directional associations" +msgstr "Associations bidirectionnelles" + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"Ensuite nous allons mapper une association bidirectionnelle - faire " +"fonctionner l'association entre une personne et un événement à partir des " +"deux côtés en Java. Bien sûr, le schéma de la base de données ne change pas, " +"nous avons toujours une pluralité many-to-many. Une base de données " +"relationnelle est plus flexible qu'un langage de programmation réseau, donc " +"elle n'a pas besoin de direction de navigation - les données peuvent être " +"vues et récupérées de toutes les manières possibles." + +#. Tag: para +#: tutorial.xml:816 +#, no-c-format +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "" +"D'abord, ajouter une collection de participants à la classe Event :" + +#. Tag: programlisting +#: tutorial.xml:820 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "" +"Maintenant mapper ce côté de l'association aussi, dans Event.hbm." +"xml." + +#. Tag: programlisting +#: tutorial.xml:826 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:828 +#, no-c-format +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"Comme vous le voyez, ce sont des mappings de sets normaux " +"dans les deux documents de mapping. Notez que les noms de colonne dans " +"key et many-to-many sont inversés dans " +"les 2 documents de mapping. L'ajout le plus important ici est l'attribut " +"inverse=\"true\" dans l'élément set du " +"mapping de la collection des Events." + +#. Tag: para +#: tutorial.xml:836 +#, no-c-format +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"Ce que signifie qu'Hibernate devrait prendre l'autre côté - la classe " +"Person - s'il a besoin de renseigner des informations à " +"propos du lien entre les deux. Ce sera beaucoup plus facile à comprendre une " +"fois que vous verrez comment le lien bidirectionnel entre les deux entités " +"est créé." + +#. Tag: title +#: tutorial.xml:845 +#, no-c-format +msgid "Working bi-directional links" +msgstr "Travailler avec des liens bidirectionnels" + +#. Tag: para +#: tutorial.xml:847 +#, no-c-format +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"Premièrement, gardez à l'esprit qu'Hibernate n'affecte pas la sémantique " +"normale de Java. Comment avons-nous créé un lien entre une Person et un Event dans l'exemple unidirectionnel ? " +"Nous avons ajouté une instance de Event à la collection " +"des références d'événement d'une instance de Person. " +"Donc, évidemment, si vous voulons rendre ce lien bidirectionnel, nous devons " +"faire la même chose de l'autre côté - ajouter une référence de " +"Person à la collection d'un Event. " +"Cette \"configuration du lien des deux côtés\" est absolument nécessaire et " +"vous ne devriez jamais oublier de le faire." + +#. Tag: para +#: tutorial.xml:857 +#, fuzzy, no-c-format +msgid "" +"Many developers program defensively and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"Beaucoup de développeurs programment de manière défensive et créent des " +"méthodes de gestion de lien pour affecter correctement les deux côtés, par " +"exemple dans Person :" + +#. Tag: programlisting +#: tutorial.xml:862 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:864 +#, no-c-format +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"Notez que les méthodes get et set pour la collection sont maintenant " +"protégées - ceci permet à des classes du même paquet et aux sous-classes " +"d'accéder encore aux méthodes, mais empêche n'importe qui d'autre de mettre " +"le désordre directement dans les collections (enfin, presque). Vous devriez " +"probablement faire de même avec la collection de l'autre côté." + +#. Tag: para +#: tutorial.xml:871 +#, no-c-format +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"Et à propos de l'attribut de mapping inverse ? Pour vous, " +"et pour Java, un lien bidirectionnel est simplement une manière de " +"configurer correctement les références des deux côtés. Hibernate n'a " +"cependant pas assez d'informations pour ordonner correctement les " +"expressions SQL INSERT et UPDATE (pour " +"éviter les violations de contrainte), et a besoin d'aide pour gérer " +"proprement les associations bidirectionnelles. Rendre inverse un côté d'une assocation dit à Hibernate de l'ignorer " +"essentiellement, pour le considérer comme un miroir de " +"l'autre côté. C'est tout ce qui est nécessaire à Hibernate pour découvrir " +"tout des problèmes de transformation d'un modèle de navigation " +"directionnelle vers un schéma SQL de base de données. Les règles dont vous " +"devez vous souvenir sont : toutes les associations bidirectionnelles ont " +"besoin d'un côté marqué inverse. Dans une association un-" +"vers-plusieurs vous pouvez choisir n'importe quel côté, il n'y a pas de " +"différence." + +#. Tag: title +#: tutorial.xml:889 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "Part 3 - L'application web EventManager" + +#. Tag: para +#: tutorial.xml:891 +#, fuzzy, no-c-format +msgid "Let's turn the following discussion into a small web application..." +msgstr "Let's turn this into a small web application." + +#. Tag: para +#: tutorial.xml:895 +#, no-c-format +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"Une application web Hibernate utilise la Session et " +"Transaction comme une application standalone. Cependant, " +"quelques patterns sont utiles. Nous allons coder une " +"EventManagerServlet. Cette servlet peut lister tous les " +"évènements stockés dans la base de données, et fournir une formulaire HTML " +"pour saisir d'autres évènements." + +#. Tag: title +#: tutorial.xml:903 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "Ecrire la servlet de base" + +#. Tag: para +#: tutorial.xml:905 +#, no-c-format +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "" +"Créons une nouvelle classe dans notre répertoire source, dans le package " +"events:" + +#. Tag: programlisting +#: tutorial.xml:910 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:912 +#, no-c-format +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" + +#. Tag: programlisting +#: tutorial.xml:917 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:919 +#, fuzzy, no-c-format +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"La pattern que nous utilisons ici est appelé session-per-request. Lorsqu'une requête touche la servlet, une nouvelle " +"Session hibernate est ouverte à l'invocationde " +"getCurrentSession() sur la SessionFactory. Ensuite, une transaction avec la base de données est " +"démarrée— tous les accès à la base de données interviennent au sein de " +"la transactiton, peu importe que les données soient lues ou écrites (nous " +"n'utilisons pas le mode auto-commit dans les applications)." + +#. Tag: para +#: tutorial.xml:928 +#, no-c-format +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"UNTRANSLATED Do not use a new Hibernate " +"Session for every database operation. Use one Hibernate " +"Session that is scoped to the whole request. Use " +"getCurrentSession(), so that it is automatically bound to " +"the current Java thread." + +#. Tag: para +#: tutorial.xml:935 +#, no-c-format +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"Ensuite, les actions possibles de la requêtes sont exécutées et la réponse " +"HTML est rendue. Nous en parlerons plus tard." + +#. Tag: para +#: tutorial.xml:940 +#, fuzzy, no-c-format +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occurred during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"Enfin, l'unité de travail s'achève lorsque l'exécution et le rendu sont " +"achevés. Si un problème survient lors de ces deux phases, une exception est " +"soulevée et la transaction avec la base de données subit un rollback. Voila " +"pour le pattern session-per-request. Au lieu d'un code de " +"démarcation de transaction au sein de chaque servlet, vous pouvez écrire un " +"filtre de servlet. Voir le site Hibernate et le Wiki pour plus d'information " +"sur ce pattern, appelé Open Session in View— vous " +"en aurez besoin dès que vous utiliserez des JSPs et non plus des servlets " +"pour le rendu de vos vues." + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Processing and rendering" +msgstr "Procéder et rendre" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "Implémentons l'exécution de la requête et le rendu de la page." + +#. Tag: programlisting +#: tutorial.xml:960 +#, no-c-format +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:962 +#, fuzzy, no-c-format +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "" +"Ce style de code avec un mix de Java et d'HTML ne serait pas scalable dans " +"une application plus complexe—gardez à l'esprit que nous ne faisons " +"qu'illustrer les concepts basiques d'Hibernate dans ce tutoriel. Ce code " +"affiche une en tête et un pied de page HTML. Dans cette page, sont affichés " +"un formulaire pour la saisie d'évènements ainsi qu'une liste de tous les " +"évènements de la base de données. La première méthode est triviale est ne " +"fait que sortir de l'HTML:" + +#. Tag: programlisting +#: tutorial.xml:971 +#, no-c-format +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:973 +#, no-c-format +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"La méthode listEvents() utilise la Session Hibernate liée au thread courant pour exécuter la requête:" + +#. Tag: programlisting +#: tutorial.xml:979 +#, no-c-format +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:981 +#, no-c-format +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"FEnfin, l'action store renvoie à la méthode " +"createAndStoreEvent(), qui utilise aussi la " +"Session du thread courant:" + +#. Tag: programlisting +#: tutorial.xml:987 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:989 +#, fuzzy, no-c-format +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these objects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"La servlet est faite. Une requête à la servlet sera exécutée par une seule " +"Session et Transaction. Comme pour une " +"application standalone, Hibernate peut automatiquement lier ces objets au " +"thread courant d'exécution. Cela vous laisse la liberté de séparer votre " +"code en couches et d'accéder à la SessionFactory par le " +"moyen que vous voulez. Généralement, vous utiliserez des conceptions plus " +"sophistiquées et déplacerez le code d'accès aux données dans une couche DAO. " +"Voir le wiki Hibernate pour plus d'exemples." + +#. Tag: title +#: tutorial.xml:1003 +#, no-c-format +msgid "Deploying and testing" +msgstr "Déployer et tester" + +#. Tag: para +#: tutorial.xml:1005 +#, no-c-format +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"Pour déployer cette application, vous devez créer une archive Web, un War. " +"Ajoutez la cible Ant suivante dans votre build.xml:" + +#. Tag: programlisting +#: tutorial.xml:1010 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:1012 +#, no-c-format +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"Cette cible créé un fichier nommé hibernate-tutorial.war " +"dans le répertoire de votre projet. Elle package les bibliothèques et le " +"descripteur web.xml qui est attendu dans le répertoire " +"racine de votre projet:" + +#. Tag: programlisting +#: tutorial.xml:1018 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:1020 +#, fuzzy, no-c-format +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compilation and excluded from the WAR package." +msgstr "" +"Avant de compiler et déployer l'application web, notez qu'une bibliothèque " +"supplémentaire est requise: servlet.jar. C'est le kit de " +"développement de Servlet Java, si vous ne disposez pas de cette " +"bibliothèque, prenez la sur le site de Sun et copiez la dans votre " +"répertoire des bibliothèques. Cependant, elle ne sera utilisée uniquement " +"pour la compilation et sera exclue du paackage WAR." + +#. Tag: para +#: tutorial.xml:1028 +#, no-c-format +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"Pour construire et déployer, appelez ant war dans votre " +"projet et copier le fichier hibernate-tutorial.war dans " +"le répertoire webapp de tomcat Si vous n'avez pas " +"installé Tomcat, téléchargez le et suivez la notice d'installation. Vous " +"n'avez pas à modifier la configuration Tomcat pour déployer cette " +"application." + +#. Tag: para +#: tutorial.xml:1036 +#, no-c-format +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"Une fois l'application déployée et Tomcat lancé, accédez à l'application via " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Assurez vous de consulter les traces tomcat pour observer l'initialisation " +"d'Hibernate à la première requête touchant votre servlet (l'initialisation " +"statique dans HibernateUtil est invoquée) et pour " +"vérifier qu'aucune exception ne survienne." + +#. Tag: title +#: tutorial.xml:1049 +#, no-c-format +msgid "Summary" +msgstr "Résumé" + +#. Tag: para +#: tutorial.xml:1051 +#, no-c-format +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"Ce didacticiel a couvert les bases de l'écriture d'une simple application " +"Hibernate ainsi qu'une petite application web." + +#. Tag: para +#: tutorial.xml:1056 +#, no-c-format +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"Si vous êtes déjà confiants avec Hibernate, continuez à parcourir les sujets " +"que vous trouvez intéressants à travers la table des matières de la " +"documentation de référence - les plus demandés sont le traitement " +"transactionnel (), la performance des " +"récupérations d'information (), ou " +"l'utilisation de l'API () et les " +"fonctionnalités des requêtes ()." + +#. Tag: para +#: tutorial.xml:1064 +#, no-c-format +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" +"N'oubliez pas de vérifier le site web d'Hibernate pour d'autres didacticiels " +"(plus spécialisés)." + +#~ msgid "" +#~ "This chapter is an introductory tutorial for new users of Hibernate. We " +#~ "start with a simple command line application using an in-memory database " +#~ "and develop it in easy to understand steps." +#~ msgstr "" +#~ "Ce chapitre est un didacticiel introductif destiné aux nouveaux " +#~ "utilisateurs d'Hibernate. Nous commençons avec une simple application en " +#~ "ligne de commande utilisant une base de données en mémoire, et la " +#~ "développons en étapes faciles à comprendre." + +#~ msgid "" +#~ "This tutorial is intended for new users of Hibernate but requires Java " +#~ "and SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-" +#~ "party libraries we name are for JDK 1.4 and 5.0. You might need others " +#~ "for JDK 1.3." +#~ msgstr "" +#~ "Ce didacticiel est destiné aux nouveaux utilisateurs d'Hibernate mais " +#~ "requiert des connaissances Java et SQL. Il est basé sur un didacticiel de " +#~ "Michael Gloegl, les bibliothèques tierces que nous nommons sont pour les " +#~ "JDK 1.4 et 5.0. Vous pourriez avoir besoin d'autres bibliothèques pour le " +#~ "JDK 1.3." + +#~ msgid "" +#~ "The source code for the tutorial is included in the distribution in the " +#~ "doc/reference/tutorial/ directory." +#~ msgstr "" +#~ "Le code source de ce tutoriel est inclus dans la distribution dans le " +#~ "répertoire doc/reference/tutorial/." + +#~ msgid "" +#~ "First, we'll create a simple console-based Hibernate application. We use " +#~ "an Java database (HSQL DB), so we do not have to install any database " +#~ "server." +#~ msgstr "" +#~ "D'abord, nous créerons une simple application Hibernate en console. Nous " +#~ "utilisons une base de données en mémoire (HSQL DB), donc nous n'avons pas " +#~ "à installer de serveur de base de données." + +#~ msgid "" +#~ "Let's assume we need a small database application that can store events " +#~ "we want to attend, and information about the hosts of these events." +#~ msgstr "" +#~ "Supposons que nous ayons besoin d'une petite application de base de " +#~ "données qui puisse stocker des événements que nous voulons suivre, et des " +#~ "informations à propos des hôtes de ces événements." + +#~ msgid "" +#~ "The first thing we do, is set up our development directory and put all " +#~ "the Java libraries we need into it. Download the Hibernate distribution " +#~ "from the Hibernate website. Extract the package and place all required " +#~ "libraries found in /lib into into the /lib directory of your new development working directory. It should " +#~ "look like this:" +#~ msgstr "" +#~ "La première chose que nous faisons est de configurer notre répertoire de " +#~ "développement et de mettre toutes les bibliothèques dont nous avons " +#~ "besoin dedans. Téléchargez la distribution Hibernate à partir du site web " +#~ "d'Hibernate. Extrayez le paquet et placez toutes les bibliothèques " +#~ "requises trouvées dans /lib dans le répertoire " +#~ "/lib de votre nouveau répertoire de travail. Il " +#~ "devrait ressembler à ça :" + +#~ msgid "" +#~ "This is the minimum set of required libraries (note that we also copied " +#~ "hibernate3.jar, the main archive) for Hibernate at the time of " +#~ "writing. The Hibernate release you are using might require " +#~ "more or less libraries. See the README.txt file in the " +#~ "lib/ directory of the Hibernate distribution for more " +#~ "information about required and optional third-party libraries. (Actually, " +#~ "Log4j is not required but preferred by many developers.)" +#~ msgstr "" +#~ "Ceci est l'ensemble minimum de bibliothèques requises (notez que nous " +#~ "avons aussi copié hibernate3.jar, l'archive principale) pour Hibernate. " +#~ "Lisez le fichier README.txt dans le répertoire " +#~ "lib/ de la distribution Hibernate pour plus " +#~ "d'informations à propos des biliothèques tierces requises et " +#~ "optionnelles. (En fait, log4j n'est pas requis mais préféré par beaucoup " +#~ "de développeurs.)" diff --git a/documentation/envers/src/main/docbook/fr-FR/content/xml.po b/documentation/envers/src/main/docbook/fr-FR/content/xml.po new file mode 100644 index 0000000000..82bbe7da9d --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/content/xml.po @@ -0,0 +1,451 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:29 +#, no-c-format +msgid "XML Mapping" +msgstr "Mapping XML" + +#. Tag: emphasis +#: xml.xml:31 +#, no-c-format +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "" +"Notez que cette fonctionnalité est expérimentale dans Hibernate 3.0 et est " +"en développement extrêmement actif." + +#. Tag: title +#: xml.xml:37 +#, no-c-format +msgid "Working with XML data" +msgstr "Travailler avec des données XML" + +#. Tag: para +#: xml.xml:39 +#, no-c-format +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"Hibernate vous laisse travailler avec des données XML persistantes de la " +"même manière que vous travaillez avec des POJOs persistants. Un arbre XML " +"peut être vu comme une autre manière de représenter les données " +"relationnelles au niveau objet, à la place des POJOs." + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"Hibernate supporte dom4j en tant qu'API pour la manipulation des arbres XML. " +"Vous pouvez écrire des requêtes qui récupèrent des arbres dom4j à partie de " +"la base de données, et avoir toutes les modifications que vous faites sur " +"l'arbre automatiquement synchronisées dans la base de données. Vous pouvez " +"même prendre un document XML, l'analyser en utilisant dom4j, et l'écrire " +"dans la base de données via les opérations basiques d'Hibernate : " +"persist(), saveOrUpdate(), merge(), delete(), replicate() " +"(merge() n'est pas encore supporté)." + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"Cette fonctionnalité a plusieurs applications dont l'import/export de " +"données, l'externalisation d'entités via JMS ou SOAP et les rapports XSLT." + +#. Tag: para +#: xml.xml:61 +#, no-c-format +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"Un simple mapping peut être utilisé pour simultanément mapper les propriétés " +"d'une classe et les noeuds d'un document XML vers la base de données, ou, si " +"il n'y a pas de classe à mapper, il peut être utilisé juste pour mapper le " +"XML." + +#. Tag: title +#: xml.xml:68 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "Spécifier le mapping XML et le mapping d'une classe ensemble" + +#. Tag: para +#: xml.xml:70 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "Voici un exemple de mapping d'un POJO et du XML simultanément :" + +#. Tag: programlisting +#: xml.xml:74 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:78 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "Spécifier seulement un mapping XML" + +#. Tag: para +#: xml.xml:80 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "Voici un exemple dans lequel il n'y a pas de class POJO :" + +#. Tag: programlisting +#: xml.xml:84 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:86 +#, no-c-format +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"Ce mapping vous permet d'accéder aux données comme un arbre dom4j, ou comme " +"un graphe de paire nom de propriété/valeur (Maps java). " +"Les noms des propriétés sont des constructions purement logiques qui peuvent " +"être référées des dans requêtes HQL." + +#. Tag: title +#: xml.xml:97 +#, no-c-format +msgid "XML mapping metadata" +msgstr "Métadonnées du mapping XML" + +#. Tag: para +#: xml.xml:99 +#, no-c-format +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"Plusieurs éléments du mapping Hibernate acceptent l'attribut node. Ceci vous permet de spécifier le nom d'un attribut XML ou d'un " +"élément qui contient la propriété ou les données de l'entité. Le format de " +"l'attribut node doit être un des suivants :" + +#. Tag: para +#: xml.xml:108 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "\"element-name\" - mappe vers l'élément XML nommé" + +#. Tag: para +#: xml.xml:111 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" +"\"@attribute-name\" - mappe vers l'attribut XML nommé" + +#. Tag: para +#: xml.xml:114 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "\".\" - mappe vers le parent de l'élément" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - mappe vers l'élément " +"nommé de l'attribut nommé" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"Pour des collections et de simples associations valuées, il y a un attribut " +"embed-xml supplémentaire. Si embed-xml=\"true\", qui est la valeur par défaut, l'arbre XML pour l'entité associée " +"(ou la collection des types de valeurs) sera embarquée directement dans " +"l'arbre XML pour l'entité qui possède l'association. Sinon, si " +"embed-xml=\"false\", alors seule la valeur de " +"l'identifiant référencé apparaîtra dans le XML pour de simples associations " +"de points, et les collections n'appraîtront simplement pas." + +#. Tag: para +#: xml.xml:134 +#, no-c-format +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"Vous devriez faire attention à ne pas laisser embed-xml=\"true\" pour trop d'associations, puisque XML ne traite pas bien les liens " +"circurlaires." + +#. Tag: programlisting +#: xml.xml:139 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:141 +#, no-c-format +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"dans ce cas, nous avons décidé d'embarquer la collection d'identifiants de " +"compte, mais pas les données actuelles du compte. La requête HQL suivante :" + +#. Tag: programlisting +#: xml.xml:146 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:148 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "devrait retourner l'ensemble de données suivant :" + +#. Tag: programlisting +#: xml.xml:152 +#, no-c-format +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:154 +#, no-c-format +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"Si vous positionnez embed-xml=\"true\" sur le mapping " +"<one-to-many>, les données pourraient ressembler " +"plus à ça :" + +#. Tag: programlisting +#: xml.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:165 +#, no-c-format +msgid "Manipulating XML data" +msgstr "Manipuler des données XML" + +#. Tag: para +#: xml.xml:167 +#, no-c-format +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"Relisons et mettons à jour des documents XML dans l'application. Nous " +"faisons ça en obtenant une session dom4j :" + +#. Tag: programlisting +#: xml.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: xml.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:176 +#, no-c-format +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"Il est extrêmement utile de combiner cette fonctionnalité avec l'opération " +"replicate() d'Hibernate pour implémenter des imports/" +"exports de données XML." diff --git a/documentation/envers/src/main/docbook/fr-FR/legal_notice.po b/documentation/envers/src/main/docbook/fr-FR/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/fr-FR/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ja-JP/Hibernate_Reference.po b/documentation/envers/src/main/docbook/ja-JP/Hibernate_Reference.po new file mode 100644 index 0000000000..4de7899516 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - Relational Persistence for Idiomatic Java" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "Hibernate Reference Documentation" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ja-JP/content/architecture.po b/documentation/envers/src/main/docbook/ja-JP/content/architecture.po new file mode 100644 index 0000000000..3b8380eb91 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/architecture.po @@ -0,0 +1,634 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:21 +#, no-c-format +msgid "Architecture" +msgstr "アーキテクチャ" + +#. Tag: title +#: architecture.xml:24 +#, no-c-format +msgid "Overview" +msgstr "概観" + +#. Tag: para +#: architecture.xml:26 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "Hibernateアーキテクチャの(非常に)高いレベルからのビュー:" + +#. Tag: para +#: architecture.xml:39 +#, no-c-format +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"この図はHibernateが、アプリケーションに対して永続化サービス (と永続オブジェ" +"クト)を提供するために、データベースと設定データを使うことを 示しています。" + +#. Tag: para +#: architecture.xml:44 +#, no-c-format +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"ここで実行時アーキテクチャのより詳細なビューをお見せしましょう。 あいにく、" +"Hibernateは柔軟であり、いろいろなアプローチをサポートしています。 ここでは、2" +"つの極端な例をお見せします。 「軽い」アーキテクチャでは、アプリケーションが自" +"前のJDBCコネクションを用意し、 アプリケーション自身がトランザクションを管理し" +"ます。 この方法は、Hibernate APIの最小限のサブセットを使います:" + +#. Tag: para +#: architecture.xml:61 +#, no-c-format +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"「重い」アーキテクチャは、アプリケーションから、その下に位置するJDBCやJTAの" +"APIを 取り払って抽象化し、その詳細の面倒をHibernateに見させます。" + +#. Tag: para +#: architecture.xml:75 +#, fuzzy, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "以下は、上の図に含まれるオブジェクトの定義です: " + +#. Tag: term +#: architecture.xml:80 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#. Tag: para +#: architecture.xml:82 +#, no-c-format +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"1つのデータベースに対するコンパイルされたマッピングの スレッドセーフな(更新" +"不能の)キャッシュ。 Session のファクトリであり、 " +"ConnectionProvider のクライアント。 オプションとして、プロ" +"セスまたはクラスタレベルにおいて、 トランザクション間で再利用可能なデータの" +"(二次)キャッシュを持ちます。" + +#. Tag: term +#: architecture.xml:92 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#. Tag: para +#: architecture.xml:94 +#, no-c-format +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"アプリケーションと永続ストアとの対話を表す、 シングルスレッドで短命のオブジェ" +"クト。 JDBCコネクションをラップします。 Transaction のファ" +"クトリです。 永続オブジェクトの必須の(一次)キャッシュを保持します。 この" +"キャッシュはオブジェクトグラフをナビゲーションする時や、 識別子でオブジェクト" +"を検索する時に使われます。" + +#. Tag: term +#: architecture.xml:104 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "Persistent objects と Collections" + +#. Tag: para +#: architecture.xml:106 +#, no-c-format +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"永続化状態とビジネスメソッドを持つ、短命でシングルスレッドのオブジェクト。 こ" +"れは通常のJavaBeans/POJOのこともありますが、特徴的なことは、 その時点での(た" +"だ1つの) Session と関連していることです。 " +"Session がクローズされるとすぐに、 それらは切り離されて他" +"のアプリケーション層から自由に使うことができます。 (例えばデータ・トランス" +"ファ・オブジェクトとして、 プレゼンテーション層から、またはプレゼンテーション" +"層へ直接使用できます。)" + +#. Tag: term +#: architecture.xml:117 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "Transient と detached な objects と Collections" + +#. Tag: para +#: architecture.xml:119 +#, no-c-format +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"現時点では Session と関連していない、 永続クラスのインスタ" +"ンス。 すでにアプリケーション側でインスタンス化されていて、まだ永続化されてい" +"ないか、 クローズされた Session でインスタンス化されたかの" +"どちらかです。" + +#. Tag: term +#: architecture.xml:128 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "Transaction (org.hibernate.Transaction)" + +#. Tag: para +#: architecture.xml:130 +#, no-c-format +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(オプション)原子性を持つ作業単位(Unit of Work)を指定するために、アプリケー" +"ションが使用する、 シングルスレッドで短命なオブジェクト。 下に位置するJDBC、" +"JTA、CORBAトランザクションからアプリケーションを抽象化します。 " +"Session は、時には いくつかの Transaction をまたがるかもしれません。 しかし、下の層のAPIを使うにせよ、 " +"Transaction を使うにせよ、 トランザクション境界を設定する" +"ことは、決してオプションではありません!。" + +#. Tag: term +#: architecture.xml:141 +#, no-c-format +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#. Tag: para +#: architecture.xml:143 +#, no-c-format +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(オプション)JDBCコネクション(とそのプール)のファクトリ。 下の層に位置する " +"DatasourceDriverManager からアプリ" +"ケーションを抽象化します。 アプリケーションには公開されませんが、開発者が継承" +"または実装することは可能です。" + +#. Tag: term +#: architecture.xml:151 +#, no-c-format +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#. Tag: para +#: architecture.xml:153 +#, no-c-format +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(オプション) Transaction インスタンスのファクトリ。 アプリ" +"ケーションには公開されませんが、開発者が継承または実装することは可能です。" + +#. Tag: emphasis +#: architecture.xml:160 +#, no-c-format +msgid "Extension Interfaces" +msgstr "Extension Interfaces" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"Hibernateは、永続層の振る舞いをカスタマイズするために、 多くのオプション拡張" +"インタフェースを用意しています。 詳細はAPIドキュメントを参照してください。" + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"「軽い」アーキテクチャでは、アプリケーションは直接JTAやJDBCと対話するため" +"に、 TransactionTransactionFactory " +"や ConnectionProvider をバイパスします。" + +#. Tag: title +#: architecture.xml:179 +#, no-c-format +msgid "Instance states" +msgstr "インスタンスの状態" + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"永続クラスのインスタンスは、次の3つの異なる状態のどれかになります。 それ" +"は、 永続コンテキスト によって決まります。 Hibernateの " +"Session オブジェクトが、永続コンテキストになります。" + +#. Tag: term +#: architecture.xml:188 +#, no-c-format +msgid "transient" +msgstr "transient" + +#. Tag: para +#: architecture.xml:190 +#, no-c-format +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "" +"この状態のインスタンスは、現在もそして過去においても、 永続コンテキストに関連" +"づいていません。また、永続ID(主キーの値)を 持っていません。" + +#. Tag: term +#: architecture.xml:198 +#, no-c-format +msgid "persistent" +msgstr "persistent" + +#. Tag: para +#: architecture.xml:200 +#, no-c-format +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"この状態のインスタンスは、その時点で永続コンテキストに関連づいています。 ま" +"た、永続ID(主キーの値)を持ち、 たいていはデータベースに対応する行を持ってい" +"るでしょう。 個々の永続コンテキストのなかでは、永続IDが JavaのID(オブジェク" +"トのメモリ上の位置)と同じであることを Hibernateが 保証 " +"します。" + +#. Tag: term +#: architecture.xml:212 +#, no-c-format +msgid "detached" +msgstr "detached" + +#. Tag: para +#: architecture.xml:214 +#, no-c-format +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corrsponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"この状態のインスタンスは、かつて永続コンテキストに関連づけられたが、 そのコン" +"テキストがクローズされたか、あるいは、 他のプロセスにそのインスタンスがシリア" +"ライズされたかです。 このインスタンスは、永続IDを持ち、たいていはデータベース" +"に 対応する行を持っているでしょう。分離インスタンスに対しては、 永続IDとJava" +"のIDとの関連は、Hibernateが保証しません。" + +#. Tag: title +#: architecture.xml:229 +#, no-c-format +msgid "JMX Integration" +msgstr "JMXとの統合" + +#. Tag: para +#: architecture.xml:231 +#, no-c-format +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMXはJavaコンポーネント管理のJ2EE標準です。 JMX標準サービスを通して、" +"Hibernateは管理されます。 ディストリビューションの中に org." +"hibernate.jmx.HibernateService という MBean実装を用意しています。" + +#. Tag: para +#: architecture.xml:237 +#, no-c-format +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"JBoss アプリケーションサーバー上にHibernateをJMXサービスとしてデプロイする方" +"法の例としては、 JBoss ユーザガイドを参照してください。 JBoss アプリケーショ" +"ンサーバーにおいて、 JMXを使ってデプロイすると、次のメリットが得られます。" + +#. Tag: para +#: architecture.xml:245 +#, no-c-format +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"セッション管理: Hibernateの Session " +"のライフサイクルは、 自動的にJTAトランザクションのスコープに結びつけられま" +"す。これは、もはや手動で Session をオープンしたり、クロー" +"ズしたりする必要がないことを意味します。 これは、JBoss EJB インターセプタの仕" +"事になります。 また、コードのどこでトランザクション境界を設定するかについ" +"て、 もはや悩む必要がありません(もちろん移植可能な永続層を書かかなくていいの" +"ならば、 オプションのHibernateの Transaction を使用してく" +"ださい。) Session にアクセスするためには、 " +"HibernateContext を コールしてください。" + +#. Tag: para +#: architecture.xml:257 +#, no-c-format +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"HAR デプロイ: 通常、(EAR または SAR ファイルにある)" +"JBoss サービス デプロイメントディスクリプタを使って、Hibernate JMX サービスを" +"デプロイします。 それは、Hibernateの SessionFactory の全て" +"の一般的な設定オプションを サポートします。しかし依然としてデプロイメントディ" +"スクリプタのなかにすべてのマッピングファイルの 名前を挙げる必要があります。 " +"もし、オプションのHARデプロイメントを使うことを決めたなら、 JBossは自動的に" +"HARファイルのなかの全てのマッピングファイルを検出します。" + +#. Tag: para +#: architecture.xml:268 +#, no-c-format +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "" +"これらのオプションについての詳細な情報は、JBossアプリケーションサーバユーザガ" +"イドを 参考にしてください。" + +#. Tag: para +#: architecture.xml:272 +#, no-c-format +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"JMXサービスとして利用可能な他の機能に、Hibernate実行時統計情報があります。 " +" を見てください。" + +#. Tag: title +#: architecture.xml:279 +#, no-c-format +msgid "JCA Support" +msgstr "JCA サポート" + +#. Tag: para +#: architecture.xml:280 +#, no-c-format +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hibernate は JCA コネクタとしても設定できます。詳細については、Webサイトを見" +"てください。 Hibernate JCA サポートは、今のところ実験段階として考えられている" +"ことに注意してください。" + +#. Tag: title +#: architecture.xml:287 +#, no-c-format +msgid "Contextual Sessions" +msgstr "コンテキスト上のセッション" + +#. Tag: para +#: architecture.xml:288 +#, no-c-format +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"Hibernate を使ったアプリケーションは、ほとんど、なんらかの形で\"コンテキスト" +"上の\"セッションが必要になります。 「コンテキスト上のセッション」は、特定のコ" +"ンテキストのスコープのなかで有効なセッションのことです。 しかし、通常アプリ" +"ケーションごとにコンテキストを構成するものの定義は異なります。 しかも、異なる" +"複数のコンテキストは、現時点に対して異なるスコープを定義します。 バージョン" +"3.0より前の Hibernate では、自作の ThreadLocal ベースの" +"「コンテキスト上のセッション」を 利用するか、 HibernateUtil のようなヘルパークラスを利用するか、 proxy/interception ベースの「コ" +"ンテキスト上のセッション」を提供する (Spring や Pico のような)サードパー" +"ティのフレームワークを利用するかのいずれかでした。" + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"バージョン 3.0.1 から、Hibernate には SessionFactory." +"getCurrentSession() が 加わりました。 これは、 JTA トランザクションの使用を前提にしています。 JTA ト" +"ランザクションは、現在のセッションのスコープとコンテキストの両方を定義しま" +"す。 Hibernate チームは、次のことを主張します。 巨大なスタンドアロンの " +"JTA TransactionManager 実装が成熟したら、 J2EE コンテナ上にデプロイされるかどうかにかかわらず、 ほとんどの(すべて" +"とは言わないが)アプリケーションが、 JTA トランザクション" +"管理を使用すべきであると。 この考えに基づくと、 JTA ベース" +"の「コンテキスト上のセッション」を 使うしかないでしょう。" + +#. Tag: para +#: architecture.xml:307 +#, no-c-format +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"しかし、バージョン 3.1 からは、 SessionFactory.getCurrentSession() の後の処理が、 プラガブルになりました。 これを受けて、現在のセッショ" +"ンを定義するスコープとコンテキストのプラガビリティを可能にするために、 新しい" +"拡張インタフェース ( org.hibernate.context.CurrentSessionContext ) と 新しい構成パラメータ ( hibernate." +"current_session_context_class ) が追加されました。" + +#. Tag: para +#: architecture.xml:314 +#, no-c-format +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"org.hibernate.context.CurrentSessionContext インタフェース" +"の規約についての 詳細な内容は Javadoc を参照してください。 それには、 " +"currentSession() という1つのメソッドが定義されており、 そ" +"の実装は、現在の「コンテキスト上のセッション」を追跡することに責任を持ちま" +"す。 そのまま使えるように、Hibernateはこのインタフェースの実装を2つ提供してい" +"ます。" + +#. Tag: para +#: architecture.xml:324 +#, no-c-format +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - JTA トランザクションによって、現在のセッションが追跡され、 スコープを決" +"められます。この処理は、古いJTAだけのアプローチとまったく同じです。 詳細は" +"Javadocを参照してください。" + +#. Tag: para +#: architecture.xml:332 +#, no-c-format +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - スレッド" +"の実行によって、現在のセッションが追跡されます。 詳細はJavadocを参照してくだ" +"さい。" + +#. Tag: para +#: architecture.xml:338 +#, no-c-format +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"org.hibernate.context.ManagedSessionContext - スレッドの実" +"行によって、現在のセッションが追跡されます。 しかし、このクラスのstaticメソッ" +"ドで Session インスタンスを バインド/アンバインドする責任" +"はあなたにあります。 これは決して Session をオープン、フ" +"ラッシュ、クローズしません。" + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programatic " +"transaction demarcation in plain JSE without JTA, you are adviced to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"始めの2つの実装は、\"1セッション - 1データベーストランザクション\" プログラミ" +"ングモデルを提供します。 これは リクエストごとのセッション" +"(session-per-request) としても知られており、使われています。 " +"Hibernate セッションの開始と終了は、データベーストランザクションの期間で決ま" +"ります。 JTAを使わない普通のJSEで、プログラム上のトランザクション境界設定を行" +"うなら、 コードから基礎のトランザクションシステムを隠蔽するために、 " +"Hibernate Transaction APIを使うとよいでしょう。 JTAを使う" +"なら、トランザクションの境界設定には、JTAインターフェイスを使ってください。 " +"CMTをサポートするEJBコンテナで実行するつもりなら、トランザクション境界は宣言" +"的に定義できるため、 コード上でトランザクションやセッションの境界を設定する必" +"要はありません。 さらに詳細な情報やコードの例は、 を参照してください。" + +#. Tag: para +#: architecture.xml:359 +#, no-c-format +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"hibernate.current_session_context_class 設定パラメータ" +"は、 org.hibernate.context.CurrentSessionContext のどの実" +"装を使うかを指定します。 下位互換性のため、このパラメータが設定されず " +"org.hibernate.transaction.TransactionManagerLookup が設定" +"されていた場合、 Hibernateは org.hibernate.context." +"JTASessionContext を使うことに注意してください。 通常このパラメータ" +"の値には、3つの実装の中から使用する実装クラスの名前を直接指定します。 しか" +"し、\"jta\", \"thread\", \"managed\"というそれぞれの省略名も用意されていま" +"す。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/association_mapping.po b/documentation/envers/src/main/docbook/ja-JP/content/association_mapping.po new file mode 100644 index 0000000000..f65d7770a1 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/association_mapping.po @@ -0,0 +1,874 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:6 +#, no-c-format +msgid "Association Mappings" +msgstr "関連マッピング" + +#. Tag: title +#: association_mapping.xml:9 +#, no-c-format +msgid "Introduction" +msgstr "イントロダクション" + +#. Tag: para +#: association_mapping.xml:11 +#, no-c-format +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"関連マッピングはしばしば理解が最も難しいものになります。 この章では、基本的な" +"一つ一つのケースについて述べます。 単方向のマッピングから始め、それから双方向" +"のケースについて考えていきます。 例として、Person と " +"Address を用います。" + +#. Tag: para +#: association_mapping.xml:19 +#, no-c-format +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "" +"関連は、結合テーブルを入れるかかどうかと、 多重度によって分類することにしま" +"す。" + +#. Tag: para +#: association_mapping.xml:24 +#, no-c-format +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"すべての例でnot nullの外部キーを使用します。 これはHibernateの要件ではありま" +"せん。 not null制約を外したとしても、マッピングは問題なく動作します。" + +#. Tag: title +#: association_mapping.xml:34 +#, no-c-format +msgid "Unidirectional associations" +msgstr "単方向関連" + +#. Tag: title +#: association_mapping.xml:37 association_mapping.xml:108 +#, no-c-format +msgid "many to one" +msgstr "多対一" + +#. Tag: para +#: association_mapping.xml:39 +#, no-c-format +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "" +"単方向多対一関連 は単方向関連の中で最も一般的なもので" +"す。" + +#. Tag: programlisting +#: association_mapping.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:45 association_mapping.xml:161 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:50 association_mapping.xml:121 +#: association_mapping.xml:185 association_mapping.xml:225 +#, no-c-format +msgid "one to one" +msgstr "一対一" + +#. Tag: para +#: association_mapping.xml:52 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"外部キーの単方向一対一関連 はほとんど同じものです。 唯一" +"違うのは、カラムのユニークな制約です。" + +#. Tag: programlisting +#: association_mapping.xml:57 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:58 association_mapping.xml:193 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:60 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"主キーの単方向一対一関連 は通常、特別なIDジェネレータを" +"使います。 (この例では関連の方向が逆になっていることに注意してください)" + +#. Tag: programlisting +#: association_mapping.xml:66 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:67 association_mapping.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:72 association_mapping.xml:94 +#, no-c-format +msgid "one to many" +msgstr "一対多" + +#. Tag: para +#: association_mapping.xml:74 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"外部キーの単方向一対多関連 はとても特殊なケースで、 あま" +"り推奨されていません。" + +#. Tag: programlisting +#: association_mapping.xml:79 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:82 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "このような関連のために結合テーブルを使うことをお薦めします。" + +#. Tag: title +#: association_mapping.xml:91 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "結合テーブルを使った単方向関連" + +#. Tag: para +#: association_mapping.xml:96 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"結合テーブルを使った単方向一対多関連 はより好ましいで" +"す。 unique=\"true\" の指定により、多重度が多対多から一対" +"多 に変わったことに注意して下さい。" + +#. Tag: programlisting +#: association_mapping.xml:102 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:110 +#, no-c-format +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"結合テーブルの単方向多対一関連 は 関連が任意であるときに" +"非常に一般的なものです。" + +#. Tag: programlisting +#: association_mapping.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:116 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:123 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"結合テーブルの単方向一対一関連 は、本当に特殊ですが 不可" +"能ではありません。" + +#. Tag: programlisting +#: association_mapping.xml:128 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:129 association_mapping.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:134 association_mapping.xml:238 +#, no-c-format +msgid "many to many" +msgstr "多対多" + +#. Tag: para +#: association_mapping.xml:136 +#, no-c-format +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "最後に、単方向多対多関連 を示します。" + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:141 association_mapping.xml:246 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:148 +#, no-c-format +msgid "Bidirectional associations" +msgstr "双方向関連" + +#. Tag: title +#: association_mapping.xml:151 association_mapping.xml:211 +#, no-c-format +msgid "one to many / many to one" +msgstr "一対多/多対一" + +#. Tag: para +#: association_mapping.xml:153 +#, no-c-format +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"双方向多対一関連 は最も一般的な関連です。 (標準的な親子" +"関係です)" + +#. Tag: programlisting +#: association_mapping.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:163 +#, no-c-format +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"List (または他のインデックス付きのコレクション)を使うな" +"ら、 外部キーの key カラムを not null " +"に設定し、 コレクション側が各要素のインデックスをメンテナンスするように、 関" +"連を扱う必要があります (update=\"false\" かつ " +"insert=\"false\" と設定して、反対側を仮想的にinverseにしま" +"す):" + +#. Tag: programlisting +#: association_mapping.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:173 +#, no-c-format +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"もし外部キーカラムが NOT NULL であるならば、 コレクション" +"マッピングの <key> 要素を not-null=\"true" +"\" にすることは重要です。 入れ子になった <column> 要素だけではなく、 <key> 要素も " +"not-null=\"true\" と定義しないようにしてください。" + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "外部キーの双方向一対一関連 は非常に一般的です。" + +#. Tag: programlisting +#: association_mapping.xml:192 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:195 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "" +"主キーの双方向一対一関連 は特殊なIDジェネレータを使いま" +"す。" + +#. Tag: programlisting +#: association_mapping.xml:200 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:208 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "結合テーブルを使った双方向関連" + +#. Tag: para +#: association_mapping.xml:213 +#, no-c-format +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"結合テーブルの双方向一対多関連 です。 inverse=" +"\"true\" が関連端、コレクション、結合のいずれかに 設定できることに" +"注意してください。" + +#. Tag: programlisting +#: association_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:227 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"結合テーブルの双方向一対一関連 は非常に特殊ですが、可能" +"です。" + +#. Tag: programlisting +#: association_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:240 +#, no-c-format +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "最後に、双方向多対多関連 を示します。" + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:253 +#, no-c-format +msgid "More complex association mappings" +msgstr "より複雑な関連マッピング" + +#. Tag: para +#: association_mapping.xml:255 +#, no-c-format +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"より複雑な関連結合は 極めて 稀です。 マッピングドキュメ" +"ントにSQL文を埋め込むことで、 さらに複雑な状況を扱うことができます。 例えば、" +"accountNumber, effectiveEndDate, " +"effectiveStartDate カラムを持つaccount(口座)情報の履歴を" +"扱うテーブルは、 以下のようにマッピングします。" + +#. Tag: programlisting +#: association_mapping.xml:264 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:266 +#, no-c-format +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"そして、関連を 現時点の インスタンス " +"(effectiveEndDate がnullであるもの)にマッピングします。 " +"以下のようになります:" + +#. Tag: programlisting +#: association_mapping.xml:271 +#, no-c-format +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:273 +#, no-c-format +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"さらに複雑な例では、Employee(従業員) と " +"Organization(組織) 間の関連が Employment(雇" +"用) テーブルで保持される場合を想像してください。 このテーブルには" +"雇用データの履歴がすべて含まれます。 すると従業員の 最も最近の 雇用者を表す関連 (最も最近の startDate を持つも" +"の)は、このようにマッピングできます:" + +#. Tag: programlisting +#: association_mapping.xml:281 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:283 +#, no-c-format +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"この機能は非常に強力です。 しかしこのような場合、普通はHQLやcriteriaクエリを" +"使う方がより実践的です。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/basic_mapping.po b/documentation/envers/src/main/docbook/ja-JP/content/basic_mapping.po new file mode 100644 index 0000000000..685eea61b9 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/basic_mapping.po @@ -0,0 +1,5651 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:5 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "基本的なO/Rマッピング" + +#. Tag: title +#: basic_mapping.xml:8 +#, no-c-format +msgid "Mapping declaration" +msgstr "マッピング定義" + +#. Tag: para +#: basic_mapping.xml:10 +#, no-c-format +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"オブジェクト/リレーショナルマッピングは通常XMLドキュメントで定義します。 マッ" +"ピングドキュメントは、読みやすく手作業で編集しやすいようにデザインされていま" +"す。 マッピング言語はJava中心、つまりテーブル定義ではなく永続クラスの定義に基" +"づいて構築されています。" + +#. Tag: para +#: basic_mapping.xml:17 +#, no-c-format +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"多くのHibernateユーザはXMLマッピングの記述を手作業で行いますが、 XDoclet, " +"Middlegen, AndroMDAというようなマッピングドキュメントを生成するツールが いく" +"つか存在します。" + +#. Tag: para +#: basic_mapping.xml:23 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "サンプルのマッピングから始めましょう:" + +#. Tag: programlisting +#: basic_mapping.xml:27 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:29 +#, no-c-format +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"マッピングドキュメントの内容を説明します。。 ただし、ここではHibernateが実行" +"時に使うドキュメント要素と属性についてのみ説明します。 マッピングドキュメント" +"は、いくつかのオプション属性と要素を含んでいます(例えば not-null 属性)。 それらはスキーマエクスポートツールが出力するデータベースス" +"キーマに影響を与えるものです。" + +#. Tag: title +#: basic_mapping.xml:40 +#, no-c-format +msgid "Doctype" +msgstr "Doctype" + +#. Tag: para +#: basic_mapping.xml:42 +#, no-c-format +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"XMLマッピングでは、お見せしたようなドキュメント型を必ず定義すべきです。 実際" +"のDTDは、上記のURLの hibernate-x.x.x/src/org/hibernate " +"ディレクトリ、 または hibernate.jar 内にあります。 " +"Hibernateは常に、そのクラスパス内でDTDを探し始めます。 インターネットにある" +"DTDファイルを探そうとしたなら、 クラスパスの内容を見て、DTD宣言を確認してくだ" +"さい。" + +#. Tag: title +#: basic_mapping.xml:52 +#, no-c-format +msgid "EntityResolver" +msgstr "エンティティ・リゾルバ" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"前述したように、Hibernateはまずクラスパス内でDTDを解決しようとします。 " +"org.xml.sax.EntityResolver のカスタム実装を XMLファイルを" +"読み込むためのSAXReaderに登録することによって、DTDを解決します。 このカスタム" +"の EntityResolver は2つの異なるシステムID名前空間を認識し" +"ます。" + +#. Tag: para +#: basic_mapping.xml:61 +#, no-c-format +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"Hibernate名前空間 は、リゾルバが http://" +"hibernate.sourceforge.net/ で始まるシステムIDに到達したときに、 認" +"識されます。 そしてリゾルバは、Hibernateのクラスをロードしたクラスローダを用" +"いて、 これらのエンティティを解決しようとします。" + +#. Tag: para +#: basic_mapping.xml:70 +#, no-c-format +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"ユーザ名前空間 は、リゾルバが URLプロトコルの " +"classpath:// を使ったシステムIDに到達したときに、 認識され" +"ます。そしてリゾルバは、(1)カレントスレッドのコンテキストクラスローダー、 ま" +"たは(2)Hibernateのクラスをロードしたクラスローダを使って、 これらのエンティ" +"ティを解決しようとします。" + +#. Tag: para +#: basic_mapping.xml:79 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "下記は、ユーザ名前空間を使った例です:" + +#. Tag: programlisting +#: basic_mapping.xml:82 +#, no-c-format +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:83 +#, no-c-format +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"ここで types.xmlyour.domain パッ" +"ケージ内のリソースであり、 カスタム typedef を含むます。" + +#. Tag: title +#: basic_mapping.xml:91 +#, no-c-format +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#. Tag: para +#: basic_mapping.xml:93 +#, no-c-format +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"この要素にはいくつかオプション属性があります。schema 属性" +"と catalog 属性は、 このマッピングが参照するテーブルが、こ" +"の属性によって指定されたスキーマと(または)カタログに属することを指定します。 " +"この属性が指定されると、テーブル名は与えられたスキーマ名とカタログ名で修飾さ" +"れます。これらの属性が指定されていなければ、 テーブル名は修飾されません。" +"default-cascade 属性は、 cascade 属性を" +"指定していないプロパティやコレクションに、 どのカスケードスタイルを割り当てる" +"かを指定します。 auto-import 属性は、 クエリ言語内で修飾さ" +"れていないクラス名を、デフォルトで使えるようにします。" + +#. Tag: programlisting +#: basic_mapping.xml:114 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "schema(オプション):データベーススキーマの名前。" + +#. Tag: para +#: basic_mapping.xml:122 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "" +"catalog (オプション):データベースカタログの名前。" + +#. Tag: para +#: basic_mapping.xml:127 +#, no-c-format +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (オプション - デフォルトは " +"none): デフォルトのカスケードスタイル。" + +#. Tag: para +#: basic_mapping.xml:133 +#, no-c-format +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (オプション - デフォルトは " +"property ): Hibernateがプロパティにアクセスする際に採る" +"べき戦略。 PropertyAccessor を実装することでカスタマイズ可" +"能。" + +#. Tag: para +#: basic_mapping.xml:140 +#, no-c-format +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (オプション - デフォルトは true ): lazy 属性が指定されていないクラスやコレクショ" +"ンマッピングに対するデフォルト値。" + +#. Tag: para +#: basic_mapping.xml:147 +#, no-c-format +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import (オプション - デフォルトは true): クエリ言語内で、(このマッピング内のクラスの)修飾されていないク" +"ラス名を使えるかどうかを指定します。" + +#. Tag: para +#: basic_mapping.xml:154 +#, no-c-format +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (オプション): マッピングドキュメント内で修飾されて" +"いないクラス名に対して割り当てる、 パッケージの接頭辞(prefix)を指定します。" + +#. Tag: para +#: basic_mapping.xml:162 +#, no-c-format +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"(修飾されていない)同じ名前の永続クラスが2つあるなら、 auto-import=" +"\"false\" を設定すべきです。 2つのクラスに”インポートされた”同じ名" +"前を割り当てようとすると、Hibernateは例外を投げます。" + +#. Tag: para +#: basic_mapping.xml:168 +#, no-c-format +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"hibernate-mapping 要素は、最初の例で示したようにいくつかの" +"永続 <class> マッピングをネストできます。 しかし、1" +"つのマッピングファイルではただひとつの永続クラス(またはひとつのクラス階層)に" +"マッピングするようにし、 さらに永続スーパークラスの後で指定するべきでしょう" +"(いくつかのツールはこのようなマッピングファイルを想定しています)。 例えば次の" +"ようになります。: Cat.hbm.xml , Dog.hbm.xml , または継承を使うなら Animal.hbm.xml 。" + +#. Tag: title +#: basic_mapping.xml:181 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:183 +#, no-c-format +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "class 要素を使って、永続クラスを宣言できます。" + +#. Tag: programlisting +#: basic_mapping.xml:211 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:214 +#, no-c-format +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (オプション):永続クラス(またはインターフェイス)の" +"完全修飾Javaクラス名。 もしこの属性を指定しなければ、POJOではないエンティティ" +"に対するマッピングとして扱われます。" + +#. Tag: para +#: basic_mapping.xml:221 +#, no-c-format +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (オプション - デフォルトは修飾されていないクラス" +"名):データベーステーブルの名前" + +#. Tag: para +#: basic_mapping.xml:227 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (オプション - デフォルトはクラス名): " +"ポリモーフィックな振る舞いに使われる個々のサブクラスを識別するための値。 値" +"は nullnot null のいずれかを取りま" +"す。" + +#. Tag: para +#: basic_mapping.xml:234 +#, no-c-format +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (オプション、 デフォルトは true ): そのクラスのインスタンスが更新可能(または不可能)であることを指" +"定します。" + +#. Tag: para +#: basic_mapping.xml:240 basic_mapping.xml:2204 +#, fuzzy, no-c-format +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (オプション): ルートの <hibernate-" +"mapping> 要素で指定されたスキーマ名をオーバーライドします。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (オプション): ルートの <hibernate-" +"mapping> 要素で指定したスキーマ名を オーバーライドします。" + +#. Tag: para +#: basic_mapping.xml:246 basic_mapping.xml:2210 +#, fuzzy, no-c-format +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (オプション):ルートの <hibernate-" +"mapping> 要素で指定されたカタログ名をオーバーライドします。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (オプション): ルートの <hibernate-" +"mapping> 要素で指定したカタログ名を オーバーライドします。" + +#. Tag: para +#: basic_mapping.xml:252 +#, no-c-format +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (オプション):遅延初期化プロキシに使うインターフェ" +"イスを指定します。 永続化するクラス名そのものを指定することも可能です。" + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (オプション、 デフォルトは " +"false ): 値が変更されたカラムだけを含むSQLの " +"UPDATE 文を、実行時に生成することを指定します。" + +#. Tag: para +#: basic_mapping.xml:265 +#, no-c-format +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (オプション, デフォルトは false ): 値がnullではないカラムだけを含むSQLの INSERT 文を、実行時に生成することを指定します。" + +#. Tag: para +#: basic_mapping.xml:272 +#, no-c-format +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (オプション, デフォルトは " +"false): オブジェクトが変更されたのが確実でないならば、" +"HibernateがSQLの UPDATE決して実行しない ことを指定します。 ある特定の場合(実際的には、一時オブジェクトが " +"update() を使い、 新しいセッションと関連付けられた時だ" +"け)、UPDATE が実際に必要かどうかを決定するために、 " +"Hibernateが余分なSQLの SELECT 文を実行することを意味しま" +"す。" + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"(optional, デフォルトでは implicit ): implicit(暗黙)か" +"explicit(明示)の、 どちらのクエリポリモーフィズムを使うか決定します。" + +#. Tag: para +#: basic_mapping.xml:288 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (オプション): このクラスのオブジェクトを検索する" +"ときに使用する、任意のSQLの WHERE 条件を指定します。" + +#. Tag: para +#: basic_mapping.xml:294 +#, no-c-format +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (オプション):カスタム " +"ClassPersister を指定します。" + +#. Tag: para +#: basic_mapping.xml:299 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (オプション, デフォルトは 1 ): 識別子でこのクラスのインスタンスを復元するときの「バッチサイ" +"ズ」を指定します。" + +#. Tag: para +#: basic_mapping.xml:305 +#, no-c-format +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock (オプション,デフォルトは " +"version ): 楽観ロック戦略を決定します。" + +#. Tag: para +#: basic_mapping.xml:311 +#, no-c-format +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (オプション): lazy=\"false\" と" +"設定することで、 遅延フェッチができなくなります。" + +#. Tag: para +#: basic_mapping.xml:317 +#, no-c-format +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name (オプション、デフォルトはクラス名): " +"Hibernate3ではクラスが複数回マッピングでき(場合によっては違うテーブルに対し" +"ても)、 JavaレベルでMapやXMLで表現されるエンティティマッピングが可能です。 " +"これらの場合、エンティティに対して任意の名前を、明示的に付けなくてはなりませ" +"ん。 詳しくは を参照してください。" + +#. Tag: para +#: basic_mapping.xml:327 +#, no-c-format +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (オプション):自動的にスキーマを生成するために、 " +"複数行の check 制約を生成するSQL式。" + +#. Tag: para +#: basic_mapping.xml:333 +#, no-c-format +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (オプション):Hibernateは、それをサポートしている" +"データベースでROWIDと 呼ばれるものを使うことができます。 例えばOracleを使って" +"いるとき、このオプションに rowid を設定すれば、 Hiberante" +"はupdateを高速化するために rowid という特別なカラムを使う" +"ことができます。 ROWIDは詳細な実装であり、保存されたタプルの物理的な位置を表" +"しています。" + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (オプション):不変かつ読み取り専用であるエン" +"ティティを データベースの副問合せ(subselect)にマッピングします。 もし元の" +"テーブルの代わりにビューを持ちたければ有用ですが、 そうでないのなら有用ではあ" +"りません。より詳しい情報は下記を参照してください。" + +#. Tag: para +#: basic_mapping.xml:348 +#, no-c-format +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (オプション): <union-subclass>" +" 階層内の抽象スーパークラスにマークするために使います。" + +#. Tag: para +#: basic_mapping.xml:356 +#, no-c-format +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"永続クラスの名前にインターフェイスを指定してもまったく問題ありません。 そのと" +"きは <subclass> 要素を使って、 そのインターフェイス" +"を実装するクラスを定義してください。 static な内部クラス" +"でも永続化できます。 そのときは標準形式、例えば eg.Foo$Bar を使ってクラス名を指定してください。" + +#. Tag: para +#: basic_mapping.xml:363 +#, no-c-format +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"mutable=\"false\" 指定をした不変クラスは、 アプリケーショ" +"ンによる更新や削除が出来ないことがあります。 これにより、Hibernateがパフォー" +"マンスを少し改善します。" + +#. Tag: para +#: basic_mapping.xml:368 +#, no-c-format +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"オプションの proxy 属性により、クラスの永続インスタンスの" +"遅延初期化が可能になります。 Hibernateは最初に、指定したインターフェイスを実" +"装したCGLIBプロキシを返します。 実際の永続オブジェクトはプロキシのメソッドを" +"呼び出すときにロードします。 以下の「遅延初期化のためのプロキシ」を参照してく" +"ださい。" + +#. Tag: para +#: basic_mapping.xml:375 +#, no-c-format +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"暗黙的 ポリモーフィズムとは、次の二つを意味しています。 " +"一つはクラスのインスタンスが、スーパークラスや実装したインターフェイス、また" +"そのクラスを指定するクエリによって返されることで、 もう一つはそのクラスのサブ" +"クラスのインスタンスが、そのクラス自身を指定したクエリによって返されることで" +"す。 また、明示的 ポリモーフィズムとは、次の二つを意味し" +"ています。 一つはクラスのインスタンスが、そのクラスを明示的に指定したクエリに" +"よってのみ返されることで、 もう一つはクラスを指定したクエリが、<" +"class> 要素の中で <subclass> や " +"<joined-subclass> とマッピングされているサブクラスの" +"インスタンスだけを返すことです。 ほとんどの用途ではデフォルトの " +"polymorphism=\"implicit\" が適切です。 明示的なポリモー" +"フィズムは、2つの違ったクラスが同じテーブルにマッピングされているときに有用で" +"す (これによってテーブルカラムのサブセットを含む、「軽量な」クラスが可能にな" +"ります)。" + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"persister 属性を指定することで、クラスの永続化戦略をカスタ" +"マイズできます。 例えば org.hibernate.persister.EntityPersister 自身のサブクラスを指定したり、 また例えばストアドプロシージャコー" +"ル、フラットファイルへシリアライズ、 LDAPなどを通した永続性を実装する " +"org.hibernate.persister.ClassPersister インターフェイスの" +"完全に新しい実装を提供できます。簡単な例として org.hibernate.test." +"CustomPersister を見てください(これは Hashtable の「永続化」です)。" + +#. Tag: para +#: basic_mapping.xml:398 +#, no-c-format +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"dynamic-updatedynamic-insert の設定" +"はサブクラスに継承されません。 そのため <subclass> " +"や <joined-subclass> 要素を指定することも出来ます。 " +"これらの設定はパフォーマンスを向上させる事もありますが、落とすこともあります" +"ので、慎重に使用してください。" + +#. Tag: para +#: basic_mapping.xml:406 +#, no-c-format +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"select-before-update の使用は通常パフォーマンスを落としま" +"す。 もし Session へ分離インスタンスのグラフを再追加するな" +"ら、 データベース更新のトリガを不必要に呼び出すのを避けるという点で、非常に有" +"用です。" + +#. Tag: para +#: basic_mapping.xml:412 +#, no-c-format +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"dynamic-update を有効にすれば、楽観ロック戦略を選ぶことに" +"なります。" + +#. Tag: para +#: basic_mapping.xml:418 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "" +"version バージョン/タイムスタンプカラムをチェックします" + +#. Tag: para +#: basic_mapping.xml:423 +#, no-c-format +msgid "all check all columns" +msgstr "all すべてのカラムをチェックします。" + +#. Tag: para +#: basic_mapping.xml:428 +#, no-c-format +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "" +"dirty 変更したカラムをチェックし、同時更新できるようにしま" +"す。" + +#. Tag: para +#: basic_mapping.xml:433 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "none 楽観ロックを使用しません" + +#. Tag: para +#: basic_mapping.xml:438 +#, no-c-format +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"Hibernateで楽観的ロック戦略を使うなら、バージョン/タイムスタンプカラムを使う" +"ことを 非常に 強くお勧めします。 楽観的ロックはパフォー" +"マンスの観点からも最適であり、さらに分離インスタンスへの修正 (つまり " +"Session.marge() が使われるとき) を正確に扱うことのできる" +"唯一の戦略でもあります。" + +#. Tag: para +#: basic_mapping.xml:445 +#, no-c-format +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"Hibernateのマッピングにとってビューと普通のテーブルの間に違いはなく、 データ" +"ベースレベルでは透過的です (ただしビューを完全にはサポートしていないDBMSもあ" +"ります。 特に、更新のあるビューに対してはそうです)。 ビューを使いたくても、" +"データベースで作成できないことがあります (例えば、レガシースキーマの場" +"合)。 この場合には、不変かつ読み取り専用のエンティティに与えられたSQLの副問" +"合せ文をマップできます。" + +#. Tag: programlisting +#: basic_mapping.xml:453 +#, no-c-format +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:455 +#, no-c-format +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"テーブルをこのエンティティと同期するように定義してください。 オートフラッシュ" +"が確実に起こるように、また導出エンティティに対するクエリが古いデータを 返さな" +"いようにするためです。 <subselect> は属性とネストし" +"たマッピング属性のどちらでも利用できます。" + +#. Tag: title +#: basic_mapping.xml:465 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:467 +#, no-c-format +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"マップされたクラスはデータベーステーブルの主キーカラムを定義 しなけ" +"ればなりません 。 ほとんどのクラスにはインスタンスのユニークな識別" +"子を保持するJavaBeansスタイルのプロパティもあります。 <id> 要素は、そのプロパティから主キーカラムへのマッピングを定義します。" + +#. Tag: programlisting +#: basic_mapping.xml:482 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:485 +#, no-c-format +msgid "" +"name (optional): The name of the identifier property." +msgstr "name(オプション):識別子プロパティの名前。" + +#. Tag: para +#: basic_mapping.xml:490 +#, no-c-format +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "type(オプション):Hibernateの型を示す名前。" + +#. Tag: para +#: basic_mapping.xml:495 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "" +"column(オプション - デフォルトはプロパティ名): 主キーカ" +"ラムの名前。" + +#. Tag: para +#: basic_mapping.xml:501 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value(オプション - デフォルトの値はsensible): " +"インスタンスが新しくインスタンス化された (セーブされていない)ことを示す、識" +"別子プロパティの値。 以前のSessionでセーブまたはロードされた一時的インスタン" +"スと区別するために 使います。" + +#. Tag: para +#: basic_mapping.xml:509 basic_mapping.xml:1017 basic_mapping.xml:1156 +#: basic_mapping.xml:1238 basic_mapping.xml:1345 basic_mapping.xml:1534 +#: basic_mapping.xml:1708 basic_mapping.xml:1878 basic_mapping.xml:2457 +#, fuzzy, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access(オプション - デフォルトは property ): プロパティの値へアクセスするためにHibernateが使う戦略です。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (オプション - デフォルトは property ): Hibernateがプロパティの値にアクセスするために使用すべき戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access(オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access(オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access(オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access(オプション - デフォルトは property ): プロパティの値へのアクセスにHibernateが使う戦略。" + +#. Tag: para +#: basic_mapping.xml:517 +#, no-c-format +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "" +"name 属性がなければ、クラスには識別子プロパティがないもの" +"とみなされます。" + +#. Tag: para +#: basic_mapping.xml:522 +#, no-c-format +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "" +"unsaved-value 属性はHibernate3ではほとんどの場合、必要では" +"ありません。" + +#. Tag: para +#: basic_mapping.xml:526 +#, no-c-format +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"複合キーを持つレガシーデータにアクセスできるように、 <composite-" +"id> という代替のマッピング定義があります。 しかし他の用途への使" +"用は全くおすすめできません。" + +#. Tag: title +#: basic_mapping.xml:532 +#, no-c-format +msgid "Generator" +msgstr "ジェネレータ" + +#. Tag: para +#: basic_mapping.xml:534 +#, no-c-format +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"オプションの <generator> 子要素は、 永続クラスのイン" +"スタンスのユニークな識別子を生成するために使う、Javaクラスを指定します。 ジェ" +"ネレータインスタンスの設定、もしくは初期化にパラメータが必要であれば、" +"<param> 要素を使って渡すことができます。" + +#. Tag: programlisting +#: basic_mapping.xml:541 +#, no-c-format +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:543 +#, fuzzy, no-c-format +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"すべてのジェネレータは、インターフェイス org.hibernate.id." +"IdentifierGenerator を実装します。 これはとても単純なインターフェイ" +"スなので、特別な実装を独自に用意するアプリケーションもあるかもしれません。 し" +"かしHibernateは組み込みの実装をいくつも用意しています。 組み込みのジェネレー" +"タには以下のショートカット名があります: " + +#. Tag: literal +#: basic_mapping.xml:551 +#, no-c-format +msgid "increment" +msgstr "increment" + +#. Tag: para +#: basic_mapping.xml:553 +#, no-c-format +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"long , short , int " +"型の識別子を生成します。 これらは他のプロセスが同じテーブルにデータを挿入しな" +"いときだけユニークです。 クラスタ内では使わないでください 。" + +#. Tag: literal +#: basic_mapping.xml:562 +#, no-c-format +msgid "identity" +msgstr "identity" + +#. Tag: para +#: basic_mapping.xml:564 +#, no-c-format +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"DB2, MySQL, MS SQL Server, Sybase, HypersonicSQLの識別子カラムを サポートしま" +"す。 返される識別子の型は long , short , int のいずれかです。" + +#. Tag: literal +#: basic_mapping.xml:572 +#, no-c-format +msgid "sequence" +msgstr "sequence" + +#. Tag: para +#: basic_mapping.xml:574 +#, no-c-format +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"DB2, PostgreSQL, Oracle, SAP DB, McKoiのシーケンスや、Interbaseのジェネレータ" +"を使用します。 返される識別子の型は long , " +"short , int のいずれかです。" + +#. Tag: literal +#: basic_mapping.xml:582 +#, no-c-format +msgid "hilo" +msgstr "hilo" + +#. Tag: para +#: basic_mapping.xml:584 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"long , short , int " +"型の識別子を効率的に生成するhi/loアルゴリズムを使います。 hi値のソースとし" +"て、テーブルとカラムを与えます(デフォルトではそれぞれ " +"hibernate_unique_keynext_hi )。 hi/" +"loアルゴリズムは特定のデータベースに対してのみユニークな識別子を生成します。" + +#. Tag: literal +#: basic_mapping.xml:594 +#, no-c-format +msgid "seqhilo" +msgstr "seqhilo" + +#. Tag: para +#: basic_mapping.xml:596 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"long , short , int " +"型の識別子を効率的に生成するhi/loアルゴリズムを使います。 指定されたデータ" +"ベースシーケンスを与えます。" + +#. Tag: literal +#: basic_mapping.xml:604 +#, no-c-format +msgid "uuid" +msgstr "uuid" + +#. Tag: para +#: basic_mapping.xml:606 +#, no-c-format +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"(IPアドレスが使用される)ネットワーク内でユニークな文字列型の識別子を生成する" +"ために、 128ビットのUUIDアルゴリズムを使用します。UUIDは長さ32の16進数字の文" +"字列としてエンコードされます。" + +#. Tag: literal +#: basic_mapping.xml:614 +#, no-c-format +msgid "guid" +msgstr "guid" + +#. Tag: para +#: basic_mapping.xml:616 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "MS SQLサーバとMySQLでデータベースが生成するGUID文字列を使用します。" + +#. Tag: literal +#: basic_mapping.xml:622 +#, no-c-format +msgid "native" +msgstr "native" + +#. Tag: para +#: basic_mapping.xml:624 +#, no-c-format +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"使用するデータベースの性能により identity , " +"sequence , hilo のいずれかが選ばれま" +"す。" + +#. Tag: literal +#: basic_mapping.xml:632 +#, no-c-format +msgid "assigned" +msgstr "assigned" + +#. Tag: para +#: basic_mapping.xml:634 +#, no-c-format +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"save() が呼ばれる前に、 アプリケーションがオブジェクトに識" +"別子を代入できるようにします。 <generator> が指定さ" +"れていなければ、これがデフォルトの戦略になります。" + +#. Tag: literal +#: basic_mapping.xml:642 +#, no-c-format +msgid "select" +msgstr "select" + +#. Tag: para +#: basic_mapping.xml:644 +#, no-c-format +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "" +"あるユニークキーによる行の選択と主キーの値の復元により、 データベーストリガが" +"割り当てた主キーを取得します。" + +#. Tag: literal +#: basic_mapping.xml:651 +#, no-c-format +msgid "foreign" +msgstr "foreign" + +#. Tag: para +#: basic_mapping.xml:653 +#, no-c-format +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"他の関連オブジェクトの識別子を使います。 普通は、<one-to-one>" +" 主キー関連と組み合わせて使います。" + +#. Tag: literal +#: basic_mapping.xml:660 +#, no-c-format +msgid "sequence-identity" +msgstr "sequence-identity" + +#. Tag: para +#: basic_mapping.xml:662 +#, no-c-format +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." + +#. Tag: title +#: basic_mapping.xml:679 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "Hi/lo アルゴリズム" + +#. Tag: para +#: basic_mapping.xml:680 +#, no-c-format +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"hiloseqhilo ジェネレータは、 識別子" +"生成の代表的なアプローチであるhi/loアルゴリズムの2つの代替実装を提供します。 " +"1番目の実装は、次回に利用される\"hi\"値を保持する「特別な」データベーステーブ" +"ルを 必要とします。 2番目の実装は、Oracleスタイルのシーケンスを使います(サ" +"ポートされている場合)。" + +#. Tag: programlisting +#: basic_mapping.xml:687 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:691 +#, no-c-format +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"残念ながらHibernateへの独自の Connection を提供するときに" +"は、hilo を使えません。 HibernateがJTAでリストされている接" +"続を取得するためにアプリケーションサーバーのデータソースを使用しているときに" +"は、 hibernate.transaction.manager_lookup_class を適切に設" +"定しなければなりません。" + +#. Tag: title +#: basic_mapping.xml:700 +#, no-c-format +msgid "UUID algorithm" +msgstr "UUID アルゴリズム" + +#. Tag: para +#: basic_mapping.xml:701 +#, no-c-format +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"UUIDには以下のものが含まれます: IPアドレス、JVMのスタートアップタイム(4分の" +"1秒の正確さ)、 システム時間、(JVMに対してユニークな)カウンタ値。 Javaコー" +"ドからMACアドレスやメモリアドレスを取得することはできないので、 JNIが使えない" +"ときの最良の方法です。" + +#. Tag: title +#: basic_mapping.xml:710 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "識別子カラムとシーケンス" + +#. Tag: para +#: basic_mapping.xml:711 +#, no-c-format +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"識別子カラムをサポートしているデータベース(DB2, MySQL, Sybase, MS SQL)で" +"は、 identity キー生成を使えます。 シーケンスをサポートす" +"るデータベース(DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB)では、 " +"sequence スタイルのキー生成を使えます。 どちらの戦略も、新" +"しいオブジェクトを挿入するために、SQLクエリを2つ必要とします。" + +#. Tag: programlisting +#: basic_mapping.xml:719 +#, no-c-format +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:721 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:723 +#, no-c-format +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"クロスプラットフォームの開発では、native 戦略は " +"identity , sequence , hilo 戦略の中から1つを選択しますが、 これは使用しているデータベースの能力" +"に依存します。" + +#. Tag: title +#: basic_mapping.xml:732 +#, no-c-format +msgid "Assigned identifiers" +msgstr "識別子の割り当て" + +#. Tag: para +#: basic_mapping.xml:733 +#, no-c-format +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"アプリケーションに識別子を割り当てさせたいのであれば(Hibernateが生成するもの" +"ではなく)、 assigned ジェネレータを使うことができます。 " +"この特別なジェネレータは、すでにオブジェクトの識別子プロパティに代入された値" +"を 識別子に使います。このジェネレータは主キーが代理キーの代わりに自然キーであ" +"る場合に使用します。 <generator> 要素を指定しない場" +"合のデフォルトの動作になります。" + +#. Tag: para +#: basic_mapping.xml:742 +#, no-c-format +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"assigned ジェネレータを選択すると、 Hibernateは " +"unsaved-value=\"undefined\" を使用します。 そして、バー" +"ジョンやタイムスタンプのプロパティがない場合や Interceptor.isUnsaved" +"() を定義しなかった場合には、インスタンスが一時的(transient)なもの" +"であるのか、 またはセッションから分離(detached)したものかどうかを決めるため" +"に、データベースを調べます。" + +#. Tag: title +#: basic_mapping.xml:752 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "トリガにより割り当てられた主キー" + +#. Tag: para +#: basic_mapping.xml:753 +#, no-c-format +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "" +"レガシースキーマのためにのみ指定します(Hibernateはトリガを使ってDDLを生成しま" +"せん)。" + +#. Tag: programlisting +#: basic_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:759 +#, no-c-format +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"上の例の中で、クラスで自然キーとして定義された " +"socialSecurityNumber という名前のユニークな値のプロパティ" +"と、 値がトリガにより生成される person_id という名前の代理" +"キーがあります。" + +#. Tag: title +#: basic_mapping.xml:771 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "Enhanced identifier generators" + +#. Tag: para +#: basic_mapping.xml:773 +#, no-c-format +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#. Tag: para +#: basic_mapping.xml:781 +#, fuzzy, no-c-format +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters: " +"" + +#. Tag: para +#: basic_mapping.xml:795 +#, no-c-format +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#. Tag: para +#: basic_mapping.xml:801 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#. Tag: para +#: basic_mapping.xml:808 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#. Tag: para +#: basic_mapping.xml:815 +#, no-c-format +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#. Tag: para +#: basic_mapping.xml:822 +#, no-c-format +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#. Tag: para +#: basic_mapping.xml:829 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"cascade(オプション - デフォルトは none ): カスケードのスタイル。" + +#. Tag: para +#: basic_mapping.xml:836 +#, fuzzy, no-c-format +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters: " + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#. Tag: para +#: basic_mapping.xml:852 +#, no-c-format +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#. Tag: para +#: basic_mapping.xml:858 +#, no-c-format +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#. Tag: para +#: basic_mapping.xml:865 +#, no-c-format +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#. Tag: para +#: basic_mapping.xml:872 +#, no-c-format +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#. Tag: para +#: basic_mapping.xml:878 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#. Tag: para +#: basic_mapping.xml:884 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#. Tag: para +#: basic_mapping.xml:890 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"cascade(オプション - デフォルトは none ): カスケードのスタイル。" + +#. Tag: title +#: basic_mapping.xml:900 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "Identifier generator optimization" + +#. Tag: para +#: basic_mapping.xml:901 +#, fuzzy, no-c-format +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion. " + +#. Tag: para +#: basic_mapping.xml:909 +#, no-c-format +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#. Tag: para +#: basic_mapping.xml:915 +#, no-c-format +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#. Tag: para +#: basic_mapping.xml:924 +#, no-c-format +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#. Tag: title +#: basic_mapping.xml:937 +#, no-c-format +msgid "composite-id" +msgstr "composite-id" + +#. Tag: programlisting +#: basic_mapping.xml:939 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:941 +#, no-c-format +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"複合キーのあるテーブルに対し、 識別子プロパティとしてクラスの複数のプロパティ" +"をマッピングすることができます。 <composite-id> 要素" +"は、子要素として <key-property> プロパティマッピング" +"と <key-many-to-one> マッピングを受け入れます。" + +#. Tag: programlisting +#: basic_mapping.xml:948 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:950 +#, no-c-format +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"複合識別子の等価性を実装するためには、永続クラスが equals()hashCode() をオーバーライド しなけれ" +"ばなりません 。 また Serializable も実装しなけ" +"ればいけません。" + +#. Tag: para +#: basic_mapping.xml:956 +#, no-c-format +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"残念ながら複合識別子のためのこの方法は、 永続オブジェクトが自身の識別子である" +"ことを意味しています。 オブジェクト自身を識別子とする以上の便利な「扱い方」は" +"ありません。 複合キーに関連した永続状態を load() 出来るよ" +"うになる前に、 永続クラス自身をインスタンス化し、識別子プロパティを設定しなけ" +"ればなりません。 組み込みの 複合識別子と呼ばれるこのア" +"プローチは、 本格的なアプリケーションには向いていません。" + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"2つ目の方法は マップされた 複合識別子と呼ばれるもの" +"で、 <composite-id>エレメント内で指定した識別プロパ" +"ティが 永続クラスと分離した識別子クラスの両方に重複して存在します。" + +#. Tag: programlisting +#: basic_mapping.xml:971 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:973 +#, no-c-format +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"この例では、複合識別子クラス( MedicareId )とエンティティ" +"クラス自身の両方が、 medicareNumber と " +"dependent という名前のプロパティを持ちます。 識別子クラス" +"は、equals()hashCode() をオーバライ" +"ドし、 Serializable を実装しなくてはなりません。 この方法" +"には、明らかにコードが重複するという不都合があります。" + +#. Tag: para +#: basic_mapping.xml:982 +#, no-c-format +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "次の属性はマッピングした複合識別子を指定するために使用します。" + +#. Tag: para +#: basic_mapping.xml:988 +#, no-c-format +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped (オプション、デフォルトは false ): マッピングした複合識別子が使用されることと、包含されたプロパティ" +"のマッピングが、 エンティティクラスと複合識別子クラスの両方を参照することを示" +"します。" + +#. Tag: para +#: basic_mapping.xml:996 +#, no-c-format +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (オプション,ただしマッピングした複合識別子には必" +"須): 複合識別子として使用するクラス。" + +#. Tag: para +#: basic_mapping.xml:1003 +#, no-c-format +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"3つ目のさらに便利な方法は、複合識別子を内の コンポーネントクラスとして実装することです。 下で記述している属性" +"は、この代替方法にのみ適用されます。" + +#. Tag: para +#: basic_mapping.xml:1011 +#, no-c-format +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (オプション, このアプローチでは必須): 複合識別子を保" +"持するコンポーネントタイプのプロパティ(9章を参照してください)." + +#. Tag: para +#: basic_mapping.xml:1023 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (オプション - デフォルトはリフレクションにより決定" +"されるプロパティの型): 複合識別子として使われるコンポーネントのクラス(次の" +"節を見てください)。" + +#. Tag: para +#: basic_mapping.xml:1030 +#, no-c-format +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"この3つ目の方法は 識別子コンポーネント と呼び、 ほとん" +"どすべてのアプリケーションに対して推奨する方法です。" + +#. Tag: title +#: basic_mapping.xml:1038 +#, no-c-format +msgid "discriminator" +msgstr "discriminator" + +#. Tag: para +#: basic_mapping.xml:1040 +#, no-c-format +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"<discriminator> 要素は、 table-per-class-hierarchy" +"マッピング戦略を使うポリモーフィックな永続化に必要であり、 テーブルの識別カラ" +"ムを定義します。 識別カラムは、ある行に対して永続層がどのサブクラスをインスタ" +"ンス化するかを 伝えるマーカー値を含んでいます。 以下のような型に制限されま" +"す: string , character , " +"integer, byte , short , boolean , yes_no , " +"true_false." + +#. Tag: programlisting +#: basic_mapping.xml:1058 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1061 +#, no-c-format +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column(オプション - デフォルトは class ): 識別カラムの名前。" + +#. Tag: para +#: basic_mapping.xml:1067 +#, no-c-format +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (オプション - デフォルトは string ):Hibernateの型を示す名前。" + +#. Tag: para +#: basic_mapping.xml:1073 +#, no-c-format +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force (オプション - デフォルトは false ): ルートクラスのすべてのインスタンスを検索する場合であっても、 " +"Hibernateが使用できる識別カラムの指定を「強制」します。" + +#. Tag: para +#: basic_mapping.xml:1080 +#, no-c-format +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (オプション - デフォルトは true ): もし識別カラムがマッピングする複合識別子の一部ならば、" +"false と設定してください。 (HibernateにSQLの " +"INSERT には含まれないことを知らせる)" + +#. Tag: para +#: basic_mapping.xml:1088 +#, no-c-format +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (オプション)型が評価されるときに実行される任意の" +"SQL式。 コンテンツベースの識別を可能にします。" + +#. Tag: para +#: basic_mapping.xml:1096 +#, no-c-format +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"識別カラムの実際の値は、 <class><" +"subclass> 要素の discriminator-value 属性で指" +"定されます。" + +#. Tag: para +#: basic_mapping.xml:1102 +#, no-c-format +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"永続クラスへマッピングされない「余分な」識別値を持つ行が テーブルにあれば、" +"(そのときに限り)force 属性は有効です。 ただし、普通はそ" +"ういうことはありません。" + +#. Tag: para +#: basic_mapping.xml:1108 +#, no-c-format +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"formula 属性を使うと、行の型を評価するために任意のSQL式を" +"宣言できます。" + +#. Tag: programlisting +#: basic_mapping.xml:1113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1118 +#, no-c-format +msgid "version (optional)" +msgstr "version(オプション)" + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"<version> 要素はオプションであり、 テーブルがバー" +"ジョンデータを含むことを示します。 これは ロングトランザクション を使うつもりなら、特に役立ちます(以下を見てください)。" + +#. Tag: programlisting +#: basic_mapping.xml:1136 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1139 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column(オプション - デフォルトはプロパティ名): バージョ" +"ン番号を保持するカラムの名前。" + +#. Tag: para +#: basic_mapping.xml:1145 +#, no-c-format +msgid "" +"name: The name of a property of the persistent class." +msgstr "name :永続クラスのプロパティの名前。" + +#. Tag: para +#: basic_mapping.xml:1150 +#, no-c-format +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (オプション - デフォルトは integer ):バージョン番号の型。" + +#. Tag: para +#: basic_mapping.xml:1162 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (オプション - デフォルトは " +"undefined ): インスタンスが新しくインスタンス化されたこ" +"とを示す (セーブされていないことを示す)バージョンプロパティの値。 以前の" +"Sessionでセーブまたはロードされた一時的なインスタンスと区別するために 使いま" +"す。 ( undefined は識別子プロパティの値が使われることを指" +"定します。)" + +#. Tag: para +#: basic_mapping.xml:1171 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"generated (オプション - デフォルトは never ): このバージョンのプロパティの値が、データベースによって生成された" +"ことを指定します。 生成プロパティ " +"の議論を見てください。" + +#. Tag: para +#: basic_mapping.xml:1178 +#, no-c-format +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"insert (オプション - デフォルトは true ): SQLのinsert文にバージョン・カラムを含めるべきかどうかを指定しま" +"す。 もしデータベース・カラムのデフォルト値が 0 と定義され" +"るときには、 false に設定すると良いでしょう。" + +#. Tag: para +#: basic_mapping.xml:1188 +#, no-c-format +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"バージョン番号は Hibernateの long , integer , short , timestamp , " +"calendar 型のいずれかです。" + +#. Tag: para +#: basic_mapping.xml:1193 +#, no-c-format +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"バージョンやタイムスタンプのプロパティは、分離されたインスタンスに対してnull" +"であってはなりません。 そのためどのような unsaved-value 戦" +"略が指定されても、 Hibernateはnullのバージョンやタイムスタンプを持ったすべて" +"のインスタンスを、 一時的なものであると判断します。 nullを許容する" +"バージョンやタイムスタンプのプロパティを定義することは、 過渡的に一時オブジェ" +"クトとすることを防ぐ簡単な方法です。 特に識別子の割り当てや複合キーを使用して" +"いるときには特に有用です。" + +#. Tag: title +#: basic_mapping.xml:1204 +#, no-c-format +msgid "timestamp (optional)" +msgstr "timestamp(オプション)" + +#. Tag: para +#: basic_mapping.xml:1206 +#, no-c-format +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"オプションの <timestamp> 要素は、 テーブルがタイムス" +"タンプデータを含むことを示します。 これはバージョン付けの代わりの方法として用" +"意されています。 タイムスタンプはもともと楽観的ロックにおける安全性の低い実装" +"です。 しかしアプリケーションは異なる用途で使うこともあるかもしれません。" + +#. Tag: programlisting +#: basic_mapping.xml:1222 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1225 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "" +"column(オプション - デフォルトはプロパティ名): タイムス" +"タンプを保持するカラムの名前。" + +#. Tag: para +#: basic_mapping.xml:1231 +#, no-c-format +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name : 永続クラスであるJava の Date型 " +"または Timestamp 型 の、JavaBeansスタイルプロパティの名" +"前。" + +#. Tag: para +#: basic_mapping.xml:1244 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (オプション - デフォルトは null ): インスタンスが新しくインスタンス化された (セーブされていない)" +"ことを示すバージョンプロパティの値。 以前のSessionでセーブまたはロードされた" +"一時的なインスタンスと 区別するために使われます。 ( undefined と指定すると、 識別子プロパティの値が使われます。)" + +#. Tag: para +#: basic_mapping.xml:1253 +#, no-c-format +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"source (オプション - デフォルトは vm ): Hibernateはどこからタイムスタンプの値を取得するべきでしょうか? " +"データベースからでしょうか、現在のJVMからでしょうか? データベースによるタイ" +"ムスタンプは、Hibernateが\"次の値\"を決定するために データベースをヒットしな" +"ければならないため、オーバヘッドを招きます。 しかしクラスタ環境ではJVMから取" +"得するより安全です。 データベースの現在のタイムスタンプの取得をサポートする " +"すべての データベース方言 が知られているわけではないこと" +"に 注意してください。また一方で、精密さを欠くために、 ロックで使用するには安" +"全でないものもあります(例えばOracle 8)。" + +#. Tag: para +#: basic_mapping.xml:1265 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"generated (オプション - デフォルトは never ): このタイムスタンプ・プロパティの値が、データベースによって生成さ" +"れることを指定します。 生成プロパティ を参照してください。" + +#. Tag: para +#: basic_mapping.xml:1274 +#, no-c-format +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"<timestamp><version type=\"timestamp" +"\"> と等価であることに注意してください。 <timestamp " +"source=\"db\"><version type=\"dbtimestamp\">" +" と等価であることに注意してください。" + +#. Tag: title +#: basic_mapping.xml:1284 +#, no-c-format +msgid "property" +msgstr "property" + +#. Tag: para +#: basic_mapping.xml:1286 +#, no-c-format +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"<property> 要素は、クラスの永続的なJavaBeanスタイル" +"のプロパティを定義します。" + +#. Tag: programlisting +#: basic_mapping.xml:1308 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1311 +#, no-c-format +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "name:小文字で始まるプロパティ名。" + +#. Tag: para +#: basic_mapping.xml:1317 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column(オプション - デフォルトはプロパティ名): マッピン" +"グされたデータベーステーブルのカラムの名前。 ネストした <" +"column> 要素でも指定できます。" + +#. Tag: para +#: basic_mapping.xml:1324 +#, no-c-format +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "type(オプション):Hibernateの型を示す名前。" + +#. Tag: para +#: basic_mapping.xml:1329 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (オプション - デフォルトは true ): マッピングされたカラムがSQLの UPDATE や " +"INSERT に含まれることを指定します。 両方とも " +"false に設定すると、 同じカラムにマッピングされた他のプロ" +"パティやトリガや 他のアプリケーションによって初期化された純粋な「導出」プロパ" +"ティが可能になります。" + +#. Tag: para +#: basic_mapping.xml:1338 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula(オプション): 計算 プロパ" +"ティのための値を定義するSQL式。 計算されたプロパティは自身のカラムへのマッピ" +"ングがありません。" + +#. Tag: para +#: basic_mapping.xml:1351 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (optional - デフォルトは false ): " +"インスタンス変数に最初にアクセスしたときに、プロパティを遅延して取得するよう" +"指定します。 (バイトコード実装を作成する時間が必要になります)。" + +#. Tag: para +#: basic_mapping.xml:1358 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (オプション):カラムにユニーク制約をつけるDDLの生成" +"を可能にします。 また、property-ref のターゲットとすること" +"もできます。" + +#. Tag: para +#: basic_mapping.xml:1365 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (オプション):カラムにnull値を許可するDDLの生成を" +"可能にします。" + +#. Tag: para +#: basic_mapping.xml:1371 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (オプション - デフォルトは true ): このプロパティの更新に楽観ロックの取得を要求するかどうかを指定し" +"ます。 言い換えれば、このプロパティがダーティであるときにバージョンを増やすべ" +"きかを決定します。" + +#. Tag: para +#: basic_mapping.xml:1379 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"generated (オプション - デフォルトは never ): プロパティの値が、データベースによって生成されたことを指定しま" +"す。 生成プロパティ を参照してくだ" +"さい。" + +#. Tag: para +#: basic_mapping.xml:1388 +#, no-c-format +msgid "typename could be:" +msgstr "typename には以下の値が可能です:" + +#. Tag: para +#: basic_mapping.xml:1394 +#, no-c-format +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"Hibernateの基本型の名前(例 integer, string, character, date, " +"timestamp, float, binary, serializable, object, blob )。" + +#. Tag: para +#: basic_mapping.xml:1400 +#, no-c-format +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"デフォルトの基本型のJavaクラス名 (例 int, float, char, java.lang." +"String, java.util.Date, java.lang.Integer, java.sql.Clob )。" + +#. Tag: para +#: basic_mapping.xml:1406 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "シリアライズ可能なJavaクラスの名前。" + +#. Tag: para +#: basic_mapping.xml:1411 +#, no-c-format +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"カスタム型のクラス名(例 com.illflow.type.MyCustomType )。" + +#. Tag: para +#: basic_mapping.xml:1417 +#, no-c-format +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"型を指定しなければ、Hibernateは正しいHibernateの型を推測するために、 指定され" +"たプロパティに対してリフレクションを使います。 Hibernateはルール2, 3, 4をその" +"順序に使い、 getterプロパティの返り値のクラスの名前を解釈しようとします。 し" +"かしこれで常に十分であるとは限りません。 場合によっては、type 属性が必要な場合があります。 (例えば Hibernate.DATEHibernate.TIMESTAMP を区別するため、 またはカ" +"スタム型を指定するためなどです。)" + +#. Tag: para +#: basic_mapping.xml:1427 +#, no-c-format +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"access 属性で、 実行時にHibernateがどのようにプロパティに" +"アクセスするかを制御できます。 デフォルトではHibernateはプロパティのget/setの" +"ペアをコールします。 access=\"field\" と指定すれば、 " +"Hibernateはリフレクションを使いget/setのペアを介さずに、直接フィールドにアク" +"セスします。 インターフェイス org.hibernate.property." +"PropertyAccessor を 実装するクラスを指定することで、プロパティへの" +"アクセスに独自の戦略を指定することができます。" + +#. Tag: para +#: basic_mapping.xml:1436 +#, no-c-format +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"特に強力な特徴は生成プロパティです。 これらのプロパティは当然読み取り専用であ" +"り、プロパティの値はロード時に計算されます。 計算をSQL式として宣言すると、こ" +"のプロパティは インスタンスをロードするSQLクエリの SELECT " +"句のサブクエリに変換されます。" + +#. Tag: programlisting +#: basic_mapping.xml:1443 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1445 +#, no-c-format +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"特定のカラム(例では customerId がそれにあたります)のエイリ" +"アスを宣言することなく、 エンティティ自身のテーブルを参照できることに注意して" +"ください。 もし属性を使用したくなければ、 ネストした <formula>" +" マッピング要素を使えることにも注意してください。" + +#. Tag: title +#: basic_mapping.xml:1455 +#, no-c-format +msgid "many-to-one" +msgstr "many-to-one" + +#. Tag: para +#: basic_mapping.xml:1457 +#, no-c-format +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"他の永続クラスへの通常の関連は many-to-one 要素を使って定" +"義します。 リレーショナルモデルは多対一関連です。 つまりあるテーブルの外部" +"キーは、ターゲットとなるテーブルの主キーカラムを参照しています。" + +#. Tag: programlisting +#: basic_mapping.xml:1485 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1488 basic_mapping.xml:1669 basic_mapping.xml:1855 +#, no-c-format +msgid "name: The name of the property." +msgstr "name:プロパティ名。" + +#. Tag: para +#: basic_mapping.xml:1493 basic_mapping.xml:2284 +#, fuzzy, no-c-format +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (オプション):外部キーカラムの名前。 ネストした " +"<column> 要素でも指定できます。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (オプション):外部キーカラムの名前。 ネストした " +"<column> カラムによっても指定されます。" + +#. Tag: para +#: basic_mapping.xml:1500 basic_mapping.xml:1674 +#, fuzzy, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class(オプション - デフォルトは、 リフレクションにより決" +"定されるプロパティの型):関連クラスの名前。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class(オプション - デフォルトはリフレクションにより決定さ" +"れるプロパティの型): 関連クラスの名前。" + +#. Tag: para +#: basic_mapping.xml:1506 +#, no-c-format +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade(オプション): どの操作を、親オブジェクトから関連" +"オブジェクトへとカスケードさせるかを指定します。" + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1695 +#, fuzzy, no-c-format +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (オプション - デフォルトは select ): 外部結合フェッチか順次選択フェッチ(sequential select fetch)を選" +"択します。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch(オプション - デフォルトは select ): 外部結合フェッチと順次選択フェッチ(sequential select fetch)の" +"どちらかを選択します。" + +#. Tag: para +#: basic_mapping.xml:1518 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert(オプション - デフォルトは true ): マッピングされたカラムがSQLの UPDATE または " +"INSERT 文に含まれることを指定します。 両方とも " +"false に設定すると、 その値が同じカラムにマッピングされた" +"他のプロパティやトリガや 他のアプリケーションによって初期化された純粋な「導" +"出」プロパティが可能になります。" + +#. Tag: para +#: basic_mapping.xml:1527 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref(オプション): この外部キーに結合された関連" +"クラスのプロパティ名。 何も指定しなければ、関連クラスの主キーが使われます。" + +#. Tag: para +#: basic_mapping.xml:1540 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique(オプション): 外部キーカラムに対してユニーク制約" +"をつけたDDLの生成を可能にします。 また、property-ref の" +"ターゲットにすることもできます。 これにより関連の多重度を効果的に一対一にしま" +"す。" + +#. Tag: para +#: basic_mapping.xml:1548 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (オプション):外部キーカラムに対して、 null値を許" +"可するDDLの生成を可能にします" + +#. Tag: para +#: basic_mapping.xml:1554 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (オプション - デフォルトは true ): このプロパティの更新に楽観的ロックの取得を要求するかどうかを指定" +"します。 言い換えれば、このプロパティがダーティであるときにバージョンを増やす" +"べきかを決定します。" + +#. Tag: para +#: basic_mapping.xml:1562 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy (オプション - デフォルトは proxy ): デフォルトでは、多重度1の関連がプロキシとなります。 " +"lazy=\"no-proxy\" は、インスタンス変数に最初にアクセスした" +"ときに、 プロパティを遅延フェッチするよう指定します (ビルド時にバイトコード実" +"装が必要になります)。 lazy=\"false\" は関連を常に即時に" +"フェッチするよう指定します。" + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (オプション - デフォルトは exception ): 欠落した行を参照する外部キーをどのように扱うかを指定します。 " +"ignore は欠落した行をnull関連として扱います。" + +#. Tag: para +#: basic_mapping.xml:1579 basic_mapping.xml:1733 +#, fuzzy, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (オプション):関連したクラスのエンティティ" +"名。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (オプション):関連クラスのエンティティ名" + +#. Tag: para +#: basic_mapping.xml:1585 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (オプション): 計算された 外" +"部キーに対して値を定義するSQL式" + +#. Tag: para +#: basic_mapping.xml:1592 +#, no-c-format +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"cascade 属性に none 以外の意味のある値" +"をを設定すると、 関連オブジェクトへある操作が伝播することになります。 意味の" +"ある値とはHibernateの基本操作の名前のことで、 delete-orphanall 、操作名をカンマで区切った組み合わせ (例" +"えば cascade=\"persist,merge,evict\"cascade=" +"\"all,delete-orphan\")、 またそれだけでなく persist, " +"merge, delete, save-update, evict, replicate, lock, refresh のこと" +"を指します。 詳しい説明は を見てく" +"ださい。 値が一つの関連(many-to-oneとone-to-one関連)は、 単独での削除" +"(orphan delete)をサポートしていないことに注意してください。" + +#. Tag: para +#: basic_mapping.xml:1605 +#, no-c-format +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "" +"典型的な many-to-one 宣言は次のようにシンプルです。:" + +#. Tag: programlisting +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1611 +#, no-c-format +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"property-ref 属性は、外部キーが関連付けられたテーブルの、" +"主キーでない ユニークキーを参照しているレガシーデータをマップするためにだけ使" +"うべきです。 これは醜いリレーショナルモデルです。 例えば Product クラスが、 主キーでないユニークなシリアルナンバーを持っていると仮定" +"してみてください。 ( unique 属性はSchemaExportツールを" +"使ったHibernateのDDL生成を制御します。)" + +#. Tag: programlisting +#: basic_mapping.xml:1620 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1622 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "" +"以下のように OrderItem に対してマッピングを使えます:" + +#. Tag: programlisting +#: basic_mapping.xml:1626 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1628 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "しかし、これは決して推奨できません。" + +#. Tag: para +#: basic_mapping.xml:1632 +#, no-c-format +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"参照したユニークキーが、関連するエンティティの多数のプロパティから構成される" +"場合、 指定した <properties> 要素内で、参照するプロ" +"パティをマッピングするべきです。" + +#. Tag: para +#: basic_mapping.xml:1637 +#, no-c-format +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "" +"もし参照したユニークキーがコンポーネントのプロパティである場合は、プロパティ" +"のパスを指定できます。" + +#. Tag: programlisting +#: basic_mapping.xml:1641 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1646 +#, no-c-format +msgid "one-to-one" +msgstr "one-to-one" + +#. Tag: para +#: basic_mapping.xml:1648 +#, no-c-format +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "" +"他の永続クラスへの一対一関連は、one-to-one 要素で定義しま" +"す。" + +#. Tag: programlisting +#: basic_mapping.xml:1666 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1680 +#, no-c-format +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade(オプション): 親オブジェクトから関連オブジェクト" +"へ、どの操作をカスケードするかを指定します。" + +#. Tag: para +#: basic_mapping.xml:1686 +#, no-c-format +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"constrained(オプション): マッピングされたテーブルの主" +"キーに対する外部キー制約が、 関連クラスのテーブルを参照することを指定しま" +"す。 このオプションは save()delete() がカスケードされる順序に影響し、 そして関連がプロキシされるかどうか" +"にも影響します (そしてスキーマエクスポートツールにも使われます)。" + +#. Tag: para +#: basic_mapping.xml:1701 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"property-ref(オプション): このクラスの主キーに結合され" +"た関連クラスのプロパティ名。 指定されなければ、関連クラスの主キーが使われま" +"す。" + +#. Tag: para +#: basic_mapping.xml:1714 +#, no-c-format +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"formula (オプション): ほとんどすべての一対一関連はオーナー" +"のエンティティの主キーへとマッピングされます。 これ以外の稀な場合は、 他のカ" +"ラムや、複数のカラム、SQL構文を使った結合するための式を指定できます。 (例は " +"org.hibernate.test.onetooneformula を参照してください。)" + +#. Tag: para +#: basic_mapping.xml:1722 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"lazy (オプション - デフォルトは proxy ): デフォルトでは、多重度1の関連がプロキシとなります。 " +"lazy=\"no-proxy\" は、インスタンス変数に最初にアクセスした" +"ときに、 プロパティを遅延フェッチするよう指定します (ビルド時にバイトコード実" +"装が必要になります)。 lazy=\"false\" は関連を常に即時に" +"フェッチするよう指定します。 もし constrained=\"false\" ならば、 プロキシは使用不可能となり、関連を即時にフェッチすることに" +"注意してください!" + +#. Tag: para +#: basic_mapping.xml:1740 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "一対一関連には2種類あります:" + +#. Tag: para +#: basic_mapping.xml:1744 +#, no-c-format +msgid "primary key associations" +msgstr "主キー関連" + +#. Tag: para +#: basic_mapping.xml:1747 +#, no-c-format +msgid "unique foreign key associations" +msgstr "ユニーク外部キー関連" + +#. Tag: para +#: basic_mapping.xml:1752 +#, no-c-format +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"主キー関連には、特別なテーブルカラムは必要ありません。 もし2つの行が関連によ" +"り関係していれば、2つのテーブルは同じ主キーの値を共有します。 そのため2つのオ" +"ブジェクトを主キー関連によって関連付けたいのであれば、 確実に同じ識別子の値を" +"代入しなければなりません。" + +#. Tag: para +#: basic_mapping.xml:1759 +#, no-c-format +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"主キー関連を行うためには、以下のマッピングを Employee と " +"Person のそれぞれに追加してください。" + +#. Tag: programlisting +#: basic_mapping.xml:1764 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1765 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1767 +#, no-c-format +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"ここで、PERSONとEMPLOYEEテーブルの関係する行の主キーが同じであることを確実に" +"しなければいけません。 ここでは、foreign という特殊な" +"Hibernate識別子生成戦略を使います:" + +#. Tag: programlisting +#: basic_mapping.xml:1773 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1775 +#, no-c-format +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"Employee インスタンスが、Person の " +"employee プロパティで参照されるように、 新しくセーブされ" +"た Person のインスタンスには同じ主キーの値が代入されま" +"す。 新しくセーブする Person インスタンスは、 その " +"Personemployee プロパティが参照す" +"る Employee インスタンスとして同じ主キーが割り当てられま" +"す。" + +#. Tag: para +#: basic_mapping.xml:1781 +#, no-c-format +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"もう1つの方法として、Employee から Person への ユニーク制約を使った外部キー関連は以下のように表現されます:" + +#. Tag: programlisting +#: basic_mapping.xml:1786 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1788 +#, no-c-format +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "" +"そしてこの関連は、 以下の記述を Person のマッピングに追加" +"することで双方向にすることができます:" + +#. Tag: programlisting +#: basic_mapping.xml:1793 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1798 +#, no-c-format +msgid "natural-id" +msgstr "natural-id" + +#. Tag: programlisting +#: basic_mapping.xml:1800 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1802 +#, no-c-format +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"主キーとして代理キーの使用を推奨しますが、 すべてのエンティティに対して自然" +"キーを識別するようにすべきです。 自然キーはユニークかつ非nullな一つのプロパ" +"ティ、またはプロパティの連結です。 不変であればさらに良いです。 <" +"natural-id> 要素内で自然キーのプロパティをマッピングします。 " +"Hibernateは必然的にユニークかつnull値を許可する制約を生成し、 こうしてマッピ" +"ングはより自己記述的になります。" + +#. Tag: para +#: basic_mapping.xml:1811 +#, no-c-format +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"エンティティの自然キープロパティの比較には、 equals() と " +"hashCode() の実装を強くお勧めします。" + +#. Tag: para +#: basic_mapping.xml:1816 +#, no-c-format +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "" +"このマッピングは自然主キーを使ったエンティティでの使用を意図していません。" + +#. Tag: para +#: basic_mapping.xml:1822 +#, no-c-format +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "" +"mutable (オプション, デフォルトは false ): デフォルトでは、自然識別子プロパティは不変(定数)と想定されていま" +"す。" + +#. Tag: title +#: basic_mapping.xml:1832 +#, no-c-format +msgid "component, dynamic-component" +msgstr "component, dynamic-component" + +#. Tag: para +#: basic_mapping.xml:1834 +#, no-c-format +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "" +"<component> 要素は、 子オブジェクトのプロパティを親" +"クラスのテーブルのカラムへマッピングします。 コンポーネントは自分のプロパ" +"ティ、コンポーネント、コレクションの順に定義できます。 以下の「コンポーネン" +"ト」を見てください。" + +#. Tag: programlisting +#: basic_mapping.xml:1852 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1860 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"class (オプション - デフォルトはリフレクションにより決定" +"されるプロパティの型): コンポーネント(子)クラスの名前。" + +#. Tag: para +#: basic_mapping.xml:1866 basic_mapping.xml:1955 +#, fuzzy, no-c-format +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert :マッピングされたカラムがSQLの INSERT に現れるようにするどうかを指定します。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert:マッピングされたカラムがSQLの INSERT に現れるようにするかどうかを指定します。" + +#. Tag: para +#: basic_mapping.xml:1872 basic_mapping.xml:1961 +#, fuzzy, no-c-format +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update : マッピングされたカラムがSQL の UPDATE に現れるようにするかどうかを指定します。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update:マッピングされたカラムがSQLの UPDATE に現れるようにするかどうかを指定します。" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (optional - デフォルトは false ): " +"インスタンス変数に最初にアクセスしたときに、 コンポーネントを遅延してフェッチ" +"するよう指定します。 (バイトコード実装を作成する時間が必要になります)" + +#. Tag: para +#: basic_mapping.xml:1891 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (オプション - デフォルトは true ): このプロパティの更新に、楽観ロックの取得を要求するかどうかを指定" +"します。 言い換えれば、このプロパティがダーティであるときにバージョンを増やす" +"べきかを決定します。" + +#. Tag: para +#: basic_mapping.xml:1899 basic_mapping.xml:1975 +#, no-c-format +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"unique (オプション - デフォルトは false ): コンポーネントのすべてのマッピングするカラムに、ユニーク制約が存" +"在するかを指定します。" + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"子の <property> タグで、 子のクラスのプロパティを" +"テーブルカラムにマッピングします。" + +#. Tag: para +#: basic_mapping.xml:1913 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component> 要素は、親エンティティへ戻る参照とし" +"て、 コンポーネントのクラスのプロパティをマッピングする <" +"parent> サブ要素を許可します。" + +#. Tag: para +#: basic_mapping.xml:1919 +#, no-c-format +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "" +"<dynamic-component> 要素は、 Map " +"がコンポーネントとしてマッピングされることを可能にします。 プロパティ名はmap" +"のキーを参照します。 を参照してくださ" +"い。" + +#. Tag: title +#: basic_mapping.xml:1928 +#, no-c-format +msgid "properties" +msgstr "properties" + +#. Tag: para +#: basic_mapping.xml:1930 +#, no-c-format +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"<properties> 要素はクラスのプロパティの指定された、 " +"論理的なグルーピングを可能にします。 この構造の最も重要な使用方法は、 " +"property-ref のターゲットになるプロパティの結合を許可する" +"ことです。 それはまた、複数カラムのユニーク制約を定義する簡単な方法でもありま" +"す。" + +#. Tag: programlisting +#: basic_mapping.xml:1946 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1949 +#, no-c-format +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"name : グルーピングの論理名。 実際のプロパティ名では " +"ありません 。" + +#. Tag: para +#: basic_mapping.xml:1967 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"optimistic-lock (オプション - デフォルトは true ): これらのプロパティの更新に楽観的ロックの取得を要求するかどうかを" +"指定します。 言い換えれば、このプロパティがダーティであるときにバージョンを増" +"やすべきかを決定します。" + +#. Tag: para +#: basic_mapping.xml:1984 +#, no-c-format +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "" +"例えば、もし以下のような <properties> マッピングが" +"あった場合:" + +#. Tag: programlisting +#: basic_mapping.xml:1988 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1990 +#, no-c-format +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"主キーの代わりに Person テーブルのユニークキーへの参照を持" +"つ、 レガシーデータの関連を持つかもしれません。:" + +#. Tag: programlisting +#: basic_mapping.xml:1995 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1997 +#, no-c-format +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "" +"しかし、このようなレガシーデータマッピングのコンテキスト外への使用は推奨しま" +"せん。" + +#. Tag: title +#: basic_mapping.xml:2005 +#, no-c-format +msgid "subclass" +msgstr "subclass" + +#. Tag: para +#: basic_mapping.xml:2007 +#, no-c-format +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "" +"最後にポリモーフィックな永続化には、ルートの永続クラスの各サブクラスの定義が" +"必要です。 table-per-class-hierarchyマッピング戦略では、 <" +"subclass> 定義が使われます。" + +#. Tag: programlisting +#: basic_mapping.xml:2020 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2023 basic_mapping.xml:2081 basic_mapping.xml:2144 +#, no-c-format +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "name:サブクラスの完全修飾されたクラス名。" + +#. Tag: para +#: basic_mapping.xml:2028 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"discriminator-value(オプション - デフォルトはクラス" +"名): 個々のサブクラスを区別するための値。" + +#. Tag: para +#: basic_mapping.xml:2034 basic_mapping.xml:2091 basic_mapping.xml:2154 +#, fuzzy, no-c-format +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy(オプション): 遅延初期化プロキシに使うクラスやイン" +"ターフェイスを指定します。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (オプション): 遅延初期化プロキシに使用するクラスやイ" +"ンターフェイスを指定します。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (オプション): 遅延初期化プロキシに使用するクラスやイ" +"ンターフェイスを指定します。" + +#. Tag: para +#: basic_mapping.xml:2040 basic_mapping.xml:2097 basic_mapping.xml:2160 +#, fuzzy, no-c-format +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy(オプション, デフォルトは true ): lazy=\"false\" と設定すると、遅延フェッチが" +"使用できません。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (オプション, デフォルトは true ): " +"lazy=\"false\" とすると、遅延フェッチが使用できません。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (オプション, デフォルトは true ): " +"lazy=\"false\" とすると、遅延フェッチが使用できません。" + +#. Tag: para +#: basic_mapping.xml:2048 +#, no-c-format +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"各サブクラスでは、永続プロパティとサブクラスを定義します。 <" +"version><id> プロパティは、 ルート" +"クラスから継承されると仮定されます。 階層構造におけるサブクラスは、 ユニーク" +"な discriminator-value を定義しなければなりません。 noneが" +"指定されると、完全修飾されたJavaクラス名が使われます。" + +#. Tag: para +#: basic_mapping.xml:2056 basic_mapping.xml:2114 basic_mapping.xml:2172 +#, no-c-format +msgid "" +"For information about inheritance mappings, see ." +msgstr "" +"継承のマッピングに関する情報は を見てくださ" +"い。" + +#. Tag: title +#: basic_mapping.xml:2063 +#, no-c-format +msgid "joined-subclass" +msgstr "joined-subclass" + +#. Tag: para +#: basic_mapping.xml:2065 +#, no-c-format +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"もう1つの方法として、各サブクラスを自身のテーブルへマッピングすることができま" +"す (table-per-subclass mapping strategy)。 継承した状態はスーパークラスのテー" +"ブルを使った結合で検索します。 <joined-subclass> 要" +"素を使用します。" + +#. Tag: programlisting +#: basic_mapping.xml:2078 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2086 basic_mapping.xml:2149 +#, no-c-format +msgid "table: The name of the subclass table." +msgstr "table :サブクラステーブルの名前。" + +#. Tag: para +#: basic_mapping.xml:2105 +#, no-c-format +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"このマッピング戦略には、識別カラムは必要ありません。 しかし各サブクラスは " +"<key> 要素を使い、 オブジェクト識別子を保持するテー" +"ブルカラムを定義しなければなりません。 この章の初めのマッピングは以下のように" +"書き直せます:" + +#. Tag: programlisting +#: basic_mapping.xml:2112 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2121 +#, no-c-format +msgid "union-subclass" +msgstr "union-subclass" + +#. Tag: para +#: basic_mapping.xml:2123 +#, no-c-format +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"3つ目の選択肢は、継承階層の具象クラスのみをテーブルにマッピングすることです " +"(the table-per-concrete-class戦略)。 それぞれのテーブルは継承の状態を含めすべ" +"てのクラスの永続状態を定義します。 Hibernateではその様な継承階層が必ずしも必" +"要ではありません。 単純にそれぞれのクラスを、 別々の <class> 宣言を使ってマッピングすることができます。 しかしポリモーフィックな" +"関連(例えば 階層のスーパークラスへの関連)を使いたいなら、 <union-" +"subclass> マッピングを使う必要があります。" + +#. Tag: programlisting +#: basic_mapping.xml:2141 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2168 +#, no-c-format +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "このマッピング戦略では識別カラムやキーカラムは必要ありません。" + +#. Tag: title +#: basic_mapping.xml:2179 +#, no-c-format +msgid "join" +msgstr "join" + +#. Tag: para +#: basic_mapping.xml:2181 +#, no-c-format +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"<join> 要素を使うことで、 1つのクラスのプロパティを" +"いくつものテーブルにマッピングすることができます。" + +#. Tag: programlisting +#: basic_mapping.xml:2195 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2199 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "table :結合したテーブルの名前" + +#. Tag: para +#: basic_mapping.xml:2216 +#, no-c-format +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch (オプション - デフォルトは join ): join を設定した場合、 Hibernateはデフォルト" +"で、クラスやスーパークラスで定義された <join> を検索" +"するのに内部結合を使い、サブクラスで定義された <join> を検索するのに外部結合を使います。 select を設定" +"した場合には、 Hibernateはサブクラスで定義された <join> の選択に順次選択を使います。この場合、 行がサブクラスのインスタンス" +"を代表することがわかった場合にのみ発行されます。 内部結合はクラスやそのスー" +"パークラスで定義された <join> を検索 するために使用" +"します。" + +#. Tag: para +#: basic_mapping.xml:2229 +#, no-c-format +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (オプション - デフォルトは false ): もし可能であれば、Hibernateはこの結合で定義されているプロパティに" +"対し 挿入や更新を行いません。" + +#. Tag: para +#: basic_mapping.xml:2236 +#, no-c-format +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optional (オプション - デフォルトは false ): もし可能であれば、Hibernateはこの結合で定義されたプロパティがnull" +"でない場合にのみ 行を挿入し、そのプロパティの検索には常に外部結合を使用しま" +"す。" + +#. Tag: para +#: basic_mapping.xml:2245 +#, no-c-format +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"例えば人のアドレスの情報を分離したテーブルにマッピングすることが可能です (す" +"べてのプロパティに対して値型のセマンティクスを保持します)。" + +#. Tag: programlisting +#: basic_mapping.xml:2250 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2252 +#, no-c-format +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"この特徴はしばしばレガシーデータモデルに対してのみ有用ですが、 クラスよりも少" +"ないテーブルと、きめの細かいドメインモデルを推奨します。 しかし後で説明するよ" +"うに、1つのクラス階層で継承のマッピング戦略を切り替える時には有用です。" + +#. Tag: title +#: basic_mapping.xml:2262 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2264 +#, no-c-format +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"今まで何度か <key> 要素が出てきました。 この要素は新" +"しいテーブルへの結合を定義したり、 結合テーブルで外部キーを定義したりする親要" +"素のどこにでも現れ、 オリジナルテーブルの主キーを参照します。" + +#. Tag: programlisting +#: basic_mapping.xml:2280 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2291 +#, no-c-format +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (オプション, デフォルトは noaction): 外部キー制約がデータベースレベルでカスケード削除が可能かどうかを指" +"定します。" + +#. Tag: para +#: basic_mapping.xml:2298 +#, no-c-format +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (オプション): オリジナルテーブルの主キーでは" +"ないカラムを参照する外部キーを指定します (レガシーデータに対して提供されま" +"す)。" + +#. Tag: para +#: basic_mapping.xml:2305 +#, no-c-format +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (オプション): 外部キーカラムがnull値を許容しない" +"ことを指定します (このことは外部キーが主キーの一部であることを暗黙的に示しま" +"す)。" + +#. Tag: para +#: basic_mapping.xml:2312 +#, no-c-format +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (オプション): 外部キーを決して更新してはならないこ" +"とを指定します (このことは外部キーが主キーの一部であることを暗黙的に示しま" +"す)。" + +#. Tag: para +#: basic_mapping.xml:2319 +#, no-c-format +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (オプション): 外部キーがユニーク制約を持つべきであ" +"ることを指定します (このことは外部キーが主キーの一部であることを暗黙的に示し" +"ます)。" + +#. Tag: para +#: basic_mapping.xml:2327 +#, no-c-format +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"削除のパフォーマンスが重要であるシステムには、 すべてのキーを on-" +"delete=\"cascade\" と定義することを推奨します。 そうすることで" +"Hibernateは、DELETE 文を毎回発行する代わりに、 データベー" +"スレベルの ON CASCADE DELETE 制約を使用します。 この特徴は" +"バージョン付けられたデータに対するHibernateの通常の楽観的ロック戦略を 無視す" +"るということに注意してください。" + +#. Tag: para +#: basic_mapping.xml:2335 +#, no-c-format +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"not-nullupdate 属性は、単方向一対多" +"関連の時には有用です。 単方向一対多関連をnullを許容しない外部キーにマッピング" +"するときは、 <key not-null=\"true\"> を使ってキーカ" +"ラムを宣言 しなくてはなりません 。" + +#. Tag: title +#: basic_mapping.xml:2345 +#, no-c-format +msgid "column and formula elements" +msgstr "column と formula 要素" + +#. Tag: para +#: basic_mapping.xml:2346 +#, no-c-format +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"column 属性を記述できる任意のマッピング要素はまた、 " +"<column> サブ要素も記述できます。 同様に " +"<formula>formula 属性の代替手" +"段です。" + +#. Tag: programlisting +#: basic_mapping.xml:2352 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2354 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2356 +#, no-c-format +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"同じプロパティや関連のマッピングの中で、 column と " +"formula 属性を組み合わせることができます。 例えば、特殊な" +"結合条件などです。" + +#. Tag: programlisting +#: basic_mapping.xml:2362 +#, no-c-format +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"
]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2367 +#, no-c-format +msgid "import" +msgstr "import" + +#. Tag: para +#: basic_mapping.xml:2369 +#, no-c-format +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"アプリケーションに同じ名前の2つの永続クラスがあり、 Hibernateクエリで完全修飾" +"された(パッケージの)名前を指定したくないと仮定します。 そのような場合は " +"auto-import=\"true\" に頼らず、 クラスが「インポート」され" +"たものであると明示できます。 明示的にマッピングされていないクラスやインター" +"フェイスでさえもインポートできます。" + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2383 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "class:Javaクラスの完全修飾されたクラス名。" + +#. Tag: para +#: basic_mapping.xml:2391 +#, no-c-format +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename(オプション - デフォルトは修飾されていないクラス" +"名): クエリ言語で使われる名前。" + +#. Tag: title +#: basic_mapping.xml:2402 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2404 +#, no-c-format +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"プロパティマッピングにはさらにもう1つの型があります。 <any> マッピング要素は、 複数のテーブルからクラスへのポリモーフィックな関" +"連を定義します。 この型のマッピングには必ず複数のカラムが必要です。1番目のカ" +"ラムは関連エンティティの型を保持します。 残りのカラムは識別子を保持します。こ" +"の種類の関連には外部キー制約を指定することはできません。 そのためこれは最も使" +"われることのない(ポリモーフィックな)関連のマッピング方法です。 非常に特別な" +"場合(例えば、検査ログやユーザセッションデータなど)に限って、これを使うべきで" +"す。" + +#. Tag: para +#: basic_mapping.xml:2414 +#, no-c-format +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"meta-type により、 アプリケーションはカスタム型を指定でき" +"ます。このカスタム型は データベースカラムの値を、id-type " +"で指定した型の 識別子プロパティを持った永続クラスへマッピングします。 meta-" +"typeの値からクラス名へのマッピングを指定しなければなりません。" + +#. Tag: programlisting +#: basic_mapping.xml:2421 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2432 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2435 +#, no-c-format +msgid "name: the property name." +msgstr "name:プロパティ名。" + +#. Tag: para +#: basic_mapping.xml:2440 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "id-type:識別子の型。" + +#. Tag: para +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type(オプション - デフォルトは string ): ディスクリミネータマッピングで許された型" + +#. Tag: para +#: basic_mapping.xml:2451 +#, no-c-format +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade(オプション - デフォルトは none ): カスケードのスタイル。" + +#. Tag: para +#: basic_mapping.xml:2463 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (オプション - デフォルトは true ): このプロパティの更新に楽観ロックの取得を要求するかどうかを指定し" +"ます。 言い換えれば、このプロパティがダーティであるときにバージョンを増やすべ" +"きかを定義します。" + +#. Tag: title +#: basic_mapping.xml:2478 +#, no-c-format +msgid "Hibernate Types" +msgstr "Hibernateの型" + +#. Tag: title +#: basic_mapping.xml:2481 +#, no-c-format +msgid "Entities and values" +msgstr "エンティティと値" + +#. Tag: para +#: basic_mapping.xml:2483 +#, no-c-format +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"永続サービスに関わる様々なJava言語レベルのオブジェクトの振る舞いを理解するた" +"めには、 オブジェクトを2つのグループに分ける必要があります:" + +#. Tag: para +#: basic_mapping.xml:2488 +#, no-c-format +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +" エンティティ はエンティティへの参照を保持する、 他のす" +"べてのオブジェクトから独立して存在します。 参照されないオブジェクトがガベージ" +"コレクトされてしまう性質を持つ通常のJavaモデルと、 これを比べてみてくださ" +"い。 (親エンティティから子へ、セーブと削除が カスケード されうることを除いて) エンティティは明示的にセーブまたは削除されな" +"ければなりません。 これは到達可能性によるオブジェクト永続化のODMGモデルとは異" +"なっています。 大規模なシステムでアプリケーションオブジェクトが普通どのように" +"使われるかにより密接に対応します。 エンティティは循環と参照の共有をサポートし" +"ます。 またそれらはバージョン付けすることもできます。" + +#. Tag: para +#: basic_mapping.xml:2499 +#, no-c-format +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"エンティティの永続状態は他のエンティティや 型の イン" +"スタンスへの参照から構成されます。 値はプリミティブ、コレクション(コレクショ" +"ンの内部ではなく)、 コンポーネント、不変オブジェクトです。 エンティティとは違" +"い、値は(特にコレクションとコンポーネントにおいて)、 到達可能性による永続化" +"や削除が 行われます 。 値オブジェクト(とプリミティブ)" +"は、包含するエンティティと一緒に永続化や削除が行われるので、 それらを独立に" +"バージョン付けすることはできません。 値には独立したアイデンティティがないの" +"で、 複数のエンティティやコレクションがこれを共有することはできません。" + +#. Tag: para +#: basic_mapping.xml:2510 +#, no-c-format +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"これまで「永続クラス」という言葉をエンティティの意味で使ってきました。 これか" +"らもそうしていきます。 厳密に言うと、永続状態を持つユーザ定義のクラスのすべて" +"が エンティティというわけではありません。 コンポーネント は値のセマンティクスを持つユーザ定義クラスです。 java." +"lang.String 型のプロパティもまた値のセマンティクスを持ちます。 定義" +"するなら、JDKで提供されているすべてのJavaの型(クラス)が値のセマンティクスを持" +"つといえます。 一方ユーザ定義型は、エンティティや値型のセマンティクスとともに" +"マッピングできます。 この決定はアプリケーション開発者次第です。 そのクラスの" +"1つのインスタンスへの共有参照は、 ドメインモデル内のエンティティクラスに対す" +"る良いヒントになります。 一方合成集約や集約は、通常値型へ変換されます。" + +#. Tag: para +#: basic_mapping.xml:2524 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "本ドキュメントを通して、何度もこの概念を取り上げます。" + +#. Tag: para +#: basic_mapping.xml:2528 +#, no-c-format +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"Java型のシステム(もしくは開発者が定義したエンティティと値型)を SQL/データベー" +"ス型のシステムにマッピングすることは難しいです。 Hibernateは2つのシステムの" +"架け橋を提供します。 エンティティに対しては <class> " +"や <subclass> などを使用します。 値型に対しては " +"<property><component> " +"などを、通常 type とともに使います。 この属性の値は" +"Hibernateの マッピング型 の名前です。 Hibernateは(標準" +"JDKの値型に対して)多くの自由なマッピングを提供します。 後で見るように、自身の" +"マッピング型を記述し、同様にカスタムの変換戦略を実装することができます。" + +#. Tag: para +#: basic_mapping.xml:2541 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" +"コレクションを除く組み込みのHibernateの型はすべて、nullセマンティクスをサポー" +"トします。" + +#. Tag: title +#: basic_mapping.xml:2548 +#, no-c-format +msgid "Basic value types" +msgstr "基本的な型" + +#. Tag: para +#: basic_mapping.xml:2550 +#, fuzzy, no-c-format +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "" +"組み込みの 基本的なマッピング型 は大まかに以下のように分" +"けられます。 " + +#. Tag: literal +#: basic_mapping.xml:2555 +#, no-c-format +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#. Tag: para +#: basic_mapping.xml:2558 +#, no-c-format +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"Javaのプリミティブやラッパークラスから適切な(ベンダー固有の) SQLカラム型へ" +"の型マッピング。 boolean, yes_notrue_false は、 すべてJavaの boolean または java." +"lang.Boolean の代替エンコードです。" + +#. Tag: literal +#: basic_mapping.xml:2567 +#, no-c-format +msgid "string" +msgstr "string" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"java.lang.String から VARCHAR (または" +"Oracleの VARCHAR2 )への型マッピング。" + +#. Tag: literal +#: basic_mapping.xml:2576 +#, no-c-format +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#. Tag: para +#: basic_mapping.xml:2578 +#, no-c-format +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"java.util.Date とそのサブクラスからSQL型の DATE, TIME , TIMESTAMP (またはそれ" +"らと等価なもの) への型マッピング。" + +#. Tag: literal +#: basic_mapping.xml:2586 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#. Tag: para +#: basic_mapping.xml:2588 +#, no-c-format +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"java.util.Calendar からSQL型 の「 TIMESTAMP , DATE (またはそれらと等価なもの)への型マッピン" +"グ。" + +#. Tag: literal +#: basic_mapping.xml:2596 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#. Tag: para +#: basic_mapping.xml:2598 +#, no-c-format +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"java.math.BigDecimaljava.math.BigInteger から NUMERIC(またはOracleの NUMBER )への型マッピング。" + +#. Tag: literal +#: basic_mapping.xml:2606 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#. Tag: para +#: basic_mapping.xml:2608 +#, no-c-format +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"java.util.Locale , java.util.TimeZone , java.util.Currency から VARCHAR (またはOracleの VARCHAR2 )への型マッピング。 " +"LocaleCurrency のインスタンスは、 " +"それらのISOコードにマッピングされます。 TimeZone のインス" +"タンスは、 それらの ID にマッピングされます。" + +#. Tag: literal +#: basic_mapping.xml:2620 +#, fuzzy, no-c-format +msgid "class" +msgstr "all すべてのカラムをチェックします。" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"java.lang.Class から VARCHAR (または" +"Oracleの VARCHAR2 )への型マッピング。 Class はその完全修飾された名前にマッピングされます。" + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "binary" +msgstr "binary" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "バイト配列は、適切なSQLのバイナリ型にマッピングされます。" + +#. Tag: literal +#: basic_mapping.xml:2638 +#, no-c-format +msgid "text" +msgstr "text" + +#. Tag: para +#: basic_mapping.xml:2640 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"長いJava文字列は、SQLの CLOB または TEXT 型にマッピングされます。" + +#. Tag: literal +#: basic_mapping.xml:2647 +#, no-c-format +msgid "serializable" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:2649 +#, no-c-format +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"シリアライズ可能なJava型は、適切なSQLのバイナリ型にマッピングされます。 デ" +"フォルトで基本型ではないシリアライズ可能なJavaクラスや インターフェイスの名前" +"を指定することで、 Hibernateの型を serializable とすること" +"もできます。" + +#. Tag: literal +#: basic_mapping.xml:2658 +#, no-c-format +msgid "clob, blob" +msgstr "clob, blob" + +#. Tag: para +#: basic_mapping.xml:2660 +#, no-c-format +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"JDBCクラス java.sql.Clobjava.sql.Blob に対する型マッピング。 blobやclobオブジェクトはトランザクションの外" +"では再利用できないため、 アプリケーションによっては不便かもしれません。 (さ" +"らにはドライバサポートが一貫していません。)" + +#. Tag: literal +#: basic_mapping.xml:2670 +#, no-c-format +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" + +#. Tag: para +#: basic_mapping.xml:2674 +#, no-c-format +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"ほとんどの場合に可変であるJavaの型に対する型マッピング。 Hibernateは不変な" +"Javaの型に対しては最適化を行い、 アプリケーションはそれを不変オブジェクトとし" +"て扱います。 例えば imm_timestamp としてマップしたインスタ" +"ンスに対して、 Date.setTime() を呼び出してはなりません。 " +"プロパティの値を変更しその変更を永続化するためには、 アプリケーションはプロパ" +"ティに対して新しい(同一でない)オブジェクトを割り当てなければなりません。" + +#. Tag: para +#: basic_mapping.xml:2689 +#, no-c-format +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"エンティティとコレクションのユニークな識別子は、binary , " +"blob , clob を除く、どんな基本型でも構" +"いません。 (複合識別子でも構いません。以下を見てください。)" + +#. Tag: para +#: basic_mapping.xml:2695 +#, no-c-format +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"基本的な値型には、org.hibernate.Hibernate で定義された " +"Type 定数がそれぞれあります。 例えば、Hibernate." +"STRINGstring 型を表現しています。" + +#. Tag: title +#: basic_mapping.xml:2704 +#, no-c-format +msgid "Custom value types" +msgstr "カスタム型" + +#. Tag: para +#: basic_mapping.xml:2706 +#, no-c-format +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"開発者が独自の値型を作成することは、比較的簡単です。 例えば、java." +"lang.BigInteger 型のプロパティを VARCHAR カラム" +"に永続化したいかもしれません。 Hibernateはこのための組み込み型を用意していま" +"せん。 しかしカスタム型は、プロパティ(またはコレクションの要素)を1つのテー" +"ブルカラムに マッピングするのに制限はありません。 そのため例えば、" +"java.lang.String 型の getName() / " +"setName() Javaプロパティを FIRST_NAME , INITIAL, SURNAME カラムに永" +"続化できます。" + +#. Tag: para +#: basic_mapping.xml:2717 +#, no-c-format +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"カスタム型を実装するには、org.hibernate.UserType または " +"org.hibernate.CompositeUserType を実装し、 型の完全修飾さ" +"れた名前を使ってプロパティを定義します。 どのような種類のものが可能かを調べる" +"には、 org.hibernate.test.DoubleStringType を確認してくだ" +"さい。" + +#. Tag: programlisting +#: basic_mapping.xml:2725 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2727 +#, no-c-format +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"<column> タグで、 プロパティを複数のカラムへマッピン" +"グできることに注目してください。" + +#. Tag: para +#: basic_mapping.xml:2732 +#, no-c-format +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"CompositeUserType , EnhancedUserType , " +"UserCollectionType , UserVersionType イ" +"ンターフェイスは、より特殊な使用法に対してのサポートを提供します。" + +#. Tag: para +#: basic_mapping.xml:2738 +#, no-c-format +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"マッピングファイル内で UserType へパラメータを提供できま" +"す。 このためには、UserTypeorg.hibernate." +"usertype.ParameterizedType を実装しなくてはなりません。 カスタム型" +"パラメータを提供するために、 マッピングファイル内で <type> 要素を使用できます。" + +#. Tag: programlisting +#: basic_mapping.xml:2746 +#, no-c-format +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2748 +#, no-c-format +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"UserType は、 引数として渡された Properties オブジェクトから、 default で指定したパラメータに" +"対する値を検索することができます。" + +#. Tag: para +#: basic_mapping.xml:2753 +#, no-c-format +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"特定の UserType を頻繁に使用するならば、短い名前を定義する" +"と便利になるでしょう。 <typedef> 要素を使ってこのよ" +"うなことが行えます。 Typedefsはカスタム型に名前を割り当てます。 その型がパラ" +"メータを持つならば、 パラメータのデフォルト値のリストを含むこともできます。" + +#. Tag: programlisting +#: basic_mapping.xml:2760 +#, no-c-format +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2762 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2764 +#, no-c-format +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "" +"プロパティのマッピングで型パラメータを使うことで、 typedefで提供されたパラ" +"メータをその都度オーバーライドすることが可能です。" + +#. Tag: para +#: basic_mapping.xml:2769 +#, no-c-format +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"Hibernateの幅広い組み込み型とコンポーネントに対するサポートは、 カスタム型を" +"めったに 使わない ということを意味します。 それでもな" +"お、アプリケーションで頻出する(エンティティではない)クラスに対するカスタム型" +"の使用は、 よいやり方であるとみなされます。 例えば MonetaryAmount クラスはコンポーネントとして簡単にマッピングできますが、 " +"CompositeUserType の良い候補です。 カスタム型を使用する動" +"機の1つは抽象化です。 カスタム型を使うことで、通貨をどのように表現しようとも " +"マッピングドキュメントは起こりうる変化に対応できます。" + +#. Tag: title +#: basic_mapping.xml:2785 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "1つのクラスに1つ以上のマッピング" + +#. Tag: para +#: basic_mapping.xml:2786 +#, no-c-format +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"ある永続クラスに、一つ以上のマッピングを提供することが出来ます。 この場合、" +"マッピングする2つのエンティティのインスタンスを明確にするために、 " +"エンティティ名 を指定しなければなりません (デフォルトではエンティ" +"ティ名はクラス名と同じです。)。 永続オブジェクトを扱うとき、クエリを書き込む" +"とき、 指定されたエンティティへの関連をマッピングするときには、 Hibernateでは" +"エンティティ名を指定しなければなりません。" + +#. Tag: programlisting +#: basic_mapping.xml:2794 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2796 +#, no-c-format +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"関連がclass の代わりに entity-name を" +"使って、 どのように指定されるのかに注目してください。" + +#. Tag: title +#: basic_mapping.xml:2804 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "バッククォートで囲んだ SQL 識別子" + +#. Tag: para +#: basic_mapping.xml:2805 +#, no-c-format +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"マッピングドキュメントでテーブルやカラムの名前をバッククォートで囲むことで、 " +"Hibernateで生成されたSQL中の識別子を引用させることができます。 HibernateはSQL" +"の Dialect に対応する、正しい引用スタイルを使います (普通" +"はダブルクォートですが、SQL Serverではかぎ括弧、MySQLではバッククォートで" +"す)。" + +#. Tag: programlisting +#: basic_mapping.xml:2812 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2818 +#, no-c-format +msgid "Metadata alternatives" +msgstr "メタデータの代替手段" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XMLの記述以外に、 HibernateではO/Rマッピングのメタデータを定義する代替方法が" +"あります。" + +#. Tag: title +#: basic_mapping.xml:2825 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "XDoclet マークアップの使用" + +#. Tag: para +#: basic_mapping.xml:2827 +#, no-c-format +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"多くのHibernateユーザはXDocletの @hibernate.tags を使っ" +"て、 ソースコード内に直接マッピング情報を埋め込むことを好みます。 これは厳密" +"に言えばXDocletの分野なので、本ドキュメントではこの方法を対象とはしません。 " +"しかしXDocletを使った以下の Cat マッピングの例を示します。" + +#. Tag: programlisting +#: basic_mapping.xml:2834 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2836 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "" +"Hibernateのウェブサイトには、XDocletとHibernateに関するサンプルが多数ありま" +"す。" + +#. Tag: title +#: basic_mapping.xml:2843 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "JDK 5.0 アノテーションの使用" + +#. Tag: para +#: basic_mapping.xml:2845 +#, no-c-format +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"JDK5.0ではタイプセーフかつコンパイル時にチェックできる、 言語レベルのXDoclet" +"スタイルのアノテーションを導入しました。 このメカニズムはXDocletのアノテー" +"ションよりも強力で、ツールやIDEも多くがサポートしています。 例えばIntelliJ " +"IDEAは、JDK5.0にアノテーションの自動補完と構文の強調表示をサポートしていま" +"す。 EJB仕様 (JSR-220)の新しいバージョンでは、エンティティビーンに対する主要" +"なメタデータメカニズムとして JDK5.0のアノテーションを使用しています。 " +"Hibernate3ではJSR-220 (永続化API)の EntityManager を実装" +"し、 メタデータマッピングに対するサポートは、 別ダウンロードの " +"Hibernate Annotations パッケージにより利用可能です。 こ" +"れはEJB3(JSR-220)とHibernate3のメタデータをどちらもサポートしています。" + +#. Tag: para +#: basic_mapping.xml:2856 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "以下はEJBのエンティティビーンとして注釈されたPOJOクラスの例です。" + +#. Tag: programlisting +#: basic_mapping.xml:2860 +#, no-c-format +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2862 +#, no-c-format +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"JDK5.0のアノテーション(とJSR-220)のサポートは進行中の作業であり、完全ではない" +"ことに注意してください。 さらに詳しい情報はHibernateのアノテーション・モ" +"ジュールを参照してください。" + +#. Tag: title +#: basic_mapping.xml:2871 +#, no-c-format +msgid "Generated Properties" +msgstr "生成プロパティ" + +#. Tag: para +#: basic_mapping.xml:2872 +#, no-c-format +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"生成プロパティとは、データベースによって生成された値を持つプロパティです。 通" +"常、Hibernateアプリケーションは、データベースが値を生成したプロパティを含むオ" +"ブジェクトを リフレッシュ する必要がありました。 しかし、" +"プロパティが生成されたということをマークすることで、 アプリケーションはリフ" +"レッシュの責任をHibernateに委譲します。 基本的に、生成プロパティを持つと定義" +"したエンティティに対して HibernateがINSERTやUPDATEのSQLを発行した後すぐに、 " +"生成された値を読み込むための SELECT SQL が発行されます。" + +#. Tag: para +#: basic_mapping.xml:2881 +#, no-c-format +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"生成プロパティは、挿入不可能かつ更新不可能でなければなりません。 versionstimestampssimple properties だけが生成されたと" +"マークできます。" + +#. Tag: para +#: basic_mapping.xml:2888 +#, no-c-format +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "" +"never (デフォルト) - 与えられたプロパティの値は、 データ" +"ベースから生成されないことを意味します。" + +#. Tag: para +#: basic_mapping.xml:2892 +#, no-c-format +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - 与えられたプロパティの値は挿入時に生成されるが、 " +"続いて起こる更新時には生成されないこと示します。 作成された日付などは、このカ" +"テゴリに分類されます。 versiontimestamp の プロパティは生成されたとマークできますが、このオプショ" +"ンは利用できないことに注意してください。" + +#. Tag: para +#: basic_mapping.xml:2900 +#, no-c-format +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "" +"always - 挿入時も更新時もプロパティの値が生成されることを" +"示します。" + +#. Tag: title +#: basic_mapping.xml:2907 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "補助的なデータベース・オブジェクト" + +#. Tag: para +#: basic_mapping.xml:2908 +#, no-c-format +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Hibernateのスキーマ・エボリューションツールと連動することで、 任意のデータ" +"ベース・オブジェクト(トリガーやストアドプロシージャなど)のCREATEとDROPによ" +"り、 Hibernateのマッピングファイル内のユーザ・スキーマをすべて定義することが" +"出来ます。 主にトリガやストアドプロシージャのようなデータベース・オブジェクト" +"を生成や削除することを意図していますが、 実際には java.sql." +"Statement.execute() メソッドによって実行できる 任意のSQLコマンド" +"(ALTER、INSERTなど)が実行できます。 補助的なデータベース・オブジェクトを定" +"義するための、2つの基本的な方法があります。" + +#. Tag: para +#: basic_mapping.xml:2917 +#, no-c-format +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "" +"1つ目の方法は、CREATEとDROPコマンドをマッピングファイルの外に、明示的に記載す" +"ることです。" + +#. Tag: programlisting +#: basic_mapping.xml:2921 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2922 +#, no-c-format +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"2つ目の方法は、CREATEとDROPコマンドの組み立て方を知っているカスタムクラスを提" +"供することです。 このカスタムクラスは org.hibernate.mapping." +"AuxiliaryDatabaseObject インタフェースを 実装しなければなりません。" + +#. Tag: programlisting +#: basic_mapping.xml:2927 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2928 +#, no-c-format +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "" +"さらに、あるデータベース方言が使用される時にだけ適用するといったように、 デー" +"タベース・オブジェクトが使われるケースを限定できます。" + +#. Tag: programlisting +#: basic_mapping.xml:2932 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "class" +#~ msgstr "class" + +#~ msgid "id" +#~ msgstr "id" + +#~ msgid "" +#~ "optimizer (optional, defaults to none): See " +#~ msgstr "" +#~ "optimizer (optional, defaults to none): See " + +#~ msgid "" +#~ "optimizer (optional, defaults to ): See " +#~ "" +#~ msgstr "" +#~ "optimizer (optional, defaults to ): See " +#~ "" + +#~ msgid "key" +#~ msgstr "key" + +#~ msgid "any" +#~ msgstr "any" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/batch.po b/documentation/envers/src/main/docbook/ja-JP/content/batch.po new file mode 100644 index 0000000000..57f0670c30 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/batch.po @@ -0,0 +1,630 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:5 +#, no-c-format +msgid "Batch processing" +msgstr "バッチ処理" + +#. Tag: para +#: batch.xml:7 +#, no-c-format +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"Hibernateを使ってデータベースに100,000行を挿入する愚直な方法は、このようなも" +"のです:" + +#. Tag: programlisting +#: batch.xml:12 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:14 +#, no-c-format +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"これは50,000番目の行のあたりで OutOfMemoryException で失敗" +"するでしょう。 Hibernateがセッションレベルキャッシュで、 新しく挿入されたすべ" +"ての Customer インスタンスをキャッシュするからです。" + +#. Tag: para +#: batch.xml:20 +#, no-c-format +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"この章では、この問題を回避する方法を紹介します。 しかしバッチ処理をするなら、" +"JDBCバッチが使用可能であることが非常に重要です。 そうでなければ手頃なパフォー" +"マンスが得られません。 JDBCバッチサイズを手頃な数値(例えば、10から50)に設定" +"してください:" + +#. Tag: programlisting +#: batch.xml:27 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:29 +#, no-c-format +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." + +#. Tag: para +#: batch.xml:34 +#, no-c-format +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "" +"また二次キャッシュが全く効かないプロセスで、 このような作業をしたいと思うかも" +"しれません:" + +#. Tag: programlisting +#: batch.xml:39 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:41 +#, no-c-format +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"しかし、これは絶対に必要というわけではありません。 なぜなら明示的に " +"CacheMode を設定して、 二次キャッシュとの相互作用を無効に" +"することができるからです。" + +#. Tag: title +#: batch.xml:47 +#, no-c-format +msgid "Batch inserts" +msgstr "バッチ挿入" + +#. Tag: para +#: batch.xml:49 +#, no-c-format +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"新しいオブジェクトを永続化するとき、一次キャッシュのサイズを制限するため、 " +"セッションを flush() して clear() しな" +"ければなりません。" + +#. Tag: programlisting +#: batch.xml:55 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:60 +#, no-c-format +msgid "Batch updates" +msgstr "バッチ更新" + +#. Tag: para +#: batch.xml:62 +#, no-c-format +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"データを復元したり更新したりするには同じアイディアを適用します。 それに加え" +"て、データの行を多く返すクエリに対して有効な サーバーサイドのカーソルの利点を" +"生かしたければ scroll() を使う必要があります。" + +#. Tag: programlisting +#: batch.xml:68 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:73 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "StatelessSessionインターフェイス" + +#. Tag: para +#: batch.xml:74 +#, no-c-format +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"また別の方法として、Hibernateはコマンド指向のAPIを用意しています。 これは分離" +"オブジェクトの形で、 データベースとのデータストリームのやり取りに使うことがで" +"きます。 StatelessSession は関連する永続コンテキストを持た" +"ず、 高レベルのライフサイクルセマンティクスの多くを提供しません。 特にステー" +"トレスセッションは、一時キャッシュを実装せず、 またどのような二次キャッシュや" +"クエリキャッシュとも相互作用しません。 トランザクショナルなwrite-behindや自動" +"ダーティチェックも実装しません。 ステートレスセッションを使って行われる操作" +"が、 関連するインスタンスへカスケードされることは決してありません。 コレク" +"ションは、ステートレスセッションからは無視されます。 ステートレスセッションを" +"通して行われる操作は、 Hibernateのイベントモデルやインターセプタの影響を受け" +"ません。 一時キャッシュを持たないため、 ステートレスセッションは別名を持つ" +"データに上手く対処できません。 ステートレスセッションは低レベルの抽象化であ" +"り、JDBCに非常によく似ています。" + +#. Tag: programlisting +#: batch.xml:89 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:91 +#, no-c-format +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "" +"このコード例では、クエリが返す Customer インスタンスは即座" +"に(セッションから)分離されることに注意してください。 これは、どのような永続" +"コンテキストとも決して関連しません。" + +#. Tag: para +#: batch.xml:97 +#, no-c-format +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"StatelessSession インターフェイスで定義されている " +"insert(), update(), delete() は、 低レベルの直接的なデータ" +"ベース操作と考えられます。 結果として、SQLの INSERT, UPDATE, " +"DELETE がそれぞれ即座に実行されます。 このように、これらは " +"Session インターフェイスで定義されている save(), " +"saveOrUpdate(), delete() とは非常に異なる意味を持ちます。" + +#. Tag: title +#: batch.xml:110 +#, no-c-format +msgid "DML-style operations" +msgstr "DMLスタイルの操作" + +#. Tag: para +#: batch.xml:112 +#, no-c-format +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" +"すでに議論したように、自動的かつ透過的なオブジェクト/リレーショナルマッピング" +"は、 オブジェクトの状態の管理であると考えられます。 これはメモリ内のオブジェ" +"クトの状態を利用できるということです。 そのため(SQLの データ操作言" +"語 (DML) 文: INSERT, UPDATE, DELETE を使って)データベース内のデータを直接操" +"作しても、 メモリ内の状態には影響を与えません。 しかしHibernateは、バルクSQL" +"スタイルのDML文実行に対応するメソッドを用意しています。 これはHibernateクエリ" +"言語(HQL) を通して実行されます。" + +#. Tag: para +#: batch.xml:122 +#, no-c-format +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"UPDATEDELETE 文の疑似構文は: " +"( UPDATE | DELETE ) FROM? エンティティ名 (WHERE 条件節)? " +"です。 注意すべき点がいくつかあります:" + +#. Tag: para +#: batch.xml:130 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "from節において、FROMキーワードはオプションです。" + +#. Tag: para +#: batch.xml:135 +#, no-c-format +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "" +"from節では単一のエンティティ名だけが可能で、 任意で別名を付けることができま" +"す。 エンティティ名に別名が与えられると、どのようなプロパティ参照も、 その別" +"名を使って修飾しなければなりません。 もしエンティティ名に別名が与えられなけれ" +"ば、 どのようなプロパティ参照も修飾してはなりません。" + +#. Tag: para +#: batch.xml:143 +#, no-c-format +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"(暗黙的であれ明示的であれ)結合 をバルクHQLクエリ内で指定することはできません。 サブクエリはwhere節で使" +"うことができます サブクエリそのものは、結合を含められます。" + +#. Tag: para +#: batch.xml:150 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "where節はオプションです。" + +#. Tag: para +#: batch.xml:156 +#, no-c-format +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"例として、HQLの UPDATE を実行するには、 Query." +"executeUpdate() メソッドを使ってください。 (このメソッドはおなじみ" +"のJDBC PreparedStatement.executeUpdate() から名付けられま" +"した): d" + +#. Tag: programlisting +#: batch.xml:162 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:164 +#, no-c-format +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"HQLの UPDATE 文は、デフォルトでは、作用するエンティティの " +"versiontimestamp プロパティの値には" +"影響しません。 これはEJB3の仕様にも受け継がれています。 しかし " +"versioned update を使って、 version や " +"timestamp プロパティの値を強制的にリセットさせることができ" +"ます。 これは UPDATE キーワードの後に VERSIONED キーワードを追加することで行えます。" + +#. Tag: programlisting +#: batch.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:176 +#, no-c-format +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"カスタムバージョン型(org.hibernate.usertype.UserVersionType) は update versioned 文と一緒に使えないことに注" +"意してください。" + +#. Tag: para +#: batch.xml:181 +#, no-c-format +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"HQLの DELETE を実行するには、 同じ Query." +"executeUpdate() メソッドを使ってください:" + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"Query.executeUpdate() メソッドが返す int の値は、この操作が影響を及ぼしたエンティティの数です。 これが影響す" +"るデータベース内の行数と、相互に関係するかどうかを考えてみてください。 HQLバ" +"ルク操作は、結果として、実際のSQL文が複数実行されることになります。 例えば" +"joined-subclassです。 返される数は、その文によって影響された実際のエンティ" +"ティの数を示します。 joined-subclassの例に戻ると、サブクラスの一つに対する削" +"除は、 そのサブクラスがマッピングされたテーブルだけではなく、 「ルート」テー" +"ブルと継承階層をさらに下ったjoined-subclassのテーブルの削除になります。" + +#. Tag: para +#: batch.xml:199 +#, no-c-format +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"INSERT 文の疑似構文は: INSERT INTO エンティティ" +"名 プロパティリスト select文 です。 注意すべき点がいくつかありま" +"す:" + +#. Tag: para +#: batch.xml:207 +#, no-c-format +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" +"INSERT INTO ... SELECT ... の形式だけがサポートされています。 INSERT " +"INTO ... VALUES ... の形式はサポートされていません。" + +#. Tag: para +#: batch.xml:210 +#, no-c-format +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" +"プロパティリストは、SQLの INSERT 文における カラ" +"ムの仕様 に類似しています。 継承のマッピングに含まれるエンティティ" +"に対して、 クラスレベルで直接定義されたプロパティだけが、プロパティリストに使" +"えます。 スーパークラスのプロパティは認められず、サブクラスのプロパティは効果" +"がありません。 言い換えると INSERT 文は、本質的にポリモー" +"フィックではありません。" + +#. Tag: para +#: batch.xml:220 +#, no-c-format +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "" +"select文の返り値の型がinsert文が期待する型とマッチしていれば、 そのselect文は" +"妥当なHQL selectクエリとなりえます。 現在このチェックをデータベースへ任せるの" +"ではなく、クエリのコンパイル時にチェックします。 このことは、" +"equalとは違い、 Hibernateの Type 間" +"の equivalent に関する 問題を引き起こすことに注意してく" +"ださい。 これは org.hibernate.type.DataType として定義され" +"たプロパティと、 org.hibernate.type.TimestampType として定" +"義されたプロパティの間のミスマッチの問題を引き起こします。 データベースがそれ" +"らを区別できなくても、変換することができても、この問題は発生します。" + +#. Tag: para +#: batch.xml:232 +#, no-c-format +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" +"idプロパティに対して、insert文には二つの選択肢があります。 プロパティリストで" +"明示的にidプロパティを指定するか (この場合、対応するselect式から値が取られま" +"す)、 プロパティリストから除外するか (この場合、生成される値が使われます)" +"のいずれかです。 後者の選択肢は、データベース内を操作するidジェネレータを使う" +"ときのみ、利用可能です。 この選択肢を採る場合、「インメモリ」型のジェネレータ" +"を使うと、構文解析時に例外が発生します。 この議論では、インデータベース型ジェ" +"ネレータは org.hibernate.id.SequenceGenerator (とそのサブ" +"クラス)と、org.hibernate.id.PostInsertIdentifierGenerator の実装であると考えています。 ここで最も注意すべき例外は、" +"org.hibernate.id.TableHiLoGenerator です。 値を取得する選" +"択可能な方法がないため、このジェネレータを使うことはできません。" + +#. Tag: para +#: batch.xml:247 +#, no-c-format +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" +"versiontimestamp としてマッピングさ" +"れるプロパティに対して、 insert文には二つの選択肢があります。 プロパティリス" +"トで明示的にプロパティを指定するか (この場合、対応するselect式から値が取られ" +"ます)、 プロパティリストから除外するか (この場合、org.hibernate." +"type.VersionType で定義された シード値 が使われ" +"ます)のいずれかです。" + +#. Tag: para +#: batch.xml:257 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "HQLの INSERT 文の実行例です:" + +#. Tag: programlisting +#: batch.xml:261 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/best_practices.po b/documentation/envers/src/main/docbook/ja-JP/content/best_practices.po new file mode 100644 index 0000000000..6d4f556b27 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/best_practices.po @@ -0,0 +1,447 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:5 +#, no-c-format +msgid "Best Practices" +msgstr "ベストプラクティス" + +#. Tag: term +#: best_practices.xml:9 +#, no-c-format +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"クラスは細かい粒度で書き <component> でマッピングし" +"ましょう。" + +#. Tag: para +#: best_practices.xml:11 +#, no-c-format +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"street(通り), suburb (都市), " +"state(州), postcode (郵便番号)をカ" +"プセル化する Address(住所)クラスを使いましょう。 そうす" +"ればコードが再利用しやすくなり、リファクタリングも簡単になります。" + +#. Tag: term +#: best_practices.xml:19 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "永続クラスには識別子プロパティを定義しましょう。" + +#. Tag: para +#: best_practices.xml:21 +#, no-c-format +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"Hibernateでは識別子プロパティはオプションですが、 使用すべき理由がたくさんあ" +"ります。 識別子は「人工的」(生成された、業務的な意味を持たない) なものにす" +"ることをおすすめします。" + +#. Tag: term +#: best_practices.xml:29 +#, no-c-format +msgid "Identify natural keys." +msgstr "自然キーを見つけましょう。" + +#. Tag: para +#: best_practices.xml:31 +#, no-c-format +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"すべてのエンティティに対して自然キーを見つけて、 <natural-id>" +" でマッピングしましょう。 自然キーを構成するプロパティを比較するた" +"めに、 equals()hashCode() を実装し" +"ましょう。" + +#. Tag: term +#: best_practices.xml:39 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "クラスのマッピングはそれぞれのクラス専用のファイルに書きましょう。" + +#. Tag: para +#: best_practices.xml:41 +#, no-c-format +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"単一の巨大なマッピングドキュメントを使用しないでください。 com.eg." +"Foo クラスなら com/eg/Foo.hbm.xml ファイルにマッ" +"ピングしましょう。 このことは、特にチームでの開発に意味があります。" + +#. Tag: term +#: best_practices.xml:49 +#, no-c-format +msgid "Load mappings as resources." +msgstr "リソースとしてマッピングをロードしましょう。" + +#. Tag: para +#: best_practices.xml:51 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "マッピングを、それらがマッピングするするクラスと一緒に配置しましょう。" + +#. Tag: term +#: best_practices.xml:57 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "クエリ文字列を外部に置くことを考えましょう" + +#. Tag: para +#: best_practices.xml:59 +#, no-c-format +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"クエリがANSI標準でないSQL関数を呼んでいるなら、これはよいプラクティスです。 " +"クエリ文字列をマッピングファイルへ外出しすればアプリケーションがポータブルに" +"なります。" + +#. Tag: term +#: best_practices.xml:67 +#, no-c-format +msgid "Use bind variables." +msgstr "バインド変数を使いましょう。" + +#. Tag: para +#: best_practices.xml:69 +#, no-c-format +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"JDBCの場合と同じように、定数でない値は必ず\"?\"で置き換えましょう。 定数でな" +"い値をバインドするために、クエリで文字列操作を使ってはいけません。 名前付きの" +"パラメータを使うようにするとさらに良いです。" + +#. Tag: term +#: best_practices.xml:77 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "JDBCコネクションを管理してはいけません。" + +#. Tag: para +#: best_practices.xml:79 +#, no-c-format +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"HibernateではアプリケーションがJDBCコネクションを管理することが許されていま" +"す。 しかしこれは最終手段だと思ってください。 組み込みのコネクションプロバイ" +"ダを使うことができなければ、 org.hibernate.connection." +"ConnectionProvider を実装することを考えてください。" + +#. Tag: term +#: best_practices.xml:87 +#, no-c-format +msgid "Consider using a custom type." +msgstr "カスタム型の使用を考えましょう。" + +#. Tag: para +#: best_practices.xml:89 +#, no-c-format +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"あるライブラリから持ってきたJava型を永続化する必要があるとしましょう。 しかし" +"その型には、コンポーネントとしてマッピングするために必要なアクセサがないとし" +"ます。 このような場合は org.hibernate.UserType の実装を考" +"えるべきです。 そうすればHibernate型との実装変換を心配せずにアプリケーション" +"のコードを扱えます。" + +#. Tag: term +#: best_practices.xml:98 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "ボトルネックを解消するにはJDBCをハンドコードしましょう。" + +#. Tag: para +#: best_practices.xml:100 +#, no-c-format +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"システムのパフォーマンスクリティカルな領域では、 ある種の操作にJDBCを直接使う" +"と良いかもしれません。 しかし何がボトルネックになっているか はっき" +"りする までは待ってください。 またJDBCを直接使うからといって、必ず" +"しも速くなるとは限らないことも理解してください。 JDBCを直接使う必要があれば、" +"Hibernateの Session をオープンして、 JDBCコネクションを使" +"うと良いかもしれません。 依然として同じトランザクション戦略とコネクションプロ" +"バイダが使えるからです。" + +#. Tag: term +#: best_practices.xml:110 +#, no-c-format +msgid "Understand Session flushing." +msgstr "Session のフラッシュを理解しましょう。" + +#. Tag: para +#: best_practices.xml:112 +#, no-c-format +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"Sessionが永続状態をデータベースと同期させることがときどきあります。 しかしこ" +"れがあまりに頻繁に起こるようだと、パフォーマンスに影響が出てきます。 自動フ" +"ラッシュを無効にしたり、特定のトランザクションのクエリや操作の順番を変更する" +"ことで、 不必要なフラッシュを最小限にできます。" + +#. Tag: term +#: best_practices.xml:121 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "3層アーキテクチャでは分離オブジェクトの使用を考えましょう。" + +#. Tag: para +#: best_practices.xml:123 +#, no-c-format +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"サーブレット / セッションビーンアーキテクチャを使うとき、 サーブレット層 / " +"JSP層間でセッションビーンでロードした永続オブジェクトをやり取りできます。 そ" +"の際リクエストごとに新しいSessionを使ってください。 また Session." +"merge()Session.saveOrUpdate() を使って、オブ" +"ジェクトとデータベースを同期させてください。" + +#. Tag: term +#: best_practices.xml:132 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "2層アーキテクチャでは長い永続コンテキストの使用を考えましょう。" + +#. Tag: para +#: best_practices.xml:134 +#, no-c-format +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"最高のスケーラビリティを得るには、 データベーストランザクションをできるだけ短" +"くしなければなりません。 しかし長い間実行する アプリケーショントラ" +"ンザクション の実装が必要なことはしばしばです。 これはユーザの視点" +"からは1個の作業単位(unit of work)になります。 アプリケーショントランザク" +"ションはいくつかのクライアントのリクエスト/レスポンスサイクルにまたがりま" +"す。 アプリケーショントランザクションの実装に分離オブジェクトを使うのは一般的" +"です。 そうでなければ、2層アーキテクチャの場合は特に適切なことですが、 アプリ" +"ケーショントランザクションのライフサイクル全体に対して 単一のオープンな永続化" +"コンテキスト(セッション)を維持してください。 そして単純にリクエストの最後に" +"JDBCコネクションから切断し、 次のリクエストの最初に再接続します。 決して複数" +"のアプリケーショントランザクションユースケースに渡って 1個のSessionを使い回さ" +"ないでください。 そうでなければ、古いデータで作業することになります。" + +#. Tag: term +#: best_practices.xml:148 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "例外を復帰可能なものとして扱ってはいけません。" + +#. Tag: para +#: best_practices.xml:150 +#, no-c-format +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"これは「ベスト」プラクティス以上の、必須のプラクティスです。 例外が発生したと" +"きは Transaction をロールバックして、 Session をクローズしてください。 そうしないとHibernateはメモリの状態が永続状" +"態を正確に表現していることを保証できません。 この特別な場合として、与えられた" +"識別子を持つインスタンスがデータベースに存在するかどうかを判定するために、 " +"Session.load() を使うことはやめてください。 その代わりに " +"Session.get() かクエリを使ってください。" + +#. Tag: term +#: best_practices.xml:160 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "関連にはなるべく遅延フェッチを使いましょう。" + +#. Tag: para +#: best_practices.xml:162 +#, no-c-format +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"即時フェッチは控えめにしましょう。 二次キャッシュには完全に保持されないような" +"クラスの関連には、 プロキシと遅延コレクションを使ってください。 キャッシュさ" +"れるクラスの関連、つまりキャッシュがヒットする可能性が非常に高い関連は、 " +"lazy=\"false\" で積極的なフェッチを明示的に無効にしてくだ" +"さい。 結合フェッチが適切な特定のユースケースには、 クエリで left " +"join fetch を使ってください。" + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"フェッチされていないデータに関わる問題を避けるために、 ビューの中で" +"オープンセッションを使う(open session in view) パターンか、統制さ" +"れた 組み立てフェーズ(assembly phase) を使いましょう。" + +#. Tag: para +#: best_practices.xml:177 +#, no-c-format +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernateは Data Transfer Objects (DTO)を書く退屈な作業" +"から開発者を解放します。 伝統的なEJBアーキテクチャではDTOは二つ目的がありま" +"す: 1つ目は、エンティティビーンがシリアライズされない問題への対策です。 2つ" +"目は、プレゼンテーション層に制御が戻る前に、 ビューに使われるすべてのデータが" +"フェッチされて、DTOに復元されるような組み立てフェーズを暗黙的に定義します。 " +"Hibernateでは1つ目の目的が不要になります。 しかしビューのレンダリング処理の" +"間、永続コンテキスト(セッション)をオープンにしたままにしなければ、 組み立て" +"フェーズはまだ必要です(分離オブジェクトの中のどのデータが利用可能かについ" +"て、 プレゼンテーション層と厳密な取り決めをしているビジネスメソッドを考えてみ" +"てください)。 これはHibernate側の問題ではありません。 トランザクション内で安" +"全にデータアクセスするための基本的な要件です。" + +#. Tag: term +#: best_practices.xml:191 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "Hibernateからビジネスロジックを抽象化することを考えましょう。" + +#. Tag: para +#: best_practices.xml:193 +#, no-c-format +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"インターフェイスで(Hibernateの)データアクセスコードを隠蔽しましょう。 " +"DAOThread Local Session パター" +"ンを組み合わせましょう。 UserType でHibernateに関連付ける" +"と、 ハンドコードしたJDBCで永続化するクラスを持つこともできます。 (このアド" +"バイスは「十分大きな」アプリケーションに対してのものです。 テーブルが5個しか" +"ないようなアプリケーションには当てはまりません。)" + +#. Tag: term +#: best_practices.xml:203 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "珍しい関連マッピングは使わないようにしましょう。" + +#. Tag: para +#: best_practices.xml:205 +#, no-c-format +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"よいユースケースに本当の多対多関連があることは稀(まれ)です。 ほとんどの場合" +"「リンクテーブル」の付加的な情報が必要になります。 この場合、リンククラスに2" +"つの1対多関連を使う方がずっと良いです。 実際ほとんどの場合関連は1対多と多対1" +"なので、 他のスタイルの関連を使うときは本当に必要かどうかを考えてみてくださ" +"い。" + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "なるべく双方向関連にしましょう。" + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"単方向関連は双方向に比べて検索が難しくなります。 大きなアプリケーションで" +"は、 ほとんどすべての関連が双方向にナビゲーションできなければなりません。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/collection_mapping.po b/documentation/envers/src/main/docbook/ja-JP/content/collection_mapping.po new file mode 100644 index 0000000000..d2c971103f --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/collection_mapping.po @@ -0,0 +1,1899 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:5 +#, no-c-format +msgid "Collection Mapping" +msgstr "コレクションのマッピング" + +#. Tag: title +#: collection_mapping.xml:8 +#, no-c-format +msgid "Persistent collections" +msgstr "コレクションの永続化" + +#. Tag: para +#: collection_mapping.xml:10 +#, no-c-format +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"コレクション型のフィールドを永続化するには、 そのコレクション型がインターフェ" +"イス型である必要があります。 例えば、" + +#. Tag: programlisting +#: collection_mapping.xml:15 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:17 +#, no-c-format +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"実在するインターフェイスには java.util.Set、 " +"java.util.Collectionjava.util.List、 " +"java.util.Mapjava.util.SortedSet、 " +"java.util.SortedMap などがあります。 または、任意のイン" +"ターフェイスが使えます! (ただし、任意のインターフェイスを使用する場合は、 " +"org.hibernate.usertype.UserCollectionType の実装クラスを作" +"成する必要があります。)" + +#. Tag: para +#: collection_mapping.xml:26 +#, no-c-format +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"HashSet のインスタンスを持つインスタンス変数が どのように" +"初期化されるかに注目してみましょう。 これは新たに生成された(永続化されていな" +"い)コレクション型のプロパティを 初期化する最適な方法です。 (例えば " +"persist() により)インスタンスを永続化しようとしたとき、 " +"Hibernateは HashSet をHibernate独自の Set の実装クラスに置き換えます。 このため、次のようなエラーには注意が必" +"要です。" + +#. Tag: programlisting +#: collection_mapping.xml:36 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:38 +#, no-c-format +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"Hibernateにより注入された永続性コレクションは、インターフェイス型に応じて、 " +"HashMapHashSetTreeMapTreeSetArrayList のように" +"振舞います。" + +#. Tag: para +#: collection_mapping.xml:45 +#, no-c-format +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"コレクションインスタンスは、値型として普通に振舞います。 永続化オブジェクトに" +"参照されたときに自動的に永続化され、 参照がなくなったときに自動的に削除されま" +"す。 もしある永続化オブジェクトから別の永続化オブジェクトに渡されたら、 その" +"要素は現在のテーブルから別のテーブルに移動するかもしれません。 2つのエンティ" +"ティが同じコレクションインスタンスを共有してはいけません。 リレーショナルモデ" +"ルをベースにしているため、コレクション型のプロパティに null値を代入しても意味" +"がありません。 つまりHibernateは参照先のないコレクションと空のコレクションを" +"区別しません。" + +#. Tag: para +#: collection_mapping.xml:56 +#, no-c-format +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"しかしそれほど心配しなくても構いません。 普段使っているJavaのコレクションと同" +"じように、永続化コレクションを使ってください。 双方向関連の意味を理解すればよ" +"いのです(これは後ほど説明します)。" + +#. Tag: title +#: collection_mapping.xml:65 +#, no-c-format +msgid "Collection mappings" +msgstr "コレクションのマッピング" + +#. Tag: para +#: collection_mapping.xml:67 +#, no-c-format +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"コレクションをマッピングするためのマッピング要素は、インターフェイスの型に依" +"存します。 例えば、<set> 要素は Set 型を マッピングするために使います。" + +#. Tag: programlisting +#: collection_mapping.xml:73 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:75 +#, no-c-format +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"マッピング要素には <set> の他に <" +"list><map><bag><array><primitive-array>" +" があります。 代表として、<map> 要素を下記" +"に示します。" + +#. Tag: programlisting +#: collection_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:103 +#, no-c-format +msgid "name the collection property name" +msgstr "name コレクション型であるプロパティの名前" + +#. Tag: para +#: collection_mapping.xml:108 +#, no-c-format +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (オプション - デフォルトはプロパティ名)コレクショ" +"ンテーブルの名前 (一対多関連では使用しません)。" + +#. Tag: para +#: collection_mapping.xml:114 +#, no-c-format +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (オプション)テーブルスキーマの名前。 ルート要素で" +"宣言されているスキーマより優先されます。" + +#. Tag: para +#: collection_mapping.xml:120 +#, no-c-format +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (オプション - デフォルトは true) 遅延フェッチを無効にし、関連を常に即時にフェッチにするために使用し" +"ます。 または、「extra-lazy」フェッチを有効にするために使用します。 「extra-" +"lazy」フェッチは、ほとんどの操作ではコレクションを初期化しません (非常に大き" +"なコレクションに適しています)。" + +#. Tag: para +#: collection_mapping.xml:129 +#, no-c-format +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (オプション - デフォルトは false) このコレクションが双方向関連の「逆」側であるとマークします。" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (オプション - デフォルトは none) 子エンティティへのカスケード操作を有効にします。" + +#. Tag: para +#: collection_mapping.xml:141 +#, no-c-format +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort (オプション)コレクションを自然な順序でソートする場" +"合は natural を指定します。 あるいはComparatorクラスを指定" +"します。" + +#. Tag: para +#: collection_mapping.xml:147 +#, no-c-format +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (オプション、JDK1.4のみ) MapSet、bagのイテレーション順序を定義する テーブル" +"カラムを指定すると共に、 オプションとして asc、" +"desc を指定します。" + +#. Tag: para +#: collection_mapping.xml:154 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (オプション)コレクションの検索や削除の際に使う 任" +"意のSQLのWHERE 条件を指定します (利用可能なデータの一部分" +"だけをコレクションが含むべきときに、これは有用です)。" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch(オプション - デフォルトは select) 外部結合によるフェッチ、順次選択フェッチ(sequential select " +"fetch)、 順次サブセレクトフェッチ(sequential subselect fetch)のどれかを選" +"択してください。" + +#. Tag: para +#: collection_mapping.xml:168 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (オプション - デフォルトは 1) コレクションのインスタンスの遅延フェッチのための「バッチサイズ」を" +"指定します。" + +#. Tag: para +#: collection_mapping.xml:174 +#, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access (オプション - デフォルトは property) コレクション型プロパティの値にアクセスするために使用する戦略です。" + +#. Tag: para +#: collection_mapping.xml:180 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"optimistic-lock(オプション - デフォルトは true) コレクションの状態を変えることによって、 そのオーナーであるエン" +"ティティのバージョンがインクリメントされるかを指定します。 (一対多関連では、" +"ほとんどの場合において無効に設定するのが妥当です。)" + +#. Tag: para +#: collection_mapping.xml:188 +#, no-c-format +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable(オプション - デフォルトは truefalse 値は、コレクションの要素が変更されないこ" +"とを表します (ある場合には、少しパフォーマンスを高めます)。" + +#. Tag: title +#: collection_mapping.xml:198 +#, no-c-format +msgid "Collection foreign keys" +msgstr "コレクションの外部キー" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"コレクションのインスタンスは、データベース内では、 そのコレクションを所有する" +"エンティティの外部キーによって識別されます。 この外部キーはコレクションテーブ" +"ルの コレクションキーカラム と呼ばれます。 コレクション" +"キーカラムは <key> 要素によりマッピングします。" + +#. Tag: para +#: collection_mapping.xml:208 +#, no-c-format +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"外部キーカラムにはnull設定制約があるかもしれません。 ほとんどのコレクションに" +"当てはまるでしょう。 単方向の一対多関連において、外部キーカラムはデフォルトで" +"nullを許す設定になっています。 よって、not-null=\"true\" " +"を指定する必要があるかもしれません。" + +#. Tag: programlisting +#: collection_mapping.xml:215 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:217 +#, no-c-format +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "" +"外部キーの制約が ON DELETE CASCADE を使うかもしれません。" + +#. Tag: programlisting +#: collection_mapping.xml:221 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:223 +#, no-c-format +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "" +"<key> 要素のすべての定義については前の章を参照してく" +"ださい。" + +#. Tag: title +#: collection_mapping.xml:231 +#, no-c-format +msgid "Collection elements" +msgstr "コレクションの要素" + +#. Tag: para +#: collection_mapping.xml:233 +#, no-c-format +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"コレクションは他のHibernateの型のほとんど(すべての基本型、カスタム型、コン" +"ポーネント、 他のエンティティへの参照)を格納することができます。 次の点は重" +"要な違いになります。 コレクションに格納されたオブジェクトが「値」セマンティク" +"スとして扱われるのか (ライフサイクルはコレクションのオーナーに完全に依存しま" +"す)、 もしくはそれ自身のライフサイクルを持った別のエンティティへの参照である" +"かのかという違いです。 後者は、2つのオブジェクト間の「リンク」をコレクション" +"に保持していると見なしているだけです。" + +#. Tag: para +#: collection_mapping.xml:242 +#, no-c-format +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"格納される型は コレクション要素型 と呼ばれます。 コレク" +"ション要素は、<element> または <" +"composite-element> によりマッピングされ、エンティティへの参照の" +"場合には <one-to-many> または <many-to-" +"many> によりマッピングされます。 最初の二つは値として要素をマッ" +"ピングし、次の二つはエンティティの関連をマッピングするのに使われます。" + +#. Tag: title +#: collection_mapping.xml:254 +#, no-c-format +msgid "Indexed collections" +msgstr "インデックス付きのコレクション" + +#. Tag: para +#: collection_mapping.xml:256 +#, no-c-format +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"setとbagを除く全てのコレクションマッピングには、 コレクションテーブルの中に " +"インデックス用のカラム が必要です。 そのカラムに、配列" +"や List のインデックス、 もしくは Map " +"のキーをマッピングします。 Map のインデックスは、 " +"<map-key> によりマッピングされた基本型か、 " +"<map-key-many-to-many> によりマッピングされたエン" +"ティティの関連か、 あるいは <composite-map-key> によ" +"りマッピングされたコンポジット型になります。 配列かリストのインデックスは、常" +"に integer 型で、 <list-index> 要" +"素によりマッピングします。 マッピングされたカラムにはシーケンシャルな整数を格" +"納します(デフォルトでは0から番号が付けられます)。" + +#. Tag: sect2 +#: collection_mapping.xml:267 +#, no-c-format +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:348 +#, no-c-format +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"もしテーブルにインデックスカラムがなくても、プロパティ型として " +"List を使いたければ、 Hibernateの <bag> としてプロパティをマッピングします。 bagはデータベースから復元され" +"る時、順序を保持しません。 しかし、(メモリ上で)ソートしたり、(SQLで)順序" +"付けしたり(order by)することもできます。" + +#. Tag: para +#: collection_mapping.xml:357 +#, no-c-format +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"多くの一般的なリレーショナルモデルをカバーしたために、 コレクションのために利" +"用できるマッピングにはかなりの幅があります。 様々なマッピング宣言がどのように" +"データベーステーブルに変換されるかを知るために、 スキーマ生成ツールを使ってみ" +"ると良いでしょう。" + +#. Tag: title +#: collection_mapping.xml:364 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "値のコレクションと多対多関連" + +#. Tag: para +#: collection_mapping.xml:366 +#, no-c-format +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "" +"値のコレクションや多対多関連は、専用の コレクションテーブル が必要です。 このテーブルは、外部キーカラムと、 コレク" +"ション要素のカラム と、 場合によってはインデックスカラムを持ちま" +"す。" + +#. Tag: para +#: collection_mapping.xml:373 +#, no-c-format +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "" +"値のコレクションのために、<element>タグを使用しま" +"す。" + +#. Tag: sect2 +#: collection_mapping.xml:375 +#, no-c-format +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:480 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "以下にいくつか例を示します。 まずはStringのsetに関しての例です。" + +#. Tag: programlisting +#: collection_mapping.xml:484 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:486 +#, no-c-format +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"整数値を含むbag(bagは order-by 属性によって反復順序が定義" +"されています)" + +#. Tag: programlisting +#: collection_mapping.xml:491 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:493 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "エンティティの配列 - この場合、多対多の関連です。" + +#. Tag: programlisting +#: collection_mapping.xml:497 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:499 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "文字列と日付のmap" + +#. Tag: programlisting +#: collection_mapping.xml:503 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:505 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "コンポーネントのlist(次の章で詳しく説明します)" + +#. Tag: programlisting +#: collection_mapping.xml:509 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:514 +#, no-c-format +msgid "One-to-many associations" +msgstr "一対多関連" + +#. Tag: para +#: collection_mapping.xml:516 +#, no-c-format +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "" +"一対多関連 は、コレクション・テーブルを介さず、 外部キー" +"により2つのクラスのテーブルを関連付けます。 このマッピングは標準的なJavaのコ" +"レクションのセマンティクスをいくつか失います。" + +#. Tag: para +#: collection_mapping.xml:524 +#, no-c-format +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "" +"エンティティクラスのインスタンスは、 2つ以上のコレクションのインスタンスに属" +"してはいけません。" + +#. Tag: para +#: collection_mapping.xml:530 +#, no-c-format +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"コレクションに含まれるエンティティクラスのインスタンスは、 コレクションイン" +"デックスの値として2度以上現れてはいけません。" + +#. Tag: para +#: collection_mapping.xml:537 +#, no-c-format +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "" +"Product から Part への関連は、 " +"Part テーブルへの外部キーカラムと、場合によってはインデッ" +"クスカラムが必要です。 <one-to-many> タグは、これが" +"一対多関連であることを表しています。" + +#. Tag: programlisting +#: collection_mapping.xml:550 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:553 +#, no-c-format +msgid "class (required): The name of the associated class." +msgstr "class (必須): 関連クラスの名前。" + +#. Tag: para +#: collection_mapping.xml:558 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (オプション - デフォルトは exception): 参照先の行がないキャッシュされた識別子をどのように扱うかを指定し" +"ます。 ignore を指定すると、行がないことを関連がないものと" +"して扱います。" + +#. Tag: para +#: collection_mapping.xml:565 +#, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"entity-name (オプション): class の代" +"替である関連クラスのエンティティ名。 class の代わりに指定" +"する、関連クラスのエンティティ名。" + +#. Tag: para +#: collection_mapping.xml:573 +#, no-c-format +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"<one-to-many> 要素はカラムを宣言する必要がないことに" +"注意してください。 同様に テーブル 名を指定する必要もあり" +"ません。" + +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"とても重要な注意: もし <one-to-many> 関連の外部キーカラムが NOT NULLと宣言された場" +"合、 <key> マッピングに not-null=\"true\" を宣言するか、 コレクションマッピングに inverse=\"true\" を付けた上で、 双方向関連を使う 必要がありま" +"す。 双方向関連についてはこの章の後のほうで説明します。" + +#. Tag: para +#: collection_mapping.xml:588 +#, no-c-format +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"次の例は、名称(Part の永続的なプロパティである " +"partName) による Part エンティティの" +"mapを表しています。 formulaによるインデックスを使っていることに注意してくださ" +"い。" + +#. Tag: programlisting +#: collection_mapping.xml:594 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:600 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "高度なコレクション・マッピング" + +#. Tag: title +#: collection_mapping.xml:603 +#, no-c-format +msgid "Sorted collections" +msgstr "ソートされたコレクション" + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernateは java.util.SortedMapjava.util." +"SortedSet を実装したコレクションをサポートしています。 開発者はマッ" +"ピング定義ファイルにコンパレータを指定しなければなりません。" + +#. Tag: programlisting +#: collection_mapping.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:612 +#, no-c-format +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"sort 属性に設定できる値は unsorted と " +"natural および、java.util.Comparator を" +"実装したクラスの名前です。" + +#. Tag: para +#: collection_mapping.xml:618 +#, no-c-format +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"ソートされたコレクションは実質的には java.util.TreeSet や " +"java.util.TreeMap のように振舞います。" + +#. Tag: para +#: collection_mapping.xml:623 +#, no-c-format +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"もしデータベース自身にコレクションの要素を並べさせたいなら、 setbagmaporder-" +"by 属性を使います。 この解決法はJDK1.4、もしくはそれ以上のバージョ" +"ンで利用可能です (LinkedHashSet または " +"LinkedHashMapを使って実装されています)。 整列はメモリ上で" +"はなく、SQLクエリ内で実行されます。" + +#. Tag: programlisting +#: collection_mapping.xml:632 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:634 +#, no-c-format +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"order-by 属性の値がSQL命令であって、HQL命令ではないことに" +"注意してください!" + +#. Tag: para +#: collection_mapping.xml:639 +#, no-c-format +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"関連は、コレクションの filter() を使うことで、 実行時に任" +"意のcriteriaによってソートすることも可能です。" + +#. Tag: programlisting +#: collection_mapping.xml:644 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:649 +#, no-c-format +msgid "Bidirectional associations" +msgstr "双方向関連" + +#. Tag: para +#: collection_mapping.xml:651 +#, fuzzy, no-c-format +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"双方向関連 は関連のどちら「側」からでもナビゲーションで" +"きます。 2種類の双方向関連がサポートされています。 " + +#. Tag: term +#: collection_mapping.xml:658 +#, no-c-format +msgid "one-to-many" +msgstr "one-to-many" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "片側がsetかbag、もう片方が単一値です。" + +#. Tag: term +#: collection_mapping.xml:666 +#, no-c-format +msgid "many-to-many" +msgstr "many-to-many" + +#. Tag: para +#: collection_mapping.xml:668 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "両側がsetかbagです。" + +#. Tag: para +#: collection_mapping.xml:677 +#, no-c-format +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"2つの多対多関連で同じデータベーステーブルをマッピングし、 片方を " +"inverse として宣言することで、 双方向の多対多関連を指定" +"することが出来ます (どちらをinverseに選んだとしても、そちら側にはインデック" +"ス付きのコレクションは使えません)。" + +#. Tag: para +#: collection_mapping.xml:684 +#, no-c-format +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"次に双方向の多対多関連の例を示します。 各カテゴリは多数のアイテムを持つことが" +"でき、各アイテムは多くのカテゴリに属することが出来ます。" + +#. Tag: programlisting +#: collection_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:691 +#, no-c-format +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"関連のinverse側にのみ行われた変更は永続化 されません。 " +"これは、Hibernateは全ての双方向関連について、メモリ上に2つの表現を持っている" +"という意味です。 つまり一つはAからBへのリンクで、もう一つはBからAへのリンクと" +"いうことです。 Javaのオブジェクトモデルについて考え、Javaで双方向関係をどう" +"やって作るかを考えれば、 これは理解しやすいです。下記に、Javaでの双方向関連を" +"示します。" + +#. Tag: programlisting +#: collection_mapping.xml:699 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:701 +#, no-c-format +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "" +"関連のinverseではない側は、メモリ上の表現をデータベースに保存するのに使われま" +"す。" + +#. Tag: para +#: collection_mapping.xml:705 +#, no-c-format +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"双方向の一対多関連を定義するには、 一対多関連を多対一関連と同じテーブルのカラ" +"ムにマッピングし、 多側に inverse=\"true\" と宣言します。" + +#. Tag: programlisting +#: collection_mapping.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:713 +#, no-c-format +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"関連の片側に inverse=\"true\" を設定しても、 カスケード操" +"作に影響を与えません。これらは直交した概念です!" + +#. Tag: title +#: collection_mapping.xml:721 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "インデックス付きコレクションと双方向関連" + +#. Tag: para +#: collection_mapping.xml:722 +#, no-c-format +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"片側が <list><map> であ" +"る 双方向関連は、特によく考える必要があります。 インデックスカラムにマップさ" +"れる子クラスのプロパティがある場合は、問題ないです。 コレクションのマッピング" +"で inverse=\"true\" を使い続けられます。" + +#. Tag: programlisting +#: collection_mapping.xml:729 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"しかし、子クラスにそのようなプロパティがない場合は、 関連を真に双方向であると" +"考えることができません (関連の片側に利用できる情報がありますが、もう一方には" +"ありません)。 この場合は、コレクションに inverse=\"true\" をマッピングできません。 代わりに、次のようなマッピングが使えます。" + +#. Tag: programlisting +#: collection_mapping.xml:738 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:740 +#, no-c-format +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"注意: このマッピングでは、関連のコレクション値の側は、 外部キーをアップデー" +"トする責任があります。" + +#. Tag: title +#: collection_mapping.xml:748 +#, no-c-format +msgid "Ternary associations" +msgstr "3項関連" + +#. Tag: para +#: collection_mapping.xml:750 +#, no-c-format +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"3項関連のマッピングには3つのアプローチがあります。 1つ目は関連をインデックス" +"として Map を使用するアプローチです。" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:759 +#, no-c-format +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"2つ目は単純に関連をエンティティ・クラスとしてモデルを作り直すアプローチで、 頻" +"繁に使われます。" + +#. Tag: para +#: collection_mapping.xml:764 +#, no-c-format +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "" +"最後はcomposite要素を使うアプローチです。これに関する議論は後ほど行います。" + +#. Tag: literal +#: collection_mapping.xml:771 +#, no-c-format +msgid "Using an <idbag>" +msgstr "<idbag>の使用" + +#. Tag: para +#: collection_mapping.xml:773 +#, no-c-format +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"複合キーは悪いもので、エンティティは人工の識別子(代理キー)を持つべきであると" +"いう考え方からは、 多対多関連と値のコレクションを複合キーを用いたテーブルへ" +"マッピングするのは少し奇妙に感じるかもしれません! 確かにこの考え方には議論の" +"余地があります。 純粋な関連テーブルは代理キーを使っても利益を得られないように" +"思えるからです (合成値のコレクションは利益がある かも " +"しれませんが)。 とはいえ、Hibernateは代理キーを持つテーブルへ多対多関連と値" +"のコレクションを マッピングする機能も備えています。" + +#. Tag: para +#: collection_mapping.xml:784 +#, no-c-format +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"bagのセマンティックスを持った List(または " +"Collection)を <idbag> 要素にマッ" +"ピングできます。" + +#. Tag: programlisting +#: collection_mapping.xml:789 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:791 +#, no-c-format +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"ご存知のように <idbag> はエンティティ・クラスのよう" +"に 人工的なidジェネレータを持っています! 異なる代理キーをそれぞれのコレク" +"ションの列に割り当てます。 しかしながら、Hibernateはある行の代理キーの値を見" +"つけ出す機構を持っていません。" + +#. Tag: para +#: collection_mapping.xml:798 +#, no-c-format +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"<idbag> を更新するパフォーマンスは 通常の " +"<bag> よりも良いことに注目してください! Hibernateは" +"個々の行を効果的に見つけることができ、 listやmap、setのように個別にその行を更" +"新、削除できます。" + +#. Tag: para +#: collection_mapping.xml:805 +#, no-c-format +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"現在の実装では、native というid生成戦略を <" +"idbag> コレクションの識別子に対して使えません。" + +#. Tag: title +#: collection_mapping.xml:829 +#, no-c-format +msgid "Collection examples" +msgstr "コレクションの例" + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "これまでの節の説明では理解しにくいので、以下の例を見てください。" + +#. Tag: programlisting +#: collection_mapping.xml:836 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:838 +#, no-c-format +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"このクラスは Child インスタンスのコレクションを持っていま" +"す。 もし各々のchildが最大でも一つのparentを持っているならば、最も自然なマッ" +"ピングは一対多関連です。" + +#. Tag: programlisting +#: collection_mapping.xml:844 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:846 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "これは以下のテーブル定義にマッピングします。" + +#. Tag: programlisting +#: collection_mapping.xml:850 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:852 +#, no-c-format +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"もしparentが 要求 されるなら、双方向の一対多関連を使用し" +"てください。" + +#. Tag: programlisting +#: collection_mapping.xml:857 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:859 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "NOT NULL 制約に注意してください。" + +#. Tag: programlisting +#: collection_mapping.xml:863 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:865 +#, no-c-format +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"あるいは、もしこの関連は単方向であるべきと強く主張するのであれば、 " +"<key>NOT NULL 制約を宣言でき" +"ます。" + +#. Tag: programlisting +#: collection_mapping.xml:871 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:873 +#, no-c-format +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "一方で、もしchildが複数のparentを持てるならば、多対多関連が妥当です。" + +#. Tag: programlisting +#: collection_mapping.xml:878 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:880 +#, no-c-format +msgid "Table definitions:" +msgstr "テーブル定義は以下のようになります。" + +#. Tag: programlisting +#: collection_mapping.xml:884 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:886 +#, no-c-format +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"parent/child関係のマッピングについてのより多くの例や完全な手順が必要であれ" +"ば、 をご覧ください。" + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "また、さらに特殊な関連マッピングも可能です。次の章で詳しく述べます。" + +#~ msgid "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." +#~ msgstr "" +#~ "column_name(必須):コレクションインデックスの値を保持" +#~ "するカラムの名前。" + +#~ msgid "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." +#~ msgstr "" +#~ "base(オプション、デフォルトは 0): " +#~ "リストもしくは配列の最初の要素に該当するインデックスカラムの値。" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." +#~ msgstr "" +#~ "column(オプション): コレクションインデックスの値を保" +#~ "持するカラムの名前。" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." +#~ msgstr "" +#~ "formula(オプション): Mapのキーを評価するのに使われる" +#~ "SQL式。" + +#~ msgid "type (reguired): The type of the map keys." +#~ msgstr "type(必須): Mapのキーの型。" + +#~ msgid "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." +#~ msgstr "" +#~ "column (オプション): コレクションインデックスの値のた" +#~ "めの外部キーカラムの名前。" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." +#~ msgstr "" +#~ "formula (オプション): Mapのキーのための外部キーを評価" +#~ "するために使うSQL式。" + +#~ msgid "" +#~ "class (required): The entity class used as the map key." +#~ msgstr "" +#~ "class (必須): Mapのキーとして使われるエンティティクラ" +#~ "ス。" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." +#~ msgstr "" +#~ "column (オプション): コレクションの要素の値を保持する" +#~ "カラムの名前。" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." +#~ msgstr "" +#~ "formula (オプション): 要素を評価するために使うSQL式。" + +#~ msgid "" +#~ "type (required): The type of the collection element." +#~ msgstr "type (必須)コレクションの要素の型。" + +#~ msgid "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." +#~ msgstr "" +#~ "多対多関連<many-to-many> 要素で指定します。" + +#~ msgid "" +#~ "column (optional): The name of the element foreign key " +#~ "column." +#~ msgstr "" +#~ "column (オプション): 外部キーカラムの要素の名前。" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." +#~ msgstr "" +#~ "formula (オプション): 外部キー値の要素を評価するため" +#~ "に使うSQL式。" + +#~ msgid "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." +#~ msgstr "" +#~ "fetch (オプション - デフォルトは join): 関連のために、外部結合か順次選択フェッチを有効にします。 これは" +#~ "特殊なケースですが、エンティティと他のエンティティとの多対多関係を (1つ" +#~ "の SELECT により)完全に即時にフェッチするためには、 そ" +#~ "のコレクション自体だけでなく、 ネストした要素である <many-to-" +#~ "many> のこの属性についても join フェッチを" +#~ "有効する必要があります。" + +#~ msgid "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." +#~ msgstr "" +#~ "unique (オプション): 外部キーカラムのユニーク制約の" +#~ "DDL生成を有効にします。 これは、関連の多重度を事実上一対多にします。" + +#~ msgid "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." +#~ msgstr "" +#~ "not-found (オプション - デフォルトは " +#~ "exception) 参照先の行がない外部キーをどのように扱うか" +#~ "を指定します。 ignore にすると、行がないことを関連が無" +#~ "いものとして扱います。" + +#~ msgid "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." +#~ msgstr "" +#~ "property-ref: (オプション) この外部キーに結合する関連" +#~ "クラスのプロパティ名。 指定しなかった場合は、関連クラスの主キーを使いま" +#~ "す。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/component_mapping.po b/documentation/envers/src/main/docbook/ja-JP/content/component_mapping.po new file mode 100644 index 0000000000..d2a41e65ac --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/component_mapping.po @@ -0,0 +1,676 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Component Mapping" +msgstr "コンポーネントのマッピング" + +#. Tag: para +#: component_mapping.xml:7 +#, no-c-format +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"コンポーネント の概念は、Hibernateを通して様々な状況の中" +"で 異なる目的のために再利用されます。" + +#. Tag: title +#: component_mapping.xml:13 +#, no-c-format +msgid "Dependent objects" +msgstr "依存オブジェクト" + +#. Tag: para +#: component_mapping.xml:15 +#, no-c-format +msgid "" +"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 "" +"コンポーネントは、エンティティの参照ではなく値型として永続化された、 包含され" +"たオブジェクトです。コンポーネントという言葉については、コンポジションという " +"オブジェクト指向の概念を参照してください(アーキテクチャレベルのコンポーネン" +"トではありません)。 例えば、以下のPersonモデルのようなものです。" + +#. Tag: programlisting +#: component_mapping.xml:21 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:23 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: component_mapping.xml:25 +#, no-c-format +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"いま、NamePerson のコンポーネントと" +"して 永続化することが出来ます。ここで Name は永続化属性に" +"対してgetter、 setterメソッドを定義しますが、インターフェイスや識別子プロパ" +"ティを定義する必要が ないことに注意して下さい。" + +#. Tag: para +#: component_mapping.xml:32 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "マッピング定義は以下のようになります。" + +#. Tag: programlisting +#: component_mapping.xml:36 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:38 +#, no-c-format +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"Personテーブルは pidbirthday、 " +"initialfirstlast カラムを持ちます。" + +#. Tag: para +#: component_mapping.xml:46 +#, no-c-format +msgid "" +"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 ad hoc. 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 "" +"全ての値型のように、コンポーネントは参照の共有をすることができません。 言い換" +"えると、二人のPersonは同じ名前を持つことができますが、二つのPersonオブジェク" +"トは \"値が同じだけ\"の別々のnameオブジェクトを含んでいるということです。 コ" +"ンポーネントのnull値のセマンティクスは アドホック で" +"す。 コンポーネントのオブジェクトを再読み込みする際、Hibernateはコンポーネン" +"トのすべてのカラムが nullであるならコンポーネント自体がnullであると考えま" +"す。 これは大抵の場合問題ありません。" + +#. Tag: para +#: component_mapping.xml:55 +#, no-c-format +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"コンポーネントの属性はどんなHibernateの型でも構いません(コレクション、many-" +"to-one関連、 他のコンポーネントなど)。ネストされたコンポーネントは滅多に使わ" +"ないと考えるべきでは ありません 。Hibernateは非常にきめ" +"の細かいオブジェクトモデルをサポートするように意図されています。" + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component> 要素は親エンティティへの逆参照として、コ" +"ンポーネントクラスの 属性をマッピングする <parent> " +"サブ要素を使用できます。" + +#. Tag: programlisting +#: component_mapping.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:84 +#, no-c-format +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"注意: コンポジットエレメントの Set を定義したなら、 " +"equals()hashCode() を正しく実装する" +"ことが重要です。" + +#. Tag: para +#: component_mapping.xml:90 +#, no-c-format +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 "" +"コンポジットエレメントはコレクションを含まず、コンポーネントを含むこともあり" +"ます。 コンポジットエレメント自身がコンポーネントを含んでいる場合は " +"<nested-composite-element> を 使用してください。コン" +"ポーネントのコレクション自身がコンポーネントを持つというケースはめったにあり" +"ません。 この段階までに、one-to-many関連の方がより適切でないかと熟考してくだ" +"さい。 コンポジットエレメントをエンティティとして再度モデリングしてみてくださ" +"い。 しかしこれはJavaのモデルとしては同じですが、リレーショナルモデルと永続動" +"作はまだ若干異なることに注意してください。" + +#. Tag: para +#: component_mapping.xml:102 +#, no-c-format +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"もし <set> を使用するのであれば、コンポジットエレメ" +"ントのマッピングがnull値が可能な 属性をサポートしていないことに注意してくださ" +"い。Hibernateはオブジェクトを削除するとき、 レコードを識別するためにそれぞれ" +"のカラムの値を使用する必要があるため、null値を持つことが出来ません (コンポ" +"ジットエレメントテーブルには別の主キーカラムはありません)。 コンポジットエレ" +"メントにnot-nullの属性のみを使用するか、または <list><map><bag>、" +"<idbag> を選択する必要があります。" + +#. Tag: para +#: component_mapping.xml:113 +#, no-c-format +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"コンポジットエレメントの特別なケースとして、ネストされた <many-" +"to-one> 属性を持つ コンポジットエレメントがあります。 このマッピ" +"ングは、コンポジットエレメントクラスを多対多関連テーブルの 余分なカラムへマッ" +"ピングします。 次の例は Order から、Item への多対多関連です。 purchaseDate、" +"pricequantity は関連の属性となりま" +"す。" + +#. Tag: programlisting +#: component_mapping.xml:123 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:125 +#, no-c-format +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"もちろん、双方向関連のナビゲーションのために反対側からpurchaseへの参照を作る" +"ことは出来ません。 コンポーネントは値型であり、参照を共有できないことを覚えて" +"おいてください。 一つの Purchase は一つの Order のsetに存在できますが、 同時に Item から参照する" +"ことは出来ません。" + +#. Tag: para +#: component_mapping.xml:133 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "3項関連(あるいは4項など)も可能です。" + +#. Tag: programlisting +#: component_mapping.xml:135 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "" +"コンポジットエレメントは他のエンティティへの関連として、 同じシンタックスを" +"使っているクエリ内で使用できます。" + +#. Tag: title +#: component_mapping.xml:145 +#, no-c-format +msgid "Components as Map indices" +msgstr "Mapのインデックスとしてのコンポーネント" + +#. Tag: para +#: component_mapping.xml:147 +#, no-c-format +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"<composite-map-key> 要素は Map の" +"キーとしてコンポーネントクラスを マッピングします。コンポーネントクラス上で " +"hashCode()equals() を正確にオーバー" +"ライドしてください。" + +#. Tag: title +#: component_mapping.xml:156 +#, no-c-format +msgid "Components as composite identifiers" +msgstr "複合識別子としてのコンポーネント" + +#. Tag: para +#: component_mapping.xml:158 +#, no-c-format +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"コンポーネントをエンティティクラスの識別子として使うことができます。 コンポー" +"ネントクラスは以下の条件を満たす必要があります。" + +#. Tag: para +#: component_mapping.xml:165 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "java.io.Serializable を実装しなければなりません。" + +#. Tag: para +#: component_mapping.xml:170 +#, no-c-format +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"データベース上の複合キーの等価性と矛盾のないように、equals()hashCode() を再実装しなければなりません。" + +#. Tag: emphasis +#: component_mapping.xml:179 +#, no-c-format +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"注意: Hibernate3において、2番目の条件は絶対的な条件ではありません。 しかしと" +"にかく条件を満たしてください。" + +#. Tag: para +#: component_mapping.xml:183 +#, no-c-format +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"複合キーを生成するために IdentifierGenerator を使用するこ" +"とはできません。 代わりにアプリケーションが識別子を割り当てなくてはなりませ" +"ん。" + +#. Tag: para +#: component_mapping.xml:188 +#, no-c-format +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"通常の <id> 宣言の代わりに <composite-" +"id> タグを (ネストされた <key-property> 属性と共に)使います。 以下の例では、OrderLine ク" +"ラスは Order の(複合)主キーに 依存した主キーを持っていま" +"す。" + +#. Tag: programlisting +#: component_mapping.xml:196 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:198 +#, no-c-format +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"このとき、OrderLine テーブルへ関連する外部キーもまた複合で" +"す。 他のクラスのマッピングでこれを宣言しなければなりません。 " +"OrderLine への関連は次のようにマッピングされます。" + +#. Tag: programlisting +#: component_mapping.xml:204 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:206 +#, no-c-format +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(<column> タグはどこであっても column 属性の 代わりになります。)" + +#. Tag: para +#: component_mapping.xml:211 +#, no-c-format +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"OrderLine への many-to-many 関連も 複合" +"外部キーを使います。" + +#. Tag: programlisting +#: component_mapping.xml:216 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:218 +#, no-c-format +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"Order にある OrderLine のコレクション" +"は 次のものを使用します。" + +#. Tag: programlisting +#: component_mapping.xml:223 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:225 +#, no-c-format +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "" +"(<one-to-many> 属性は、例によってカラムを宣言しませ" +"ん)" + +#. Tag: para +#: component_mapping.xml:229 +#, no-c-format +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "" +"OrderLine 自身がコレクションを持っている場合、 同時に複合" +"外部キーも持っています。" + +#. Tag: programlisting +#: component_mapping.xml:234 +#, no-c-format +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:239 +#, no-c-format +msgid "Dynamic components" +msgstr "動的コンポーネント" + +#. Tag: para +#: component_mapping.xml:241 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "Map 型のプロパティのマッピングも可能です。" + +#. Tag: programlisting +#: component_mapping.xml:245 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:247 +#, no-c-format +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"<dynamic-component> マッピングのセマンティクスは " +"<component> と同一のものです。この種のマッピングの利" +"点は、マッピングドキュメントの編集により、配置時にbeanの属性を 決定できる点で" +"す。また、DOMパーサを利用して、マッピングドキュメントのランタイム操作が可能で" +"す。 さらに、Configuration オブジェクト経由でHibernateのコ" +"ンフィグレーション時のメタモデルに アクセス(または変更)が可能です。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/configuration.po b/documentation/envers/src/main/docbook/ja-JP/content/configuration.po new file mode 100644 index 0000000000..6834b8b0cd --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/configuration.po @@ -0,0 +1,3233 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:5 +#, no-c-format +msgid "Configuration" +msgstr "設定" + +#. Tag: para +#: configuration.xml:7 +#, no-c-format +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"Hibernateはさまざまな環境で動作するようにデザインされているため、非常に多くの" +"設定要素があります。 幸いなことに、Hibernateは、公開されているパッケージの " +"etc/ フォルダの hibernate.properties " +"に、ほとんどの設定要素の適切なデフォルト値が記述されています。 この " +"hibernate.properties をクラスパスに設定し、設定要素をカス" +"タマイズするだけです。" + +#. Tag: title +#: configuration.xml:16 +#, no-c-format +msgid "Programmatic configuration" +msgstr "プログラム上の設定" + +#. Tag: para +#: configuration.xml:18 +#, no-c-format +msgid "" +"An instance of org.hibernate.cfg.Configuration represents " +"an entire set of mappings of an application's Java types to an SQL database. " +"The Configuration is used to build an (immutable) " +"SessionFactory. The mappings are compiled from various " +"XML mapping files." +msgstr "" +"org.hibernate.cfg.Configuration のインスタンスは、 Javaの" +"型とSQLデータベースのマッピング情報をすべて持っています。 The " +"Configuration は、(不変の) SessionFactory を生成するときに使用します。 複数のXMLマッピングファイルを変換し、" +"マッピング情報にします。" + +#. Tag: para +#: configuration.xml:26 +#, no-c-format +msgid "" +"You may obtain a Configuration instance by instantiating " +"it directly and specifying XML mapping documents. If the mapping files are " +"in the classpath, use addResource():" +msgstr "" +"通常、Configuration インスタンスは、特定のXMLマッピング" +"ファイル によって直接初期化されます。もし、マッピングファイルがクラスパスに設" +"定されている場合、 次のメソッドを使ってください。 addResource() :" + +#. Tag: programlisting +#: configuration.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:34 +#, no-c-format +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"代替案(こちらのほうが良いときもあります)としてマッピングクラスを指定する方法" +"もあります。Hibernateに、マッピングファイルを 見つけさせてください:" + +#. Tag: programlisting +#: configuration.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:41 +#, no-c-format +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"Hibernateは、クラスパスにある以下のような名前のマッピングファイルを見つけま" +"す。 /org/hibernate/auction/Item.hbm.xml/org/" +"hibernate/auction/Bid.hbm.xml 。 この方法だと、ハードコーディングさ" +"れたファイル名を排除できます。" + +#. Tag: para +#: configuration.xml:48 +#, no-c-format +msgid "" +"A Configuration also allows you to specify configuration " +"properties:" +msgstr "" +"Configuration は、設定プロパティを指定することもできます:" + +#. Tag: programlisting +#: configuration.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:55 +#, no-c-format +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "" +"Hibernateに設定プロパティを通す方法は1つではありません。 さまざまなオプション" +"を用意しています:" + +#. Tag: para +#: configuration.xml:62 +#, no-c-format +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"java.util.Properties インスタンスを " +"Configuration.setProperties() に渡します。" + +#. Tag: para +#: configuration.xml:68 +#, no-c-format +msgid "" +"Place hibernate.properties in a root directory of the " +"classpath." +msgstr "" +"hibernate.properties を クラスパスのルートディレクトリに置" +"きます。" + +#. Tag: para +#: configuration.xml:74 +#, no-c-format +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"System プロパティが java -Dproperty=value を使うように設定します。" + +#. Tag: para +#: configuration.xml:80 +#, no-c-format +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"<property> 要素を hibernate.cfg.xml (後述)に設定します。" + +#. Tag: para +#: configuration.xml:87 +#, no-c-format +msgid "" +"hibernate.properties is the easiest approach if you want " +"to get started quickly." +msgstr "" +"今すぐ始めたいのなら、hibernate.properties を使うのが一番" +"の近道です。" + +#. Tag: para +#: configuration.xml:92 +#, no-c-format +msgid "" +"The Configuration is intended as a startup-time object, " +"to be discarded once a SessionFactory is created." +msgstr "" +"Configuration は、起動時にだけあるオブジェクトであり、 一" +"度 SessionFactory を生成した後は、破棄されることを意図して" +"います。" + +#. Tag: title +#: configuration.xml:100 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "SessionFactoryを取得する" + +#. Tag: para +#: configuration.xml:102 +#, no-c-format +msgid "" +"When all mappings have been parsed by the Configuration, " +"the application must obtain a factory for Session " +"instances. This factory is intended to be shared by all application threads:" +msgstr "" +"Configuration がすべてのマッピング情報を解析したら、 アプ" +"リケーションは、 Session ファクトリインスタンスを取得しま" +"す。 このSessionFactoryは、Hibernateを使用するすべてのスレッドで共有されるべ" +"きです。" + +#. Tag: programlisting +#: configuration.xml:108 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:110 +#, no-c-format +msgid "" +"Hibernate does allow your application to instantiate more than one " +"SessionFactory. This is useful if you are using more than " +"one database." +msgstr "" +"Hibernateは、 SessionFactory を複数生成することができま" +"す。 これは、複数のデータベースを使用する場合に便利です。" + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "JDBC connections" +msgstr "JDBCコネクション" + +#. Tag: para +#: configuration.xml:121 +#, no-c-format +msgid "" +"Usually, you want to have the SessionFactory create and " +"pool JDBC connections for you. If you take this approach, opening a " +"Session is as simple as:" +msgstr "" +"通常、開発者は SessionFactory を生成し、SessionFactoryで" +"JDBCコネクションをプーリングしたいと考えます。 そのアプローチを採用する場合、" +"単純に Session をオープンしてください:" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, no-c-format +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"これだけで、プーリングしたJDBCコネクションを使って目的のデータベース にアクセ" +"スすることができます。" + +#. Tag: para +#: configuration.xml:134 +#, no-c-format +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now describe " +"the most important settings for JDBC connection configuration." +msgstr "" +"そのためには、JDBCコネクションのプロパティをHibernateに設定する必要がありま" +"す。 すべてのHibernateプロパティ名とセマンティクスは org.hibernate." +"cfg.Environment クラスに定義されています。 この設定はJDBCコネクショ" +"ン設定の中で一番重要なものです。" + +#. Tag: para +#: configuration.xml:141 +#, no-c-format +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"もし、以下のプロパティを設定すると、Hibernateはコネクションを取得する(プール" +"も)ために java.sql.DriverManager を使います。" + +#. Tag: title +#: configuration.xml:147 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "Hibernate JDBCプロパティ" + +#. Tag: entry +#: configuration.xml:153 configuration.xml:241 configuration.xml:338 +#: configuration.xml:529 configuration.xml:725 configuration.xml:832 +#: configuration.xml:920 +#, no-c-format +msgid "Property name" +msgstr "プロパティ名" + +#. Tag: entry +#: configuration.xml:154 configuration.xml:242 configuration.xml:339 +#: configuration.xml:530 configuration.xml:726 configuration.xml:833 +#: configuration.xml:921 +#, no-c-format +msgid "Purpose" +msgstr "意味" + +#. Tag: literal +#: configuration.xml:160 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: emphasis +#: configuration.xml:163 +#, no-c-format +msgid "JDBC driver class" +msgstr "JDBCドライバクラス" + +#. Tag: literal +#: configuration.xml:168 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: emphasis +#: configuration.xml:171 +#, no-c-format +msgid "JDBC URL" +msgstr "jdbc URL" + +#. Tag: literal +#: configuration.xml:176 configuration.xml:272 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: emphasis +#: configuration.xml:179 +#, no-c-format +msgid "database user" +msgstr "database user" + +#. Tag: literal +#: configuration.xml:184 configuration.xml:280 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: emphasis +#: configuration.xml:187 +#, no-c-format +msgid "database user password" +msgstr "database user password" + +#. Tag: literal +#: configuration.xml:192 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#. Tag: emphasis +#: configuration.xml:195 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "プールするコネクションの最大数" + +#. Tag: para +#: configuration.xml:202 +#, no-c-format +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property with " +"connection pool specific settings. This will turn off Hibernate's internal " +"pool. For example, you might like to use C3P0." +msgstr "" +"Hibernateのコネクションプールアルゴリズムは非常に初歩的なものです。 これはす" +"ぐに始められるようにと用意されたもので、製品として使用することを意" +"図していません 。 また、パフォーマンスのテストのためのものでもあり" +"ません。 最高のパフォーマンスと安定性を持ったプールを実現したければ、サード" +"パーティのツールをお勧めします。 hibernate.connection.pool_size プロパティに 適切なコネクションプールサイズを記述してください。 この" +"ままだとHibernateのコネクションプールを使います。 例えば次のようにC3P0を使い" +"ます。" + +#. Tag: para +#: configuration.xml:212 +#, no-c-format +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"C3P0ConnectionProvider for connection pooling if you set " +"hibernate.c3p0.* properties. If you'd like to use Proxool " +"refer to the packaged hibernate.properties and the " +"Hibernate web site for more information." +msgstr "" +"C3P0はオープンソースJDBCコネクションプールで、Hibernateの lib ディレクトリにあります。もし、hibernate.c3p0.* プ" +"ロパティを セットすれば、Hibernateは、 C3P0ConnectionProvider を使います。 もしProxoolを使いたい場合は、 hibernate." +"properties パッケージを 参照したり、HibernateのWebサイトでより多く" +"の情報を取得してください。" + +#. Tag: para +#: configuration.xml:221 +#, no-c-format +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "" +"C3P0用の hibernate.properties ファイルを例として示します:" + +#. Tag: programlisting +#: configuration.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:227 +#, no-c-format +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"Datasource registered in JNDI. You'll need to set at " +"least one of the following properties:" +msgstr "" +"アプリケーションサーバ上で使う場合は、Hibernateを設定し、 アプリケーション" +"サーバからコネクションを取得するようにしてください。 Datasource をJNDIに登録します。そして プロパティを以下のように設定してくださ" +"い。" + +#. Tag: title +#: configuration.xml:235 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "Hibernate データソースプロパティ" + +#. Tag: literal +#: configuration.xml:248 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#. Tag: emphasis +#: configuration.xml:251 +#, no-c-format +msgid "datasource JNDI name" +msgstr "データソースのJNDI名" + +#. Tag: literal +#: configuration.xml:256 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#. Tag: entry +#: configuration.xml:258 +#, fuzzy, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "JNDIプロバイダのURL" + +#. Tag: literal +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#. Tag: entry +#: configuration.xml:266 +#, no-c-format +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:274 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:290 +#, no-c-format +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"アプリケーションサーバから提供されたJNDIデータソースを使う " +"hibernate.properties ファイルの例を示します:" + +#. Tag: programlisting +#: configuration.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:297 +#, no-c-format +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"JNDIデータソースから取得したJDBCコネクションは、アプリケーションサーバの コン" +"テナ管理トランザクションに自動的に参加します。" + +#. Tag: para +#: configuration.xml:302 +#, no-c-format +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the property name. For " +"example, you may specify a charSet using " +"hibernate.connection.charSet." +msgstr "" +"任意のコネクションプロパティは、与えられた” hibernate.connnection ” プロパティ名によって与えられます。例えば、 charSet を設定したい場合は、 hibernate.connection.charSet を使います。" + +#. Tag: para +#: configuration.xml:308 +#, no-c-format +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider. You may select a custom implementation by " +"setting hibernate.connection.provider_class." +msgstr "" +"JDBCコネクションを取得する戦略を持つ独自のプラグインを定義する場合は、 " +"org.hibernate.connection.ConnectionProvider インターフェイ" +"スを 実装してください。そして、実装クラスを hibernate.connection." +"provider_class に設定してください。" + +#. Tag: title +#: configuration.xml:317 +#, no-c-format +msgid "Optional configuration properties" +msgstr "オプション設定プロパティ" + +#. Tag: para +#: configuration.xml:319 +#, no-c-format +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"これらのプロパティはHibernateの挙動を制御するものです。 これらのプロパティは" +"すべて妥当なデフォルト値があり、任意で設定します。" + +#. Tag: para +#: configuration.xml:324 +#, no-c-format +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"注意:これらのプロパティは\"システムレベル\"のみです。 " +"システムレベルプロパティは java -Dproperty=value 、もしく" +"は hibernate.properties でのみ設定可能です。 それ以外の設" +"定方法は ありません 。" + +#. Tag: title +#: configuration.xml:332 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "Hibernate設定プロパティ" + +#. Tag: literal +#: configuration.xml:345 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: configuration.xml:347 +#, fuzzy, no-c-format +msgid "" +"The classname of a Hibernate Dialect which allows " +"Hibernate to generate SQL optimized for a particular relational database." +msgstr "" +"Hibernate クラス名が入ります。 これはリレーショナルデータ" +"ベースごとに最適化されたSQLを生成します。 " + +#. Tag: para +#: configuration.xml:351 +#, fuzzy, no-c-format +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:359 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#. Tag: entry +#: configuration.xml:361 +#, fuzzy, no-c-format +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"発行されたすべてのSQLをコンソールに出力します。 これはログカテゴリの " +" を設定する方法の代替手段です。 " +"" + +#. Tag: para +#: configuration.xml:365 configuration.xml:377 configuration.xml:471 +#: configuration.xml:484 configuration.xml:497 configuration.xml:510 +#: configuration.xml:564 configuration.xml:591 configuration.xml:605 +#: configuration.xml:660 configuration.xml:888 configuration.xml:903 +#: configuration.xml:993 +#, fuzzy, no-c-format +msgid "" +"eg. true | " +"false" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:373 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#. Tag: entry +#: configuration.xml:375 +#, fuzzy, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "ログとコンソールのSQLを美しく表示します。 " + +#. Tag: literal +#: configuration.xml:385 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#. Tag: entry +#: configuration.xml:387 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"生成されるSQL文のテーブルに設定するスキーマ/テーブルスペースです。 " +"" + +#. Tag: para +#: configuration.xml:390 +#, fuzzy, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:398 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#. Tag: entry +#: configuration.xml:400 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "生成されるSQL文のテーブルに設定するカタログです。 " + +#. Tag: para +#: configuration.xml:403 +#, fuzzy, no-c-format +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:411 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#. Tag: entry +#: configuration.xml:413 +#, fuzzy, no-c-format +msgid "" +"The SessionFactory will be automatically bound to this " +"name in JNDI after it has been created." +msgstr "" +" は生成後、この名前でJNDIに登録されます。 " + +#. Tag: para +#: configuration.xml:416 configuration.xml:859 +#, fuzzy, no-c-format +msgid "" +"eg. jndi/composite/name" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:424 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#. Tag: entry +#: configuration.xml:426 +#, fuzzy, no-c-format +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"外部結合フェッチの最大深度を設定します。結合する関連は 対一関連のみ(一対一、" +"多対一)です。 を指定すると外部結合フェッチは無効になりま" +"す。 " + +#. Tag: para +#: configuration.xml:430 +#, no-c-format +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"例: 推奨する値は 0 " +"から 3 です。" + +#. Tag: literal +#: configuration.xml:439 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#. Tag: entry +#: configuration.xml:441 +#, fuzzy, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "関連フェッチのデフォルトバッチサイズを指定します。 " + +#. Tag: para +#: configuration.xml:443 +#, no-c-format +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"例: 推奨する値は 4 , 8 , 16 です。" + +#. Tag: literal +#: configuration.xml:452 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#. Tag: entry +#: configuration.xml:454 +#, fuzzy, no-c-format +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +" からセッションをオープンしたときに 使用するエンティティのデ" +"フォルトモードを設定します。 " + +#. Tag: para +#: configuration.xml:457 +#, no-c-format +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"dynamic-map, dom4j, pojo" + +#. Tag: literal +#: configuration.xml:465 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#. Tag: entry +#: configuration.xml:467 +#, fuzzy, no-c-format +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"項目が更新されたときに、別のSQLで主キーを更新することを強制します。 この場" +"合、同時実行可能なシステムでは、まれにデッドロックが発生する可能性がありま" +"す。 " + +#. Tag: literal +#: configuration.xml:479 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#. Tag: entry +#: configuration.xml:481 +#, fuzzy, no-c-format +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" +"有効の場合、Hibernateはパフォーマンスチューニングに 有効な統計情報を収集しま" +"す。 " + +#. Tag: literal +#: configuration.xml:492 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#. Tag: entry +#: configuration.xml:494 +#, fuzzy, no-c-format +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"有効の場合、オブジェクトが削除されたときに 識別子プロパティをリセットし、デ" +"フォルト値にしたものを生成します。 " + +#. Tag: literal +#: configuration.xml:505 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#. Tag: entry +#: configuration.xml:507 +#, fuzzy, no-c-format +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"有効の場合、SQL内にコメントを生成します。これはデバックを容易にします。 デ" +"フォルトの値は です。 " + +#. Tag: title +#: configuration.xml:521 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "Hibernate JDBC とコネクションプロパティ" + +#. Tag: literal +#: configuration.xml:536 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#. Tag: entry +#: configuration.xml:538 +#, fuzzy, no-c-format +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "" +"値が0でない場合、JDBCフェッチサイズを決定します ( を呼びま" +"す)。" + +#. Tag: literal +#: configuration.xml:545 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#. Tag: entry +#: configuration.xml:547 +#, fuzzy, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" +"値が0でない場合、HibernateがJDBC2バッチ更新を使用します。 " + +#. Tag: para +#: configuration.xml:549 +#, no-c-format +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"例: 推奨する値は 5 " +"から 30 です。" + +#. Tag: literal +#: configuration.xml:557 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#. Tag: entry +#: configuration.xml:559 +#, fuzzy, no-c-format +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"もしJDBCドライバが によって正確な行数を 返す場合、このプロパ" +"ティを にしてください (通常はこのオプションをONにしま" +"す)。 Hibernateは、自動バージョンデータのためバッチDMLを使います。 デフォル" +"トの値は です。 " + +#. Tag: literal +#: configuration.xml:572 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#. Tag: entry +#: configuration.xml:574 +#, fuzzy, no-c-format +msgid "" +"Select a custom Batcher. Most applications will not need " +"this configuration property." +msgstr "" +"カスタム を選びます。 ほとんどのアプリケーションに、この設定" +"は必要ありません。 " + +#. Tag: para +#: configuration.xml:577 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:585 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#. Tag: entry +#: configuration.xml:587 +#, fuzzy, no-c-format +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"スクロール可能なリザルトセットを、Hibernateが使用します。 このプロパティは、" +"JDBCコネクションがコネクションメタデータを サポートしていることが必須条件にな" +"ります。 " + +#. Tag: literal +#: configuration.xml:599 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#. Tag: entry +#: configuration.xml:601 +#, fuzzy, no-c-format +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC (system-level property)." +msgstr "" +"JDBCへ/から の書き込み/読み込みストリー" +"ムを使います(システムレベルのプロパティ)。 " + +#. Tag: literal +#: configuration.xml:613 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#. Tag: entry +#: configuration.xml:615 +#, fuzzy, no-c-format +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"挿入の後に自動生成された主キーを取得するための JDBC3 の使用" +"を有効にします。 これはJDBC3+ドライバとJRE1.4+を必要とし、 もしHibernateの識" +"別子ジェネレータに問題が発生するようならfalseに設定してください。 デフォルト" +"ではコネクションメタデータを使いドライバの能力を決定します。 " + +#. Tag: para +#: configuration.xml:621 configuration.xml:751 configuration.xml:763 +#: configuration.xml:777 configuration.xml:815 +#, fuzzy, no-c-format +msgid "eg. true|false" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:629 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#. Tag: entry +#: configuration.xml:631 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom ConnectionProvider which " +"provides JDBC connections to Hibernate." +msgstr "" +"JDBCコネクションをHibernateに提供する独自の の 名前を指定し" +"ます。 " + +#. Tag: para +#: configuration.xml:634 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:642 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#. Tag: entry +#: configuration.xml:644 +#, fuzzy, no-c-format +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most databases do " +"not support all isolation levels." +msgstr "" +"JDBCトランザクション分離レベルを設定します。 妥当な値を調べるためには " +" をチェックしてください。 しかし使用するデータベースが、すべ" +"ての分離レベルをサポートしているとは限りません。 " + +#. Tag: para +#: configuration.xml:648 +#, fuzzy, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:656 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#. Tag: entry +#: configuration.xml:658 +#, fuzzy, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"プールされているJDBCコネクションの自動コミットを有効にする(非推奨)。 " +"" + +#. Tag: literal +#: configuration.xml:668 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#. Tag: entry +#: configuration.xml:670 +#, fuzzy, no-c-format +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"HibernateがJDBCコネクションをリリースするかを指定します。デフォルトでは セッ" +"ションが明示的にクローズまたは切断されてもコネクションは保持します。 アプリ" +"ケーションサーバのJTAデータソースの場合、 すべてのJDBCコールの後、強制的にコ" +"ネクションをリリースするために を 使ってください。 非JTAコネ" +"クションの場合、各トランザクションが終了したときに を使い、" +"コネクションをリリースしてください。 にすると、 JTAやCMTトラ" +"ンザクションの場合、 でクローズし、 JDBCトランザクションの場" +"合、 でクローズします。 " + +#. Tag: para +#: configuration.xml:681 +#, fuzzy, no-c-format +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"例:auto (default) | " +"on_close | after_transaction | " +"after_statement" + +#. Tag: para +#: configuration.xml:686 +#, fuzzy, no-c-format +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"注意してください。この設定は SessionFactory.openSession か" +"ら 取得した Session だけに効果があります。 " +"SessionFactory.getCurrentSession を通じて取得した " +"Session では、CurrentSessionContext の" +"実装によって、コネクションのリリースモードを設定します。 を参照してください。" + +#. Tag: entry +#: configuration.xml:697 +#, no-c-format +msgid "" +"hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:700 +#, no-c-format +msgid "" +"Pass the JDBC property <propertyName> to " +"DriverManager.getConnection()." +msgstr "" + +#. Tag: entry +#: configuration.xml:706 +#, no-c-format +msgid "" +"hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:709 +#, no-c-format +msgid "" +"Pass the property <propertyName> to the JNDI " +"InitialContextFactory." +msgstr "" + +#. Tag: title +#: configuration.xml:719 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "Hibernate キャッシュプロパティ" + +#. Tag: literal +#: configuration.xml:732 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#. Tag: entry +#: configuration.xml:734 +#, fuzzy, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "カスタム のクラス名です。 " + +#. Tag: para +#: configuration.xml:736 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:744 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#. Tag: entry +#: configuration.xml:746 +#, fuzzy, no-c-format +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"書き込みを最小限にするために、二次キャッシュの操作を最適化します。 その代わり" +"に、読み込みがより頻繁に発生するようになります。 このセッティングはクラスタ" +"キャッシュで役に立ちます。 Hibernate3ではクラスタキャッシュ実装用にデフォルト" +"では有効になっています。 " + +#. Tag: literal +#: configuration.xml:759 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#. Tag: entry +#: configuration.xml:761 +#, fuzzy, no-c-format +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "" +"特定のクエリがキャッシュ可能な場合に、クエリキャッシュを有効にします。 " +"" + +#. Tag: literal +#: configuration.xml:771 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#. Tag: entry +#: configuration.xml:773 +#, fuzzy, no-c-format +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"二次キャッシュを完全に無効にする場合に使います。 デフォルトでは有効で、クラス" +"の マッピング で制御します。 " + +#. Tag: literal +#: configuration.xml:785 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#. Tag: entry +#: configuration.xml:787 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"カスタム インターフェイスのクラス名を 指定します。デフォルト" +"では になります。 " + +#. Tag: para +#: configuration.xml:790 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:798 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#. Tag: entry +#: configuration.xml:800 +#, fuzzy, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "二次キャッシュの領域名の接頭辞です。 " + +#. Tag: para +#: configuration.xml:802 +#, fuzzy, no-c-format +msgid "eg. prefix" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:810 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#. Tag: entry +#: configuration.xml:812 +#, fuzzy, no-c-format +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "" +"二次キャッシュに格納するデータを、人が理解しやすいフォーマットにします。 " +"" + +#. Tag: title +#: configuration.xml:826 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "Hibernate トランザクションプロパティ" + +#. Tag: literal +#: configuration.xml:839 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#. Tag: entry +#: configuration.xml:841 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"Hibernate APIと一緒に使われる のクラス名で" +"す。 (デフォルトでは です)。 " + +#. Tag: para +#: configuration.xml:845 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:853 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#. Tag: entry +#: configuration.xml:855 +#, fuzzy, no-c-format +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"アプリケーションサーバからJTA を取得するために に使われるJNDI名です。 " + +#. Tag: literal +#: configuration.xml:867 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#: configuration.xml:869 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +" のクラス名です。 JTA環境において、JVMレベルのキャッシュを有" +"効にするために必要です。 " + +#. Tag: para +#: configuration.xml:873 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:881 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#. Tag: entry +#: configuration.xml:883 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"有効の場合、トランザクションのcompletionフェーズの前に自動的に セッションをフ" +"ラッシュします。内臓の自動セッションコンテキスト管理に適しています。 を参照してください。 " + +#. Tag: literal +#: configuration.xml:896 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#. Tag: entry +#: configuration.xml:898 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"有効の場合、トランザクションのcompletionフェーズの後に セッションを自動的にク" +"ローズします。内臓の自動セッションコンテキスト管理に適しています。 を参照してください。 " + +#. Tag: title +#: configuration.xml:914 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "その他のプロパティ" + +#. Tag: literal +#: configuration.xml:927 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#. Tag: entry +#: configuration.xml:929 +#, fuzzy, no-c-format +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"「現在の」 のための(カスタム)戦略を提供します。 ビルトイン" +"ストラテジーに関するその他の情報については を参照してください。 " + +#. Tag: para +#: configuration.xml:934 +#, fuzzy, no-c-format +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"例:jta | " +"thread | managed | custom." +"Class" + +#. Tag: literal +#: configuration.xml:943 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#. Tag: entry +#: configuration.xml:945 +#, fuzzy, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "HQLパーサーの実装を選択します。 " + +#. Tag: para +#: configuration.xml:947 +#, fuzzy, no-c-format +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"例:org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#. Tag: literal +#: configuration.xml:956 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#. Tag: entry +#: configuration.xml:958 +#, fuzzy, no-c-format +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"HQLとSQLのトークンをマッピングします。 (例えば、トークンは関数やリテラル名で" +"す)。 " + +#. Tag: para +#: configuration.xml:961 +#, fuzzy, no-c-format +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"例:true | " +"false" + +#. Tag: literal +#: configuration.xml:969 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#. Tag: entry +#: configuration.xml:971 +#, fuzzy, no-c-format +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +" を生成したときに、 自動的にスキーマDDLをDBに出力します。 " +" の場合、 を クローズしたときに、データベー" +"ススキーマをドロップします。 " + +#. Tag: para +#: configuration.xml:977 +#, fuzzy, no-c-format +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"例:validate | " +"update | create | create-" +"drop" + +#. Tag: literal +#: configuration.xml:986 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#: configuration.xml:988 +#, fuzzy, no-c-format +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"実行時リフレクションの代わりのCGLIBの使用を有効にします (システムレベルのプ" +"ロパティ) リフレクションはトラブルシューティングのときに役立つことがありま" +"す。 オプティマイザをオフにしているときでさえ、 Hibernateには必ずCGLIBが必要" +"なことに注意してください。 このプロパティは で設定できませ" +"ん。 " + +#. Tag: title +#: configuration.xml:1004 +#, no-c-format +msgid "SQL Dialects" +msgstr "SQL 方言(Dialect)" + +#. Tag: para +#: configuration.xml:1006 +#, no-c-format +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"hibernate.dialect プロパティには、 使用するデータベースの" +"正しい org.hibernate.dialect.Dialect のサブクラスを、 必ず" +"指定すべきです。 しかし方言を指定すれば、Hibernateは上述したプロパティのいく" +"つかについて、 より適切なデフォルト値を使います。 そうすれば、それらを手作業" +"で設定する手間が省けます。" + +#. Tag: title +#: configuration.xml:1014 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Hibernate SQL Dialects (hibernate.dialect)" + +#. Tag: entry +#: configuration.xml:1022 +#, no-c-format +msgid "RDBMS" +msgstr "RDBMS" + +#. Tag: entry +#: configuration.xml:1023 +#, no-c-format +msgid "Dialect" +msgstr "Dialect" + +#. Tag: entry +#: configuration.xml:1028 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1028 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#. Tag: entry +#: configuration.xml:1031 +#, no-c-format +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#. Tag: literal +#: configuration.xml:1031 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#. Tag: entry +#: configuration.xml:1034 +#, no-c-format +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#. Tag: literal +#: configuration.xml:1034 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#. Tag: entry +#: configuration.xml:1037 +#, no-c-format +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#. Tag: literal +#: configuration.xml:1037 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "MySQL" +msgstr "MySQL" + +#. Tag: literal +#: configuration.xml:1040 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#. Tag: entry +#: configuration.xml:1043 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "MySQL with InnoDB" + +#. Tag: literal +#: configuration.xml:1043 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "MySQL with MyISAM" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "Oracle (any version)" +msgstr "Oracle (any version)" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "Sybase" +msgstr "Sybase" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "SAP DB" +msgstr "SAP DB" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Informix" +msgstr "Informix" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Ingres" +msgstr "Ingres" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Progress" +msgstr "Progress" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "Interbase" +msgstr "Interbase" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Pointbase" +msgstr "Pointbase" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "FrontBase" +msgstr "FrontBase" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Firebird" +msgstr "Firebird" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#. Tag: title +#: configuration.xml:1100 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "外部結合フェッチ" + +#. Tag: para +#: configuration.xml:1102 +#, no-c-format +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"もしDBがANSIか、OracleかSybaseスタイルの外部結合をサポートしている場合、 " +"outer join fetching は、DBのSQL発行回数を節約し パフォー" +"マンスを良くします。(DB内でより多くの処理コストが発生します) 外部結合フェッ" +"チは、多対一、一対多、多対多、一対一のオブジェクト関連で グループオブジェクト" +"を1つのSQLで SELECT します。" + +#. Tag: para +#: configuration.xml:1111 +#, no-c-format +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"hibernate.max_fetch_depth プロパティの値を 0 にすると Outer join fetchingを すべて 無効にす" +"ることになります。 1 やそれ以上の値を設定すると、外部結合" +"フェッチが有効になり、 一対一と多対一関連が fetch=\"join\" としてマッピングされます。" + +#. Tag: para +#: configuration.xml:1119 +#, no-c-format +msgid "See for more information." +msgstr "See for more information." + +#. Tag: title +#: configuration.xml:1126 +#, no-c-format +msgid "Binary Streams" +msgstr "バイナリストリーム" + +#. Tag: para +#: configuration.xml:1128 +#, no-c-format +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"OracleはJDBCドライバとの間でやりとりされる byte 配列のサイ" +"ズを制限します。 binaryserializable 型の大きなインスタンスを使いたければ、 hibernate.jdbc." +"use_streams_for_binary を有効にしてください。 ただし これ" +"はシステムレベルの設定だけです 。" + +#. Tag: title +#: configuration.xml:1139 +#, no-c-format +msgid "Second-level and query cache" +msgstr "2次キャッシュとクエリーキャッシュ" + +#. Tag: para +#: configuration.xml:1141 +#, no-c-format +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"hibernate.cache プロパティ接頭辞は Hibernateでプロセスやク" +"ラスタ二次キャッシュを使うとことを許可します。 により多くの詳細があります。" + +#. Tag: title +#: configuration.xml:1151 +#, no-c-format +msgid "Query Language Substitution" +msgstr "クエリー言語の置き換え" + +#. Tag: para +#: configuration.xml:1153 +#, no-c-format +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"hibernate.query.substitutions を使うことで、 新しい" +"Hibernateクエリトークンを定義できます。 例:" + +#. Tag: programlisting +#: configuration.xml:1158 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions true=1, false=0" + +#. Tag: para +#: configuration.xml:1160 +#, no-c-format +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"これはトークン truefalse を、 生成" +"されるSQLにおいて整数リテラルに翻訳します。" + +#. Tag: programlisting +#: configuration.xml:1165 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#. Tag: para +#: configuration.xml:1167 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "" +"これはSQLの LOWER 関数の名前の付け替えを可能にします。" + +#. Tag: title +#: configuration.xml:1174 +#, no-c-format +msgid "Hibernate statistics" +msgstr "Hibernate 統計" + +#. Tag: para +#: configuration.xml:1176 +#, no-c-format +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"hibernate.generate_statistics を有効にした場合、 動作して" +"いるシステムをチューニングするときに、SessionFactory.getStatistics()" +" を経由して、Hibernateは便利な統計情報を出力します。 JMXを経由して" +"統計情報を出力することも可能です。 Javadocの org.hibernate.stats パッケージ内の インターフェイスにはより多くの情報があります。" + +#. Tag: title +#: configuration.xml:1188 +#, no-c-format +msgid "Logging" +msgstr "ロギング" + +#. Tag: para +#: configuration.xml:1190 +#, no-c-format +msgid "Hibernate logs various events using Apache commons-logging." +msgstr "" +"HibernateはApache commons-logginを使って、さまざまなイベントをログとして 出力" +"します。" + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "" +"The commons-logging service will direct output to either Apache Log4j (if " +"you include log4j.jar in your classpath) or JDK1.4 " +"logging (if running under JDK1.4 or above). You may download Log4j from " +"http://jakarta.apache.org. To use Log4j you will need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" +"commons-loggingサービスは(クラスパスに log4j.jar を含めれ" +"ば)Apache Log4jに、 また(JDK1.4かそれ以上で実行させれば)JDK1.4 loggingに直" +"接出力します。 Log4jは http://jakarta.apache.org からダウ" +"ンロードできます。 Log4jを使うためには、クラスパスに log4j." +"properties ファイルを配置する必要があります。 例のプロパティファイ" +"ルはHibernateと一緒に配布され、それは src/ ディレクトリに" +"あります。" + +#. Tag: para +#: configuration.xml:1204 +#, no-c-format +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"Hibernateのログメッセージに慣れることを強くおすすめします。 Hibernateのログは" +"読みやすく、できる限り詳細になるように努力されています。 これは必須のトラブル" +"シューティングデバイスです。 以下に重要なログのカテゴリを示します。" + +#. Tag: title +#: configuration.xml:1213 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "Hibernate ログカテゴリ" + +#. Tag: entry +#: configuration.xml:1219 +#, no-c-format +msgid "Category" +msgstr "カテゴリ" + +#. Tag: entry +#: configuration.xml:1220 +#, no-c-format +msgid "Function" +msgstr "機能" + +#. Tag: literal +#: configuration.xml:1225 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#. Tag: entry +#: configuration.xml:1226 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "実行したすべてのSQL(DDL)ステートメントをロギングします。" + +#. Tag: literal +#: configuration.xml:1229 +#, no-c-format +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#. Tag: entry +#: configuration.xml:1230 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "すべてのJDBCパラメータをロギングします。" + +#. Tag: literal +#: configuration.xml:1233 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "実行したすべてのSQL(DDL)ステートメントをロギングします。" + +#. Tag: literal +#: configuration.xml:1237 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#. Tag: entry +#: configuration.xml:1238 +#, no-c-format +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "" +"sessionに関連するすべてのエンティティ(最大20)のフラッシュ時間をロギングし" +"ます。" + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "すべての2次キャッシュの動作をロギングします。" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log transaction related activity" +msgstr "トランザクションに関連する動作をロギングします。" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "JDBCリソース取得をロギングします。" + +#. Tag: literal +#: configuration.xml:1256 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.ast.AST" + +#. Tag: entry +#: configuration.xml:1257 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "HQLとSQLのASTのクエリーパースをロギングします。" + +#. Tag: literal +#: configuration.xml:1262 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#. Tag: entry +#: configuration.xml:1263 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "すべてのJAAS分析をロギングします。" + +#. Tag: literal +#: configuration.xml:1266 +#, no-c-format +msgid "org.hibernate" +msgstr "org.hibernate" + +#. Tag: entry +#: configuration.xml:1267 +#, no-c-format +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "" +"すべてをロギングします。(情報が大量になりますが、トラブルシューティングには" +"便利です)" + +#. Tag: para +#: configuration.xml:1276 +#, no-c-format +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"Hibernateでアプリケーションを作成するときは、org.hibernate.SQL カテゴリの debug を常に有効にしておいたほうが良い" +"でしょう。 代替方法として、hibernate.show_sql を有効にする" +"方法があります。" + +#. Tag: title +#: configuration.xml:1286 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "NamingStrategy の実装" + +#. Tag: para +#: configuration.xml:1288 +#, no-c-format +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"インターフェイス net.sf.hibernate.cfg.NamingStrategy を使" +"うと データベースオブジェクトとスキーマ要素のための「命名標準」を指定できま" +"す。" + +#. Tag: para +#: configuration.xml:1293 +#, no-c-format +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"Javaの識別子からデータベースの識別子を自動生成するためのルールや、 マッピング" +"ファイルで与えた「論理的な」カラムとテーブル名から 「物理的な」テーブルとカラ" +"ム名を生成するためのルールを用意することができます。 この機能は繰り返しの雑音" +"(例えば TBL_ プリフィックス)を取り除き、 マッピングド" +"キュメントの冗長さを減らすことに役立ちます。 Hibernateが使うデフォルトの戦略" +"はかなり最小限に近いものです。" + +#. Tag: para +#: configuration.xml:1302 +#, no-c-format +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"マッピングを追加する前に Configuration.setNamingStrategy() を呼ぶことで 以下のように異なる戦略を指定することができます:" + +#. Tag: programlisting +#: configuration.xml:1307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1309 +#, no-c-format +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"org.hibernate.cfg.ImprovedNamingStrategy は組み込みの戦略" +"です。 これはいくつかのアプリケーションにとって有用な開始点となるかもしれませ" +"ん。" + +#. Tag: title +#: configuration.xml:1317 +#, no-c-format +msgid "XML configuration file" +msgstr "XML設定ファイル" + +#. Tag: para +#: configuration.xml:1319 +#, no-c-format +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"もう1つの方法は hibernate.cfg.xml という名前のファイルで " +"十分な設定を指定する方法です。 このファイルは hibernate.properties ファイルの代わりとなります。 もし両方のファイルがあれば、プロパティ" +"が置き換えられます。" + +#. Tag: para +#: configuration.xml:1326 +#, no-c-format +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"XML設定ファイルは初期設定で CLASSPATH に配置してくださ" +"い。 これが例です:" + +#. Tag: programlisting +#: configuration.xml:1331 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1333 +#, no-c-format +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"見てのとおり、この方法の優位性は設定のためのマッピングファイル名を外出しにで" +"きることです。 Hibernateキャッシュをチューニングしなければならないのであれ" +"ば、 hibernate.cfg.xml はより便利です。 " +"hibernate.propertieshibernate.cfg.xml の どちらかを使えることを覚えておいてください。 二つは同じもので、違" +"うところといえばXML構文を使うことの利点だけです。" + +#. Tag: para +#: configuration.xml:1342 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "XML設定を使うことで、Hibernateは以下のようにシンプルになります。" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "違うXML設定ファイルを使うこともできます。" + +#. Tag: programlisting +#: configuration.xml:1352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: configuration.xml:1357 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "J2EEアプリケーションサーバとの統合" + +#. Tag: para +#: configuration.xml:1359 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "HibernateはJ2EE構造と統合するポイントをサポートしています。" + +#. Tag: para +#: configuration.xml:1365 +#, no-c-format +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"コンテナ管理データソース:Hibernateは JNDIが提供し、コン" +"テナが管理するJDBCコネクションを使用できます。 通常、JTA準拠の " +"TransactionManagerResourceManager " +"がトランザクション管理(CMT)、 特に様々なデータソースにまたがる分散トランザク" +"ションを扱います。 当然プログラムでトランザクション境界を指定できます(BMT)。 " +"あるいは、記述したコードのポータビリティを保つために、 オプションのHibernate" +"の Transaction APIを使いたくなるかもしれません。" + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"自動JNDIバインディング:HibernateはJNDIが立ち上がった後" +"に SessionFactory を生成します。" + +#. Tag: para +#: configuration.xml:1389 +#, no-c-format +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"JTAセッションバインディング : Hibernate " +"Session のトランザクション境界はJTAトランザクションと同じ" +"になります。 単純に SessionFactory をJNDIからlookupして、 " +"現在の Session を取得します。 JTAトランザクションが完了し" +"たときに、Hibernateが Session をフラッシュし、クローズしま" +"す。 EJBデプロイメントディスクリプタの中に、トランザクション境界を宣言しま" +"す。" + +#. Tag: para +#: configuration.xml:1402 +#, no-c-format +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"JMXデプロイ: もしJMXが使用可能なアプリケーションサーバ" +"(例えばJBOSS) がある場合、HibernateをMBeanとしてデプロイすることを選べま" +"す。 これは Configuration から SessionFactory を 生成するコードを無くすことができます。 コンテナは " +"HibernateService を起動し、 サービスの依存を理想的に管理し" +"ます(データソースはHibernateやその他が起動する前に 使用できるようにしなけれ" +"ばなりません)。" + +#. Tag: para +#: configuration.xml:1413 +#, no-c-format +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"環境に依存しますが、もし、アプリケーションサーバが\"connection containment" +"\"の例外をスローするなら 設定のオプション hibernate.connection." +"aggressive_release をtrueにしてください。" + +#. Tag: title +#: configuration.xml:1420 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "トランザクション戦略設定" + +#. Tag: para +#: configuration.xml:1422 +#, no-c-format +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"Hibernate Session APIは、アーキテクチャ内のシステムの管轄" +"である あらゆるトランザクションに依存しません。 もしコネクションプールのJDBC" +"を直接使いたい場合、JDBC APIから トランザクションを呼ぶことができます。 も" +"し、J2EEアプリケーションサーバで動作させるなら、Bean管理トランザクションを使" +"い、 必要に応じて UserTransaction をJTA APIから呼ぶことに" +"なるでしょう。" + +#. Tag: para +#: configuration.xml:1430 +#, no-c-format +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"2つ(それ以上)の環境で互換性のあるコードを維持するために、オプションとして根" +"本的なシステムを ラッピングするHibernate Transaction APIを" +"推奨します。 Hibernate設定プロパティの hibernate.transaction." +"factory_class を設定することで ある特定の Transaction クラスのインスタンスを持つことができます。" + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "3つの基本的な(既にある)選択を挙げます:" + +#. Tag: literal +#: configuration.xml:1443 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "org.hibernate.transaction.JDBCTransactionFactory" + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "データベース(JDBC)トランザクションに委譲します(デフォルト)" + +#. Tag: literal +#: configuration.xml:1449 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#. Tag: para +#: configuration.xml:1451 +#, no-c-format +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"もし、このコンテキスト(例えば、EJBセッションBeanメソッド)で進行中のトランザ" +"クションが存在する、もしくは 新しいトランザクションが開始されており、Bean管理" +"トランザクションが使われている場合、 コンテナ管理トランザクションに委譲しま" +"す。" + +#. Tag: literal +#: configuration.xml:1459 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#. Tag: para +#: configuration.xml:1461 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "コンテナ管理JTAトランザクションに委譲します" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "" +"自分自身のトランザクション戦略(例えば、CORBAトランザクションサービス)を定義" +"することもできます。" + +#. Tag: para +#: configuration.xml:1471 +#, no-c-format +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Hibernateのいくつかの機能(例えば、二次キャッシュ、JTAによるコンテキストセッ" +"ション 等)は 管理された環境の中のJTA TransactionManager " +"へのアクセスを要求します。 J2EEがひとつのメカニズムに規格化されていないの" +"で、 アプリケーションサーバにおいて、Hibernateが " +"TransactionManager のリファレンス を取得する方法を明確にす" +"る必要があります。" + +#. Tag: title +#: configuration.xml:1479 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "JTA トランザクションマネージャ" + +#. Tag: entry +#: configuration.xml:1485 +#, no-c-format +msgid "Transaction Factory" +msgstr "Transaction Factory" + +#. Tag: entry +#: configuration.xml:1486 +#, no-c-format +msgid "Application Server" +msgstr "Application Server" + +#. Tag: literal +#: configuration.xml:1491 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1492 +#, no-c-format +msgid "JBoss" +msgstr "JBoss" + +#. Tag: literal +#: configuration.xml:1495 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1496 +#, no-c-format +msgid "Weblogic" +msgstr "Weblogic" + +#. Tag: literal +#: configuration.xml:1499 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "WebSphere" +msgstr "WebSphere" + +#. Tag: literal +#: configuration.xml:1503 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#. Tag: entry +#: configuration.xml:1504 +#, no-c-format +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#. Tag: literal +#: configuration.xml:1507 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1508 +#, no-c-format +msgid "Orion" +msgstr "Orion" + +#. Tag: literal +#: configuration.xml:1511 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1512 +#, no-c-format +msgid "Resin" +msgstr "Resin" + +#. Tag: literal +#: configuration.xml:1515 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1516 +#, no-c-format +msgid "JOTM" +msgstr "JOTM" + +#. Tag: literal +#: configuration.xml:1519 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1520 +#, no-c-format +msgid "JOnAS" +msgstr "JOnAS" + +#. Tag: literal +#: configuration.xml:1523 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1524 +#, no-c-format +msgid "JRun4" +msgstr "JRun4" + +#. Tag: literal +#: configuration.xml:1527 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1528 +#, no-c-format +msgid "Borland ES" +msgstr "Borland ES" + +#. Tag: title +#: configuration.xml:1537 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "SessionFactory のJNDIへの登録" + +#. Tag: para +#: configuration.xml:1539 +#, no-c-format +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"JNDIに登録したHibernate SessionFactory は単純に ファクトリ" +"をルックアップし、新しい Session を作ります。 これはJNDIに" +"登録された Datasource には関連せず、 お互いにシンプルにこ" +"れらの登録を使うことに注意してください。" + +#. Tag: para +#: configuration.xml:1546 +#, no-c-format +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"もし SessionFactory をJNDIネームスペースに登録したい場" +"合、 特別な名前(例えば、 java:hibernate/SessionFactory )" +"を hibernate.session_factory_name プロパティに使ってくださ" +"い もしこのプロパティを省略した場合、 SessionFactory は " +"JNDIに登録されません。(これはTomcatのようなデフォルト実装でJNDIが読みより専" +"用の環境の場合特に便利です。)" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"SessionFactory をJNDIに登録するとき、Hibernateは " +"hibernate.jndi.url の値を使用し、hibernate.jndi." +"class をイニシャルコンテキストとして具体化します。 もし何も設定しな" +"い場合は、デフォルトの InitialContext を使用します。" + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"cfg.buildSessionFactory() をコール後 Hibernateは自動的に " +"SessionFactory をJNDIに配置します。 " +"HibernateService と一緒にJMXデプロイメントを使わない限" +"り、 これはこの呼び出しをアプリケーション内の何らかのスタートアップコード(も" +"しくはユーティリティクラス) に配置しなければならないことを意味します。(後で" +"議論します)" + +#. Tag: para +#: configuration.xml:1568 +#, no-c-format +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"もしJNDI SessionFactory を使う場合、EJBや他のクラスは JNDI" +"ルックアップを使って SessionFactory を取得します。" + +#. Tag: para +#: configuration.xml:1573 +#, no-c-format +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"管理された環境では SessionFactory をJNDIにバインドし、 そ" +"うでなければ static シングルトンを使うことを推奨します。 " +"こういった詳細からアプリケーションコードを保護するために、 " +"HibernateUtil.getSessionFactory() のようなヘルパークラスの" +"中に、 SessionFactory をルックアップするコードを隠すことを" +"推奨します。 このようなヘルパークラスはHibernateを開始する便利な手段でもあり" +"ます。 —1章を参照してください。" + +#. Tag: title +#: configuration.xml:1585 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "JTAによる現在のセッションコンテキストマネージメント" + +#. Tag: para +#: configuration.xml:1587 +#, no-c-format +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"もっとも簡単に Session とトランザクションを扱う方法は、 " +"Hibernateが自動的に「現在の」 Session を管理することで" +"す。 カレントセッション の説明を参照してください。 もし 「JTA」 セッションコ" +"ンテキストを使った上で、 現在のJTAトランザクションとHibernate " +"Session が関連していない場合は、 最初に " +"sessionFactory.getCurrentSession() をコールし、 JTAトラン" +"ザクションとの関連付けを行ってください。 「JTA」 コンテキ" +"ストの getCurrentSession() を 通じて取得した " +"Session は、トランザクションが完了する前に 自動的にフラッ" +"シュし、完了した後には自動的にクローズします。 また、各ステートメント後にJDBC" +"コネクションを積極的にリリースします。 これによりJTAトランザクションのライフ" +"サイクルで Session を管理することができ、 ユーザーのコード" +"からそのような管理をするコードを排除できます。 UserTransaction を通じてJTAをプログラムで管理することができます。 または、(ポータブ" +"ルなコードであれば)Hibernate Transaction APIを トランザク" +"ション境界として使うこともできます。 EJBコンテナを使うときは、CMTによる宣言的" +"トランザクション境界が好ましいです。" + +#. Tag: title +#: configuration.xml:1610 +#, no-c-format +msgid "JMX deployment" +msgstr "JMXデプロイメント" + +#. Tag: para +#: configuration.xml:1612 +#, no-c-format +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"SessionFactory をJNDIから取得するためには cfg." +"buildSessionFactory() 行をどこかで実行していなければなりません。 あ" +"なたはこれを、static 初期化ブロック内" +"( HibernateUtil のような)か managed service としてHibernateをデプロイするか、どちらかで実行できます。" + +#. Tag: para +#: configuration.xml:1620 +#, no-c-format +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"JBOSSのようなJMXの機能でアプリケーションサーバにデプロイするために " +"org.hibernate.jmx.HibernateService を使って、配置します。 " +"実際のデプロイメントと設定はベンダー特有です。 ここで例としてJBOSS 4.0.x用の " +"jboss-service.xml を示します。" + +#. Tag: programlisting +#: configuration.xml:1627 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1629 +#, no-c-format +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"このファイルは META-INF ディレクトリに配置され、 JARファイ" +"ルを拡張した .sar (service archive)でパッケージ化されま" +"す。 同様にHibernateパッケージも必要です。また、Hibernateはサードパーティのラ" +"イブラリも要求します。 コンパイルした永続化クラスとそのマッピングファイルも同" +"様にアーカイブ(.sarファイル)に入れます。 エンタープライズbean(通常はセッ" +"ションbean)は自身のJARファイルを保持しますが、 1回で(ホット)デプロイ可能な" +"ユニットのためにメインサービスアーカイブとしてこのEJB JARファイルをインクルー" +"ドする ことができます。JBossアプリケーションサーバのドキュメントにJXMサービス" +"と EJBデプロイメントのより多くの情報があります。" + +#~ msgid " (optional)" +#~ msgstr " (オプション)" + +#~ msgid "InitialContextFactory" +#~ msgstr "InitialContextFactory" + +#~ msgid "class of the JNDI " +#~ msgstr "JNDIクラス " + +#~ msgid "eg." +#~ msgstr "例:" + +#~ msgid "full.classname.of.Dialect" +#~ msgstr "full.classname.of.Dialect" + +#~ msgid "debug" +#~ msgstr "debug" + +#~ msgid "SCHEMA_NAME" +#~ msgstr "SCHEMA_NAME" + +#~ msgid "CATALOG_NAME" +#~ msgstr "CATALOG_NAME" + +#~ msgid "SessionFactory" +#~ msgstr "SessionFactory" + +#~ msgid "jndi/composite/name" +#~ msgstr "jndi/composite/name" + +#~ msgid "0" +#~ msgstr "0" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "Statement.setFetchSize()" +#~ msgstr "Statement.setFetchSize()" + +#~ msgid "true" +#~ msgstr "executeBatch()" + +#~ msgid "executeBatch()" +#~ msgstr "true" + +#~ msgid "Batcher" +#~ msgstr "Batcher" + +#~ msgid "classname.of.BatcherFactory" +#~ msgstr "classname.of.BatcherFactory" + +#~ msgid "binary" +#~ msgstr "binary" + +#~ msgid "serializable" +#~ msgstr "serializable" + +#~ msgid "PreparedStatement.getGeneratedKeys()" +#~ msgstr "PreparedStatement.getGeneratedKeys()" + +#~ msgid "true|false" +#~ msgstr "true|false" + +#~ msgid "ConnectionProvider" +#~ msgstr "ConnectionProvider" + +#~ msgid "classname.of.ConnectionProvider" +#~ msgstr "classname.of.ConnectionProvider" + +#~ msgid "java.sql.Connection" +#~ msgstr "java.sql.Connection" + +#~ msgid "1, 2, 4, 8" +#~ msgstr "1, 2, 4, 8" + +#~ msgid "after_statement" +#~ msgstr "after_statement" + +#~ msgid "after_transaction" +#~ msgstr "after_transaction" + +#~ msgid "auto" +#~ msgstr "auto" + +#~ msgid "hibernate.connection." +#~ msgstr "<propertyName>" + +#, fuzzy +#~ msgid "<propertyName>" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.connection.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.jndi.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName" + +#~ msgid "DriverManager.getConnection()" +#~ msgstr "DriverManager.getConnection()" + +#~ msgid "Pass the JDBC property to ." +#~ msgstr "" +#~ "JDBCの プロパティを、 に渡します。" + +#~ msgid "hibernate.jndi." +#~ msgstr "<propertyName>" + +#~ msgid "Pass the property to the JNDI ." +#~ msgstr " プロパティを、 JNDI に渡します。" + +#~ msgid "CacheProvider" +#~ msgstr "CacheProvider" + +#~ msgid "classname.of.CacheProvider" +#~ msgstr "classname.of.CacheProvider" + +#~ msgid "<cache>" +#~ msgstr "<cache>" + +#~ msgid "QueryCache" +#~ msgstr "QueryCache" + +#~ msgid "StandardQueryCache" +#~ msgstr "StandardQueryCache" + +#~ msgid "classname.of.QueryCache" +#~ msgstr "classname.of.QueryCache" + +#~ msgid "prefix" +#~ msgstr "prefix" + +#~ msgid "TransactionFactory" +#~ msgstr "Transaction" + +#~ msgid "Transaction" +#~ msgstr "TransactionFactory" + +#~ msgid "JDBCTransactionFactory" +#~ msgstr "JDBCTransactionFactory" + +#~ msgid "classname.of.TransactionFactory" +#~ msgstr "classname.of.TransactionFactory" + +#~ msgid "JTATransactionFactory" +#~ msgstr "UserTransaction" + +#~ msgid "UserTransaction" +#~ msgstr "JTATransactionFactory" + +#~ msgid "TransactionManagerLookup" +#~ msgstr "TransactionManagerLookup" + +#~ msgid "classname.of.TransactionManagerLookup" +#~ msgstr "classname.of.TransactionManagerLookup" + +#~ msgid "Session" +#~ msgstr "Session" + +#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" + +#~ msgid "create-drop" +#~ msgstr "create-drop" + +#~ msgid "hibernate.cfg.xml" +#~ msgstr "hibernate.cfg.xml" + +#~ msgid "DB2" +#~ msgstr "DB2" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/events.po b/documentation/envers/src/main/docbook/ja-JP/content/events.po new file mode 100644 index 0000000000..b5deb8836d --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/events.po @@ -0,0 +1,471 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:5 +#, no-c-format +msgid "Interceptors and events" +msgstr "インターセプタとイベント" + +#. Tag: para +#: events.xml:7 +#, no-c-format +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"アプリケーションがHibernateの内部で発生するイベントに対応できると役に立つこと" +"があります。 ある種の一般的な機能を実装できるようになり、 またHibernateの機能" +"を拡張することもできるようになります。" + +#. Tag: title +#: events.xml:14 +#, no-c-format +msgid "Interceptors" +msgstr "インターセプタ" + +#. Tag: para +#: events.xml:16 +#, no-c-format +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"Interceptor インターフェイスを使って、 セッションからアプ" +"リケーションへコールバックをすることができます。 これにより永続オブジェクトの" +"保存、更新、削除、読み込みの前に、 アプリケーションがプロパティを検査したり操" +"作したりできるようになります。 これは監査情報の追跡に利用できます。 下の例で " +"InterceptorAuditable が作成されると" +"自動的に createTimestamp を設定し、 Auditable が更新されると自動的に lastUpdateTimestamp プロパ" +"ティを更新します。" + +#. Tag: para +#: events.xml:27 +#, no-c-format +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"Interceptor を直接実装したり、 (さらによいのは)" +"EmptyInterceptor を拡張したりできます。" + +#. Tag: programlisting +#: events.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:34 +#, no-c-format +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"インターセプタには二種類あります: Session スコープのもの" +"と SessionFactory スコープのものです。" + +#. Tag: para +#: events.xml:39 +#, no-c-format +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"Session スコープのインターセプタは、 セッションをオープン" +"するときに指定します。 Interceptor を引数に取る" +"SessionFactory.openSession() のオーバーロードメソッドの一つを使います。" + +#. Tag: programlisting +#: events.xml:45 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:47 +#, no-c-format +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"SessionFactory スコープのインターセプタは " +"Configuration オブジェクトを使って登録します。 これは " +"SessionFactory の構築よりも優先されます。 この場合、提供さ" +"れるインターセプタは SessionFactory からオープンされたすべ" +"てのセッションに適用されます。 これは使用するインターセプタを明示的に指定して" +"セッションをオープンしない限り、そうなります。 SessionFactory スコープのインターセプタはスレッドセーフでなければなりません。 複数" +"のセッションが(潜在的に)このインターセプタを同時並行で使用することになるた" +"め、 セッション固有の状態を格納しないように気をつけてください。" + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: events.xml:61 +#, no-c-format +msgid "Event system" +msgstr "イベントシステム" + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"永続化層で特定のイベントに対応しなければならない場合、 Hibernate3の " +"イベント アーキテクチャを使うこともできます。 イベントシ" +"ステムはインターセプタと一緒に使うか、またはインターセプタの代わりとして使う" +"ことができます。" + +#. Tag: para +#: events.xml:69 +#, no-c-format +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"本質的に Session インターフェイスのすべてのメソッドは、 1" +"個のイベントと相互に関連します。 例えば LoadEvent、" +"FlushEvent などがあります (定義済みのイベント型の一覧につ" +"いては、XML設定ファイルのDTDや org.hibernate.event パッ" +"ケージを調べてください)。 リクエストがこれらのメソッドの1つから作られると" +"き、 Hibernateの Session は適切なイベントを生成し、 そのイ" +"ベント型に設定されたイベントリスナに渡します。 すばらしいことに、これらのリス" +"ナはそのメソッドと同じ処理を実装します。 とはいえ、リスナインターフェイスの一" +"つを自由にカスタム実装できます (つまり、LoadEvent は登録" +"された LoadEventListener インターフェイスの実装により処理" +"されます)。 その場合、その実装には Session から作られたど" +"のような load() リクエストをも処理する責任があります。" + +#. Tag: para +#: events.xml:84 +#, no-c-format +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"リスナは事実上シングルトンであると見なせます。 つまりリスナはリクエスト間で共" +"有されるため、 インスタンス変数として状態を保持するべきではないということで" +"す。" + +#. Tag: para +#: events.xml:89 +#, no-c-format +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"カスタムリスナは処理したいイベントについて適切なインターフェイスを実装するべ" +"きです。 便利な基底クラスのうちの一つを継承してもよいです (またはHibernateが" +"デフォルトで使用するイベントリスナを継承してもよいです。 すばらしいことに、こ" +"の目的のために非finalとして宣言されています)。 カスタムリスナは " +"Configuration オブジェクトを使ってプログラムから登録する" +"か、 HibernateのXML設定ファイルで指定できます (プロパティファイルで宣言的に" +"設定する方法はサポートされていません)。 カスタムロードイベントリスナの例を示" +"します。" + +#. Tag: programlisting +#: events.xml:99 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:101 +#, no-c-format +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "デフォルトリスナ以外のリスナを使うには、Hibernateへの設定も必要です:" + +#. Tag: programlisting +#: events.xml:106 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "またその他に、プログラムで登録する方法もあります:" + +#. Tag: programlisting +#: events.xml:112 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:114 +#, no-c-format +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"リスナを宣言的に登録すると、そのリスナのインスタンスを共有できません。 複数" +"の <listener/> 要素で同じクラス名が使われると、 それ" +"ぞれの参照はそのクラスの別々のインスタンスを指すことになります。 リスナ型の間" +"でリスナインスタンスを共有する必要があれば、 プログラムで登録する方法を採らな" +"ければなりません。" + +#. Tag: para +#: events.xml:122 +#, no-c-format +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"なぜインターフェイスを実装して、特化した型を設定時に指定するのでしょうか? リ" +"スナの実装クラスに、複数のイベントリスナインターフェイスを実装できるからで" +"す。 登録時に追加で型を指定することで、カスタムリスナのon/offを設定時に簡単に" +"切り替えられます。" + +#. Tag: title +#: events.xml:132 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "Hibernateの宣言的なセキュリティ" + +#. Tag: para +#: events.xml:133 +#, no-c-format +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"一般的にHibernateアプリケーションの宣言的なセキュリティは、セッションファサー" +"ド層で管理します。 現在、Hiberenate3はJACCで許可しかつ、JAASで認証したアク" +"ションを許しています。 これはイベントアーキテクチャの最上位に組み込まれている" +"オプションの機能です。" + +#. Tag: para +#: events.xml:139 +#, no-c-format +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"まず最初に、適切なイベントリスナを設定してJAAS認証を使えるようにしなければな" +"りません。" + +#. Tag: programlisting +#: events.xml:144 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"特定のイベント型に対してちょうど一つのリスナがあるとき、 <" +"listener type=\"...\" class=\"...\"/><event " +"type=\"...\"><listener class=\"...\"/></event> の簡" +"略形に過ぎないことに注意してください。" + +#. Tag: para +#: events.xml:152 +#, no-c-format +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"次に、同じく hibernate.cfg.xml でロールにパーミッションを" +"与えてください:" + +#. Tag: programlisting +#: events.xml:156 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:158 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "このロール名は使用するJACCプロバイダに理解されるロールです。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/example_mappings.po b/documentation/envers/src/main/docbook/ja-JP/content/example_mappings.po new file mode 100644 index 0000000000..cb6eed80d9 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/example_mappings.po @@ -0,0 +1,790 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Example: Various Mappings" +msgstr "例:いろいろなマッピング" + +#. Tag: para +#: example_mappings.xml:22 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "この章では、より複雑な関連のマッピングをいくつか紹介します。" + +#. Tag: title +#: example_mappings.xml:27 +#, no-c-format +msgid "Employer/Employee" +msgstr "雇用者/従業員" + +#. Tag: para +#: example_mappings.xml:29 +#, no-c-format +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"EmployerEmployee の関係を表す以下の" +"モデルは、 関連の表現に実際のエンティティクラス( Employment ) を使います。 なぜなら、同じ2つのパーティに複数の期間雇用されると" +"いうことがありえるからです。 お金の値と従業員の名前をモデル化するためにコン" +"ポーネントを使っています。" + +#. Tag: para +#: example_mappings.xml:46 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "マッピングドキュメントの一例です:" + +#. Tag: programlisting +#: example_mappings.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:52 +#, no-c-format +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "SchemaExport で生成したテーブルスキーマです。" + +#. Tag: programlisting +#: example_mappings.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:61 +#, no-c-format +msgid "Author/Work" +msgstr "作者/作品" + +#. Tag: para +#: example_mappings.xml:63 +#, no-c-format +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"Work , Author そして Person の関係を表す以下のモデルを考えてみてください。 WorkAuthor の関係を多対多関連で表しています。 " +"AuthorPerson の関係は一対一関連とし" +"て表しています。 他には AuthorPerson を拡張するという方法もあります。" + +#. Tag: para +#: example_mappings.xml:81 +#, no-c-format +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "以下のマッピングドキュメントはこのような関係を正確に表現しています。" + +#. Tag: programlisting +#: example_mappings.xml:85 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:87 +#, no-c-format +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"このマッピングには4つのテーブルがあります。 works , " +"authors , persons はそれぞれ、仕事、作" +"者、人のデータを保持します。 author_work は作者と作品をリ" +"ンクする関連テーブルです。 以下は SchemaExport で生成した" +"テーブルスキーマです。" + +#. Tag: programlisting +#: example_mappings.xml:95 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:100 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "顧客/注文/製品" + +#. Tag: para +#: example_mappings.xml:102 +#, no-c-format +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"さて、 Customer , Order , " +"LineItemProduct の関係を表すモデルを考" +"えてみましょう。 CustomerOrder は一" +"対多の関連ですが、 Order / LineItem / " +"Product はどのように表現するべきでしょうか? " +"LineItem を、Order と " +"Product の多対多関連を表現する関連クラスとしてマッピングし" +"ました。 Hibernateではこれをコンポジット要素と呼びます。" + +#. Tag: para +#: example_mappings.xml:122 +#, no-c-format +msgid "The mapping document:" +msgstr "マッピングドキュメント:" + +#. Tag: programlisting +#: example_mappings.xml:126 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:128 +#, no-c-format +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers , orders , " +"line_items , products はそれぞれ、顧" +"客、注文、注文明細、製品のデータを保持します。 line_items " +"は注文と製品をリンクする関連テーブルとしても働きます。" + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:140 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "種々雑多なマッピング例" + +#. Tag: para +#: example_mappings.xml:142 +#, no-c-format +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"ここにある例はすべてHibernateのテストスイートから取りました。 そこには、他に" +"もたくさんのマッピングの例があります。 Hibernateディストリビューションの " +"test フォルダを見てください。" + +#. Tag: para +#: example_mappings.xml:148 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "TODO: ここに文章を埋める" + +#. Tag: title +#: example_mappings.xml:151 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "「型付けされた」一対一関連" + +#. Tag: programlisting +#: example_mappings.xml:152 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:156 +#, no-c-format +msgid "Composite key example" +msgstr "複合キーの例" + +#. Tag: programlisting +#: example_mappings.xml:157 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:161 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "複合キー属性を共有する多対多" + +#. Tag: programlisting +#: example_mappings.xml:162 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:166 +#, no-c-format +msgid "Content based discrimination" +msgstr "discriminationに基づく内容" + +#. Tag: programlisting +#: example_mappings.xml:167 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:171 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "代替キーの関連" + +#. Tag: programlisting +#: example_mappings.xml:172 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/example_parentchild.po b/documentation/envers/src/main/docbook/ja-JP/content/example_parentchild.po new file mode 100644 index 0000000000..0e80c03a3f --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/example_parentchild.po @@ -0,0 +1,603 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:5 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "例:親/子供" + +#. Tag: para +#: example_parentchild.xml:7 +#, no-c-format +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"新規ユーザがHibernateを使ってまず最初に扱うモデルの一つに、親子型のモデル化が" +"あります。 このモデル化には二つのアプローチが存在します。とりわけ新規ユーザに" +"とって、 さまざまな理由から最も便利だと思われるアプローチは、 から 子供 への <one-to-many> 関連により 子供 の両方を" +"エンティティクラスとしてモデリングする方法です (もう一つの方法は、" +"子供<composite-element> として定義する" +"ものです)。 これで(Hibernateにおける)一対多関連のデフォルトのセマンティク" +"スが、通常の複合要素のマッピングよりも、 親子関係のセマンティクスから遠いこと" +"がわかります。 それでは親子関係を効率的かつエレガントにモデリングするため" +"に、 カスケード操作を使った双方向一対多関連 の扱い方を説" +"明します。これはまったく難しいものではありません。" + +#. Tag: title +#: example_parentchild.xml:21 +#, no-c-format +msgid "A note about collections" +msgstr "コレクションに関する注意" + +#. Tag: para +#: example_parentchild.xml:23 +#, no-c-format +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Hibernateのコレクションは自身のエンティティの論理的な部分と考えられ、 決して" +"包含するエンティティのものではありません。これは致命的な違いです! これは以下" +"のような結果になります:" + +#. Tag: para +#: example_parentchild.xml:30 +#, no-c-format +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "" +"オブジェクトをコレクションから削除、またはコレクションに追加するとき、 コレク" +"ションのオーナーのバージョン番号はインクリメントされます。" + +#. Tag: para +#: example_parentchild.xml:36 +#, no-c-format +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"もしコレクションから削除されたオブジェクトが値型のインスタンス (例えばコンポ" +"ジットエレメント)だったならば、そのオブジェクトは永続的ではなくなり、 その状" +"態はデータベースから完全に削除されます。 同じように、値型のインスタンスをコレ" +"クションに追加すると、その状態はすぐに永続的になります。" + +#. Tag: para +#: example_parentchild.xml:44 +#, no-c-format +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"一方、もしエンティティがコレクション(一対多または多対多関連)から削除されて" +"も、 デフォルトではそれは削除されません。この動作は完全に一貫しています。 す" +"なわち、他のエンティティの内部状態を変更しても、関連するエンティティが消滅す" +"べきではないということです。 同様に、エンティティがコレクションに追加されて" +"も、デフォルトではそのエンティティは永続的にはなりません。" + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"その代わりに、デフォルトの動作では、エンティティをコレクションに追加すると単" +"に二つのエンティティ間のリンクを作成し、 一方エンティティを削除するとリンクも" +"削除します。これはすべてのケースにおいて非常に適切です。 これが適切でないのは" +"親/子関係の場合です。この場合子供の生存は親のライフサイクルに制限されるからで" +"す。" + +#. Tag: title +#: example_parentchild.xml:64 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "双方向一対多" + +#. Tag: para +#: example_parentchild.xml:66 +#, no-c-format +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "" +"Parent から Child への単純な " +"<one-to-many> 関連から始めるとします。" + +#. Tag: programlisting +#: example_parentchild.xml:71 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:73 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "以下のコードを実行すると、" + +#. Tag: programlisting +#: example_parentchild.xml:77 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:79 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernateは二つのSQL文を発行します:" + +#. Tag: para +#: example_parentchild.xml:85 +#, no-c-format +msgid "" +"an INSERT to create the record for c" +msgstr "" +"cに対するレコードを生成するINSERT" + +#. Tag: para +#: example_parentchild.xml:88 +#, no-c-format +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"pからcへのリンクを作成する" +"UPDATE" + +#. Tag: para +#: example_parentchild.xml:95 +#, no-c-format +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"これは非効率的なだけではなく、parent_id カラムにおいて " +"NOT NULL 制約に違反します。 コレクションのマッピングで " +"not-null=\"true\" と指定することで、null制約違反を解決する" +"ことができます:" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "しかしこの解決策は推奨できません。" + +#. Tag: para +#: example_parentchild.xml:106 +#, no-c-format +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"この動作の根本的な原因は、p から c への" +"リンク (外部キー parent_id)は Child オ" +"ブジェクトの状態の一部とは考えられず、 そのため INSERT に" +"よってリンクが生成されないことです。 ですから、解決策はリンクをChildマッピン" +"グの一部にすることです。" + +#. Tag: programlisting +#: example_parentchild.xml:113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:115 +#, no-c-format +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(また Child クラスに parent プロパティ" +"を追加する必要があります。)" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"それでは Child エンティティがリンクの状態を制御するように" +"なったので、 コレクションがリンクを更新しないようにしましょう。それには " +"inverse 属性を使います。" + +#. Tag: programlisting +#: example_parentchild.xml:124 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:126 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "" +"以下のコードを使えば、新しい Child を追加することができま" +"す。" + +#. Tag: programlisting +#: example_parentchild.xml:130 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:132 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "" +"これにより、SQLの INSERT 文が一つだけが発行されるようにな" +"りました!" + +#. Tag: para +#: example_parentchild.xml:136 +#, no-c-format +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"もう少し強化するには、ParentaddChild() メソッドを作成します。" + +#. Tag: programlisting +#: example_parentchild.xml:141 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "Child を追加するコードはこのようになります。" + +#. Tag: programlisting +#: example_parentchild.xml:147 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:152 +#, no-c-format +msgid "Cascading life cycle" +msgstr "ライフサイクルのカスケード" + +#. Tag: para +#: example_parentchild.xml:154 +#, no-c-format +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"明示的に save() をコールするのはまだ煩わしいものです。これ" +"をカスケードを使って対処します。" + +#. Tag: programlisting +#: example_parentchild.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:161 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "これにより先ほどのコードをこのように単純化します" + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"同様に Parent を保存または削除するときに、子供を一つ一つ取" +"り出して扱う必要はありません。 以下のコードは p を削除し、" +"そしてデータベースからその子供をすべて削除します。" + +#. Tag: programlisting +#: example_parentchild.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:174 +#, no-c-format +msgid "However, this code" +msgstr "しかしこのコードは" + +#. Tag: programlisting +#: example_parentchild.xml:178 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:180 +#, no-c-format +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"データベースから c を削除しません。p へ" +"のリンクを削除する (そしてこのケースでは NOT NULL 制約違" +"反を引き起こす)だけです。 Childdelete() を明示する必要があります。" + +#. Tag: programlisting +#: example_parentchild.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:188 +#, no-c-format +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"今このケースでは実際に Child が親なしでは存在できないよう" +"になりました。 そのため、もしコレクションから Child を取り" +"除く場合、これも削除したいです。 そのためには cascade=\"all-delete-" +"orphan\" を使わなければなりません。" + +#. Tag: programlisting +#: example_parentchild.xml:194 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:196 +#, no-c-format +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"注意:コレクションのマッピングで inverse=\"true\" と指定し" +"ても、 コレクションの要素のイテレーションによって、依然カスケードが実行されま" +"す。 そのためもしカスケードでオブジェクトをセーブ、削除、更新する必要があるな" +"ら、 それをコレクションに追加しなければなりません。単に setParent()" +" を呼ぶだけでは不十分です。" + +#. Tag: title +#: example_parentchild.xml:206 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "カスケードと unsaved-value" + +#. Tag: para +#: example_parentchild.xml:208 +#, no-c-format +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"Parent が、ある Session でロードされ、" +"UIのアクションで変更が加えられ、 update() を呼んでこの変更" +"を新しいセッションで永続化したいとします。 Parent が子供の" +"コレクションを持ち、カスケード更新が有効になっているため、 Hibernateはどの子" +"供が新しくインスタンス化されたか、どれがデータベースの既存の行に相当するのか" +"を知る必要があります。 ParentChild " +"の両方が java.lang.Long 型の識別プロパティを生成したとしま" +"しょう。 Hibernateはどの子供が新しいものかを決定するために識別プロパティの値" +"を使います(versionやtimestampプロパティも使えます。 参照)。Hibernate3になって、 明示的" +"に unsaved-value を指定する必要はなくなりました。" + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"以下のコードは parentchild を更新" +"し、newChild を挿入します。" + +#. Tag: programlisting +#: example_parentchild.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:227 +#, no-c-format +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"これらは生成された識別子の場合には非常に良いのですが、割り当てられた識別子と" +"複合識別子の場合はどうでしょうか? これはHibernateが、(ユーザにより割り当て" +"られた識別子を持つ)新しくインスタンス化されたオブジェクトと、 以前のSession" +"でロードされたオブジェクトを区別できないため、より難しいです。 この場合、" +"Hibernateはタイムスタンプかバージョンのプロパティのどちらかを使うか、二次" +"キャッシュに問い合わせます。 最悪の場合、行が存在するかどうかデータベースを見" +"ます。" + +#. Tag: title +#: example_parentchild.xml:260 +#, no-c-format +msgid "Conclusion" +msgstr "結論" + +#. Tag: para +#: example_parentchild.xml:262 +#, no-c-format +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"ここではかなりの量を要約したので、最初の頃は混乱しているように思われるかもし" +"れません。 しかし実際は、すべて非常に良く動作します。ほとんどのHibernateアプ" +"リケーションでは、多くの場面で親子パターンを使用します。" + +#. Tag: para +#: example_parentchild.xml:267 +#, no-c-format +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"最初の段落で代替方法について触れました。上記のような問題は <" +"composite-element> マッピングの場合は存在せず、 にもかかわらずそ" +"れは確かに親子関係のセマンティクスを持ちます。 しかし残念ながら、複合要素クラ" +"スには二つの大きな制限があります: 1つは複合要素はコレクションを持つことがで" +"きないことです。もうひとつは、 ユニークな親ではないエンティティの子供となるべ" +"きではないということです" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/example_weblog.po b/documentation/envers/src/main/docbook/ja-JP/content/example_weblog.po new file mode 100644 index 0000000000..e7cdd37789 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/example_weblog.po @@ -0,0 +1,484 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:5 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "例: Weblogアプリケーション" + +#. Tag: title +#: example_weblog.xml:8 +#, no-c-format +msgid "Persistent Classes" +msgstr "永続クラス" + +#. Tag: para +#: example_weblog.xml:10 +#, no-c-format +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"永続クラスがウェブログと、ウェブログに掲示された項目を表しています。 それらは" +"通常の親子関係としてモデリングされますが、 setではなく順序を持ったbagを使用す" +"ることにします。" + +#. Tag: programlisting +#: example_weblog.xml:16 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:18 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_weblog.xml:23 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "Hibernateのマッピング" + +#. Tag: para +#: example_weblog.xml:25 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "XMLマッピングは、今ではとても簡単なはずです。" + +#. Tag: programlisting +#: example_weblog.xml:29 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:31 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:36 +#, no-c-format +msgid "Hibernate Code" +msgstr "Hibernateのコード" + +#. Tag: para +#: example_weblog.xml:38 +#, no-c-format +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "" +"以下のクラスは、 Hibernateでこれらのクラスを使ってできることをいくつか示して" +"います。" + +#. Tag: programlisting +#: example_weblog.xml:43 +#, no-c-format +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/filters.po b/documentation/envers/src/main/docbook/ja-JP/content/filters.po new file mode 100644 index 0000000000..fd5f43db37 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/filters.po @@ -0,0 +1,286 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:5 +#, no-c-format +msgid "Filtering data" +msgstr "データのフィルタリング" + +#. Tag: para +#: filters.xml:7 +#, no-c-format +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"Hibernate3では「可視性」ルールに基づいてデータを扱うための画期的な方法を用意" +"しています。 Hibernate filter はグローバルで、名前付き" +"で、パラメータ化されたフィルタです。 これはHibernateセッションごとに有効無効" +"を切り替えられます。" + +#. Tag: title +#: filters.xml:14 +#, no-c-format +msgid "Hibernate filters" +msgstr "Hibernateのフィルタ" + +#. Tag: para +#: filters.xml:16 +#, no-c-format +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"Hibernate3はフィルタクライテリアをあらかじめ定義し、 これらのフィルタをクラス" +"やコレクションレベルに加える機能を加えました。 フィルタクライテリアは制約節を" +"定義する機能です。 これらのフィルタ条件はパラメータ化できるということを除" +"き、 クラスやさまざまなコレクション要素で利用可能な「where」句に非常によく似て" +"います。 アプリケーションは、与えられたフィルタを可能にすべきか、 そしてその" +"パラメータ値を何にすべきかを実行時に決定することができます。 フィルタはデータ" +"ベースビューのように使用されますが、アプリケーション内ではパラメータ化されま" +"す。" + +#. Tag: para +#: filters.xml:26 +#, no-c-format +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"フィルタを使うためにはまず、適切なマッピング要素に定義、追加しなくてはなりま" +"せん。 フィルタを定義するためには、 <hibernate-mapping/> 要素内で <filter-def/> 要素を使用します。:" + +#. Tag: programlisting +#: filters.xml:32 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:34 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "そうしてフィルタはクラスへと結び付けられます。:" + +#. Tag: programlisting +#: filters.xml:38 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "or, to a collection:" +msgstr "また、コレクションに対しては次のようになります。:" + +#. Tag: programlisting +#: filters.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:46 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "どちらに対しても(また、それぞれを複数)同時に設定することもできます。" + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enabledFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Session 上のメソッドは enableFilter(String " +"filterName), getEnabledFilter(String filterName), disableFilter(String filterName) です。 デフォル" +"トでは、フィルタは与えられたセッションに対して使用 できませんFilter インスタンスを返り値とする " +"Session.enableFilter() メソッドを使うことで、 フィルタは" +"明示的に使用可能となります。 上で定義した単純なフィルタの使用は、このようにな" +"ります。:" + +#. Tag: programlisting +#: filters.xml:59 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: filters.xml:61 +#, no-c-format +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"org.hibernate.Filterインターフェイスのメソッドは、 Hibernateの多くに共通して" +"いるメソッド連鎖を許していることに注意してください。" + +#. Tag: para +#: filters.xml:65 +#, no-c-format +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "有効なレコードデータパターンを持つ一時データを使った完全な例です:" + +#. Tag: programlisting +#: filters.xml:69 +#, no-c-format +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:71 +#, no-c-format +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"常に現在の有効レコードを返却することを保証するために、 単純に、社員データの検" +"索より前にセッション上のフィルタを有効にします。" + +#. Tag: programlisting +#: filters.xml:76 +#, no-c-format +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:78 +#, no-c-format +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"上記のHQLでは、結果の給料の制約について明示的に触れただけですが、 有効になっ" +"ているフィルタのおかげで、このクエリは給料が100万ドル以上の現役の社員だけを返" +"します。" + +#. Tag: para +#: filters.xml:84 +#, no-c-format +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"(HQLかロードフェッチで)外部結合を持つフィルタを使うつもりなら、 条件式の方向" +"に注意してください。 これは左外部結合のために設定するのが最も安全です。 一般" +"的に、演算子の後カラム名に続けて最初のパラメータを配置してください。" + +#. Tag: para +#: filters.xml:91 +#, no-c-format +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "translator-credits" + +#. Tag: programlisting +#: filters.xml:98 +#, no-c-format +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:100 +#, no-c-format +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/ja-JP/content/inheritance_mapping.po new file mode 100644 index 0000000000..46f9f1e242 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/inheritance_mapping.po @@ -0,0 +1,842 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:5 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "継承マッピング" + +#. Tag: title +#: inheritance_mapping.xml:8 +#, no-c-format +msgid "The Three Strategies" +msgstr "3つの戦略" + +#. Tag: para +#: inheritance_mapping.xml:10 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "Hibernateは3つの基本的な継承のマッピング戦略をサポートします。" + +#. Tag: para +#: inheritance_mapping.xml:16 +#, no-c-format +msgid "table per class hierarchy" +msgstr "クラス階層ごとのテーブル(table-per-class-hierarchy)" + +#. Tag: para +#: inheritance_mapping.xml:21 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"サブクラスごとのテーブル(table-per-subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table per subclass" + +#. Tag: para +#: inheritance_mapping.xml:26 +#, no-c-format +msgid "table per concrete class" +msgstr "具象クラスごとのテーブル(table-per-concrete-class)" + +#. Tag: para +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "" +"加えて4つ目に、Hibernateはわずかに異なる性質を持ったポリモーフィズムをサポー" +"トします。" + +#. Tag: para +#: inheritance_mapping.xml:39 +#, no-c-format +msgid "implicit polymorphism" +msgstr "暗黙的ポリモーフィズム" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, no-c-format +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"同一の継承階層の異なるブランチに対して異なるマッピング戦略を使うことができま" +"す。 その場合には全体の階層に渡るポリモーフィズムを実現するために暗黙的ポリ" +"モーフィズムを使用します。 しかし、Hibernateは同じルート <" +"class> 要素内で <subclass> マッピング、" +"<joined-subclass> マッピング、 <union-" +"subclass> マッピングの同時使用をサポートしていません。 " +"<subclass> 要素と <join> 要" +"素を組み合わせることで、 同一 <class> 要素内での " +"table-per-hierarchy 戦略と table-per-subclass 戦略の同時使用は可能です。次の" +"例を見てください。" + +#. Tag: para +#: inheritance_mapping.xml:59 +#, no-c-format +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"subclass, union-subclass と " +"joined-subclass マッピングを複数のマッピングドキュメントに" +"定義することが出来、 hibernate-mapping の直下に配置しま" +"す。 これは新しいマッピングファイルを追加するだけで、クラス階層を拡張できると" +"いうことです。 あらかじめマップしたスーパークラスを指定して、サブクラスマッピ" +"ングに extends 属性を記述しなければなりません。 注意:この" +"特徴により、以前はマッピング・ドキュメントの順番が重要でした。 Hibernate3から" +"は、extendsキーワードを使う場合、マッピングドキュメントの順番は問題になりませ" +"ん。 1つのマッピングファイル内で順番付けを行うときは、 依然として、サブクラ" +"スを定義する前にスーパークラスを定義する必要があります。)" + +#. Tag: programlisting +#: inheritance_mapping.xml:70 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:74 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "クラス階層ごとのテーブル(table-per-class-hierarchy)" + +#. Tag: para +#: inheritance_mapping.xml:76 +#, no-c-format +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"例えば、インターフェイス Payment と、それを実装した " +"CreditCardPaymentCashPayment、 " +"ChequePayment があるとします。階層ごとのテーブルマッピング" +"は 以下のようになります。" + +#. Tag: programlisting +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:85 +#, no-c-format +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"ちょうど一つのテーブルが必要です。 このマッピング戦略には一つ大きな制限があり" +"ます。 CCTYPE のような、サブクラスで宣言されたカラムは " +"NOT NULL 制約を持てません。" + +#. Tag: title +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "Table per subclass" +msgstr "サブクラスごとのテーブル(table-per-subclass)" + +#. Tag: para +#: inheritance_mapping.xml:96 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "table-per-subclass マッピングは以下のようになります。" + +#. Tag: programlisting +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:102 +#, 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 "" +"このマッピングには4つのテーブルが必要です。3つのサブクラステーブルは スーパー" +"クラステーブルとの関連を示す主キーを持っています (実際、関係モデル上は一対一" +"関連です)。" + +#. Tag: title +#: inheritance_mapping.xml:111 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "弁別子を用いた table-per-subclass" + +#. Tag: para +#: inheritance_mapping.xml:113 +#, no-c-format +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"Hibernateの table-per-subclass 実装は、discriminatorカラムを必要としないこと" +"を覚えておいてください。 Hibernate以外のO/Rマッパーは、table-per-subclass に" +"異なる実装を用います。 それは、スーパークラスのテーブルにタイプdiscriminator" +"カラムを必要とします。 このアプローチは実装が困難になりますが、関係の視点から" +"見ると、より正確なものです。 table-per-subclass 戦略でdiscriminatorカラムを使" +"いたければ、 <subclass><join> を以下のように組み合わせて使ってください。" + +#. Tag: programlisting +#: inheritance_mapping.xml:125 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:127 +#, no-c-format +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"オプションの fetch=\"select\" 宣言は、 スーパークラスのク" +"エリ実行時に外部結合を使って、 サブクラスの ChequePayment " +"データを取得しないように指定するためのものです。" + +#. Tag: title +#: inheritance_mapping.xml:136 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "table-per-subclass と table-per-class-hierarchy の混合" + +#. Tag: para +#: inheritance_mapping.xml:138 +#, no-c-format +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"このアプローチを使用すると、table-per-hierarchy と table-per-subclass 戦略を " +"組み合わせる事も可能です。" + +#. Tag: programlisting +#: inheritance_mapping.xml:143 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:145 +#, no-c-format +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"いずれのマッピング戦略であっても、ルートである Payment ク" +"ラスへの ポリモーフィックな関連は <many-to-one> を" +"使ってマッピングします。" + +#. Tag: programlisting +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:156 +#, no-c-format +msgid "Table per concrete class" +msgstr "具象クラスごとのテーブル(table-per-concrete-class)" + +#. Tag: para +#: inheritance_mapping.xml:158 +#, no-c-format +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"table-per-concrete-class 戦略のマッピングに対するアプローチは、2つあります。 " +"1つ目は <union-subclass> を利用する方法です。" + +#. Tag: programlisting +#: inheritance_mapping.xml:163 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:165 +#, 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 "" +"サブクラスごとに3つのテーブルが必要です。それぞれのテーブルは、継承プロパティ" +"を含んだ、 クラスの全てのプロパティに対するカラムを定義します。" + +#. Tag: para +#: inheritance_mapping.xml:170 +#, 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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"このアプローチには制限があります。 それは、プロパティがスーパークラスにマッピ" +"ングされていた場合、 全てのサブクラスにおいてカラム名が同じでなければならない" +"というものです。 (Hibernateの今後のリリースで緩和されるかもしれません)。 " +"<union-subclass> を使った table-per-concrete-class 戦略では識別子生成戦" +"略を使用できません。 主キーを生成するためのシードは、全ての union subclass の" +"階層内で共有する必要があるからです。" + +#. Tag: para +#: inheritance_mapping.xml:179 +#, no-c-format +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"もしスーパークラスが抽象クラスなら、abstract=\"true\"と" +"マッピングします。 もちろん、スーパークラスが抽象クラスでないなら、スーパーク" +"ラスのインスタンスを 保持するためのテーブルの追加が必要となります(上の例での" +"デフォルトは PAYMENT )。" + +#. Tag: title +#: inheritance_mapping.xml:189 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "暗黙的ポリモーフィズムを用いた table-per-concrete-class" + +#. Tag: para +#: inheritance_mapping.xml:191 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "もう一つのアプローチは暗黙的ポリモーフィズムの使用です。" + +#. Tag: programlisting +#: inheritance_mapping.xml:195 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:197 +#, no-c-format +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"Payment インターフェイスがどこにも明示的に示されていないこ" +"とに注意してください。 そして、Payment プロパティがそれぞ" +"れのサブクラスにマッピングされていることにも注意してください。 もし重複を避け" +"たいのであれば、XMLエンティティの利用を考えてください。 (例: " +"DOCTYPE 宣言における [ <!ENTITY allproperties " +"SYSTEM \"allproperties.xml\"> ] と、マッピングにおける " +"&allproperties;)" + +#. Tag: para +#: inheritance_mapping.xml:207 +#, no-c-format +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"このアプローチの欠点は、Hibernateがポリモーフィックなクエリの実行時にSQL " +"UNION を生成しない点です。" + +#. Tag: para +#: inheritance_mapping.xml:212 +#, no-c-format +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"このマッピング戦略に対しては、Payment へのポリモーフィック" +"な関連は 通常、<any> を使ってマッピングされます。" + +#. Tag: programlisting +#: inheritance_mapping.xml:217 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:222 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "他の継承マッピングと暗黙的ポリモーフィズムの組み合わせ" + +#. Tag: para +#: inheritance_mapping.xml:224 +#, no-c-format +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"このマッピングについての更なる注意点があります。 サブクラスが自身を " +"<class> 要素としてマッピングしているので、 (かつ " +"Payment は単なるインターフェイスなので)、 それぞれのサブ" +"クラスは簡単にその他の継承階層の一部となります。 (しかも、今までどおり " +"Payment インターフェイスに対するポリモーフィックなクエリ " +"を使用することができます)" + +#. Tag: programlisting +#: inheritance_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:234 +#, no-c-format +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"もう一度述べますが、Payment は明示的に定義されません。 も" +"し、Payment インターフェイスに対してクエリを実行するなら " +"(例えば from Payment 節を使って)、 Hibernateは自動的に " +"CreditCardPayment (とCreditCardPaymentのサブクラス、" +"Payment の実装であるため)、 および、" +"CashPaymentChequePayment のインスタ" +"ンスを返します。 NonelectronicTransaction インスタンスは返" +"しません。" + +#. Tag: title +#: inheritance_mapping.xml:249 +#, no-c-format +msgid "Limitations" +msgstr "制限" + +#. Tag: para +#: inheritance_mapping.xml:251 +#, no-c-format +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"table-per-concrete-class マッピング戦略への「暗黙的ポリモーフィズム」アプロー" +"チには いくつかの制限があります。<union-subclass> " +"マッピングに対しても 少し弱めの制限があります。" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, 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 +#: inheritance_mapping.xml:264 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "継承マッピングの機能" + +#. Tag: entry +#: inheritance_mapping.xml:276 +#, no-c-format +msgid "Inheritance strategy" +msgstr "継承戦略" + +#. Tag: entry +#: inheritance_mapping.xml:277 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "多対一のポリモーフィズム" + +#. Tag: entry +#: inheritance_mapping.xml:278 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "一対一のポリモーフィズム" + +#. Tag: entry +#: inheritance_mapping.xml:279 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "一対多のポリモーフィズム" + +#. Tag: entry +#: inheritance_mapping.xml:280 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "多対多のポリモーフィズム" + +#. Tag: entry +#: inheritance_mapping.xml:281 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "Polymorphic queries" +msgstr "ポリモーフィズムを使ったクエリ" + +#. Tag: entry +#: inheritance_mapping.xml:283 +#, no-c-format +msgid "Polymorphic joins" +msgstr "ポリモーフィズムを使った結合" + +#. Tag: entry +#: inheritance_mapping.xml:284 +#, no-c-format +msgid "Outer join fetching" +msgstr "外部結合によるフェッチ" + +#. Tag: entry +#: inheritance_mapping.xml:289 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "table per class-hierarchy" + +#. Tag: literal +#: inheritance_mapping.xml:290 inheritance_mapping.xml:301 +#: inheritance_mapping.xml:312 +#, no-c-format +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:291 inheritance_mapping.xml:302 +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:292 inheritance_mapping.xml:303 +#, no-c-format +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:293 inheritance_mapping.xml:304 +#: inheritance_mapping.xml:315 +#, no-c-format +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:294 inheritance_mapping.xml:305 +#: inheritance_mapping.xml:316 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#. Tag: literal +#: inheritance_mapping.xml:295 inheritance_mapping.xml:306 +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 +#, no-c-format +msgid "from Payment p" +msgstr "from Payment p" + +#. Tag: literal +#: inheritance_mapping.xml:296 inheritance_mapping.xml:307 +#: inheritance_mapping.xml:318 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#. Tag: emphasis +#: inheritance_mapping.xml:297 inheritance_mapping.xml:308 +#: inheritance_mapping.xml:319 +#, no-c-format +msgid "supported" +msgstr "サポート" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"サブクラスごとのテーブル(table-per-subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table per subclass" + +#. Tag: entry +#: inheritance_mapping.xml:311 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "table per concrete-class (union-subclass)" + +#. Tag: entry +#: inheritance_mapping.xml:314 +#, no-c-format +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:322 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "table per concrete class (implicit polymorphism)" + +#. Tag: literal +#: inheritance_mapping.xml:323 +#, no-c-format +msgid "<any>" +msgstr "<any>" + +#. Tag: emphasis +#: inheritance_mapping.xml:324 inheritance_mapping.xml:325 +#: inheritance_mapping.xml:329 inheritance_mapping.xml:330 +#, no-c-format +msgid "not supported" +msgstr "サポートしていません" + +#. Tag: literal +#: inheritance_mapping.xml:326 +#, no-c-format +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#. Tag: literal +#: inheritance_mapping.xml:327 +#, no-c-format +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +#~ msgid "load()/get()" +#~ msgstr "load()/get()" + +#~ msgid "Polymorphic " +#~ msgstr "ポリモーフィズムを使った" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid " (for only)" +#~ msgstr " (for only)" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/performance.po b/documentation/envers/src/main/docbook/ja-JP/content/performance.po new file mode 100644 index 0000000000..5d0b737a04 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/performance.po @@ -0,0 +1,2553 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:5 +#, no-c-format +msgid "Improving performance" +msgstr "パフォーマンスの改善" + +#. Tag: title +#: performance.xml:8 +#, no-c-format +msgid "Fetching strategies" +msgstr "フェッチ戦略" + +#. Tag: para +#: performance.xml:10 +#, no-c-format +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"フェッチ戦略 は、アプリケーションが関連をナビゲートする" +"必要がある ときに、Hibernateが関連オブジェクトを復元するために使用する戦略で" +"す。フェッチ戦略はO/Rマッピングの メタデータに宣言するか、特定のHQL、 " +"Criteria クエリでオーバーライドします。" + +#. Tag: para +#: performance.xml:17 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3は次に示すフェッチ戦略を定義しています。" + +#. Tag: para +#: performance.xml:23 +#, no-c-format +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"結合フェッチ - Hibernateは OUTER JOIN を使って、 関連するインスタンスやコレクションを1つの " +"SELECT で復元します。" + +#. Tag: para +#: performance.xml:30 +#, no-c-format +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"セレクトフェッチ - 2回目の SELECT で" +"関連するエンティティやコレクションを復元します。 lazy=\"false\" で明示的に遅延フェッチを無効にしなければ、この2回目のselectは実際に " +"関連にアクセスしたときのみ実行されるでしょう。" + +#. Tag: para +#: performance.xml:39 +#, no-c-format +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"サブセレクトフェッチ - 2回目の SELECT で、直前のクエリやフェッチで復元したすべての要素に関連するコレクショ" +"ンを 復元します。 lazy=\"false\" で明示的に遅延フェッチを" +"無効にしなければ、この2回目のselectは実際に 関連にアクセスしたときのみ実行さ" +"れるでしょう。" + +#. Tag: para +#: performance.xml:48 +#, no-c-format +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"バッチフェッチ - セレクトフェッチのための最適化された戦" +"略 - Hibernateはエンティティのインスタンスやコレクションの一群を1回の " +"SELECT で復元します。これは主キーや外部キーのリストを指定" +"することに により行います。" + +#. Tag: para +#: performance.xml:57 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "Hibernateは次に示す戦略とも区別をします。" + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"即時フェッチ - 所有者のオブジェクトがロードされたとき" +"に、 関連、コレクションは即時にフェッチされます。" + +#. Tag: para +#: performance.xml:69 +#, no-c-format +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"遅延コレクションフェッチ - アプリケーションがコレクショ" +"ンに 対して操作を行ったときにコレクションをフェッチします。 (これはコレクショ" +"ンに対するデフォルトの動作です)" + +#. Tag: para +#: performance.xml:76 +#, no-c-format +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"\"特別な遅延\"コレクションフェッチ - コレクションの要素 " +"1つ1つが独立して、必要なときにデータベースから取得されます。 Hibernateは必" +"要ないならば、コレクション全体をメモリにフェッチすることは 避けます(とても大" +"きなコレクションに適しています)。" + +#. Tag: para +#: performance.xml:84 +#, no-c-format +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"プロキシフェッチ - 単一値関連は、識別子のgetter以外の メ" +"ソッドが関連オブジェクトで呼び出されるときにフェッチされます。" + +#. Tag: para +#: performance.xml:91 +#, no-c-format +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"\"プロキシなし\"フェッチ - 単一値関連は、インスタンス変" +"数に アクセスされたときにフェッチされます。プロキシフェッチと比較すると、この" +"方法は 遅延の度合いが少ない(関連は識別子にアクセスしただけでもフェッチされま" +"す) ですが、より透過的で、アプリケーションにプロキシが存在しないように見せま" +"す。 この方法はビルド時のバイトコード組み込みが必要になり、使う場面はまれで" +"す。" + +#. Tag: para +#: performance.xml:101 +#, no-c-format +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"遅延属性フェッチ - 属性や単一値関連は、インスタンス変数" +"にアクセスした ときにフェッチされます。この方法はビルド時のバイトコード組み込" +"みが必要になり、 使う場面はまれです。" + +#. Tag: para +#: performance.xml:110 +#, no-c-format +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"二つの直行する概念があります: いつ 関連をフェッチする" +"か、 そして、 どうやって フェッチするか(どんなSQLを使っ" +"て)。 これらを混同しないでください! fetch はパフォーマン" +"スチューニングに使います。 lazy はあるクラスの分離されたイ" +"ンスタンスのうち、どのデータを常に 使用可能にするかの取り決めを定義します。" + +#. Tag: title +#: performance.xml:119 +#, no-c-format +msgid "Working with lazy associations" +msgstr "遅延関連の働き" + +#. Tag: para +#: performance.xml:121 +#, no-c-format +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"デフォルトでは、Hibernate3はコレクションに対しては遅延セレクトフェッチを使" +"い、 単一値関連には遅延プロキシフェッチを使います。これらのデフォルト動作はほ" +"ぼすべての アプリケーションのほぼすべての関連で意味があります。" + +#. Tag: para +#: performance.xml:127 +#, no-c-format +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"注:hibernate.default_batch_fetch_size をセットしたときは、Hibernateは 遅延フェッチのためのバッチフェッチ最" +"適化を使うでしょう (この最適化はより細かいレベルで有効にすることも出来ま" +"す)。" + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"しかし、遅延フェッチは知っておかなければならない一つの問題があります。 " +"Hibernateのsessionをオープンしているコンテキストの外から遅延関連にアクセスす" +"ると、 例外が発生します。例:" + +#. Tag: programlisting +#: performance.xml:140 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:142 +#, no-c-format +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"Session がクローズされたとき、permissionsコレクションは 初" +"期化されていないため、このコレクションは自身の状態をロードできません。 " +"Hibernateは切り離されたオブジェクトの遅延初期化はサポート していま" +"せん 。修正方法として、コレクションから読み込みを行うコードを トラ" +"ンザクションをコミットする直前に移動させます。" + +#. Tag: para +#: performance.xml:150 +#, no-c-format +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"一方で、 lazy=\"false\" を関連マッピングに指定すること" +"で、 遅延処理をしないコレクションや関連を使うことが出来ます。 しかしながら、" +"遅延初期化はほぼすべてのコレクションや関連で使われることを 意図しています。も" +"しあなたのオブジェクトモデルの中に遅延処理をしない関連を 多く定義してしまう" +"と、Hibernateは最終的にはトランザクション毎に ほぼ完全なデータベースをメモリ" +"の中にフェッチすることになるでしょう!" + +#. Tag: para +#: performance.xml:159 +#, no-c-format +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"他方では、特定のトランザクションにおいてセレクトフェッチの代わりに 結合フェッ" +"チ(当然これは遅延処理ではなくなります)を選択したいことが 時々あります。これ" +"からフェッチ戦略をカスタマイズする方法をお見せします。 Hibernate3では、フェッ" +"チ戦略を選択する仕組みは単一値関連とコレクションで 変わりはありません。" + +#. Tag: title +#: performance.xml:170 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "フェッチ戦略のチューニング" + +#. Tag: para +#: performance.xml:172 +#, no-c-format +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"セレクトフェッチ(デフォルト)はN+1セレクト問題という大きな弱点があるため、 " +"マッピング定義で結合フェッチを有効にすることができます。" + +#. Tag: programlisting +#: performance.xml:177 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:179 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:181 +#, no-c-format +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"マッピング定義で定義した フェッチ 戦略は次のものに影響しま" +"す。" + +#. Tag: para +#: performance.xml:187 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "get()load() による復元" + +#. Tag: para +#: performance.xml:192 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "関連にナビゲートしたときに発生する暗黙的な復元" + +#. Tag: para +#: performance.xml:197 +#, no-c-format +msgid "Criteria queries" +msgstr "Criteria クエリ" + +#. Tag: para +#: performance.xml:202 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "サブセレクト フェッチを使うHQLクエリ" + +#. Tag: para +#: performance.xml:208 +#, no-c-format +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"たとえどんなフェッチ戦略を使ったとしても、遅延ではないグラフはメモリに読み込" +"まれることが 保証されます。つまり、特定のHQLクエリを実行するためにいくつかの" +"SELECT文が即時実行される ことがあるので注意してください。" + +#. Tag: para +#: performance.xml:214 +#, no-c-format +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"通常は、マッピング定義でフェッチのカスタマイズは行いません。 代わりに、デフォ" +"ルトの動作のままにしておいて、HQLで left join fetch を 指" +"定することで特定のトランザクションで動作をオーバーライドします。 これは" +"Hibernateに初回のセレクトで外部結合を使って関連を先にフェッチするように指定し" +"ています。 Criteria クエリのAPIでは、 " +"setFetchMode(FetchMode.JOIN) を使うことが出来ます。" + +#. Tag: para +#: performance.xml:223 +#, no-c-format +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"もし get()load() で使われる フェッ" +"チ戦略を変えたいと感じたときには、単純に Criteria クエリを" +"使ってください。例:" + +#. Tag: programlisting +#: performance.xml:229 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:231 +#, no-c-format +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(これはいくつかのORMソリューションが\"fetch plan\"と呼んでいるものと同じで" +"す。)" + +#. Tag: para +#: performance.xml:235 +#, no-c-format +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "" +"N+1セレクト問題を避けるためのまったく違う方法は、第2レベルキャッシュを使うこ" +"とです。" + +#. Tag: title +#: performance.xml:243 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "単一端関連プロキシ" + +#. Tag: para +#: performance.xml:245 +#, no-c-format +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"コレクションの遅延フェッチは、Hibernate自身の実装による永続コレクションを使っ" +"て 実現しています。しかし、単一端関連における遅延処理では、違う仕組みが 必要" +"です。対象の関連エンティティはプロキシでなければなりません。Hibernateは (す" +"ばらしいCGLIBライブラリによる)実行時のバイトコード拡張を 使って永続オブジェ" +"クトの遅延初期化プロキシを実現しています。" + +#. Tag: para +#: performance.xml:253 +#, no-c-format +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"デフォルトでは、Hibernate3は(開始時に)すべての永続クラスのプロキシを生成" +"し、 それらを使って、 many-to-oneone-to-one 関連の 遅延フェッチを可能にしています。" + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"マッピングファイルで proxy 属性によって、クラスのプロキシ" +"インターフェイスとして 使うインターフェイスを宣言できます。デフォルトでは、" +"Hibernateはそのクラスのサブクラスを使います。 プロキシクラスは少な" +"くともパッケージ可視でデフォルトコンストラクタを実装しなければ ならないことに" +"注意してください。すべての永続クラスにこのコンストラクタを推奨します!" + +#. Tag: para +#: performance.xml:266 +#, no-c-format +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "" +"ポリモーフィズムのクラスに対してこの方法を適用するときにいくつか考慮すること" +"があります。 例:" + +#. Tag: programlisting +#: performance.xml:271 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:273 +#, no-c-format +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"第一に、 Cat のインスタンスは DomesticCat にキャストできません。たとえ基となるインスタンスが " +"DomesticCat であったとしてもです。" + +#. Tag: programlisting +#: performance.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:281 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "第二に、プロキシの == は成立しないことがあります。" + +#. Tag: programlisting +#: performance.xml:285 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:287 +#, no-c-format +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"しかし、これは見かけほど悪い状況というわけではありません。たとえ異なったプロ" +"キシオブジェクトへの 二つの参照があったとしても、基となるインスタンスは同じオ" +"ブジェクトです。" + +#. Tag: programlisting +#: performance.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:294 +#, no-c-format +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "" +"第三に、 final クラスや final メソッド" +"を持つクラスに CGLIBプロキシを使えません。" + +#. Tag: para +#: performance.xml:299 +#, no-c-format +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"最後に、もし永続オブジェクトのインスタンス化時(例えば、初期化処理やデフォルト" +"コンストラクタの中で) になんらかのリソースが必要となるなら、そのリソースもま" +"たプロキシを通して取得されます。 実際には、プロキシクラスは永続クラスのサブク" +"ラスです。" + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"これらの問題はJavaの単一継承モデルの原理上の制限のためです。もしこれらの問題" +"を避けたいのなら、 ビジネスメソッドを宣言したインターフェイスをそれぞれ永続ク" +"ラスで実装しなければなりません。 マッピングファイルでこれらのインターフェイス" +"を指定する必要があります。例:" + +#. Tag: programlisting +#: performance.xml:311 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:313 +#, no-c-format +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"CatImplCat インターフェイスを実装す" +"るのに対し、 DomesticCatImplDomesticCat を実装します。 すると、 load() や " +"iterate() は、 Cat や " +"DomesticCat のインスタンスのプロキシを 返します。" +"( list() は通常はプロキシを返さないことに注意してくださ" +"い。)" + +#. Tag: programlisting +#: performance.xml:321 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"関連も遅延初期化されます。これはプロパティを Cat 型で宣言" +"しなければ ならないことを意味します。 CatImpl ではありませ" +"ん。" + +#. Tag: para +#: performance.xml:328 +#, no-c-format +msgid "" +"Certain operations do not require proxy initialization" +msgstr "" +"プロキシの初期化を 必要としない 操作も存在します。" + +#. Tag: para +#: performance.xml:334 +#, no-c-format +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals() (永続クラスが equals() を " +"オーバーライドしないとき)" + +#. Tag: para +#: performance.xml:340 +#, no-c-format +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode() (永続クラスが hashCode() " +"を オーバーライドしないとき)" + +#. Tag: para +#: performance.xml:346 +#, no-c-format +msgid "The identifier getter method" +msgstr "識別子のgetterメソッド" + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"Hibernateは equals()hashCode() を" +"オーバーライドした 永続クラスを検出します。" + +#. Tag: para +#: performance.xml:357 +#, no-c-format +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"デフォルトの lazy=\"proxy\" の代わりに、 lazy=" +"\"no-proxy\" を 選んだことで、型変換に関連する問題を回避することが" +"出来ます。 しかし、ビルド時のバイトコード組み込みが必要になり、どのような操作" +"であっても、 ただちにプロキシの初期化を行うことになるでしょう。" + +#. Tag: title +#: performance.xml:367 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "コレクションとプロキシの初期化" + +#. Tag: para +#: performance.xml:369 +#, no-c-format +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"LazyInitializationException は、 Session のスコープ外から 初期化していないコレクションやプロキシにアクセスさ" +"れたときに、Hibernateによってスローされます。 すなわち、コレクションやプロキ" +"シへの参照を持つエンティティが分離された状態の時です。" + +#. Tag: para +#: performance.xml:375 +#, no-c-format +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"Session をクローズする前にプロキシやコレクションの初期化を" +"確実に 行いたいときがあります。もちろん、 cat.getSex() や " +"cat.getKittens().size() などを常に呼び出すことで初期化を強" +"制することはできます。 しかしこれはコードを読む人を混乱させ、汎用的なコードと" +"いう点からも不便です。" + +#. Tag: para +#: performance.xml:382 +#, no-c-format +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"staticメソッドの Hibernate.initialize() や " +"Hibernate.isInitialized() は遅延初期化のコレクションやプロ" +"キシを扱うときに便利な方法をアプリケーションに提供します。 " +"Hibernate.initialize(cat) は、 Session " +"がオープンしている限りは cat プロキシを強制的に初期化しま" +"す。 Hibernate.initialize( cat.getKittens() ) はkittensコ" +"レクションに対して同様の 効果があります。" + +#. Tag: para +#: performance.xml:391 +#, no-c-format +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"別の選択肢として、必要なすべてのコレクションやプロキシがロードされるまで " +"Session をオープンにしておく方法があります。いくつかのアプ" +"リケーションの アーキテクチャでは、特にHibernateによるデータアクセスを行う" +"コードと、それを使う コードが異なるアプリケーションのレイヤーや、物理的に異な" +"るプロセッサのときには、 コレクションが初期化されるときに Session がオープンしていることを 保証する問題があります。この問題に対しては2" +"つの基本的な方法があります。" + +#. Tag: para +#: performance.xml:402 +#, no-c-format +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"Webベースのアプリケーションでは、 ビューのレンダリングが完了し、リクエストが" +"終わる一番最後で Session をクローズするために、サーブレッ" +"トフィルタを使うことができます( Open Session in View パ" +"ターンです)。もちろん、アプリケーション基盤の例外処理の正確性が非常に重要に" +"なります。 ビューのレンダリング中に例外が発生したときでさえ、ユーザに処理が戻" +"る前に Session のクローズとトランザクションの終了を行う こ" +"とが不可欠になります。 HibernateのWikiに載っている\"Open Session in View\"パ" +"ターンの例を参照してください。" + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"ビジネス層が分離しているアプリケーションでは、ビジネスロジックは Web層で必要" +"になるすべてのコレクションを事前に\"準備\"する必要があります。 これは特定の" +"ユースケースで必要となるプレゼンテーション/Web層に対し、 ビジネス層がすべての" +"データをロードし、すべてのデータを初期化して返すべきと いうことを意味していま" +"す。通常は、アプリケーションはWeb層で必要なコレクション それぞれに対して " +"Hibernate.initialize() を呼び出すか (この呼び出しはセッ" +"ションをクローズする前に行う必要があります)、 Hibernateクエリの " +"FETCH 節や Criteria の " +"FetchMode.JOIN を使ってコレクションを先に復元します。 普通" +"は Session Facade パターンの代わりに Command パターンを採用するほうがより簡単です。" + +#. Tag: para +#: performance.xml:430 +#, no-c-format +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"初期化されていないコレクション(もしくは他のプロキシ)にアクセスする前に、 " +"merge()lock() を使って新しい " +"Session に以前にロードされたオブジェクトを追加することも出" +"来ます。 アドホックなトランザクションのセマンティクスを導入したので、" +"Hibernateは これを自動的に行わず、 行うべきでもありません !" + +#. Tag: para +#: performance.xml:440 +#, no-c-format +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"大きなコレクションを初期化したくはないが、コレクションについてのなんらかの情" +"報(サイズのような) やデータのサブセットを必要とすることがあります。" + +#. Tag: para +#: performance.xml:445 +#, no-c-format +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "" +"コレクションフィルタを使うことで、初期化せずにコレクションのサイズを取得する" +"ことが出来ます。" + +#. Tag: programlisting +#: performance.xml:449 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:451 +#, no-c-format +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"createFilter() メソッドは、コレクション全体を初期化する必" +"要なしに、コレクションの サブセットを復元するために効果的に使えます。" + +#. Tag: programlisting +#: performance.xml:456 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:461 +#, no-c-format +msgid "Using batch fetching" +msgstr "バッチフェッチの使用" + +#. Tag: para +#: performance.xml:463 +#, no-c-format +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"Hibernateはバッチフェッチを効率的に使用できます。一つのプロキシ(もしくはコレ" +"クション)がアクセス されると、Hibernateはいくつかの初期化していないプロキシ" +"をロードすることができます。バッチフェッチは 遅延セレクトフェッチ戦略に対する" +"最適化です。バッチフェッチの調整には2つの方法があります。 クラスレベルとコレ" +"クションレベルです。" + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"クラス、要素のバッチフェッチは理解が簡単です。実行時の次の場面を想像してくだ" +"さい。 Session にロードされた25個の Cat インスタンスが存在し、 それぞれの Cat は " +"owner である Person への関連を持ちま" +"す。 Person クラスは lazy=\"true\" のプ" +"ロキシでマッピングされています。 もし今すべてのCatに対して繰り返し " +"getOwner() を呼び出すと、Hibernateは デフォルトでは25回の " +"SELECT を実行し、ownerプロキシの復元をします。 この振る舞" +"いを Person のマッピングの batch-size " +"の指定で調整できます。" + +#. Tag: programlisting +#: performance.xml:479 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:481 +#, no-c-format +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" +"Hibernateはクエリを3回だけを実行するようになります。パターンは10, 10, 5で" +"す。" + +#. Tag: para +#: performance.xml:485 +#, no-c-format +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Sesssion, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"コレクションのバッチフェッチも有効にすることが出来ます。例として、それぞれの " +"PersonCat の遅延コレクションを持っ" +"ており、 10個のPersonが Sesssion にロードされたとすると、" +"すべてのPersonに 対して繰り返し getCats() を呼び出すこと" +"で、計10回の SELECT が発生します。もし Person のマッピングで cats コレクションのバッチフェッチ" +"を有効にすれば、Hibernateはコレクションの事前フェッチが出来ます。" + +#. Tag: programlisting +#: performance.xml:494 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:496 +#, no-c-format +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"batch-size が3なので、Hibernateは4回の SELECT で3個、3個、3個、1個をロードします。繰り返すと、属性の値は特定の " +"Session の中の初期化されていないコレクションの期待数に依存" +"します。" + +#. Tag: para +#: performance.xml:502 +#, no-c-format +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"コレクションのバッチフェッチはアイテムのネストしたツリー、 すなわち、代表的な" +"部品表のパターンが ある場合に特に有用です。(しかし、読み込みが多いツリーで" +"は ネストしたset具体化したパス " +"がよりよい選択になります。)" + +#. Tag: title +#: performance.xml:511 +#, no-c-format +msgid "Using subselect fetching" +msgstr "サブセレクトフェッチの使用" + +#. Tag: para +#: performance.xml:513 +#, no-c-format +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"一つの遅延コレクションや単一値プロキシがフェッチされなければいけないとき、" +"Hibernateは それらすべてをロードし、サブセレクトのオリジナルクエリが再度実行" +"されます。これは バッチフェッチと同じ方法で動き、少しずつのロードは行いませ" +"ん。" + +#. Tag: title +#: performance.xml:524 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "遅延プロパティフェッチの使用" + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"Hibernate3はプロパティごとの遅延フェッチをサポートしています。この最適化手法" +"は グループのフェッチ としても知られています。これはほと" +"んど 要望から出た機能であることに注意してください。実際には列読み込みの最適化" +"よりも、 行読み込みの最適化が非常に重要です。 しかし、クラスのいくつかのプロ" +"パティだけを読み込むことは、既存のテーブルが何百もの列を持ち、 データモデルを" +"改善できないなどの極端な場合には有用です。" + +#. Tag: para +#: performance.xml:535 +#, no-c-format +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"遅延プロパティ読み込みを有効にするには、対象のプロパティのマッピングで " +"lazy 属性をセットしてください。" + +#. Tag: programlisting +#: performance.xml:540 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:542 +#, no-c-format +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"遅延プロパティ読み込みはビルド時のバイトコード組み込みを必要とします!もし 永" +"続クラスに組み込みがされていないなら、Hibernateは黙って遅延プロパティの設定を" +"無視して、 即時フェッチに戻します。" + +#. Tag: para +#: performance.xml:548 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "バイトコード組み込みは以下のAntタスクを使ってください。" + +#. Tag: programlisting +#: performance.xml:552 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:554 +#, no-c-format +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a prefered solution." +msgstr "" +"不要な列を読み込まないための、別の(よりよい?)方法は、少なくとも 読み込みの" +"みのトランザクションにおいては、HQLやCriteriaクエリの射影 機能を使うことで" +"す。この方法はビルド時のバイトコード組み込みが不要になり、 より良い解決方法で" +"す。" + +#. Tag: para +#: performance.xml:561 +#, no-c-format +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"HQLで fetch all properties を使うことで、普通どおりの プロ" +"パティの即時フェッチングを強制することが出来ます。" + +#. Tag: title +#: performance.xml:571 +#, no-c-format +msgid "The Second Level Cache" +msgstr "第2レベルキャッシュ" + +#. Tag: para +#: performance.xml:573 +#, no-c-format +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"Hibernateの Session は永続データのトランザクションレベルの" +"キャッシュです。 class-by-classとcollection-by-collectionごとの、クラスタレベ" +"ルやJVMレベル ( SessionFactory レベル)のキャッシュを設定" +"することが出来ます。 クラスタ化されたキャッシュにつなぐことさえ出来ます。しか" +"し注意してください。 キャッシュは他のアプリケーションによる永続層の変更を 考" +"慮しません(キャッシュデータを定期的に期限切れにする設定は出来ます)。" + +#. Tag: para +#: performance.xml:581 +#, no-c-format +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"Hibernateが使用するキャッシュ実装は、hibernate.cache." +"provider_class プロパティに org.hibernate.cache." +"CacheProvider を実装したクラス名を指定することで変更できます。 " +"Hibernateは多くのオープンソースのキャッシュプロバイダをビルトイン実装で持って" +"います(後にリストがあります)。 加えて、前に説明したように、あなた自身が独自" +"の実装をして、それを組み込むことも出来ます。 バージョン3.2より前ではEhCacheが" +"デフォルトのキャッシュプロバイダであることに注意してください。 バージョン3.2" +"ではこれは当てはまりません。" + +#. Tag: title +#: performance.xml:592 +#, no-c-format +msgid "Cache Providers" +msgstr "キャッシュプロバイダ" + +#. Tag: entry +#: performance.xml:601 performance.xml:774 +#, no-c-format +msgid "Cache" +msgstr "キャッシュ" + +#. Tag: entry +#: performance.xml:602 +#, no-c-format +msgid "Provider class" +msgstr "プロバイダクラス" + +#. Tag: entry +#: performance.xml:603 +#, no-c-format +msgid "Type" +msgstr "タイプ" + +#. Tag: entry +#: performance.xml:604 +#, no-c-format +msgid "Cluster Safe" +msgstr "クラスタセーフ" + +#. Tag: entry +#: performance.xml:605 +#, no-c-format +msgid "Query Cache Supported" +msgstr "クエリキャッシュのサポート" + +#. Tag: entry +#: performance.xml:610 performance.xml:783 +#, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "Hashtable(製品用として意図していません)" + +#. Tag: literal +#: performance.xml:611 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#. Tag: entry +#: performance.xml:612 +#, no-c-format +msgid "memory" +msgstr "メモリ" + +#. Tag: entry +#: performance.xml:614 performance.xml:621 performance.xml:628 +#: performance.xml:784 performance.xml:785 performance.xml:786 +#: performance.xml:791 performance.xml:792 performance.xml:793 +#: performance.xml:798 performance.xml:799 performance.xml:800 +#: performance.xml:805 performance.xml:806 performance.xml:812 +#: performance.xml:815 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:617 performance.xml:790 +#, no-c-format +msgid "EHCache" +msgstr "EHCache" + +#. Tag: literal +#: performance.xml:618 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:619 performance.xml:626 +#, no-c-format +msgid "memory, disk" +msgstr "メモリ、ディスク" + +#. Tag: entry +#: performance.xml:624 performance.xml:797 +#, no-c-format +msgid "OSCache" +msgstr "OSCache" + +#. Tag: literal +#: performance.xml:625 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#. Tag: entry +#: performance.xml:631 performance.xml:804 +#, no-c-format +msgid "SwarmCache" +msgstr "SwarmCache" + +#. Tag: literal +#: performance.xml:632 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#. Tag: entry +#: performance.xml:633 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "クラスタ(ipマルチキャスト)" + +#. Tag: entry +#: performance.xml:634 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "yes(クラスタ無効化)" + +#. Tag: entry +#: performance.xml:638 performance.xml:811 +#, no-c-format +msgid "JBoss TreeCache" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:639 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#. Tag: entry +#: performance.xml:640 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "クラスタ(ipマルチキャスト)、トランザクショナル" + +#. Tag: entry +#: performance.xml:641 +#, no-c-format +msgid "yes (replication)" +msgstr "yes(複製)" + +#. Tag: entry +#: performance.xml:642 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "yes(時刻同期が必要)" + +#. Tag: title +#: performance.xml:649 +#, no-c-format +msgid "Cache mappings" +msgstr "キャッシュのマッピング" + +#. Tag: para +#: performance.xml:651 +#, no-c-format +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "" +"クラスやコレクションのマッピングの <cache> 要素は以" +"下の形式です。" + +#. Tag: programlisting +#: performance.xml:662 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:665 +#, no-c-format +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" + +#. Tag: para +#: performance.xml:674 +#, no-c-format +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" + +#. Tag: para +#: performance.xml:681 +#, no-c-format +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" + +#. Tag: para +#: performance.xml:691 +#, no-c-format +msgid "" +"Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"または(よりよい方法として?)、 hibernate.cfg.xml に " +"<class-cache><collection-cache> 要素を指定することも出来ます。" + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"usage 属性は キャッシュの並列性戦略 " +"を指定します。" + +#. Tag: title +#: performance.xml:703 +#, no-c-format +msgid "Strategy: read only" +msgstr "read only戦略" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"もしアプリケーションが読み込みのみ必要で、永続クラスのインスタンスを変更しな" +"いなら、 read-only キャッシュを使うことが出来ます。これは" +"もっとも単純で もっともパフォーマンスの良い戦略です。クラスタでの使用も完全に" +"安全です。" + +#. Tag: programlisting +#: performance.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:717 +#, no-c-format +msgid "Strategy: read/write" +msgstr "read/write戦略" + +#. Tag: para +#: performance.xml:719 +#, no-c-format +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"アプリケーションがデータを更新する必要があるなら、 read-write キャッシュが適当かも しれません。このキャッシュ戦略は、シリアライザ" +"ブルなトランザクション分離レベルが要求されるなら、 決して使うべきではありませ" +"ん。もしキャッシュがJTA環境で使われるなら、JTA TransactionManager を取得するための方法を示す hibernate.transaction." +"manager_lookup_class プロパティを指定しなければなりません。他の環境" +"では、 Session.close()Session.disconnect() が呼ばれたときに、確実にトランザクションが完了 していなければなりま" +"せん。 もしクラスタでこの戦略を使いたいなら、基となるキャッシュの実装がロック" +"をサポート していることを保証しなければなりません。 組み込みのキャッシュプロ" +"バイダは サポートしていません 。" + +#. Tag: programlisting +#: performance.xml:730 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:735 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "厳密ではないread/write戦略" + +#. Tag: para +#: performance.xml:737 +#, no-c-format +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"アプリケーションがたまにしかデータを更新する必要はなく(すなわち二つのトラン" +"ザクションが 同時に同じアイテムを更新しようとすることはほとんど起こらない)、" +"厳密なトランザクション分離が 要求されないなら、 nonstrict-read-" +"write キャッシュが適当かもしれません。 もしキャッシュがJTA環境で使" +"われるなら、 hibernate.transaction.manager_lookup_class を" +"指定しなければなりません。他の環境では、 Session.close() " +"や Session.disconnect() が呼ばれたときに、確実にトランザク" +"ションが完了 していなければなりません。" + +#. Tag: title +#: performance.xml:749 +#, no-c-format +msgid "Strategy: transactional" +msgstr "transactional戦略" + +#. Tag: para +#: performance.xml:751 +#, no-c-format +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"transactional キャッシュ戦略はJBoss TreeCacheのような完全" +"なトランザクショナル キャッシュプロバイダのサポートを提供します。 このような" +"キャッシュはJTA環境でのみ使用可能で、 hibernate.transaction." +"manager_lookup_class を指定しなければなりません。" + +#. Tag: para +#: performance.xml:759 +#, no-c-format +msgid "" +"None of the cache providers support all of the cache concurrency strategies. " +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"すべての同時並行性キャッシュ戦略をサポートしているキャッシュプロバイダはあり" +"ません。 以下の表はどのプロバイダがどの同時並列性戦略に対応するかを表していま" +"す。" + +#. Tag: title +#: performance.xml:765 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "同時並行性キャッシュ戦略のサポート" + +#. Tag: entry +#: performance.xml:775 +#, no-c-format +msgid "read-only" +msgstr "read-only" + +#. Tag: entry +#: performance.xml:776 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "厳密ではないread-write" + +#. Tag: entry +#: performance.xml:777 +#, no-c-format +msgid "read-write" +msgstr "read-write" + +#. Tag: entry +#: performance.xml:778 +#, no-c-format +msgid "transactional" +msgstr "transactional" + +#. Tag: title +#: performance.xml:824 +#, no-c-format +msgid "Managing the caches" +msgstr "キャッシュの管理" + +#. Tag: para +#: performance.xml:826 +#, no-c-format +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"オブジェクトを save()update() 、 " +"saveOrUpdate() に渡すとき、そして load()get()list() 、 " +"iterate()scroll() を使ってオブジェ" +"クトを復元するときには常に、 そのオブジェクトは Session の" +"内部キャッシュに追加されます。" + +#. Tag: para +#: performance.xml:833 +#, no-c-format +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"次に flush() が呼ばれると、オブジェクトの状態はデータベー" +"スと同期化されます。 もしこの同期が起こることを望まないときや、膨大な数のオブ" +"ジェクトを処理していてメモリを効率的に 扱う必要があるときは、 evict" +"() メソッドを使って一次キャッシュから オブジェクトやコレクションを" +"削除することが出来ます。" + +#. Tag: programlisting +#: performance.xml:841 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:843 +#, no-c-format +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"Session はインスタンスがセッションキャッシュに含まれるかど" +"うかを判断するための contains() メソッドも提供します。" + +#. Tag: para +#: performance.xml:848 +#, no-c-format +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"すべてのオブジェクトをセッションキャッシュから完全に取り除くには、" +"Session.clear() を呼び出してください。" + +#. Tag: para +#: performance.xml:852 +#, no-c-format +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"二次キャッシュのために、 SessionFactory には インスタン" +"ス、クラス全体、コレクションのインスタンス、コレクション全体をキャッシュから " +"削除するためのメソッドがそれぞれ定義されています。" + +#. Tag: programlisting +#: performance.xml:858 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:860 +#, no-c-format +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"CacheMode は特定のセッションが二次キャッシュとどのように相" +"互作用するかを 指定します。" + +#. Tag: para +#: performance.xml:867 +#, no-c-format +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "" +"CacheMode.NORMAL - アイテムの読み込みと書き込みで二次" +"キャッシュを使います" + +#. Tag: para +#: performance.xml:872 +#, no-c-format +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - 読み込みは二次キャッシュから行いますが、" +"データを 更新した場合を除いて二次キャッシュに書き込みをしません。" + +#. Tag: para +#: performance.xml:878 +#, no-c-format +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - 二次キャッシュにアイテムを書き込みますが、" +"読み込みには 二次キャッシュを使いません。" + +#. Tag: para +#: performance.xml:884 +#, no-c-format +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - 二次キャッシュにアイテムを書き込みます" +"が、読み込みには 二次キャッシュを使わず、 hibernate.cache." +"use_minimal_puts の影響を受けずに、データベースから読み込むすべての" +"アイテムの二次キャッシュを強制的にリフレッシュします。" + +#. Tag: para +#: performance.xml:892 +#, no-c-format +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"二次キャッシュの内容やクエリキャッシュ領域を見るために、 " +"Statistics APIを 使ってください。" + +#. Tag: programlisting +#: performance.xml:897 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:899 +#, no-c-format +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"統計情報を有効にして、さらにオプションとして、キャッシュエントリを 人がより理" +"解可能な形式で保持することをHibernateに強制します。" + +#. Tag: programlisting +#: performance.xml:904 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:909 +#, no-c-format +msgid "The Query Cache" +msgstr "クエリキャッシュ" + +#. Tag: para +#: performance.xml:911 +#, no-c-format +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"クエリのリザルトセットもキャッシュ出来ます。これは同じパラメータで何度も実行" +"される クエリに対してのみ有用です。クエリキャッシュを使うには、まず設定で有効" +"にしなくてはなりません。" + +#. Tag: programlisting +#: performance.xml:916 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:918 +#, no-c-format +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"この設定は新たに二つのキャッシュ領域の作成を行います。一つはクエリのリザルト" +"セットの キャッシュ( org.hibernate.cache.StandardQueryCache )を保持し、 もう1つはクエリ可能なテーブルへの最新の更新タイムスタン" +"プ ( org.hibernate.cache.UpdateTimestampsCache )を保持し" +"ます。 クエリキャッシュはリザルトセットの実際の要素の状態はキャッシュしないこ" +"とに 注意してください。キャッシュするのは識別子の値と、値型の結果のみです。 " +"そのため、クエリキャッシュは常に二次キャッシュと一緒に使うべきです。" + +#. Tag: para +#: performance.xml:928 +#, no-c-format +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"ほとんどのクエリはキャッシュの恩恵を受けないので、デフォルトではクエリは" +"キャッシュされません。 キャッシュを有効にするには、 Query." +"setCacheable(true) を呼び出してください。 そうすればクエリが既存の" +"キャッシュ結果を探し、クエリ実行時にその結果をキャッシュに追加する ようになり" +"ます。" + +#. Tag: para +#: performance.xml:935 +#, no-c-format +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"クエリキャッシュの破棄ポリシーを細かく制御したいときは、 Query." +"setCacheRegion() を呼び出して特定のクエリに対するキャッシュ領域を指" +"定することが出来ます。" + +#. Tag: programlisting +#: performance.xml:941 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:943 +#, no-c-format +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"クエリが自身のクエリキャッシュ領域のリフレッシュを強制しなければならないな" +"ら、 Query.setCacheMode(CacheMode.REFRESH) を呼び出すべき" +"です。これは 元となるデータが別のプロセスによって更新されたり(すなわち" +"Hibernateを通じて更新されない)、 アプリケーションに特定のクエリリザルトセッ" +"トを選択してリフレッシュさせる場合に特に有用です。 さらに有用なもう一つの方法" +"は、 SessionFactory.evictQueries() によってクエリキャッ" +"シュ領域を消去することです。" + +#. Tag: title +#: performance.xml:955 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "コレクションのパフォーマンスの理解" + +#. Tag: para +#: performance.xml:957 +#, no-c-format +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"コレクションの話題にはすでに多くの時間を使いました。この節では コレクションが" +"実行時にどのように振舞うかについての話題を2、3取り上げます。" + +#. Tag: title +#: performance.xml:964 +#, no-c-format +msgid "Taxonomy" +msgstr "分類" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernateは3つの基本的なコレクションの種類を定義しています。" + +#. Tag: para +#: performance.xml:970 +#, no-c-format +msgid "collections of values" +msgstr "値のコレクション" + +#. Tag: para +#: performance.xml:973 +#, no-c-format +msgid "one to many associations" +msgstr "一対多関連" + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "many to many associations" +msgstr "多対多関連" + +#. Tag: para +#: performance.xml:980 +#, no-c-format +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"この分類はさまざまなテーブルや外部キー関連を区別しますが、私たちが知る必要の" +"ある 関連モデルについてほとんどなにも教えてくれません。関連構造やパフォーマン" +"スの特徴を 完全に理解するには、Hibernateがコレクションの行を更新、削除するた" +"めに使う主キーの 構造もまた考えなければなりません。これは以下の分類を提示しま" +"す。" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "indexed collections" +msgstr "インデックス付きコレクション" + +#. Tag: para +#: performance.xml:994 +#, no-c-format +msgid "sets" +msgstr "set" + +#. Tag: para +#: performance.xml:997 +#, no-c-format +msgid "bags" +msgstr "bag" + +#. Tag: para +#: performance.xml:1001 +#, no-c-format +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"すべてのインデックス付きコレクション(map、list、配列)は <" +"key><index> カラムからなる主キーを" +"持っています。この場合は コレクションの更新は非常に効率的です。主キーは有用な" +"インデックスになり、Hibernateが 特定の行を更新または削除するときに、その行を" +"効率的に見つけることができます。" + +#. Tag: para +#: performance.xml:1009 +#, no-c-format +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"setは <key> からなる主キーと要素のカラムを持っていま" +"す。 これはコレクション要素のいくつかの型については効率的ではないかもしれませ" +"ん。 特に複合要素、大きなテキスト、バイナリフィールドでは非効率です。データ" +"ベースは 複合主キーに効率的にインデックスを付けることができないからです。一" +"方、1対多や多対多関連において、 特に人工識別子の場合は同じぐらい効率的です。" +"(余談: SchemaExport で実際に <set> の主キーを作りたいなら、すべてのカラムで not-null=\"true" +"\" を宣言しなければなりません。)" + +#. Tag: para +#: performance.xml:1020 +#, no-c-format +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"<idbag> マッピングは代理キーを定義します。そのため " +"更新は常に非常に効率的です。事実上、これは最善のケースです。" + +#. Tag: para +#: performance.xml:1025 +#, no-c-format +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"bagは最悪のケースです。bagは要素の値の重複が可能で、インデックスカラムを持た" +"ないため、 主キーは定義されないかもしれません。Hibernateには重複した行を区別" +"する方法がありません。 Hibernateはこの問題の解決のために、変更があったときに" +"は常に完全な削除 (一つの DELETE による)を行い、コレク" +"ションの再作成を行います。 これは非常に非効率的かもしれません。" + +#. Tag: para +#: performance.xml:1033 +#, no-c-format +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"1対多関連では、「主キー」はデータベースのテーブルの物理的な 主キーではないか" +"もしれないことに注意してください。しかしこの場合でさえ、上記の分類はまだ有用" +"です。 (Hibernateがコレクションの個々の行をどうやって「見つけるか」を表して" +"います。)" + +#. Tag: title +#: performance.xml:1043 +#, no-c-format +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "更新にもっとも効率的なコレクション list、map、idbag、set" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"上での議論から、インデックス付きコレクションと(普通の)setは要素の追加、削" +"除、 更新でもっとも効率的な操作が出来ることは明らかです。" + +#. Tag: para +#: performance.xml:1051 +#, no-c-format +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"ほぼ間違いなく、多対多関連や値のコレクションにおいて、インデックス付きコレク" +"ションが setよりも優れている点が一つ以上あります。 Set は" +"その 構造のために、Hibernateは要素が「変更」されたときに行を決して " +"UPDATE しません。 Set への変更は常に" +"(個々の行の)INSERTDELETE によって" +"行います。繰り返しますが、これは一対多関連には 当てはまりません。" + +#. Tag: para +#: performance.xml:1060 +#, no-c-format +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"配列は遅延処理ができないという決まりなので、結論として、list、map、idbagが" +"もっとも パフォーマンスの良い(inverseではない)コレクションタイプとなりま" +"す。setも それほど違いはありません。Hibernateのアプリケーションでは、setはコ" +"レクションのもっとも 共通の種類として期待されます。setの表現は関連モデルでは" +"もっとも自然だからです。" + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"しかし、よくデザインされたHibernateのドメインモデルでは、通常もっとも多いコレ" +"クションは 事実上 inverse=\"true\" を指定した1対多関連で" +"す。これらの関連では、 更新は多対一の関連端で扱われ、コレクションの更新パ" +"フォーマンスの問題は当てはまりません。" + +#. Tag: title +#: performance.xml:1078 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "inverseコレクションにもっとも最適なbagとlist" + +#. Tag: para +#: performance.xml:1080 +#, no-c-format +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"bagを見放してしまう前に、bag(そしてlistも)がsetよりもずっとパフォーマンスが" +"良い特別なケースを 紹介します。 inverse=\"true\" のコレク" +"ション(一般的な1対多関連の使い方など)で、 bagの要素を初期化(フェッチ)する" +"必要なくbagやlistに要素を追加できます! これは Collection.add()Collection.addAll() はbagや List では常にtrueを返さなければならないからです ( Set とは異なります)。 これは以下の共通処理をより速くすることができま" +"す。" + +#. Tag: programlisting +#: performance.xml:1090 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:1095 +#, no-c-format +msgid "One shot delete" +msgstr "一括削除" + +#. Tag: para +#: performance.xml:1097 +#, no-c-format +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"時々、コレクションの要素を一つ一つ削除することは極めて非効率的になることがあ" +"ります。 Hibernateは愚かではないので、新しい空のコレクションの場合" +"( list.clear() を呼び出した場合など)ではこれをすべきでな" +"いことを知っています。この場合は、Hibernateは DELETE を一" +"回発行して、それですべて終わります!" + +#. Tag: para +#: performance.xml:1104 +#, no-c-format +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"サイズ20のコレクションに一つの要素を追加し、それから二つの要素を削除するとし" +"ます。 Hibernateは一つの INSERT 文と二つの " +"DELETE 文を発行します (コレクションがbagでなければ)。こ" +"れは確かに望ましい動作です。" + +#. Tag: para +#: performance.xml:1110 +#, no-c-format +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"しかし、18個の要素を削除して2つを残し、それから3つ新しい要素を追加するとしま" +"す。 このとき二つの方法があります。" + +#. Tag: para +#: performance.xml:1117 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "18行を一つ一つ削除して、3行を追加する" + +#. Tag: para +#: performance.xml:1120 +#, no-c-format +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "" +"コレクション全体を削除( DELETE のSQLを一回)し、そして5つ" +"の要素すべてを (一つずつ)追加する" + +#. Tag: para +#: performance.xml:1125 +#, no-c-format +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernateはこの場合に2番目の方法がより速いだろうとわかるほど賢くはありませ" +"ん。 (そしてHibernateがこのように賢いことも望ましくないでしょう。このような" +"振る舞いは データベースのトリガなどを混乱させるかもしれません。)" + +#. Tag: para +#: performance.xml:1131 +#, no-c-format +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"幸いにも、元のコレクションを捨て(つまり参照をやめて)、現在の要素をすべて持" +"つ新しいコレクションの インスタンスを返すことで、いつでもこの振る舞い(2番目" +"の戦略)を強制することが出来ます。 時にこれはとても便利で強力です。" + +#. Tag: para +#: performance.xml:1137 +#, no-c-format +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"もちろん、一括削除は inverse=\"true\" を指定したコレクショ" +"ンには行いません。" + +#. Tag: title +#: performance.xml:1146 +#, no-c-format +msgid "Monitoring performance" +msgstr "パフォーマンスのモニタリング" + +#. Tag: para +#: performance.xml:1148 +#, no-c-format +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"最適化はモニタリングやパフォーマンスを示す数値がなければ十分に行えません。 " +"Hibernateは内部処理のすべての範囲の数値を提供します。 Hibernateの統計情報は " +"SessionFactory 単位で取得可能です。" + +#. Tag: title +#: performance.xml:1155 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "SessionFactoryのモニタリング" + +#. Tag: para +#: performance.xml:1157 +#, no-c-format +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"SessionFactory のメトリクスにアクセスするには2つの方法があ" +"ります。 最初の方法は、 sessionFactory.getStatistics() を" +"呼び出し、 自分で Statistics の読み込みや表示を行います。" + +#. Tag: para +#: performance.xml:1163 +#, no-c-format +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"StatisticsService MBeanを有効にしていれば、HibernateはJMX" +"を使って メトリクスを発行することもできます。1つのMBeanをすべての " +"SessionFactory に対して有効にするか、SessionFactoryごとに" +"一つのMBeanを有効にすることが出来ます。 最小限の設定例である以下のコードを見" +"てください。" + +#. Tag: programlisting +#: performance.xml:1170 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1173 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1175 +#, no-c-format +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"TODO: これは意味がありません。最初のケースは、MBeanを直接復元して使用します。" +"2番目のケースは、 使う前にsession factoryが持っているJNDI名を渡さなければなり" +"ません。 hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name" +"\") を使ってください。" + +#. Tag: para +#: performance.xml:1180 +#, no-c-format +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"SessionFactory に対してモニタリングの開始(終了)を行うこ" +"とが出来ます。" + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"設定時には、 hibernate.generate_statistics を " +"false にします" + +#. Tag: para +#: performance.xml:1192 +#, no-c-format +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"実行時に、 sf.getStatistics().setStatisticsEnabled(true) " +"または hibernateStatsBean.setStatisticsEnabled(true) を呼" +"び出します" + +#. Tag: para +#: performance.xml:1199 +#, no-c-format +msgid "" +"Statistics can be reset programatically using the clear() " +"method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"統計は clear() メソッドを使って手動でリセットすることが出" +"来ます。 サマリは logSummary() メソッドを使ってloggerに送" +"ることが出来ます (infoレベルです)。" + +#. Tag: title +#: performance.xml:1208 +#, no-c-format +msgid "Metrics" +msgstr "メトリクス" + +#. Tag: para +#: performance.xml:1210 +#, no-c-format +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"多くのものがあります。すべての使用可能なカウンタは Statistics インターフェイスのAPIに書かれており、3つの分類があります。" + +#. Tag: para +#: performance.xml:1217 +#, no-c-format +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"メトリクスは一般的な Session の使い方と関係しています。 " +"オープンしたセッションの数がJDBCコネクションと関連しているのと同じです。" + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "" +"メトリクスは要素、コレクション、クエリやキャッシュなど全体に 関係しています" +"(別名はグローバルメトリクスです)。" + +#. Tag: para +#: performance.xml:1229 +#, no-c-format +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "" +"メトリクスの詳細は特定のエンティティ、コレクション、クエリ、キャッシュ領域に" +"関係しています。" + +#. Tag: para +#: performance.xml:1236 +#, no-c-format +msgid "" +"For exampl,e you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"例として、キャッシュのヒット、ヒットミスや、要素、コレクション、クエリの割" +"合、クエリの実行に 必要な平均時間を確認できます。ミリ秒の数値はJavaの近似を受" +"けることに注意してください。 HibernateはJVMの精度に制限され、プラットフォーム" +"によっては10秒単位でしか正確でないかもしれません。" + +#. Tag: para +#: performance.xml:1243 +#, no-c-format +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"単純なgetterはグローバルメトリクス(すなわち特定のエンティティ、コレクショ" +"ン、キャッシュ領域などに縛られない) にアクセスするために使います。特定のエン" +"ティティ、コレクション、キャッシュ領域のメトリクスは、 それらの名前や、クエリ" +"のHQL、SQL表現によってアクセスすることが出来ます。さらに詳しい情報は、 " +"StatisticsEntityStatistics 、 " +"CollectionStatistics 、 " +"SecondLevelCacheStatisticsQueryStatistics APIのjavadocを 参照してください。以下のコードは簡単な例です。" + +#. Tag: programlisting +#: performance.xml:1253 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1255 +#, no-c-format +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"すべてのエンティティ、コレクション、クエリ、キャッシュ領域に対して行う場合" +"は、 getQueries()getEntityNames()getCollectionRoleNames() 、 " +"getSecondLevelCacheRegionNames() メソッドで それぞれの名前" +"のリストを取得することが出来ます。" + +#~ msgid "yes" +#~ msgstr "yes" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/persistent_classes.po b/documentation/envers/src/main/docbook/ja-JP/content/persistent_classes.po new file mode 100644 index 0000000000..ab6ccca7f5 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/persistent_classes.po @@ -0,0 +1,856 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:5 +#, no-c-format +msgid "Persistent Classes" +msgstr "永続クラス" + +#. Tag: para +#: persistent_classes.xml:7 +#, no-c-format +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"永続クラスはビジネス上の問題のエンティティ(例えば、Eコマースアプリケーション" +"の顧客や注文) を実装するアプリケーションのクラスです。 永続クラスのすべての" +"インスタンスが永続状態であると見なされるわけではありません。 インスタンスは逆" +"に一時的(transient)であったり、分離状態(detached)であったりするかもしれま" +"せん。" + +#. Tag: para +#: persistent_classes.xml:14 +#, no-c-format +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"Plain Old Java Object (POJO)プログラミングモデルとしても知られる いくつかの単" +"純なルールに従うなら、Hibernateは最もよく働きます。 しかしこれらのルールは難" +"しいものではありません。 実際Hibernate3は永続オブジェクトの性質にほとんど何の" +"前提も置いていません。 ドメインモデルは他の方法で表現することもできます。 例" +"えば Map インスタンスのツリーを使う方法があります。" + +#. Tag: title +#: persistent_classes.xml:23 +#, no-c-format +msgid "A simple POJO example" +msgstr "単純なPOJOの例" + +#. Tag: para +#: persistent_classes.xml:25 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "" +"ほとんどのJavaアプリケーションにはネコ科の動物を表現する永続クラスが必要で" +"す。" + +#. Tag: programlisting +#: persistent_classes.xml:29 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "従うべき4つのルールがあります:" + +#. Tag: title +#: persistent_classes.xml:37 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "引数のないコンストラクタを実装する" + +#. Tag: para +#: persistent_classes.xml:39 +#, no-c-format +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat には引数のないコンストラクタがあります。 Hibernateが " +"Constructor.newInstance() を使って永続クラスの インスタン" +"ス化を行えるように、すべての永続クラスにはデフォルトコンストラクタ (publicで" +"なくても構いません)がなければなりません。 Hibernateの実行時プロキシ生成のた" +"めに、少なくとも package の可視性を持つデフォルトコンス" +"トラクタを強くお勧めします。" + +#. Tag: title +#: persistent_classes.xml:49 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "識別子プロパティを用意する(オプション)" + +#. Tag: para +#: persistent_classes.xml:51 +#, no-c-format +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Cat には id というプロパティがありま" +"す。 このプロパティはデータベーステーブルの主キーカラムへマッピングされま" +"す。 このプロパティの名前は何でも構いませんし、型はどのようなプリミティブ型で" +"も、 プリミティブの「ラッパー」型でも、java.lang.String " +"や java.util.Date でも構いません。 (もしレガシーデータ" +"ベーステーブルが複合キーを持つならば、 今述べたような型のプロパティを持つユー" +"ザ定義のクラスを使うことさえ可能です。 後で複合識別子の節を見てください。)" + +#. Tag: para +#: persistent_classes.xml:60 +#, no-c-format +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"識別子プロパティは厳密にはオプションです。 これを省略して、Hibernateに内部的" +"にオブジェクトの識別子を追跡させることは可能です。 しかしおすすめはしません。" + +#. Tag: para +#: persistent_classes.xml:65 +#, no-c-format +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "" +"実際に、識別子プロパティを宣言するクラスだけが利用可能な機能がいくつかありま" +"す:" + +#. Tag: para +#: persistent_classes.xml:72 +#, fuzzy, no-c-format +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"分離オブジェクトの連鎖的な再追加(カスケード更新やカスケードマージ)。 を参照してください。" + +#. Tag: literal +#: persistent_classes.xml:79 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#. Tag: literal +#: persistent_classes.xml:84 +#, no-c-format +msgid "Session.merge()" +msgstr "Session.merge()" + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"永続クラスには、一貫した名前の識別子プロパティを定義することをお勧めします。 " +"さらにnull値を取れる(つまりプリミティブではない)型を使った方がよいでしょう。" + +#. Tag: title +#: persistent_classes.xml:96 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "finalクラスにしない(オプション)" + +#. Tag: para +#: persistent_classes.xml:97 +#, no-c-format +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"Hibernateの中心的な特徴である プロキシ は、 永続クラスが" +"finalでないこと、またはメソッドを全部publicで宣言している インターフェイスが" +"実装されているかに依存しています。" + +#. Tag: para +#: persistent_classes.xml:102 +#, no-c-format +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"Hibernateでインターフェイスを実装していない final クラスを" +"永続化することはできますが、 遅延関連フェッチに対してプロキシを使うことはでき" +"なくなります。 これはパフォーマンスチューニングへの選択肢を狭めることになりま" +"す。" + +#. Tag: para +#: persistent_classes.xml:107 +#, no-c-format +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"finalではないクラスで public final メソッドを定義すること" +"も避けるべきです。 public final メソッドを持つクラスを使い" +"たければ、 lazy=\"false\" と設定して明示的にプロキシを無効" +"にしなければなりません。" + +#. Tag: title +#: persistent_classes.xml:115 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "永続フィールドに対するアクセサとミューテータを定義する(オプション)" + +#. Tag: para +#: persistent_classes.xml:117 +#, no-c-format +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat ではすべての永続フィールドに対してアクセサメソッドを定" +"義しています。 他の多くのORMツールは、永続インスタンス変数を直接永続化しま" +"す。 私たちはリレーショナルスキーマとクラスの内部構造を分離する方が良いと信じ" +"ています。 デフォルトでは、HibernateはJavaBeanスタイルのプロパティを永続化" +"し、 getFoo, isFoo, setFoo 形式のメソッド名を認識します。 しかし必要なら、特定のプロパティに対" +"して、直接のフィールドアクセスに切り替えることは可能です。" + +#. Tag: para +#: persistent_classes.xml:127 +#, no-c-format +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"プロパティはpublicで宣言する必要は ありません 。 " +"Hibernateはデフォルト、protected もしくは " +"private のget / setのペアを持つプロパティを永続化すること" +"ができます。" + +#. Tag: title +#: persistent_classes.xml:138 +#, no-c-format +msgid "Implementing inheritance" +msgstr "継承の実装" + +#. Tag: para +#: persistent_classes.xml:140 +#, no-c-format +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"サブクラスも1番目と2番目のルールを守らなければなりません。 サブクラスはスー" +"パークラス Cat から識別子プロパティを継承します。" + +#. Tag: programlisting +#: persistent_classes.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:149 +#, no-c-format +msgid "" +"Implementing equals() and hashCode()" +msgstr "equals()hashCode() の実装" + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"以下の条件の場合、 equals()hashCode() メソッドをオーバーライドしなければなりません、" + +#. Tag: para +#: persistent_classes.xml:157 +#, no-c-format +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"永続クラスのインスタンスを Set に置く場合。 (これは多値の" +"関連を表現するおすすめの方法です) そして同時に" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "分離インスタンスをセッションへ再追加する場合。" + +#. Tag: para +#: persistent_classes.xml:170 +#, no-c-format +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernateは、永続ID(データベースの行)と、特定のセッションスコープ内に 限定" +"ですがJavaIDとが等価であることを保証します。 ですから異なるセッションで検索し" +"たインスタンスを組み合わせる場合、 Set に意味のあるセマン" +"ティクスを持たせようと思っているなら すぐにequals() と " +"hashCode() を実装しなければなりません。" + +#. Tag: para +#: persistent_classes.xml:178 +#, no-c-format +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"最も明白な方法は、両方のオブジェクトの識別子の値の比較によって " +"equals()hashCode() を実装する方法で" +"す。 値が同じなら、両者はデータベースの同じ行でなければならないため等しくなり" +"ます。 (両者が Set に追加されても、 Set には1個の要素しかないことになります) 残念なことに、生成された識別子" +"にはこのアプローチを使うことができません。 Hibernateは永続化されたオブジェク" +"トへ識別子の値を代入するだけであり、 新しく作成されたインスタンスはどのような" +"識別子の値も持っていません。 さらに、インスタンスがセーブされておらず、現在 " +"Set の中にあれば、 セーブするとオブジェクトへ識別子の値を" +"代入することになります。 もし equals() と " +"hashCode() が識別子の値に基づいているなら、 ハッシュコード" +"が変更されると Set の規約が破られます。 この問題についての" +"完全な議論は、Hibernateのウェブサイトを見てください。 これはHibernateの問題で" +"はなく、オブジェクトの同一性と等価性についての、 通常のJavaのセマンティクスで" +"あることに注意してください。" + +#. Tag: para +#: persistent_classes.xml:192 +#, no-c-format +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"ビジネスキーの等価性 を使って、 equals()hashCode() を実装することをお勧めします。 ビジ" +"ネスキーの等価性とは、equals() メソッドが、ビジネスキー、 " +"つまり現実の世界においてインスタンスを特定するキー(自然 候補キー) を形成するプロパティだけを比較することを意味します。" + +#. Tag: programlisting +#: persistent_classes.xml:200 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"ビジネスキーはデータベースの主キー候補ほど安定である必要はないことに注意して" +"ください ( を見てくださ" +"い)。 更新不可なプロパティやユニークなプロパティは、通常ビジネスキーのよい候" +"補です。" + +#. Tag: title +#: persistent_classes.xml:212 +#, no-c-format +msgid "Dynamic models" +msgstr "動的モデル" + +#. Tag: emphasis +#: persistent_classes.xml:215 +#, no-c-format +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "" +"以下の機能は現在実験段階にあると見なされており、 近い将来変更される可能性があ" +"ることに注意してください。" + +#. Tag: para +#: persistent_classes.xml:219 +#, no-c-format +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"永続エンティティは、必ずしも実行時にPOJOクラスやJavaBeanオブジェクトで表現す" +"る必要はありません。 Hibernateは(実行時に Map の " +"Map を使う)動的モデルと、 DOM4Jツリーとしてのエンティティ" +"の表現もサポートします。 このアプローチを使うと永続クラスを書かず、マッピング" +"ファイルだけを書くことになります。" + +#. Tag: para +#: persistent_classes.xml:227 +#, no-c-format +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"デフォルトでは、Hibernateは通常のPOJOモードで動作します。 " +"default_entity_mode 設定オプションを使って、 特定の " +"SessionFactory に対するデフォルトのエンティティ表現モード" +"を設定することができます ( を見てください)。" + +#. Tag: para +#: persistent_classes.xml:234 +#, no-c-format +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"以下の例では Map を使った表現を紹介します。 まずマッピング" +"ファイルで、クラス名の代わりに(またはそれに加えて) entity-name を定義しなければなりません:" + +#. Tag: programlisting +#: persistent_classes.xml:240 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:242 +#, no-c-format +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"関連がターゲットのクラス名を使って定義していたとしても、 関連のターゲット型も" +"POJOではなく動的なエンティティでも構わないことに注意してください。" + +#. Tag: para +#: persistent_classes.xml:249 +#, no-c-format +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"SessionFactory に対してデフォルトのエンティティモードを " +"dynamic-map に設定した後、 実行時に MapMap を使うことができます:" + +#. Tag: programlisting +#: persistent_classes.xml:255 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:257 +#, no-c-format +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"動的なマッピングの利点は、エンティティクラスの実装を必要としないため、 プロト" +"タイピングに要するターンアラウンドタイムが早いということです。 しかしコンパイ" +"ル時の型チェックがないので、実行時に非常に多くの例外処理を扱わなければならな" +"いでしょう。 Hibernateマッピングのおかげで、データベーススキーマは容易に正規" +"化でき、健全になり、 後で適切なドメインモデルの実装を追加することが可能になり" +"ます。" + +#. Tag: para +#: persistent_classes.xml:265 +#, no-c-format +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "" +"エンティティ表現モードは Session ごとに設定することも可能" +"です。" + +#. Tag: programlisting +#: persistent_classes.xml:270 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"EntityMode を使った getSession() の呼び" +"出しは SessionFactory ではなく Session " +"APIにあることに注意してください。 その方法では、新しい Session は、ベースとなるJDBCコネクション、 トランザクション、その他のコンテ" +"キスト情報を共有します。 これは2番目の Session では " +"flush()close() を呼ぶ必要がないとい" +"うこと、そのためトランザクションとコネクションの管理を 1番目の作業単位(Unit " +"of Work)に任せることができるということです。" + +#. Tag: para +#: persistent_classes.xml:283 +#, no-c-format +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "" +"XML表現の能力についてのさらなる情報は で見つかりま" +"す。" + +#. Tag: title +#: persistent_classes.xml:291 +#, no-c-format +msgid "Tuplizers" +msgstr "Tuplizer" + +#. Tag: para +#: persistent_classes.xml:293 +#, no-c-format +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer とそのサブインターフェイス" +"は、 表現の org.hibernate.EntityMode を利用して、 データ断" +"片のある表現の管理に責任を持ちます。 与えられたデータ断片をデータ構造として考" +"えるなら、Tuplizerはそのようなデータ構造を どのように作成するかを知り、そのよ" +"うなデータ構造からどのように値を抽出し、 注入するかを知っています。 例えば" +"POJOエンティティモードでは、対応するTuplizerはコンストラクタを通して、 POJOを" +"どのように作成するか、定義されたプロパティアクセサを使い、 POJOプロパティにど" +"のようにアクセスするかを知ります。 Tuplizerには二つのハイレベルの型がありま" +"す。 それらは、org.hibernate.tuple.EntityTuplizer と " +"org.hibernate.tuple.ComponentTuplizer インターフェイスで表" +"現されます。 EntityTuplizer は上で述べたようなエンティティ" +"に関する契約の管理に責任を持ちます。 一方、ComponentTuplizer はコンポーネントに関する契約の管理に責任を持ちます。" + +#. Tag: para +#: persistent_classes.xml:308 +#, no-c-format +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"ユーザは独自のTuplizerに差し替えることも可能です。 おそらくdynamic-map " +"entity-modeの際に java.util.HashMap を使うのではなく、 " +"java.util.Map の実装が必要でしょう。 もしくは、おそらくデ" +"フォルトのものではなく、別のプロキシ生成戦略の定義が必要でしょう。 両者とも、" +"カスタムのTuplizer実装を定義することで達成されます。 Tuplizerの定義は、管理し" +"ようとするエンティティやコンポーネントのマッピングに結び付けられます。 顧客エ" +"ンティティの例に戻ると:" + +#. Tag: programlisting +#: persistent_classes.xml:317 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:322 +#, no-c-format +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "" +"TODO: プロパティとプロキシパッケージのユーザ拡張フレームワークを文書化するこ" +"と" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/preface.po b/documentation/envers/src/main/docbook/ja-JP/content/preface.po new file mode 100644 index 0000000000..b082f757b6 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/preface.po @@ -0,0 +1,196 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:21 +#, no-c-format +msgid "Preface" +msgstr "前書き" + +#. Tag: para +#: preface.xml:23 +#, no-c-format +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"今日の企業環境において、オブジェクト指向ソフトウェアとリレーショナルデータ" +"ベースに関わる作業は 煩雑で膨大な時間を必要とします。 HibernateはJava環境のオ" +"ブジェクト/リレーショナルマッピングツールです。 オブジェクト/リレーショナル" +"マッピング(ORM)とは、 オブジェクトモデルからSQLベーススキーマのリレーショナ" +"ルデータモデルへと、 データ表現をマッピングする(対応付ける)技術のことです。" + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"HibernateはJavaクラスからデータベーステーブルへ(そしてJavaデータ型からSQL" +"データ型へ) のマッピングを処理するだけではなく、データのクエリと復元の仕組み" +"も提供します。 このおかげでSQLとJDBCを使った手作業でのデータ処理に費やされて" +"いた開発時間を大幅に削減できます。" + +#. Tag: para +#: preface.xml:38 +#, no-c-format +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"Hibernateの最終目標は、データの永続化に関わる一般的なプログラミング作業の95%" +"から開発者を解放することです。 Hibernateはビジネスロジックの実装にストアドプ" +"ロシージャを使う データ中心アプリケーションに対してのベストソリューションであ" +"るに留まりません。 オブジェクト指向ドメインモデルとJavaベースの中間層でのビジ" +"ネスロジックに対して最も役に立ちます。 しかしHibernateはベンダ固有のSQLコード" +"を削減またはカプセル化したり、 表形式からオブジェクトのグラフへとリザルトセッ" +"トを変換するなどの、 一般的なタスクにも役立つでしょう。" + +#. Tag: para +#: preface.xml:48 +#, no-c-format +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"Hibernateやオブジェクト/リレーショナルマッピング、 さらにはJavaが初めての方" +"は、以下のステップに従ってください:" + +#. Tag: para +#: preface.xml:55 +#, no-c-format +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +" を読んでください。 段階的に解説していきます。 " +"チュートリアルのソースコードはディストリビューションの doc/" +"reference/tutorial ディレクトリに含まれています。" + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "" +" を読んで、Hibernateが利用可能な環境を理解し" +"てください。" + +#. Tag: para +#: preface.xml:69 +#, no-c-format +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"Hibernateディストリビューションの eg/ ディレクトリを見てく" +"ださい。 簡単なスタンドアローンのアプリケーションがあります。 JDBCドライバを " +"lib/ ディレクトリにコピーして、 自分のデータベースに合う正" +"しい値を指定するように etc/hibernate.properties を編集して" +"ください。 ディストリビューションディレクトリから、コマンドプロンプトで " +"ant eg とタイプしてください(Antを使います)。 またWindows" +"環境では build eg とタイプしてください。" + +#. Tag: para +#: preface.xml:80 +#, no-c-format +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "" +"このリファレンスドキュメントを第一の情報源として利用してください。 アプリケー" +"ション設計についてのさらなる情報や段階的なチュートリアルを探しているなら、 " +"Java Persistence with Hibernate(http://www.manning.com/" +"bauer2) をおすすめします。 またhttp://caveatemptor.hibernate.orgから Java " +"Persistence with Hibernateの例題のアプリケーションをダウンロードできます。" + +#. Tag: para +#: preface.xml:90 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "FAQはHibernateウェブサイトにあります。" + +#. Tag: para +#: preface.xml:95 +#, no-c-format +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "" +"サードパーティのデモ、例、チュートリアルはHibernateウェブサイトにリンクがあり" +"ます。" + +#. Tag: para +#: preface.xml:101 +#, no-c-format +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"Hibernateウェブサイトのコミュニティエリアは、デザインパターンやさまざまな統合" +"ソリューション (Tomcat, JBoss AS, Struts, EJB, 等)についてのよい情報源で" +"す。" + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"質問があればHibernateウェブサイトのユーザフォーラムを活用してください。 また" +"バグレポートとフィーチャリクエストのためJIRA課題追跡システムを用意していま" +"す。 Hibernateの開発に興味があれば、開発者メーリングリストに参加してくださ" +"い。 このドキュメントをあなたの国の言葉に翻訳したい場合は、 開発者メーリング" +"リストで私たちにコンタクトを取ってください。" + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"商用開発のサポート、製品のサポート、HibernateのトレーニングはJBoss Inc.が提供" +"しています (http://www.hibernate.org/SupportTraining/を見てください)。 " +"HibernateはProfessional Open Sourceプロジェクト、 そしてJBoss Enterprise " +"Middleware System(JEMS)プロダクトスイートのクリティカルコンポーネントです。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/query_criteria.po b/documentation/envers/src/main/docbook/ja-JP/content/query_criteria.po new file mode 100644 index 0000000000..3cb264609e --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/query_criteria.po @@ -0,0 +1,773 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:5 +#, no-c-format +msgid "Criteria Queries" +msgstr "Criteriaクエリ" + +#. Tag: para +#: query_criteria.xml:7 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "Hibernateには、直感的で拡張可能なcriteriaクエリAPIが用意されています。" + +#. Tag: title +#: query_criteria.xml:12 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "Criteria インスタンスの作成" + +#. Tag: para +#: query_criteria.xml:14 +#, no-c-format +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"org.hibernate.Criteria インターフェイスは特定の永続性クラ" +"スに対するクエリを表現します。 Session は " +"Criteria インスタンスのファクトリです。" + +#. Tag: programlisting +#: query_criteria.xml:20 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:25 +#, no-c-format +msgid "Narrowing the result set" +msgstr "リザルトセットの絞込み" + +#. Tag: para +#: query_criteria.xml:27 +#, no-c-format +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"org.hibernate.criterion.Criterion インターフェイスのインス" +"タンスは、 個別のクエリクライテリオン(問い合わせの判定基準)を表します。 " +"org.hibernate.criterion.Restrictions クラスは、ある組み込" +"みの Criterion 型を取得するためのファクトリメソッドを持っ" +"ています。" + +#. Tag: programlisting +#: query_criteria.xml:35 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:37 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "Restriction(限定)は、論理的にグループ化できます。" + +#. Tag: programlisting +#: query_criteria.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:43 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:45 +#, no-c-format +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"元々あるCriterion型(Restrictions のサブクラス) はかなり" +"の範囲に及びますが、特に有用なのはSQLを直接指定できるものです。" + +#. Tag: programlisting +#: query_criteria.xml:50 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:52 +#, no-c-format +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "" +"{alias} というプレースホルダは、 問い合わせを受けたエン" +"ティティの行の別名によって置き換えられます。" + +#. Tag: para +#: query_criteria.xml:57 +#, no-c-format +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"criterionを得る別の手段は、 Property インスタンスから取得" +"することです。 Property.forName() を呼び出して、 " +"Property インスタンスを作成できます。" + +#. Tag: programlisting +#: query_criteria.xml:63 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:68 +#, no-c-format +msgid "Ordering the results" +msgstr "結果の整列" + +#. Tag: para +#: query_criteria.xml:70 +#, no-c-format +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"org.hibernate.criterion.Order を使って結果を並び替えること" +"ができます。" + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:76 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:81 +#, no-c-format +msgid "Associations" +msgstr "関連" + +#. Tag: para +#: query_criteria.xml:83 +#, no-c-format +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"createCriteria() を使い、関連をナビゲートすることで、 容易" +"に関係するエンティティに制約を指定できます。" + +#. Tag: programlisting +#: query_criteria.xml:88 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:90 +#, no-c-format +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"2番目の createCriteria() は、kittens コ" +"レクションの要素を参照する新しい Criteria インスタンスを返" +"すことに注意してください。" + +#. Tag: para +#: query_criteria.xml:96 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "以下のような方法も、状況により有用です。" + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:102 +#, no-c-format +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias() は新しい Criteria イン" +"スタンスを作成しません。)" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"前の2つのクエリによって返される Cat インスタンスによって保" +"持されるkittensコレクションは、 criteriaによって事前にフィルタリング " +"されない ことに注意してください。 もしcriteriaに適合する" +"kittenを取得したいなら、 ResultTransformer を使わなければ" +"なりません。" + +#. Tag: programlisting +#: query_criteria.xml:114 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:119 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "関連の動的フェッチ" + +#. Tag: para +#: query_criteria.xml:121 +#, no-c-format +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"setFetchMode() を使い、 実行時に関連の復元方法を指定しても" +"よいです。" + +#. Tag: programlisting +#: query_criteria.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:128 +#, no-c-format +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"このクエリは外部結合により matekittens の両方をフェッチします。 より多くの情報は を参照してください。" + +#. Tag: title +#: query_criteria.xml:136 +#, no-c-format +msgid "Example queries" +msgstr "クエリの例" + +#. Tag: para +#: query_criteria.xml:138 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"org.hibernate.criterion.Example クラスは、 与えられたイン" +"スタンスからクエリクライテリオンを構築できます。" + +#. Tag: programlisting +#: query_criteria.xml:143 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "" +"バージョンプロパティ、識別子、関連は無視されます。 デフォルトではnull値のプロ" +"パティは除外されます。" + +#. Tag: para +#: query_criteria.xml:150 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "" +"どのように Example を適用するか 調整することができます。" + +#. Tag: programlisting +#: query_criteria.xml:154 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:156 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "" +"関連オブジェクトにcriteriaを指定するために、Exampleを使うことも可能です。" + +#. Tag: programlisting +#: query_criteria.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:165 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "射影、集約、グループ化" + +#. Tag: para +#: query_criteria.xml:166 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"org.hibernate.criterion.Projections クラスは " +"Projection インスタンスのファクトリです。 " +"setProjection() を呼び出すことで、 クエリに射影を適用しま" +"す。" + +#. Tag: programlisting +#: query_criteria.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:176 +#, no-c-format +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"必要であっても、criteriaクエリに「group by」を明示する必要はありません。 ある" +"種のProjection型は グループ化射影 として定義され、 SQL" +"の group by 節にも現れます。" + +#. Tag: para +#: query_criteria.xml:182 +#, no-c-format +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"任意で射影に別名を付けられるため、射影される値はrestrictionやordering内から参" +"照できます。 別名をつける2つの異なる方法を示します。" + +#. Tag: programlisting +#: query_criteria.xml:188 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:190 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:192 +#, no-c-format +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"alias()as() メソッドは、 Projection" +"インスタンスを別の名前の Projection インスタンスで ラップ" +"するだけです。 ショートカットとして、射影を射影リストに追加する際に、別名をつ" +"けられます。" + +#. Tag: programlisting +#: query_criteria.xml:199 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:203 +#, no-c-format +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "射影の式に Property.forName() も使用できます。" + +#. Tag: programlisting +#: query_criteria.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:209 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:214 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "クエリおよびサブクエリの分離" + +#. Tag: para +#: query_criteria.xml:215 +#, no-c-format +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"DetachedCriteria クラスにより、 セッションスコープ外にクエ" +"リを作成できます。 後で、任意の Session を使って、実行でき" +"ます。" + +#. Tag: programlisting +#: query_criteria.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:222 +#, no-c-format +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"DetachedCriteria は、サブクエリを表現するためにも使えま" +"す。 サブクエリを伴うCriterionインスタンスは、 Subqueries " +"もしくは Property から得られます。" + +#. Tag: programlisting +#: query_criteria.xml:228 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:230 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:232 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "相互関係があるサブクエリでさえも可能です。" + +#. Tag: programlisting +#: query_criteria.xml:236 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:245 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "自然識別子によるクエリ" + +#. Tag: para +#: query_criteria.xml:247 +#, no-c-format +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"criteriaクエリを含むたいていのクエリにとって、 クエリキャッシュはあまり効率が" +"よくないです。 なぜなら、クエリキャッシュが頻繁に無効になるためです。 しかし" +"ながら、キャッシュを無効にするアルゴリズムを最適化できる 特別なクエリの種類が" +"1つあります。 更新されない自然キーによる検索です。 いくつかのアプリケーショ" +"ンでは、この種類のクエリが頻繁に現れます。 このような使われ方のために、" +"criteria APIは特別な対策を提供します。" + +#. Tag: para +#: query_criteria.xml:255 +#, no-c-format +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"最初に、<natural-id> を使って、 エンティティの自然" +"キーをマップしてください。 そして、二次キャッシュを有効にします。" + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:262 +#, no-c-format +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "" +"注意: 変更される 自然キーを持つエンティティに この機能" +"を使うのは、意図されていない使い方です。" + +#. Tag: para +#: query_criteria.xml:267 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "次に、Hibernateクエリキャッシュを有効にします。" + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"これで、Restrictions.naturalId() により、 より効率的な" +"キャッシュアルゴリズムを使用できます。" + +#. Tag: programlisting +#: query_criteria.xml:276 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/query_hql.po b/documentation/envers/src/main/docbook/ja-JP/content/query_hql.po new file mode 100644 index 0000000000..96c754a35b --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/query_hql.po @@ -0,0 +1,2399 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:5 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: The Hibernate Query Language" + +#. Tag: para +#: query_hql.xml:7 +#, no-c-format +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"HibernateはSQLに非常によく似た(意図的に似せた)強力な問い合わせ言語を備えてい" +"ます。 しかしSQLに似た構文に惑わされないでください。HQLは完全にオブジェクト指" +"向であり、 継承、ポリモーフィズム、関連といった概念を理解します。" + +#. Tag: title +#: query_hql.xml:14 +#, no-c-format +msgid "Case Sensitivity" +msgstr "大文字と小文字の区別" + +#. Tag: para +#: query_hql.xml:16 +#, no-c-format +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"クエリはJavaのクラス名とプロパティ名を除いて大文字、小文字を区別しません。 " +"従って SeLeCTsELEct と同じで、かつ " +"SELECT とも同じですが net.sf.hibernate.eg.FOOnet.sf.hibernate.eg.Foo とは違い、かつ " +"foo.barSetfoo.BARSET とも違います。" + +#. Tag: para +#: query_hql.xml:27 +#, no-c-format +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"このマニュアルでは小文字のHQLキーワードを使用します。 大文字のキーワードのク" +"エリの方が読みやすいと感じるユーザーもいると思います。 ですが、Javaコード内に" +"埋め込まれたときには見づらいと思います。" + +#. Tag: title +#: query_hql.xml:35 +#, no-c-format +msgid "The from clause" +msgstr "from節" + +#. Tag: para +#: query_hql.xml:37 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "もっとも単純なHibernateクエリは次の形式です。" + +#. Tag: programlisting +#: query_hql.xml:41 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:43 +#, no-c-format +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"これは単純に eg.Cat クラスのインスタンスをすべて返しま" +"す。 必ずしもクラス名を修飾する(クラスにパッケージ名を付ける)必要はありませ" +"ん。 というのも、auto-import がデフォルトになっているから" +"です。 そのためほとんどの場合、このように書くだけで十分です。" + +#. Tag: programlisting +#: query_hql.xml:49 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"ほとんどの場合クエリのほかの部分で Cat を参照するので、" +"別名を割り当てる必要があるでしょう。" + +#. Tag: programlisting +#: query_hql.xml:57 query_hql.xml:372 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:59 +#, no-c-format +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"このクエリでは Cat インスタンスに cat " +"という別名を付けています。 そのため、後でこのクエリ内で、この別名を使うことが" +"できます。 as キーワードはオプションです。つまりこのように" +"書くこともできます:" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "直積、あるいはクロス結合によって多数のクラスが出現することもあります。" + +#. Tag: programlisting +#: query_hql.xml:71 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:72 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:74 +#, no-c-format +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"ローカル変数のJavaのネーミング基準と一致した、 頭文字に小文字を使ったクエリの" +"別名を付けることはいい習慣です(例えば domesticCat )。" + +#. Tag: title +#: query_hql.xml:83 +#, no-c-format +msgid "Associations and joins" +msgstr "関連と結合" + +#. Tag: para +#: query_hql.xml:85 +#, no-c-format +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"関連するエンティティあるいは値コレクションの要素にも、結合 を使って別名を割り当てることが出来ます。" + +#. Tag: programlisting +#: query_hql.xml:90 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:92 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:94 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:96 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "サポートしている結合のタイプはANSI SQLと同じです。" + +#. Tag: literal +#: query_hql.xml:103 +#, no-c-format +msgid "inner join" +msgstr "inner join" + +#. Tag: literal +#: query_hql.xml:108 +#, no-c-format +msgid "left outer join" +msgstr "left outer join" + +#. Tag: literal +#: query_hql.xml:113 +#, no-c-format +msgid "right outer join" +msgstr "right outer join" + +#. Tag: para +#: query_hql.xml:117 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "full join (たいていの場合使いづらい)" + +#. Tag: para +#: query_hql.xml:123 +#, no-c-format +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"inner joinleft outer join、" +"right outer joinには省略形を使うこともできます。" + +#. Tag: programlisting +#: query_hql.xml:128 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:130 +#, no-c-format +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "" +"HQLの with キーワードを使うと、結合条件を付け加えることが" +"できます。" + +#. Tag: programlisting +#: query_hql.xml:135 +#, no-c-format +msgid "" +" 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:137 +#, no-c-format +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"加えて、「フェッチ」結合は関連や値のコレクションを親オブジェクトと一緒に1度の" +"select句で初期化します。 これは特にコレクションの場合に有用です。これは実質" +"上、関連とコレクションに対するマッピング定義ファイルの外部結合とlazy初期化の" +"定義を上書きすることになります。 に" +"より多くの情報があります。" + +#. Tag: programlisting +#: query_hql.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"結合によるフェッチは関連するオブジェクトが where 節(または" +"他のどんな節でも) で使われてはならないので、通常別名を割り当てる必要がありま" +"せん。また関連オブジェクトは問い合わせ結果として 直接返されません。代わりに親" +"オブジェクトを通してアクセスできます。 コレクションを再帰的に結合フェッチする" +"場合のみ、別名が必要になります。" + +#. Tag: programlisting +#: query_hql.xml:155 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:157 +#, no-c-format +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"fetch 構文は iterate() を使ったクエリ呼" +"び出しで使用できないことに注意してください (一方で scroll() は使用できます)。 また、これらの操作は結果の行に基づいているため、 " +"fetchsetMaxResults() や " +"setFirstResult() と一緒に使用すべきではありません。 通常" +"eagerなコレクションフェッチをすると重複が出てしまうため、あなたが期待するよう" +"な行数にはならないのです。 そしてまた fetch は、アドホック" +"な with 条件を 一緒に使うこともできません。 一つのクエリで" +"複数のコレクションを結合フェッチすることにより直積を作成できるので、この場合" +"注意してください。 また、複数のコレクションに対する結合フェッチはbagマッピン" +"グに対して予期せぬ結果をもたらすことがあるので、 この場合のクエリの作成には注" +"意してください。 最後に 全外部結合によるフェッチ と " +"右外部結合によるフェッチ は有用ではないことに注意してくだ" +"さい。" + +#. Tag: para +#: query_hql.xml:172 +#, no-c-format +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"もしプロパティレベルの遅延フェッチを使う場合(内部的にバイトコード処理をする" +"場合)、 fetch all properties を使うことで Hibernateに遅延" +"プロパティを速やかに(最初のクエリで)フェッチさせることができます。" + +#. Tag: programlisting +#: query_hql.xml:178 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:184 +#, no-c-format +msgid "Forms of join syntax" +msgstr "結合構文の形式" + +#. Tag: para +#: query_hql.xml:186 +#, no-c-format +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"HQLは2つの関連結合形式をサポートします:暗黙的 と " +"明示的。" + +#. Tag: para +#: query_hql.xml:190 +#, no-c-format +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"これまでのセクションでお見せした使い方はすべて 明示的な 形" +"式で、 from節で明示的にjoinキーワードを使っています。 この形式をおすすめしま" +"す。" + +#. Tag: para +#: query_hql.xml:195 +#, no-c-format +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"暗黙的 フォームは、joinキーワードを使いません。代わりに、" +"参照する関連に ドット表記を使います。暗黙的 結合は、さまざ" +"まなHQLに出てきます。 暗黙的 結合の結果は、SQLステートメン" +"トの内部結合結果です。" + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:206 +#, no-c-format +msgid "Refering to identifier property" +msgstr "Refering to identifier property" + +#. Tag: para +#: query_hql.xml:208 +#, no-c-format +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" + +#. Tag: para +#: query_hql.xml:213 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." + +#. Tag: para +#: query_hql.xml:220 +#, no-c-format +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"If the entity defines a named identifier property, you may use that property " +"name." + +#. Tag: para +#: query_hql.xml:226 +#, no-c-format +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." + +#. Tag: para +#: query_hql.xml:233 +#, fuzzy, no-c-format +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, idalways referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." + +#. Tag: title +#: query_hql.xml:242 +#, no-c-format +msgid "The select clause" +msgstr "Select節" + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"select 節は以下のようにどのオブジェクトと属性をクエリリザ" +"ルトセットに返すかを選択します。:" + +#. Tag: programlisting +#: query_hql.xml:249 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:251 +#, no-c-format +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"上記のクエリは他の Catmate を選択し" +"ます。 実際には次のように、より簡潔に表現できます。:" + +#. Tag: programlisting +#: query_hql.xml:256 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:258 +#, no-c-format +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"クエリはコンポーネント型のプロパティを含む、あらゆる値型のプロパティも返せま" +"す。:" + +#. Tag: programlisting +#: query_hql.xml:262 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:264 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:266 +#, no-c-format +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"クエリは複数のオブジェクトと(または)プロパティを Object[] " +"型の配列として返せます。" + +#. Tag: programlisting +#: query_hql.xml:271 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:273 +#, no-c-format +msgid "or as a List," +msgstr "もしくは List として、" + +#. Tag: programlisting +#: query_hql.xml:277 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:279 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "または、タイプセーフなJavaオブジェクトを返せます。" + +#. Tag: programlisting +#: query_hql.xml:283 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:285 +#, no-c-format +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "" +"あるいは Family クラスが適切なコンストラクタを持っていると" +"するならば、" + +#. Tag: para +#: query_hql.xml:289 +#, no-c-format +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "select節に as を使って別名をつけることもできます。" + +#. Tag: programlisting +#: query_hql.xml:293 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:295 +#, no-c-format +msgid "" +"This is most useful when used together with select new map:" +msgstr "select new map と一緒に使うときに最も役立ちます:" + +#. Tag: programlisting +#: query_hql.xml:299 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:301 +#, no-c-format +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "このクエリは別名からselectした値へ Map を返します。" + +#. Tag: title +#: query_hql.xml:308 +#, no-c-format +msgid "Aggregate functions" +msgstr "集約関数" + +#. Tag: para +#: query_hql.xml:310 +#, no-c-format +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "HQLのクエリはプロパティの集約関数の結果も返せます:" + +#. Tag: programlisting +#: query_hql.xml:314 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "サポートしている集約関数は以下のものです。" + +#. Tag: literal +#: query_hql.xml:332 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#. Tag: literal +#: query_hql.xml:337 +#, no-c-format +msgid "count(*)" +msgstr "count(*)" + +#. Tag: literal +#: query_hql.xml:342 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#. Tag: para +#: query_hql.xml:347 +#, no-c-format +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "" +"select節において算術操作、連結と承認されたSQL関数を使うことができます。" + +#. Tag: programlisting +#: query_hql.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:354 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:356 +#, no-c-format +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"SQLと同じ意味を持つ distinctall " +"キーワードを使うことができます。" + +#. Tag: programlisting +#: query_hql.xml:361 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:366 +#, no-c-format +msgid "Polymorphic queries" +msgstr "ポリモーフィックなクエリ" + +#. Tag: para +#: query_hql.xml:368 +#, no-c-format +msgid "A query like:" +msgstr "次のようなクエリ:" + +#. Tag: para +#: query_hql.xml:374 +#, no-c-format +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"Cat インスタンスだけではなく、DomesticCat のようなサブクラスも返されます。Hibernateクエリは どんな Javaクラスやインターフェイスも from 節に入れるこ" +"とができます。 クエリはそのクラスを拡張した、もしくはインターフェイスを実装し" +"た全ての永続クラスを返します。 次のクエリは永続オブジェクトをすべて返します:" + +#. Tag: programlisting +#: query_hql.xml:382 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:384 +#, no-c-format +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "" +"Named インターフェイスは様々な永続クラスによって実装されま" +"す。:" + +#. Tag: programlisting +#: query_hql.xml:389 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:391 +#, no-c-format +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"最後の二つのクエリは、二つ以上のSQL SELECT を要求している" +"ことに注意してください。 このことは order by 節がリザルト" +"セット全体を正確には整列しないことを意味します (さらにそれは、Query." +"scroll() を使用してこれらのクエリを呼ぶことができないことを意味しま" +"す。)。" + +#. Tag: title +#: query_hql.xml:400 +#, no-c-format +msgid "The where clause" +msgstr "where節" + +#. Tag: para +#: query_hql.xml:402 +#, no-c-format +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"where 節は返されるインスタンスのリストを絞ることができま" +"す。 もし別名がない場合、名前でプロパティを参照します。" + +#. Tag: programlisting +#: query_hql.xml:407 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:409 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "もし別名がある場合、修飾名を使ってください。" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "名前が'Fritz'という Cat のインスタンスを返します。" + +#. Tag: programlisting +#: query_hql.xml:419 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:421 +#, no-c-format +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"上のHQLは、FoostartDate プロパティ" +"と等しい date プロパティを持った bar イ" +"ンスタンスが存在する、 すべての Foo インスタンスを返しま" +"す。 コンパウンドパス式(例えば「cat.mate.name」)は where 節を非常に強力にします。注目:" + +#. Tag: programlisting +#: query_hql.xml:430 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:432 +#, no-c-format +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"このクエリはテーブル結合(内部結合)を持つSQLクエリに変換されます。 その代わ" +"りに以下のように書くと、" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "" +"もし上のクエリを記述したらクエリ内に4つのテーブル結合を必要とするSQLクエリに" +"変換されます。" + +#. Tag: para +#: query_hql.xml:443 +#, no-c-format +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"= 演算子は以下のように、プロパティだけでなくインスタンスを" +"比較するためにも使われます。:" + +#. Tag: programlisting +#: query_hql.xml:448 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:450 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:452 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"id (小文字)は特別なプロパティであり、 オブジェクトのユニー" +"クな識別子を参照するために使用できます。(さらに、そのプロパティ名を使用できま" +"す。)" + +#. Tag: programlisting +#: query_hql.xml:458 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:460 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "2番目のクエリは効率的です。テーブル結合が必要ありません!" + +#. Tag: para +#: query_hql.xml:464 +#, no-c-format +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"また複合識別子のプロパティも使用できます。ここで Person " +"が countrymedicareNumber からなる複" +"合識別子を持つと仮定します。" + +#. Tag: programlisting +#: query_hql.xml:471 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:473 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:475 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "もう一度言いますが、2番目のクエリにはテーブル結合が必要ありません。" + +#. Tag: para +#: query_hql.xml:479 +#, no-c-format +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"同様に class は特別なプロパティであり、 ポリモーフィックな" +"永続化におけるインスタンスのdiscriminator値にアクセスします。 where節に埋め込" +"まれたJavaのクラス名はそのdiscriminator値に変換されます。" + +#. Tag: programlisting +#: query_hql.xml:485 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:487 +#, no-c-format +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"またコンポーネントや複合ユーザ型(またそのコンポーネントのコンポーネントなど)" +"のプロパティも指定できます。 しかし決して(コンポーネントのプロパティではな" +"く)コンポーネント型のプロパティで終了するパス式を使わないでください。 例えば" +"もし store.owneraddress コンポーネ" +"ントを持つエンティティならば以下のような結果となります。" + +#. Tag: para +#: query_hql.xml:492 +#, no-c-format +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"\"any\"型は特別なプロパティである idclass を持ち、 以下の方法で結合を表現することを可能にします" +"(AuditLog.item<any> でマッピ" +"ングされたプロパティです)。" + +#. Tag: programlisting +#: query_hql.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:500 +#, no-c-format +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"log.item.classpayment.class が 上記" +"のクエリ中で全く異なるデータベースカラムの値を参照するということに注意してく" +"ださい。" + +#. Tag: title +#: query_hql.xml:508 +#, no-c-format +msgid "Expressions" +msgstr "Expressions 式" + +#. Tag: para +#: query_hql.xml:510 +#, no-c-format +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"SQLの where 節で記述することが出来る式のほとんどをHQLでも" +"記述できます。:" + +#. Tag: para +#: query_hql.xml:517 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "算術演算子:+, -, *, /" + +#. Tag: para +#: query_hql.xml:522 +#, no-c-format +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "2項比較演算子:=, >=, <=, <>, !=, like" + +#. Tag: para +#: query_hql.xml:527 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "論理演算子:and, or, not" + +#. Tag: para +#: query_hql.xml:532 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "グループ分けを表す括弧:( )" + +#. Tag: para +#: query_hql.xml:537 +#, no-c-format +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" + +#. Tag: para +#: query_hql.xml:550 +#, no-c-format +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"\"シンプル\"なcase case ... when ... then ... else ... end、 \"探索的\"なcase case when ... then ... else ... end" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"ストリングの連結 ...||... または concat(...,...)" +"" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#. Tag: para +#: query_hql.xml:567 +#, no-c-format +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"EJB-QL 3.0で定義されている関数や演算子: substring(), trim(), lower" +"(), upper(), length(), locate(), abs(), sqrt(), bit_length()" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "coalesce()nullif()" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "数字や時間の値をStringにコンバートする str())" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"2番目の引数がHibernate型の名前である cast(... as ...) と " +"extract(... from ...)。 ただし使用するデータベースがANSI " +"cast()extract() をサポートする場合" +"に限ります。" + +#. Tag: para +#: query_hql.xml:599 +#, no-c-format +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "" +"結合したインデックス付きのコレクションの別名に適用されるHQLの index" +"() 関数。" + +#. Tag: para +#: query_hql.xml:605 +#, no-c-format +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"コレクション値のパス式を取るHQL関数: size(), minelement(), " +"maxelement(), minindex(), maxindex()some, all, " +"exists, any, in を使って修飾することができる特別な " +"elements()indices 関数と一緒に使い" +"ます。" + +#. Tag: para +#: query_hql.xml:613 +#, no-c-format +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"sign(), trunc(), rtrim(), sin() のようなデータベースがサポートするSQLスカ" +"ラ関数。" + +#. Tag: para +#: query_hql.xml:619 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "JDBCスタイルの位置パラメータ ?" + +#. Tag: para +#: query_hql.xml:624 +#, no-c-format +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"名前付きパラメータ: :name, :start_date, :x1" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"SQLリテラル:'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" + +#. Tag: para +#: query_hql.xml:635 +#, no-c-format +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"Javaの public static final 定数:eg.Color.TABBY" + +#. Tag: para +#: query_hql.xml:641 +#, no-c-format +msgid "" +"in and between may be used as follows:" +msgstr "" +"inbetween は以下のように使用できま" +"す。:" + +#. Tag: programlisting +#: query_hql.xml:645 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:647 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:649 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "また、否定形で記述することもできます。" + +#. Tag: programlisting +#: query_hql.xml:653 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:655 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:657 +#, no-c-format +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"同様に is nullis not null はnull値" +"をテストするために使用できます。" + +#. Tag: para +#: query_hql.xml:662 +#, no-c-format +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"Hibernate設定ファイルでHQL query substitutionsを定義すれば、boolean値を式の中" +"で簡単に使用できま。:" + +#. Tag: programlisting +#: query_hql.xml:667 +#, no-c-format +msgid "" +"true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:669 +#, no-c-format +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"こうすることで下記のHQLをSQLに変換するときに true , " +"false キーワードは 1 , 0 に置き換えられます。:" + +#. Tag: programlisting +#: query_hql.xml:674 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:676 +#, no-c-format +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"特別なプロパティ size、または特別な関数 size() を使ってコレクションのサイズをテストできます。:" + +#. Tag: programlisting +#: query_hql.xml:681 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:683 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:685 +#, no-c-format +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"インデックス付きのコレクションでは、minindex と " +"maxindex 関数を使って、インデックスの最小値と最大値を参照" +"できます。 同様に、minelementmaxelement を使って、 基本型のコレクション要素の最小値と最大値を参照できます。" + +#. Tag: programlisting +#: query_hql.xml:693 +#, no-c-format +msgid "" +" current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:695 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:697 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:699 +#, no-c-format +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"コレクションの要素やインデックスのセット(elements と " +"indices 関数)、または副問い合わせ(後述)の結果が受け取れ" +"るときは、 SQL関数 any, some, all, exists, in がサポートさ" +"れます。" + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:709 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:711 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:713 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:715 +#, no-c-format +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"size, elements, indices, minindex, maxindex, " +"minelement, maxelement はHibernate3の" +"where節だけで利用可能であることに注意してください。" + +#. Tag: para +#: query_hql.xml:722 +#, no-c-format +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"インデックス付きのコレクション(arrays, lists, maps)の要素は、 インデックス" +"で参照できます(where節内でのみ)。" + +#. Tag: programlisting +#: query_hql.xml:727 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:735 +#, no-c-format +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "[] 内部の式は、算術式でも構いません。" + +#. Tag: programlisting +#: query_hql.xml:739 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:741 +#, no-c-format +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"一対多関連や値のコレクションの要素に対しては、HQLは組み込みの index" +"() 関数も用意しています。" + +#. Tag: programlisting +#: query_hql.xml:746 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:748 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "" +"ベースとなるデータベースがサポートしているスカラーSQL関数が使用できます" + +#. Tag: programlisting +#: query_hql.xml:752 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:754 +#, no-c-format +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"もしまだ全てを理解していないなら、下のクエリをSQLでどれだけ長く、読みづらく出" +"来るか考えてください。:" + +#. Tag: programlisting +#: query_hql.xml:759 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:761 +#, no-c-format +msgid "Hint: something like" +msgstr "ヒント: 例えばこのように出来ます。" + +#. Tag: programlisting +#: query_hql.xml:765 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:770 +#, no-c-format +msgid "The order by clause" +msgstr "order by節" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"クエリが返すlistは、返されるクラスやコンポーネントの任意の属性によって並べ替" +"えられます。:" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"オプションの ascdesc はそれぞれ昇順" +"か降順の整列を示します。" + +#. Tag: title +#: query_hql.xml:785 +#, no-c-format +msgid "The group by clause" +msgstr "group by節" + +#. Tag: para +#: query_hql.xml:787 +#, no-c-format +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"集約値を返すクエリは、返されるクラスやコンポーネントの任意のプロパティによっ" +"てグループ化できます。:" + +#. Tag: programlisting +#: query_hql.xml:791 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:793 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:795 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "having 節も使えます。" + +#. Tag: programlisting +#: query_hql.xml:799 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:801 +#, no-c-format +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"もし使用するデータベースがサポートしているなら、 having " +"と order by 節でSQL関数と集約関数が使えます (例えばMySQL" +"にはありません)。" + +#. Tag: programlisting +#: query_hql.xml:807 +#, no-c-format +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:809 +#, no-c-format +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." + +#. Tag: title +#: query_hql.xml:821 +#, no-c-format +msgid "Subqueries" +msgstr "副問い合わせ" + +#. Tag: para +#: query_hql.xml:823 +#, no-c-format +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"サブセレクトをサポートするデータベースのため、Hibernateは副問い合わせをサポー" +"トしています。 副問い合わせは括弧で囲まなければなりません(SQLの集約関数呼び" +"出しによる事が多いです)。 関連副問い合わせ(外部クエリ中の別名を参照する副問" +"い合わせのこと)さえ許可されます。" + +#. Tag: programlisting +#: query_hql.xml:829 +#, no-c-format +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:833 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:835 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:837 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:839 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" +"HQL副問い合わせは、selectまたはwhere節だけで使われることに注意してください。" + +#. Tag: para +#: query_hql.xml:843 +#, no-c-format +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." + +#. Tag: title +#: query_hql.xml:851 +#, no-c-format +msgid "HQL examples" +msgstr "HQLの例" + +#. Tag: para +#: query_hql.xml:853 +#, no-c-format +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"Hibernateクエリは非常に強力で複雑にできます。実際、クエリ言語の威力は" +"Hibernateの主要なセールスポイントの一つです。 ここに最近のプロジェクトで使用" +"したクエリと非常によく似た例があります。 ほとんどのクエリはこれらの例より簡単" +"に記述できることに注意してください!" + +#. Tag: para +#: query_hql.xml:859 +#, no-c-format +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"以下のクエリは特定の顧客と与えられた最小の合計値に対する未払い注文の注文ID、 " +"商品の数、注文の合計を合計値で整列して返します。 価格を決定する際、現在のカタ" +"ログを使います。結果として返されるSQLクエリは ORDER, " +"ORDER_LINE, PRODUCT, CATALOG および PRICE テーブルに対し4つの内部結合と (関連" +"しない)副問い合わせを持ちます。" + +#. Tag: programlisting +#: query_hql.xml:868 +#, no-c-format +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:870 +#, no-c-format +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"何て巨大なクエリなのでしょう! 普段私は副問い合わせをあまり使いません。した" +"がって私のクエリは実際には以下のようになります。:" + +#. Tag: programlisting +#: query_hql.xml:875 +#, no-c-format +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"次のクエリは各ステータスの支払い数を数えます。ただしすべての支払いが現在の利" +"用者による 最新のステータス変更である AWAITING_APPROVAL で" +"ある場合を除きます。 このクエリは2つの内部結合と PAYMENT, " +"PAYMENT_STATUS および PAYMENT_STATUS_CHANGE テーブルに対する関連副問い合わせを備えたSQLクエリに変換されます。" + +#. Tag: programlisting +#: query_hql.xml:885 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:887 +#, no-c-format +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"もし私がsetの代わりにlistとして statusChanges コレクション" +"を マッピングしたならば、はるかに簡単にクエリを記述できるでしょう。" + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"次のクエリは現在のユーザが所属する組織に対するアカウントおよび未払いの支払い" +"を すべて返すMS SQL Server の isNull() 関数を使用していま" +"す。 このクエリは3つの内部結合と1つの外部結合 、 そして ACCOUNT, PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION および " +"ORG_USER テーブルに対する副問い合わせ持ったSQLに変換されま" +"す。" + +#. Tag: programlisting +#: query_hql.xml:903 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:905 +#, no-c-format +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "" +"いくつかのデータベースについては、(関連させられた)副問い合わせの使用を避ける" +"必要があるでしょう。" + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:914 +#, no-c-format +msgid "Bulk update and delete" +msgstr "大量のUPDATEとDELETE" + +#. Tag: para +#: query_hql.xml:916 +#, no-c-format +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"HQLは今は updatedelete、" +"insert ... select ... ステートメントをHQLに入れることをサ" +"ポートしています。 に詳細があります。" + +#. Tag: title +#: query_hql.xml:924 +#, no-c-format +msgid "Tips & Tricks" +msgstr "Tips & Tricks" + +#. Tag: para +#: query_hql.xml:926 +#, no-c-format +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "実際に結果を返さなくてもクエリの結果数を数えることができます。:" + +#. Tag: programlisting +#: query_hql.xml:930 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:932 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" +"コレクションのサイズにより結果を並べ替えるためには以下のクエリを使用します。:" + +#. Tag: programlisting +#: query_hql.xml:936 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:938 +#, no-c-format +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"使用しているデータベースがサブセレクトをサポートする場合、クエリのwhere節でサ" +"イズによる選択条件を設定できます:" + +#. Tag: programlisting +#: query_hql.xml:943 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:945 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "" +"使用しているデータベースがサブセレクトをサポートしない場合は、次のクエリを使" +"用してください:" + +#. Tag: programlisting +#: query_hql.xml:949 +#, no-c-format +msgid "" +"= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:951 +#, no-c-format +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"内部結合をしているせいで上の解決法がmessageの件数が ゼロの User を返すことができないならば、以下の形式が使えます。" + +#. Tag: programlisting +#: query_hql.xml:956 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:958 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" +"JavaBeanのプロパティは、名前付きのクエリパラメータに結びつけることが出来ま" +"す。:" + +#. Tag: programlisting +#: query_hql.xml:962 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:964 +#, no-c-format +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"コレクションはフィルタ付き Query インターフェイスを使用す" +"ることでページをつけることができます。:" + +#. Tag: programlisting +#: query_hql.xml:968 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:970 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"コレクションの要素はクエリフィルタを使って、並べ替えやグループ分けが出来ま" +"す。:" + +#. Tag: programlisting +#: query_hql.xml:974 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:976 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "コレクションを初期化せずにコレクションのサイズを得ることができます。:" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:985 +#, no-c-format +msgid "Components" +msgstr "translator-credits" + +#. Tag: para +#: query_hql.xml:987 +#, no-c-format +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:992 query_hql.xml:1038 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:993 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:995 +#, no-c-format +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1000 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1001 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1003 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1007 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1008 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1010 +#, no-c-format +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1016 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:1018 +#, no-c-format +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" + +#. Tag: para +#: query_hql.xml:1040 +#, no-c-format +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1045 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1047 +#, no-c-format +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/query_sql.po b/documentation/envers/src/main/docbook/ja-JP/content/query_sql.po new file mode 100644 index 0000000000..ec75aebf79 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/query_sql.po @@ -0,0 +1,1470 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:5 +#, no-c-format +msgid "Native SQL" +msgstr "ネイティブSQL" + +#. Tag: para +#: query_sql.xml:7 +#, no-c-format +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"データベースのネイティブSQL方言を使ってクエリを表現することもできます。 クエ" +"リヒントやOracleの CONNECT キーワードのように、 データベー" +"ス独自の機能を利用したいときに使えます。 SQL/JDBCを直接使用しているアプリケー" +"ションからHibernateへの移行も容易にしています。" + +#. Tag: para +#: query_sql.xml:13 +#, no-c-format +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3では、生成、更新、削除、読み込み処理のようなすべての SQL(ストアド" +"プロシージャを含む)を手書きできます。" + +#. Tag: title +#: query_sql.xml:17 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "SQLQuery の使用" + +#. Tag: para +#: query_sql.xml:19 +#, no-c-format +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"ネイティブなSQLクエリの実行は SQLQuery インターフェイスを" +"通して制御します。 SQLQuery インターフェイスは " +"Session.createSQLQuery() を呼び出して取得します。 このAPI" +"を使って問い合わせする方法を以下で説明します。" + +#. Tag: title +#: query_sql.xml:25 +#, no-c-format +msgid "Scalar queries" +msgstr "スカラーのクエリ" + +#. Tag: para +#: query_sql.xml:27 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "最も基本的なSQLクエリはスカラー(値)のリストを得ることです。" + +#. Tag: programlisting +#: query_sql.xml:30 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:32 +#, no-c-format +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"これらはどちらも、CATSテーブルの各カラムのスカラー値を含む Object配列(Object" +"[])のリストを返します。 返すスカラー値の実際の順番と型を推定するために、 " +"HibernateはResultSetMetadataを使用します。" + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"ResultSetMetadata を使用するオーバーヘッドを避けるため、 " +"もしくは単に何が返されるか明確にするため、addScalar() を使" +"えます。" + +#. Tag: programlisting +#: query_sql.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:43 query_sql.xml:89 query_sql.xml:170 query_sql.xml:321 +#, no-c-format +msgid "This query specified:" +msgstr "このクエリで指定されているものを下記に示します。" + +#. Tag: para +#: query_sql.xml:47 query_sql.xml:93 query_sql.xml:325 +#, no-c-format +msgid "the SQL query string" +msgstr "SQLクエリ文字列" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "the columns and types to return" +msgstr "返されるカラムと型" + +#. Tag: para +#: query_sql.xml:55 +#, no-c-format +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"これはまだObject配列を返しますが、 ResultSetMetdata を使用" +"しません。 ただし、その代わりに基礎にあるリザルトセットから ID、NAME、" +"BIRTHDATE カラムをそれぞれ Long、String、Short として明示的に取得します。 こ" +"れは3つのカラムを返すのみであることも意味します。 たとえ、クエリが " +"* を使用し、 列挙した3つより多くのカラムを返せるとしても" +"です。" + +#. Tag: para +#: query_sql.xml:63 +#, no-c-format +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "スカラーの型情報を省くこともできます。" + +#. Tag: programlisting +#: query_sql.xml:66 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:68 +#, no-c-format +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"これは本質的に前と同じクエリですが、、 NAME と BIRTHDATE の型を決めるために " +"ResultSetMetaData を使用します。一方、ID の型は明示的に指" +"定されています。" + +#. Tag: para +#: query_sql.xml:72 +#, no-c-format +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"ResultSetMetaData から返される java.sql.Types を Hibernate の型に マッピング" +"することは、Dialect が制御します。 明示された型がマッピングされていないか、結" +"果の型が期待したものと異なる場合、 Dialect の " +"registerHibernateType を呼び出し、 カスタマイズできます。" + +#. Tag: title +#: query_sql.xml:80 +#, no-c-format +msgid "Entity queries" +msgstr "エンティティのクエリ" + +#. Tag: para +#: query_sql.xml:82 +#, no-c-format +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"ここまでのクエリは、すべてスカラー値を返すものでした。 基本的に、リザルトセッ" +"トから「未加工」の値を返します。 以降では、addEntity() に" +"より、ネイティブSQLクエリから エンティティオブジェクトを取得する方法を示しま" +"す。" + +#. Tag: programlisting +#: query_sql.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:97 +#, no-c-format +msgid "the entity returned by the query" +msgstr "クエリが返すエンティティとSQLテーブルの別名" + +#. Tag: para +#: query_sql.xml:101 +#, no-c-format +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"CatがID, NAME, BIRTHDATEのカラムを使ってクラスにマッピングされる場合、 上記の" +"クエリはどちらも、要素がCatエンティティであるリストを返します。" + +#. Tag: para +#: query_sql.xml:105 +#, no-c-format +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"エンティティを別のエンティティに 多対一 でマッピングしてい" +"る場合は、 ネイティブクエリを実行する際に、この別のエンティティを返すことも要" +"求します。 さもなければ、データベース固有の「column not found(カラムが見つか" +"りません)」エラーが発生します。 * 表記を使用した際は、追加のカラムが自動的に" +"返されますが、 次の例のように、Dog多対一 であることを 明示することを私たちは好みます。" + +#. Tag: programlisting +#: query_sql.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:115 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "これにより cat.getDog() が正しく機能します。" + +#. Tag: title +#: query_sql.xml:119 +#, no-c-format +msgid "Handling associations and collections" +msgstr "関連とコレクションの操作" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"プロキシを初期化するための余分な処理を避けるため、 Dog の" +"中で即時結合できます。 これは addJoin() メソッドにより行い" +"ます。 関連もしくはコレクションに結合できます。" + +#. Tag: programlisting +#: query_sql.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:128 +#, no-c-format +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"この例の中で、返される Cat は、 データベースへの余分処理な" +"しで、 完全に初期化された dog プロパティを持ちます。 結合" +"対象のプロパティへのパスを指定できるように、 別名(「cat」)を追加したことに" +"注意してください。 コレクションの即時結合も同じようにできます。 たとえば、" +"Cat が一対多で Dog を持っていた場合、次" +"のようになります。" + +#. Tag: programlisting +#: query_sql.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:138 +#, no-c-format +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"現在のところ、 Hibernateで使いやすくするためのSQLクエリの拡張なしに、 ネイ" +"ティブクエリで何かを可能にする限界に来ています。 同じ型のエンティティを複数返" +"す際や、デフォルトの別名や列名で十分ではない場合に、 問題は起こり始めます。" + +#. Tag: title +#: query_sql.xml:146 +#, no-c-format +msgid "Returning multiple entities" +msgstr "複数エンティティの取得" + +#. Tag: para +#: query_sql.xml:148 +#, no-c-format +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"ここまでは、リザルトセットのカラム名は、 マッピングファイルで指定されたカラム" +"名と同じであると仮定していました。 複数のテーブルが同じカラム名を持つ場合があ" +"るため、 複数テーブルを結合するSQLクエリで問題となる場合があります。" + +#. Tag: para +#: query_sql.xml:153 +#, no-c-format +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "" +"下記のような(失敗しそうな)クエリでは、 カラム別名インジェクション(column " +"alias injection)が必要です。" + +#. Tag: programlisting +#: query_sql.xml:156 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:158 +#, no-c-format +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"このクエリの意図は、 1行ごとに2つのCatインスタンス、つまり猫とその母親を返" +"すということです。 同じカラム名にマッピングすることにより名前が衝突するため、" +"このクエリは失敗します。 ベータベースによっては、返されるカラムの別名が \"c." +"ID\"、\"c.NAME\" などの形式であり、 マッピングで指定されたカラム(\"ID\" と " +"\"NAME\")と等しくないため、失敗します。" + +#. Tag: para +#: query_sql.xml:165 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "下記の形式は、カラム名が重複しても大丈夫です。" + +#. Tag: programlisting +#: query_sql.xml:168 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:174 +#, no-c-format +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "" +"SQLクエリ文字列 (Hibernateがカラムの別名を挿入するためのプレースホルダを含" +"む)" + +#. Tag: para +#: query_sql.xml:179 +#, no-c-format +msgid "the entities returned by the query" +msgstr "クエリによって返されるエンティティ" + +#. Tag: para +#: query_sql.xml:183 +#, no-c-format +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." +msgstr "" +"上記で使用している {cat.*} と {mother.*} という表記は、 「すべてのプロパ" +"ティ」を表す省略形です。 代わりに、明示的にカラムを列挙してもよいですが、 そ" +"の場合は、Hibernateに各プロパティに対応するSQLカラムの別名を挿入させるべきで" +"しょう。 カラムの別名のためのプレースホルダは、テーブルの別名によって修飾され" +"たプロパティ名です。 下記の例では、別のテーブル cat_log から マッピングメタ" +"データで定義された Cat とその母親を復元します。 もし好むなら、where節の中で" +"も、プロパティの別名を使えます。" + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:195 +#, no-c-format +msgid "Alias and property references" +msgstr "別名とプロパティのリファレンス" + +#. Tag: para +#: query_sql.xml:197 +#, no-c-format +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"多くの場合、上記のような別名インジェクションが必要です。 ただし、複合プロパ" +"ティ、継承識別子、コレクションなどのような より複雑なマッピングと関連するクエ" +"リがなければです。 ある特定の別名を使用することにより、Hibernateは適切な別名" +"を挿入できます。" + +#. Tag: para +#: query_sql.xml:202 +#, no-c-format +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"別名インジェクションとして使用できるものを下表に示します。 注意:下表の別名は" +"一例です。 それぞれの別名は一意であり、使用する際にはおそらく異なる名前を持ち" +"ます。" + +#. Tag: title +#: query_sql.xml:208 +#, no-c-format +msgid "Alias injection names" +msgstr "別名に挿入する名前" + +#. Tag: entry +#: query_sql.xml:219 +#, no-c-format +msgid "Description" +msgstr "説明" + +#. Tag: entry +#: query_sql.xml:221 +#, no-c-format +msgid "Syntax" +msgstr "構文" + +#. Tag: entry +#: query_sql.xml:223 +#, no-c-format +msgid "Example" +msgstr "例" + +#. Tag: entry +#: query_sql.xml:229 +#, no-c-format +msgid "A simple property" +msgstr "単純なプロパティ" + +#. Tag: literal +#: query_sql.xml:231 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:233 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#. Tag: entry +#: query_sql.xml:237 +#, no-c-format +msgid "A composite property" +msgstr "複合プロパティ" + +#. Tag: literal +#: query_sql.xml:239 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:241 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#. Tag: entry +#: query_sql.xml:246 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "エンティティのクラスを識別する値" + +#. Tag: literal +#: query_sql.xml:248 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#. Tag: literal +#: query_sql.xml:250 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#. Tag: entry +#: query_sql.xml:254 +#, no-c-format +msgid "All properties of an entity" +msgstr "エンティティの全プロパティ" + +#. Tag: literal +#: query_sql.xml:256 query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#. Tag: literal +#: query_sql.xml:258 +#, no-c-format +msgid "{item.*}" +msgstr "{item.*}" + +#. Tag: entry +#: query_sql.xml:262 +#, no-c-format +msgid "A collection key" +msgstr "コレクションのキー" + +#. Tag: literal +#: query_sql.xml:264 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#. Tag: literal +#: query_sql.xml:266 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "The id of an collection" +msgstr "コレクションのID" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "The element of an collection" +msgstr "コレクションの要素" + +#. Tag: literal +#: query_sql.xml:280 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "コレクションの要素のプロパティ" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "コレクションの要素の全プロパティ" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "All properties of the the collection" +msgstr "コレクションの全プロパティ" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "{coll.*}" +msgstr "{coll.*}" + +#. Tag: title +#: query_sql.xml:315 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "管理されていないエンティティの取得" + +#. Tag: para +#: query_sql.xml:317 +#, no-c-format +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"ネイティブSQLクエリに ResultTransformer を適用できます。 下記のように、例え" +"ば、管理されていないエンティティを返します。" + +#. Tag: programlisting +#: query_sql.xml:319 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:329 +#, no-c-format +msgid "a result transformer" +msgstr "結果を変換したもの" + +#. Tag: para +#: query_sql.xml:333 +#, no-c-format +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"上記のクエリは、インスタンス化し、NAME と BIRTHDATE の値を 対応するプロパティ" +"もしくはフィールドに挿入した CatDTO のリストを返します。" + +#. Tag: title +#: query_sql.xml:340 +#, no-c-format +msgid "Handling inheritance" +msgstr "継承の制御" + +#. Tag: para +#: query_sql.xml:342 +#, no-c-format +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"継承の一部としてマッピングされたエンティティを問い合わせるネイティブSQLクエリ" +"は、 ベースのクラスとそのすべてのサブクラスのプロパティすべてを含まなければな" +"りません。" + +#. Tag: title +#: query_sql.xml:348 +#, no-c-format +msgid "Parameters" +msgstr "パラメータ" + +#. Tag: para +#: query_sql.xml:350 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "" +"ネイティブSQLクエリは、以下のように、 名前付きパラメータ(:name)と同様に位置" +"パラメータをサポートします。" + +#. Tag: programlisting +#: query_sql.xml:353 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:361 +#, no-c-format +msgid "Named SQL queries" +msgstr "名前付きSQLクエリ" + +#. Tag: para +#: query_sql.xml:363 +#, no-c-format +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"名前付きSQLクエリはマッピングドキュメントで定義することができ、 名前付きHQLク" +"エリと全く同じ方法で呼ぶことができます。 この場合、addEntity() を呼び出す必要は ない です。" + +#. Tag: programlisting +#: query_sql.xml:368 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:370 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:372 +#, no-c-format +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"関連を結合するためとコレクションを初期化するクエリを定義するために、それぞれ " +"<return-join><load-collection> 要素を使います。" + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:379 +#, no-c-format +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"名前付きSQLクエリはスカラ値を返すこともできます。 <return-" +"scalar> 要素を使って、 列の別名とHibernateの型を宣言しなければな" +"りません。" + +#. Tag: programlisting +#: query_sql.xml:383 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:385 +#, no-c-format +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"リザルトセットのマッピング情報を <resultset> に外出" +"しすることができます。 複数の名前付きクエリで再利用したり、" +"setResultSetMapping() APIを通して再利用したりできます。" + +#. Tag: programlisting +#: query_sql.xml:390 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:392 +#, no-c-format +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "" +"代わりに、hbmファイル内のリザルトセットのマッピング情報を 直接Javaコードの中" +"で使用できます。" + +#. Tag: programlisting +#: query_sql.xml:395 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:398 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "列と列の別名を明示的に指定するために return-property を使う" + +#. Tag: para +#: query_sql.xml:401 +#, no-c-format +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"別名を挿入するために {} 構文を使う代わりに、 <" +"return-property> を使い、 どの列の別名を使うのかを明示できます。" + +#. Tag: programlisting +#: query_sql.xml:406 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:408 +#, no-c-format +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property> は複数の列も扱えます。 これは、複" +"数列のプロパティをきめ細かく制御できないという、 {} 構文の" +"制限を解決します。" + +#. Tag: programlisting +#: query_sql.xml:413 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:415 +#, no-c-format +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"この例では、挿入のための {} 構文といっしょに、 " +"<return-property> を使っていることに注意してくださ" +"い。 列とプロパティをどのように参照するかを選べます。" + +#. Tag: para +#: query_sql.xml:420 +#, no-c-format +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"マッピングに discriminator が含まれている場合、 discriminator の列を指定する" +"ために、<return-discriminator> を使わなければなりません。" + +#. Tag: title +#: query_sql.xml:426 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "問い合わせするためにストアドプロシージャを使う" + +#. Tag: para +#: query_sql.xml:428 +#, no-c-format +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernateはバージョン3から、ストアドプロシージャとストアド関数経由の問い合わ" +"せが サポートされました。 以降の文書の多くは、両方に当てはまります。 ストアド" +"プロシージャやストアド関数をHibernateで使うためには、 1番目の出力パラメータと" +"してリザルトセットを返さなければなりません。 Oracle 9(もしくはそれ以上のバー" +"ジョン)のストアドプロシージャの例を以下に示します。" + +#. Tag: programlisting +#: query_sql.xml:434 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:436 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "" +"Hibernateでこのクエリを使うためには、 名前付きクエリでマッピングする必要があ" +"ります。" + +#. Tag: programlisting +#: query_sql.xml:439 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:441 +#, no-c-format +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"注意:今のところ、ストアドプロシージャはスカラとエンティティを返すのみです。 " +"<return-join><load-collection> はサポートされていません。" + +#. Tag: title +#: query_sql.xml:446 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "ストアドプロシージャを使う上でのルールと制限" + +#. Tag: para +#: query_sql.xml:448 +#, no-c-format +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"Hibernateでストアドプロシージャや関数を使うためには、 そのプロシージャはいく" +"つかのルールに準拠する必要があります。 ルールに準拠していないプロシージャは、" +"Hibernateで使うことはできません。 それでも、準拠していないプロシージャを使い" +"たいのであれば、 session.connection() を通じて実行しなけれ" +"ばなりません。 ルールはデータベースごとに異なります。 ストアドプロシージャの" +"セマンティックスとシンタックスは、 データベースベンダごとに異なるためです。" + +#. Tag: para +#: query_sql.xml:455 +#, no-c-format +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"setFirstResult()/setMaxResults() を使って、 ストアドプロ" +"シージャクエリをページ分けすることはできません。" + +#. Tag: para +#: query_sql.xml:458 +#, no-c-format +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "" +"推奨する呼び出し方は、標準であるSQL92に従うことです。 { ? = call " +"functionName(<parameters>) }{ ? = call " +"procedureName(<parameters>) } です。 ネイティブな呼び出し構文" +"はサポートされていません。" + +#. Tag: para +#: query_sql.xml:463 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "Oracleには下記のルールが適用されます。" + +#. Tag: para +#: query_sql.xml:467 +#, no-c-format +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"関数はリザルトセットを返さなければなりません。 プロシージャの第一引数はリザル" +"トセットを返すため、 OUT でなければなりません。 Oracle 9と" +"10では、SYS_REFCURSOR を使うことによってできます。 Oracle" +"では REF CURSOR 型を定義する必要があります。 Oracleの文献" +"を参照してください。" + +#. Tag: para +#: query_sql.xml:476 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "SybaseとMS SQLサーバーに適用されるルールを下記に示します。" + +#. Tag: para +#: query_sql.xml:480 +#, no-c-format +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"プロシージャはリザルトセットを返さなければなりません。 サーバーは複数のリザル" +"トセットと更新カウントを返しますが、 Hibernateは1つ目のリザルトセットだけを返" +"すことに注意してください。 その他はすべて捨てられます。" + +#. Tag: para +#: query_sql.xml:488 +#, no-c-format +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"プロシージャの中で SET NOCOUNT ON を有効にできれば、 おそ" +"らく効率がよくなるでしょう。 しかし、これは必要条件ではありません。" + +#. Tag: title +#: query_sql.xml:498 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "作成、更新、削除のためのカスタムSQL" + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3は作成、更新、削除処理のためのカスタムSQL文を使用できます。 クラス" +"とコレクションの永続化機構は、コンフィグレーション時に生成された文字列 " +"(insertsql、deletesql、updatesqlなど)のセットをすでに保持しています。 これ" +"らの文字列より、 <sql-insert><sql-" +"delete><sql-update> というマッピング" +"タグが優先されます。" + +#. Tag: programlisting +#: query_sql.xml:508 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:510 +#, no-c-format +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"SQLを直接データベースで実行するため、好みの方言を自由に使用できます。 データ" +"ベース独自のSQLを使えば、当然マッピングのポータビリティが下がります。" + +#. Tag: para +#: query_sql.xml:514 +#, no-c-format +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "" +"callable 属性をセットすれば、 ストアドプロシージャを使用で" +"きます。" + +#. Tag: programlisting +#: query_sql.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:519 +#, no-c-format +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "" +"今のところ、位置パラメータの順番はとても重要です。 すなわち、Hibernateが期待" +"する順序でなければなりません。" + +#. Tag: para +#: query_sql.xml:522 +#, no-c-format +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"org.hiberante.persister.entity レベルのデバッグログを 有効" +"にすることによって、期待される順番を確かめられます。 このレベルを有効にするこ" +"とにより、エンティティの作成、更新、削除などで 使用される静的なSQLが出力され" +"ます。 (期待される順序を確認するためには、Hibernateが生成する静的なSQLをオー" +"バーライドする カスタムSQLをマッピングファイルに含めないことを忘れないでくだ" +"さい。)" + +#. Tag: para +#: query_sql.xml:529 +#, no-c-format +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"ストアドプロシージャは挿入/更新/削除された行数を返す必要があります (読み込み" +"の場合は、返さないよりは返す方がよいです)。 実行時にHibernateがSQL文の成功を" +"チェックするからです。 Hibernateは、CUD処理のための数値の出力パラメータとし" +"て、 SQL文の最初のパラメータをいつも記録します。" + +#. Tag: programlisting +#: query_sql.xml:535 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:539 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "ロードのためのカスタムSQL" + +#. Tag: para +#: query_sql.xml:541 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" +"エンティティを読み込むための独自のSQL(もしくはHQL)クエリも宣言できます。" + +#. Tag: programlisting +#: query_sql.xml:544 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "" +"これは、まさに(以前議論した)名前付きクエリの宣言です。 この名前付きクエリを" +"クラスのマッピングから参照できます。" + +#. Tag: programlisting +#: query_sql.xml:549 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:551 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "これはストアドプロシージャでさえも動作します。" + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "次のように、コレクションをロードするためのクエリさえ定義してよいです。" + +#. Tag: programlisting +#: query_sql.xml:555 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:557 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:559 +#, no-c-format +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "" +"次のように、結合フェッチによりコレクションをロードする エンティティローダーを" +"定義できます。" + +#. Tag: programlisting +#: query_sql.xml:562 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/quickstart.po b/documentation/envers/src/main/docbook/ja-JP/content/quickstart.po new file mode 100644 index 0000000000..cd14d33057 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/quickstart.po @@ -0,0 +1,12 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ja-JP/content/session_api.po b/documentation/envers/src/main/docbook/ja-JP/content/session_api.po new file mode 100644 index 0000000000..234a52cf2d --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/session_api.po @@ -0,0 +1,2218 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:5 +#, no-c-format +msgid "Working with objects" +msgstr "オブジェクトを扱う" + +#. Tag: para +#: session_api.xml:7 +#, no-c-format +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"Hibernate は完全なオブジェクト/リレーショナルマッピングソリューションであ" +"り、 データベース管理システムの詳細を開発者から隠蔽するだけでなく、 オブジェ" +"クトの 状態管理 も行います。 これは、JDBC/SQL永続層と同" +"じようなSQL の管理とは異なり、 Javaアプリケーションにお" +"ける永続化に対する、とても自然なオブジェクト指向の考え方を提供します。" + +#. Tag: para +#: session_api.xml:16 +#, no-c-format +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"言いかえれば、Hibernateを用いるアプリケーション開発者は、オブジェクトの " +"状態 については 常に意識すべきであり、SQL文の実行につい" +"ては必ずしもそうではありません。 この部分は、通常、Hibernateが処理し、システ" +"ムのパフォーマンスをチューニングするときにだけ、 問題になってきます。" + +#. Tag: title +#: session_api.xml:24 +#, no-c-format +msgid "Hibernate object states" +msgstr "Hibernateにおけるオブジェクトの状態" + +#. Tag: para +#: session_api.xml:26 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "Hibernateは次のようなオブジェクトの状態を定義し、サポートしています。" + +#. Tag: para +#: session_api.xml:32 +#, no-c-format +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +" 一時的(Transient) - new 演算子を" +"使って インスタンス化されただけで、 Hibernateの Session に" +"関連付けられていないオブジェクトは、 一時的(transient)です。 それは、データ" +"ベースに永続的な表現を持たず、識別子となる値は割り当てられていません。 一時的" +"なインスタンスは、アプリケーションがその参照をどこにも保持しない場合に、 ガ" +"ベージコレクタによって破棄されます。 オブジェクトを永続的(persistent)な状態に" +"するためには、Hibernateの Session を使いましょう。 (この" +"状態遷移に必要となるSQL文の発行は、Hibernateに任せましょう。)" + +#. Tag: para +#: session_api.xml:44 +#, no-c-format +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"永続的(Persistent) - 永続的なインスタンスはデータベース" +"に 永続的な表現を持ち、識別子となる値を持っています。 それは、セーブされた" +"り、ロードされたりするかもしれませんが、 定義上は、 Session のスコープの中に存在しています。 Hibernateは、作業単位(Unit of " +"work)が完了したときに、 永続状態のオブジェクトに加えられた変更を検出し、 オ" +"ブジェクトの状態とデータベースを同期します。 オブジェクトを一時的(transient)" +"にするときは、開発者は、手作業で UPDATE 文や " +"DELETE 文を実行しません。" + +#. Tag: para +#: session_api.xml:55 +#, no-c-format +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"分離(Detached) - 分離されたインスタンスとは、永続化され" +"ているが、 それと関連付いていた Session がクローズされてい" +"るオブジェクトのことです。 そのオブジェクトへの参照は、依然として有効です。 " +"そして、もちろん、分離された状態にあるオブジェクトは、修正することさえできま" +"す。 分離されたインスタンスは、もう一度永続化したい(そして、すべての変更を永" +"続化したい)ときに、 新しい Session に再追加できます。 こ" +"の機能は、ユーザが考える時間を必要とするような、長期間に及ぶ作業単位に対する " +"プログラミングモデルを可能にします。 我々は、これを アプリケーショ" +"ンのトランザクション(application transactions) と呼んでいます。 " +"すなわち、ユーザから見た作業単位だということです。" + +#. Tag: para +#: session_api.xml:69 +#, no-c-format +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"これから、状態と状態遷移(そして、遷移のきっかけとなるHibernateのメソッド)に" +"ついて 、詳細に述べます。" + +#. Tag: title +#: session_api.xml:77 +#, no-c-format +msgid "Making objects persistent" +msgstr "オブジェクトを永続状態にする" + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"新しくインスタンス化された永続クラスのインスタンスは、 Hibernateでは " +"一時的(transient) と見なされます。 以下のように、セッ" +"ションと関連づけることで、一時的なインスタンスを 永続状態" +"(persistent) にできます。" + +#. Tag: programlisting +#: session_api.xml:86 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:88 +#, no-c-format +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"Cat クラスの識別子が自動生成されるのであれば、 " +"save() が呼ばれるときに、 識別子が生成され、 " +"cat インスタンスに割り当てられます。 Cat の識別子が他から割り当てられる( assigned 識別子" +"を持つ)か、複合キーであるなら、 save() を呼び出す前に、識" +"別子を割り当てなければなりません。 save() の代わりに、" +"EJB3 の初期ドラフトで定義された persist() を使うことも可能" +"です。" + +#. Tag: para +#: session_api.xml:100 +#, no-c-format +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." + +#. Tag: para +#: session_api.xml:111 +#, no-c-format +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#. Tag: para +#: session_api.xml:121 +#, no-c-format +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "" +"代わりに、識別子を引数にとる save() メソッドを使って、 識" +"別子を割り当てることもできます。" + +#. Tag: programlisting +#: session_api.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:128 +#, no-c-format +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"永続化するオブジェクトが関連オブジェクトを持っている場合 (例えば、前の例にお" +"ける kittens コレクションのように)、 外部キーカラムに、 " +"NOT NULL 制約をつけない限りは、 これらの一連のオブジェクト" +"をどんな順番で永続化してもかまいません。 外部キー制約を違反する恐れはありませ" +"ん。 しかし、 NOT NULL 制約がある場合、間違った順番でオブ" +"ジェクトを save() してしまうと、 制約に違反するかもしれま" +"せん。" + +#. Tag: para +#: session_api.xml:138 +#, no-c-format +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"関連するオブジェクトを自動的に保存する、 Hibernateの 遷移的な永続化" +"(transitive persistence) 機能を 使うつもりならば、そのような詳細を" +"気にする必要はありません。 そして、 NOT NULL 制約の違反す" +"ら起こりません。 Hibernateがすべて面倒をみてくれます。遷移的な永続化は、この" +"章の後半に書かれています。" + +#. Tag: title +#: session_api.xml:149 +#, no-c-format +msgid "Loading an object" +msgstr "オブジェクトのロード" + +#. Tag: para +#: session_api.xml:151 +#, no-c-format +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"永続化されたインスタンスの識別子があらかじめ分かっているなら、 " +"Sessionload() メソッドを使って、復" +"元できます。 load() は、Class オブジェクトを引数にとり、 " +"そのクラスのインスタンスを新たに生成し、状態をロードします。 そのインスタンス" +"の状態は、永続(persistent)状態です。" + +#. Tag: programlisting +#: session_api.xml:158 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "" +"あるいは、以下のように、既存のインスタンスに状態をロードすることもできます。" + +#. Tag: programlisting +#: session_api.xml:166 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:168 +#, no-c-format +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"DBに該当する行が無い場合、 load() は回復不可能な例外を 投" +"げることに注意しましょう。 そのクラスがプロキシを使ってマッピングされている場" +"合、 load() は初期化されていないプロキシを返し、プロキシの" +"メソッドが呼ばれるまで実際には データベースにアクセスしません。 もし、実際に" +"データベースからロードせずに、オブジェクトに対する関連を作りたい場合、 この振" +"る舞いはとても役立ちます。 batch-size がクラスマッピングに" +"定義されているならば、 複数のインスタンスを一括でロードすることが可能です。" + +#. Tag: para +#: session_api.xml:179 +#, no-c-format +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"該当する行が存在することを確信できない場合は、 get() メ" +"ソッドを使うべきです。 それは、データベースにすぐにアクセスし、該当する行が無" +"い場合はnullを返します。" + +#. Tag: programlisting +#: session_api.xml:185 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:187 +#, no-c-format +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"LockMode を使えば、 SELECT ... FOR UPDATEというSQLを 使ってオブジェクトをロードすることができます。 詳細な情報" +"は、APIドキュメントを参照してください。" + +#. Tag: programlisting +#: session_api.xml:192 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:194 +#, no-c-format +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"関連に対するカスケード方法として lockall を 指定しない限り、関連するインスタンスや含まれるコレクションは " +"FOR UPDATE で復元 されない ことに注意" +"しましょう。" + +#. Tag: para +#: session_api.xml:201 +#, no-c-format +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"refresh() メソッドを使うことで、どんなときでも、オブジェク" +"トやそのコレクションを リロードすることができます。 データベースのトリガが" +"テーブルを更新した際に、 そのテーブルに対応するオブジェクトのプロパティを同期" +"する場合、このメソッドが役に立ちます。" + +#. Tag: programlisting +#: session_api.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:209 +#, no-c-format +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"大切な問題は、いつも次の点に関するものです。それは、Hibernateがデータベースか" +"ら、 どのくらいの量を復元するのかと、どのくらいの数のSQLの SELECT 文が使われるのかです。 これは、 フェッチの戦略 " +"によります。これについては、 で説明し" +"ています。" + +#. Tag: title +#: session_api.xml:219 +#, no-c-format +msgid "Querying" +msgstr "クエリ" + +#. Tag: para +#: session_api.xml:221 +#, no-c-format +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"探したいオブジェクトの識別子が分からない場合は、クエリが必要になります。 " +"Hibernateは使いやすくて強力なオブジェクト指向のクエリ言語 (HQL)をサポートして" +"います。 プログラムによってクエリが作成できるように、Hibernateは洗練された" +"CriteriaとExampleクエリ機能(QBCとQBE)を サポートしています。ResultSetをオブ" +"ジェクトに変換するHibernateのオプション機能を使うことで、 データベースのネイ" +"ティブなSQLでクエリを表現することもできます。" + +#. Tag: title +#: session_api.xml:231 +#, no-c-format +msgid "Executing queries" +msgstr "クエリの実行" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"HQLやネイティブなSQLクエリは、 org.hibernate.Query のイン" +"スタンスとして表現されます。 このインタフェースは、パラメータバインディングや" +"ResultSetのハンドリングや クエリの実行を行うメソッドを用意しています。 通" +"常、 Query は、以下に示すように、 その時点の " +"Session を使って取得します。" + +#. Tag: programlisting +#: session_api.xml:240 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:242 +#, no-c-format +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"クエリは、普通、 list() を呼び出すことによって実行されま" +"す。 クエリの結果は、メモリ上にあるコレクションにすべてロードされます。 クエ" +"リによって復元されたエンティティのインスタンスは、永続状態です。 もし、クエリ" +"がたった1個のインスタンスを返すと分かっているなら、 uniqueResult() メソッドが手っ取り早い方法です。 即時フェッチを利用したクエリの場" +"合、ふつう、得られたコレクションには、 ルートのオブジェクトが重複して含まれて" +"います (しかし、ルートが持つコレクションは初期化(ロード)されています)。 こ" +"の重複は Set を使って取り除くことができます。" + +#. Tag: title +#: session_api.xml:254 +#, no-c-format +msgid "Iterating results" +msgstr "結果をイテレートする" + +#. Tag: para +#: session_api.xml:256 +#, no-c-format +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"時々、 iterate() メソッドを使ってクエリを実行することで、 " +"より良いパフォーマンスを得ることができます。 これは、通常、クエリによって得ら" +"れた実際のエンティティのインスタンスが、 すでにセッションまたは二次キャッシュ" +"に存在することが期待できる場合だけです。 それらが、まだキャッシュされていない" +"なら、 iterate() は、 list() よりも遅" +"く、簡単なクエリに対しても多くのデータベースアクセスを 必要とします。そのアク" +"セスとは、識別子だけを取得するための最初のselect1回と、 実際のインスタンスを" +"初期化するために後から行うn回のselectのことです。" + +#. Tag: programlisting +#: session_api.xml:268 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:272 +#, no-c-format +msgid "Queries that return tuples" +msgstr "オブジェクトの組(tuple)を返すクエリ" + +#. Tag: para +#: session_api.xml:274 +#, no-c-format +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"Hibernateのクエリでは、時々、オブジェクトの組を返すことがあります。 その場合" +"は、各タプルは配列として返されます。" + +#. Tag: programlisting +#: session_api.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:284 +#, no-c-format +msgid "Scalar results" +msgstr "スカラーの結果" + +#. Tag: para +#: session_api.xml:286 +#, no-c-format +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"クエリでは、 select 節でクラスのプロパティを指定できま" +"す。 SQLの集合関数を呼ぶこともできます。プロパティや集合関数は、 (永続状態の" +"エンティティではなく)「スカラー値」であると見なされます。" + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:297 +#, no-c-format +msgid "Bind parameters" +msgstr "パラメータのバインド" + +#. Tag: para +#: session_api.xml:299 +#, no-c-format +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"Query は、名前付きのパラメータやJDBCスタイルの ?" +" パラメータに値をバインドするためのメソッドを持っています。 " +"JDBCとは違い、Hibernateはパラメータにゼロから番号を振っていきます。" +" 名前付きのパラメータとは、クエリ文字列のなかにある :" +"name 形式の識別子です。 名前付きパラメータの利点は次の通りです。" + +#. Tag: para +#: session_api.xml:309 +#, no-c-format +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "名前付きパラメータは、クエリ文字列に登場する順番と無関係です" + +#. Tag: para +#: session_api.xml:315 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "同じクエリ内に複数回登場することができます" + +#. Tag: para +#: session_api.xml:320 +#, no-c-format +msgid "they are self-documenting" +msgstr "自分自身を説明します" + +#. Tag: programlisting +#: session_api.xml:326 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:328 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:330 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:335 +#, no-c-format +msgid "Pagination" +msgstr "ページ分け" + +#. Tag: para +#: session_api.xml:337 +#, no-c-format +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"ResultSetに制限(復元したい最大行数や復元したい最初の行)を加える必要があれ" +"ば、 以下のように、 Query インターフェイスのメソッドを使い" +"ます。" + +#. Tag: programlisting +#: session_api.xml:343 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:345 +#, no-c-format +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"制限付きのクエリをDBMSのネイティブなSQLに変換する方法を、Hibernateは知ってい" +"ます。" + +#. Tag: title +#: session_api.xml:353 +#, no-c-format +msgid "Scrollable iteration" +msgstr "スクロール可能なイテレーション" + +#. Tag: para +#: session_api.xml:355 +#, no-c-format +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"JDBCドライバがスクロール可能な ResultSet をサポートしてい" +"れば、 Query インターフェイスを使って、 " +"ScrollableResults オブジェクトを 取得できます。それを使う" +"と、クエリの結果に対して柔軟にナビゲーションできます。" + +#. Tag: programlisting +#: session_api.xml:362 +#, no-c-format +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:364 +#, no-c-format +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"この機能にはオープン状態のデータベースコネクションが必要であることに注意して" +"ください。 もし、オフラインのページ分け機能が必要であれば、 " +"setMaxResult() / setFirstResult() を使" +"いましょう。" + +#. Tag: title +#: session_api.xml:373 +#, no-c-format +msgid "Externalizing named queries" +msgstr "名前付きクエリの外出し" + +#. Tag: para +#: session_api.xml:375 +#, no-c-format +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"マッピングドキュメントに名前付きのクエリを定義することができます。 (マーク" +"アップと解釈される文字がクエリに含まれるなら、 CDATA セク" +"ションを 使うことを忘れないようにしましょう。)" + +#. Tag: programlisting +#: session_api.xml:381 +#, no-c-format +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:383 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "" +"パラメータのバインディングと実行は、以下のようなプログラムで行われます。" + +#. Tag: programlisting +#: session_api.xml:387 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:389 +#, no-c-format +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"実際のプログラムコードは、使われるクエリ言語に依存していないことに注意しま" +"しょう。 メタデータには、ネイティブSQLクエリを定義することもできます。 また、" +"既存のクエリをマッピングファイルに移すことで、 Hibernateに移行することもでき" +"ます。" + +#. Tag: para +#: session_api.xml:395 +#, no-c-format +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"<hibernate-mapping> の中のクエリ定義は、クエリに対す" +"る ユニークな名前が必要なことにも注意してください。それに対して、 " +"<class> の中の クエリ定義は、クラスの完全限定名が前" +"に付けられるので、自動的にユニークな名前になります。 例: eg.Cat." +"ByNameAndMaximumWeight" + +#. Tag: title +#: session_api.xml:408 +#, no-c-format +msgid "Filtering collections" +msgstr "コレクションのフィルタリング" + +#. Tag: para +#: session_api.xml:409 +#, no-c-format +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"コレクション フィルタ は、永続化されているコレクションや" +"配列に適用される 特殊なタイプのクエリです。そのクエリ文字列では、コレクション" +"のその時点での要素を意味する this を使います。" + +#. Tag: programlisting +#: session_api.xml:415 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:417 +#, no-c-format +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"返されるコレクションはBagとみなされます。そして、それはもとのコレクションのコ" +"ピーになります。 元のコレクションは修正されません(これは、\"filter\"という名" +"前の意味とは異なりますが、 期待される動きとは一致しています)。" + +#. Tag: para +#: session_api.xml:423 +#, no-c-format +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"フィルタには from 節が不要であることに気づくでしょう(必要" +"なら、持つことも可能ですが)。 フィルタは、コレクションの要素自体を返して構い" +"ません。" + +#. Tag: programlisting +#: session_api.xml:428 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:430 +#, no-c-format +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"クエリを含まないフィルタも役に立ちます。 例えば、非常に大きなコレクションの部" +"分集合をロードするために使えます。" + +#. Tag: programlisting +#: session_api.xml:435 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:440 +#, no-c-format +msgid "Criteria queries" +msgstr "クライテリアのクエリ" + +#. Tag: para +#: session_api.xml:442 +#, no-c-format +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQLは非常に強力ですが、クエリ文字列を作るよりも、オブジェクト指向のAPIを使っ" +"て 動的にクエリを作る方を好む開発者もいます。 こういった場合のために、" +"Hibernateは直感的な Criteria クエリAPIを提供しています。" + +#. Tag: programlisting +#: session_api.xml:448 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:450 +#, no-c-format +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"CriteriaExample APIの詳細は、 " +" に述べられています。" + +#. Tag: title +#: session_api.xml:458 +#, no-c-format +msgid "Queries in native SQL" +msgstr "ネイティブSQLのクエリ" + +#. Tag: para +#: session_api.xml:460 +#, no-c-format +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"createSQLQuery() を使って、SQLでクエリを表現することもでき" +"ます。 そして、Hibernateに、ResultSet からオブジェクトへのマッピングをまかせ" +"ます。 session.connection() を呼べばどんなときでも、直接、" +"JDBC Connection を使用できることを覚えておきましょう。 も" +"し、Hibernate APIを使うのであれば、下記のようにSQLの別名を括弧でくくらなけれ" +"ばなりません。" + +#. Tag: programlisting +#: session_api.xml:468 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:470 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:472 +#, no-c-format +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"SQLクエリは、Hibernateクエリと同じように、名前付きのパラメータと位置パラメー" +"タを持つことができます。 HibernateにおけるネイティブなSQLクエリの詳細について" +"は、 を参照してください。" + +#. Tag: title +#: session_api.xml:483 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "永続オブジェクトの修正" + +#. Tag: para +#: session_api.xml:485 +#, no-c-format +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"処理中の永続インスタンス (例: Session によって、 ロード、セーブ、作成、クエリされたオブジェクト)は、アプ" +"リケーションに操作されます。 その際に変更された永続状態は、 " +"Sessionフラッシュ されるときに、" +"永続化されます(これは、この章の後半で述べています)。 変更を永続化するため" +"に、特殊なメソッド( update() のようなもの。これは、別の目" +"的で使用します)を 呼ぶ必要はありません。 オブジェクトの状態を更新する一番簡" +"単な方法は、オブジェクトを load() し、 Session をオープンにしている間に、直接操作することです。" + +#. Tag: programlisting +#: session_api.xml:496 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:498 +#, no-c-format +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"(オブジェクトをロードするための)SQLの SELECT と(更新さ" +"れた状態を永続化するための) SQLの UPDATE が同じセッション" +"で必要となるので、このプログラミングモデルは、 効率が悪くなる場合がありま" +"す。 そのため、Hibernateは別の方法を用意しています。それは、インスタンスを分" +"離する(detached)方法です。" + +#. Tag: emphasis +#: session_api.xml:506 +#, fuzzy, no-c-format +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"Hibernateは、 文や 文を直接実行するAPIを用" +"意していません。 Hibernateは、 サービスであり、使われるSQL " +" のことを開発者が考える必要はありません。 JDBCはSQL文を実行す" +"る完璧なAPIであり、 を呼ぶことで いつでも、JDBC " +" を開発者は取得できます。 さらに、大量のデータ操作の考え方" +"は、オンライントランザクション処理向きアプリケーションの オブジェクト/リレー" +"ショナルマッピングと衝突します。 しかし、Hibernateの今後のバージョンでは、大" +"量データを処理する特別な機能を提供するかもしれません。 バッチ操作に利用できる" +"いくつかの工夫については、 を参照してください。" + +#. Tag: title +#: session_api.xml:521 +#, no-c-format +msgid "Modifying detached objects" +msgstr "分離オブジェクトの修正" + +#. Tag: para +#: session_api.xml:523 +#, no-c-format +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"多くのアプリケーションでは次のことが必要になります。 それは、あるトランザク" +"ションでオブジェクトを復元し、操作するためにそれをUI層に送り、 その後に、新し" +"いトランザクションで変更をセーブするといったことです。 並行性の高い環境で、こ" +"のタイプのアプローチを使うアプリケーションでは、 \"期間の長い\" 作業単位の隔" +"離性を保証するために、バージョンデータが通常使われます。" + +#. Tag: para +#: session_api.xml:530 +#, no-c-format +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernateは、 Session.update()Session.merge()" +" メソッドを 使って、分離インスタンスを再追加することで、このモデル" +"に対応します。" + +#. Tag: programlisting +#: session_api.xml:536 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:538 +#, no-c-format +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"識別子catId を持つ Cat が、既に " +"secondSession でロードされていた場合は、再追加しようとした" +"ときに、例外が投げられます。" + +#. Tag: para +#: session_api.xml:544 +#, no-c-format +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"同じ識別子を持つ永続インスタンスをセッションが既に保持していないことを 確信で" +"きるなら update() を使いましょう。 そして、セッションの状" +"態を考えずに、どんな場合でも変更をマージしたい場合は、 merge() を使いましょう。 すなわち、分離オブジェクトの再追加操作が、最初に実" +"行されることを確実にするために、 通常は update() が新しい" +"セッションのなかで最初に呼ばれるメソッドになります。" + +#. Tag: para +#: session_api.xml:553 +#, no-c-format +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"分離インスタンスから到達可能な、分離インスタンスをアプリケーションは個別に " +"update() すべきです。それは、その状態を更新したい場合に " +"限り ます。 遷移的な永続化 を使え" +"ば、もちろん自動化できます。 を参" +"照してください。" + +#. Tag: para +#: session_api.xml:560 +#, no-c-format +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"メソッドでもまた、新しいセッションにオブジェクトを再関連付けできます。 しか" +"し、分離インスタンスは無修正でなければなりません。" + +#. Tag: programlisting +#: session_api.xml:565 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:567 +#, no-c-format +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"lock() は、さまざまな LockMode とともに" +"使うことができます。 詳細は、APIドキュメントとトランザクション処理の章を参照" +"してください。 再追加のときにだけ、 lock() が使われるわけ" +"ではありません。" + +#. Tag: para +#: session_api.xml:574 +#, no-c-format +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"期間の長い作業単位の、その他のモデルは、 で述べています。" + +#. Tag: title +#: session_api.xml:581 +#, no-c-format +msgid "Automatic state detection" +msgstr "自動的な状態検出" + +#. Tag: para +#: session_api.xml:583 +#, no-c-format +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Hibernateのユーザは次の2つのケースのどちらにも使える汎用的なメソッドを要求し" +"ていました。 それは、新しい識別子を生成して一時的なインスタンスをセーブするこ" +"とと、 その時点の識別子と関連づいている分離インスタンスを更新/再追加すること" +"のできるメソッドです。 saveOrUpdate() はこのような機能を実" +"現したメソッドです。" + +#. Tag: programlisting +#: session_api.xml:590 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:592 +#, no-c-format +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"saveOrUpdate() の使用方法と意味は、 新しいユーザにとって混" +"乱を招くかもしれません。 まず第一に、あるセッションで使用したインスタンスを別" +"の新しいセッションで使おうとしない限り、 update() や " +"saveOrUpdate()merge() を使う必要は" +"ありません。 アプリケーション全体を通じて、これらのメソッドを全く使わないこと" +"もあります。" + +#. Tag: para +#: session_api.xml:600 +#, no-c-format +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"通常、 update()saveOrUpdate() は次" +"のシナリオで 使われます。" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "アプリケーションが最初のセッションでオブジェクトをロードします。" + +#. Tag: para +#: session_api.xml:612 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "オブジェクトがUI層に送られます。" + +#. Tag: para +#: session_api.xml:617 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "オブジェクトに対して変更が加えられます。" + +#. Tag: para +#: session_api.xml:622 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "オブジェクトがビジネスロジック層に送られます。" + +#. Tag: para +#: session_api.xml:627 +#, no-c-format +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "" +"アプリケーションは、2番目のセッションで update() を呼ぶこ" +"とで、これらの変更を永続化します。" + +#. Tag: para +#: session_api.xml:634 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate() は以下のことを行います。" + +#. Tag: para +#: session_api.xml:640 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "" +"オブジェクトがこのセッションで、すでに永続化されていれば、何もしません。" + +#. Tag: para +#: session_api.xml:645 +#, no-c-format +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"そのセッションに関連づいている別のオブジェクトが同じ識別子を持っているなら、 " +"例外を投げます。" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "" +"オブジェクトの識別子が値を持たないならば、 save() します。" + +#. Tag: para +#: session_api.xml:656 +#, no-c-format +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"オブジェクトの識別子が値を持ち、その値が新たにインスタンス化されたオブジェク" +"トのための値である場合、 そのオブジェクトを save() しま" +"す。" + +#. Tag: para +#: session_api.xml:662 +#, no-c-format +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"オブジェクトが( <version><" +"timestamp> によって) バージョンづけされていて、バージョンのプロ" +"パティが値を持ち、 その値が新しくインスタンス化されたオブジェクトのための値で" +"ある場合、 そのオブジェクトを save() します。" + +#. Tag: para +#: session_api.xml:670 +#, no-c-format +msgid "otherwise update() the object" +msgstr "" +"そうでない場合は、そのオブジェクトを update() します。" + +#. Tag: para +#: session_api.xml:676 +#, no-c-format +msgid "and merge() is very different:" +msgstr "そして、 merge() は以下のようにとても異なります。" + +#. Tag: para +#: session_api.xml:682 +#, no-c-format +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"同じ識別子を持つ永続化インスタンスがその時点でセッションと関連付いているなら" +"ば、 引数で受け取ったオブジェクトの状態を永続化インスタンスにコピーします。" + +#. Tag: para +#: session_api.xml:689 +#, no-c-format +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"永続化インスタンスがその時点でセッションに関連付いていないなら、 データベース" +"からそれをロードするか、あるいは、新しい永続化インスタンスを作成します。" + +#. Tag: para +#: session_api.xml:695 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "永続化インスタンスが返されます。" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "" +"引数として与えたインスタンスはセッションと関連を持ちません。 それは、分離状態" +"のままです。" + +#. Tag: title +#: session_api.xml:710 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "永続オブジェクトの削除" + +#. Tag: para +#: session_api.xml:712 +#, no-c-format +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"Session.delete() はオブジェクトの状態をデータベースから削" +"除します。 もちろん、削除したオブジェクトをアプリケーションが保持したままでも" +"よいです。 そのため、 delete() は永続インスタンスを一時的" +"にするものと考えるのが一番です。" + +#. Tag: programlisting +#: session_api.xml:719 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:721 +#, no-c-format +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"外部キー制約に違反するリスクもなく、好きな順番でオブジェクトを削除することが" +"できます。 ただし、間違った順番でオブジェクトを削除すると、外部キーカラムの " +"NOT NULL 制約に違反する可能性があります。 例えば、親オブ" +"ジェクトを削除したときに、子供オブジェクトを削除し忘れた場合です。" + +#. Tag: title +#: session_api.xml:732 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "異なる二つのデータストア間でのオブジェクトのレプリケーション" + +#. Tag: para +#: session_api.xml:734 +#, no-c-format +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"永続インスタンスのグラフを別のデータストアに永続化する場合に、 識別子の値を再" +"生成せずにすむと便利な場合があります。" + +#. Tag: programlisting +#: session_api.xml:740 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:742 +#, no-c-format +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"レプリケーション先のデータベースに行が既にある場合、 replicate() が衝突をどのように扱うかを ReplicationMode で指定" +"します。" + +#. Tag: para +#: session_api.xml:749 +#, no-c-format +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "" +"ReplicationMode.IGNORE - 同じ識別子を持つ行がデータベース" +"に存在するなら、 そのオブジェクトを無視します。" + +#. Tag: para +#: session_api.xml:755 +#, no-c-format +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "" +"ReplicationMode.OVERWRITE - 同じ識別子を持つ既存の行を す" +"べて上書きします。" + +#. Tag: para +#: session_api.xml:761 +#, no-c-format +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "" +"ReplicationMode.EXCEPTION - 同じ識別子を持つ行がデータベー" +"スに存在するなら、 例外を投げます。" + +#. Tag: para +#: session_api.xml:767 +#, no-c-format +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - 行に保存されているバー" +"ジョン番号が、 引数のオブジェクトのバージョン番号より古いならば、その行を上書" +"きします。" + +#. Tag: para +#: session_api.xml:775 +#, no-c-format +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"次のようなケースで、この機能を使用します。 異なるデータベースインスタンスに入" +"れられたデータの同期、 製品更新時におけるシステム設定情報の更新、非ACIDトラン" +"ザクションのなかで加えられた変更のロールバックなどです。" + +#. Tag: title +#: session_api.xml:784 +#, no-c-format +msgid "Flushing the Session" +msgstr "セッションのフラッシュ" + +#. Tag: para +#: session_api.xml:786 +#, no-c-format +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"JDBCコネクションの状態とメモリ上のオブジェクトの状態を同期させるために必要な " +"SQL文を Session が実行することがときどきあります。 この処" +"理 flush は、デフォルトでは次のときに起こります。" + +#. Tag: para +#: session_api.xml:795 +#, no-c-format +msgid "before some query executions" +msgstr "クエリを実行する前" + +#. Tag: para +#: session_api.xml:800 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "org.hibernate.Transaction.commit() を実行したとき" + +#. Tag: para +#: session_api.xml:805 +#, no-c-format +msgid "from Session.flush()" +msgstr "Session.flush() を実行したとき" + +#. Tag: para +#: session_api.xml:811 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "SQL文は以下の順番で発行されます。" + +#. Tag: para +#: session_api.xml:817 +#, no-c-format +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"すべてのエンティティの挿入。これは、 Session.save() を使っ" +"てセーブした オブジェクトの順に実行していきます。" + +#. Tag: para +#: session_api.xml:823 +#, no-c-format +msgid "all entity updates" +msgstr "すべてのエンティティの更新" + +#. Tag: para +#: session_api.xml:828 +#, no-c-format +msgid "all collection deletions" +msgstr "すべてのコレクションの削除" + +#. Tag: para +#: session_api.xml:833 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "すべてのコレクションの要素に対する削除、更新、挿入" + +#. Tag: para +#: session_api.xml:838 +#, no-c-format +msgid "all collection insertions" +msgstr "すべてのコレクションの挿入" + +#. Tag: para +#: session_api.xml:843 +#, no-c-format +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"すべてのエンティティの削除。これは、Session.delete() を" +"使って 削除したオブジェクトの順に実行していきます。" + +#. Tag: para +#: session_api.xml:850 +#, no-c-format +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(1つ例外があります。 native ID 生成を使ったオブジェクト" +"は、 それらがセーブされたときに挿入されます。)" + +#. Tag: para +#: session_api.xml:855 +#, no-c-format +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"明示的に flush() するときを除いて、 いつSession がJDBCをコールするのかについて 絶対的な保" +"証はありません。ただし、それらが実行される 順番 だけは " +"保証されます。 また、Hibernate は、 Query.list(..) が古い" +"データや間違ったデータ返さないことを 保証しています。" + +#. Tag: para +#: session_api.xml:863 +#, no-c-format +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"フラッシュが頻繁に起こらないようにデフォルトの振る舞いを変えることができま" +"す。 FlushMode クラスは3つの異なるモードを定義します。 そ" +"れは、コミット時にだけフラッシュするモード (Hibernateの " +"Transaction APIが使われる場合だけです)、 説明のあった処理" +"順に基づいて自動でフラッシュするモード、 flush() が明示的" +"に呼ばれない限りフラッシュしないモードの3つです。 最後のモードは、作業単位が" +"長期間に及ぶ場合に役に立ちます ( を参照してください)。" + +#. Tag: programlisting +#: session_api.xml:873 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:875 +#, no-c-format +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"フラッシュのとき、例外が発生するかもしれません。 (例えば、DML操作が制約を違" +"反するような場合です。) 例外処理を理解するためには、Hibernateのトランザク" +"ションの振る舞いを理解する必要があるため、 " +"で説明します。" + +#. Tag: title +#: session_api.xml:884 +#, no-c-format +msgid "Transitive persistence" +msgstr "連鎖的な永続化" + +#. Tag: para +#: session_api.xml:886 +#, no-c-format +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"個々のオブジェクトをセーブしたり、削除したり、再追加したりすることは かなり面" +"倒です。特に、関連するオブジェクトを扱うような場合には際立ちます。 よくあるの" +"は、親子関係を扱うケースです。 以下の例を考えてみましょう。" + +#. Tag: para +#: session_api.xml:892 +#, no-c-format +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"もし、親子関係の子が値型なら(例えば、住所や文字列のコレクション)、 それらの" +"ライフサイクルは親に依存しており、便利な状態変化の\"カスケード\"を使うため" +"に、 追加の作業は必要はありません。 親がセーブされたとき、値型の子オブジェク" +"トも同じようにセーブされますし、 親が削除されたときは、子も削除されます。その" +"他の操作も同じです。 コレクションから1つの子を削除するような操作でもうまくい" +"きます。 すなわち、Hibernateはこの削除操作を検出すると、 値型のオブジェクトは" +"参照を共有できないので、データベースからその子供を削除します。" + +#. Tag: para +#: session_api.xml:903 +#, no-c-format +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"ここで、親と子が値型でなくエンティティであるとして同じシナリオを考えてみま" +"しょう。 (例えば、カテゴリーと品目の関係や親と子の猫の関係です。) エンティ" +"ティは、それ自身がライフサイクルを持ち、参照の共有をサポートします。 (そのた" +"め、コレクションからエンティティを削除することは、 エンティティ自身の削除を意" +"味しません。) また、エンティティは、デフォルトでは、関連する他のエンティティ" +"へ 状態をカスケードすることはありません。 Hibernateは 到達可能性に" +"よる永続化 をデフォルトでは実行しません。" + +#. Tag: para +#: session_api.xml:912 +#, no-c-format +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"HibernateのSessionの基本操作( persist(), merge(), saveOrUpdate(), " +"delete(), lock(), refresh(), evict(), replicate() が含まれます)に" +"対して、 それぞれに対応するカスケードスタイルがあります。 それぞれのカスケー" +"ドスタイルには、 create, merge, save-update, delete, lock, refresh, " +"evict, replicate という名前がついています。 もし、関連に沿ってカス" +"ケードさせたい操作があるなら、マッピングファイルにそう指定しなければなりませ" +"ん。 例えば、以下のようにします。" + +#. Tag: programlisting +#: session_api.xml:921 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:923 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "カスケードスタイルは、組み合わせることができます。" + +#. Tag: programlisting +#: session_api.xml:927 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:929 +#, no-c-format +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"すべての 操作を関連に沿ってカスケードするよう指定すると" +"きは、 cascade=\"all\" を使います。 デフォルトの " +"cascade=\"none\" は、どの操作もカスケードしないことを意味" +"します。" + +#. Tag: para +#: session_api.xml:935 +#, no-c-format +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"特殊なカスケードスタイル delete-orphan は、一対多関連にだ" +"け 適用できます。 これは、関連から削除された子供のオブジェクトに対して、 " +"delete() 操作が適用されることを意味します。" + +#. Tag: para +#: session_api.xml:942 +#, no-c-format +msgid "Recommendations:" +msgstr "おすすめ:" + +#. Tag: para +#: session_api.xml:948 +#, no-c-format +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"普通、 <many-to-one><many-to-" +"many> 関連に対しては、 カスケードを設定する意味はありません。 " +"<one-to-one><one-to-many> 関連に対しては、 カスケードが役に立つことがあります。" + +#. Tag: para +#: session_api.xml:956 +#, no-c-format +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"子供オブジェクトの寿命が親オブジェクトの寿命に制限を受けるならば、 " +"cascade=\"all,delete-orphan\" を指定し、 子供オブジェクト" +"を ライフサイクルオブジェクト にします。" + +#. Tag: para +#: session_api.xml:963 +#, no-c-format +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +". それ以外の場合は、カスケードはほとんど必要ないでしょう。 しかし、同じトラン" +"ザクションのなかで親と子が一緒に動作することが多いと思い、 いくらかのコードを" +"書く手間を省きたいのであれば、 cascade=\"persist,merge,save-update" +"\" を使うことを考えましょう。" + +#. Tag: para +#: session_api.xml:971 +#, no-c-format +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"cascade=\"all\" でマッピングした関連(単値関連やコレクショ" +"ン)は、 親子 スタイルの関連とマークされます。 それは、" +"親のセーブ/更新/削除が、子のセーブ/更新/削除を引き起こす関係のことです。" + +#. Tag: para +#: session_api.xml:977 +#, no-c-format +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"さらに、永続化された親が子を単に参照しているだけで、子のセーブ/更新を引き起こ" +"します。 しかし、このメタファーは不完全です。親から参照されなくなった子は、自" +"動的に削除 されません 。 ただし、 cascade=" +"\"delete-orphan\" でマッピングされた <one-to-many> 関連を 除いてです。 親子関係のカスケード操作の正確な意味は以下のよう" +"になります。" + +#. Tag: para +#: session_api.xml:988 +#, no-c-format +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"親が persist() に渡されたならば、 すべての子は " +"persist() に渡されます。" + +#. Tag: para +#: session_api.xml:994 +#, no-c-format +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"merge() に渡されたならば、 すべての子は merge() に渡されます。" + +#. Tag: para +#: session_api.xml:1000 +#, no-c-format +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"親が save()update() 、 " +"saveOrUpdate() に渡されたならば、すべての子は " +"saveOrUpdate() に渡されます。" + +#. Tag: para +#: session_api.xml:1006 +#, no-c-format +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"一時的または分離状態の子が、永続化された親に参照されたならば、 " +"saveOrUpdate() に渡されます。" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "" +"親が削除されたならば、すべての子は、 delete() に渡されま" +"す。" + +#. Tag: para +#: session_api.xml:1017 +#, no-c-format +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"子が永続化された親から参照されなくなったときは、 特に何も起こりませ" +"ん 。 よって、アプリケーションが必要であれば、明示的に削除する必要" +"があります。 ただし、 cascade=\"delete-orphan\" の場合を除" +"きます。 この場合、「親のない」子は削除されます。" + +#. Tag: para +#: session_api.xml:1026 +#, no-c-format +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"最後に、操作のカスケードがオブジェクトグラフに適用されるのは、 コー" +"ルした時 あるいは、 flushした時 であることに" +"注意してください。 すべての操作は、その操作が実行されたときに、到達可能な関連" +"するエンティティに対して カスケードが可能ならカスケードします。 しかし、 " +"save-upatedelete-orphan は、 " +"Session がflushしている間に、 すべての到達可能な関連するエ" +"ンティティに伝播します。" + +#. Tag: title +#: session_api.xml:1038 +#, no-c-format +msgid "Using metadata" +msgstr "メタデータの使用" + +#. Tag: para +#: session_api.xml:1040 +#, no-c-format +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"Hibernateは、すべてのエンティティと値型の非常にリッチなメタレベルのモデルを必" +"要とします。 ときどき、このモデルはアプリケーションにとってとても役に立ちま" +"す。 例えば、アプリケーションは、Hibernateのメタデータを使って、\"賢い\" " +"ディープコピーアルゴリズムを 実装できるかもしません。そのアルゴリズムとは、ど" +"のオブジェクトがコピーされるべきか(例:可変の値型)や どのオブジェクトはコ" +"ピーされないべきか(例:不変な値型や可能なら関連するエンティティ)を 判断でき" +"るものです。" + +#. Tag: para +#: session_api.xml:1047 +#, no-c-format +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"HibernateはClassMetadataCollectionMetadata インタフェースと Type 階層を通してメタデータを公" +"開します。 メタデータインターフェイスのインスタンスは、 " +"SessionFactory から得られます。" + +#. Tag: programlisting +#: session_api.xml:1054 +#, no-c-format +msgid "" +"" +msgstr "" + +#~ msgid "UPDATE" +#~ msgstr "UPDATE" + +#~ msgid "DELETE" +#~ msgstr "DELETE" + +#~ msgid "state management" +#~ msgstr "状態管理" + +#~ msgid "statements" +#~ msgstr "文" + +#~ msgid "Connection" +#~ msgstr "session.connection()" + +#~ msgid "session.connection()" +#~ msgstr "Connection" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/toolset_guide.po b/documentation/envers/src/main/docbook/ja-JP/content/toolset_guide.po new file mode 100644 index 0000000000..c4284639d0 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/toolset_guide.po @@ -0,0 +1,1198 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:5 +#, no-c-format +msgid "Toolset Guide" +msgstr "Toolset Guide ツールセットガイド" + +#. Tag: para +#: toolset_guide.xml:7 +#, no-c-format +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"Hibernateを使ったラウンドトリップエンジニアリングは、 Eclipseプラグインやコマ" +"ンドラインツール、もちろんAntタスクを使うことで可能です。" + +#. Tag: para +#: toolset_guide.xml:12 +#, no-c-format +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"Hibernate Tools は現在、既存データベースのリバースエンジ" +"ニアリングのAntタスクに加えて、EclipseIDEのプラグインを含みます。" + +#. Tag: para +#: toolset_guide.xml:18 +#, no-c-format +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"マッピングエディタ: HibernateのXMLマッピングファイル用の" +"エディタで、 自動補完と構文強調表示をサポートしています。クラス名やプロパ" +"ティ/フィールド名に対する自動補完もサポートし、 通常のXMLエディタよりも強力で" +"す。" + +#. Tag: para +#: toolset_guide.xml:23 +#, no-c-format +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"Console: コンソールはエクリプスの新しいビューです。 コン" +"ソールコンフィギュレーションのツリーオーバービューに加えて、永続クラスとその" +"関連の相互作用ビューも得られます。 データベースにHQLを実行し、結果を直接エク" +"リプス上で見ることができます。" + +#. Tag: para +#: toolset_guide.xml:30 +#, no-c-format +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"開発ウィザード HibernateのEclipseツールはいくつかのウィ" +"ザードを提供します。 ウィザードを使ってHibernateの設定ファイル(cfg.xml)をすば" +"やく生成したり、 既存のデータベーススキーマをPOJOのソースファイルとHibernate" +"のマッピングファイルへと、 完全にリバースエンジニアリングすることができま" +"す。 リバースエンジニアリングウィザードはカスタマイズ可能なテンプレートをサ" +"ポートします。" + +#. Tag: emphasis +#: toolset_guide.xml:38 +#, no-c-format +msgid "Ant Tasks:" +msgstr "Ant Tasks:" + +#. Tag: para +#: toolset_guide.xml:43 +#, no-c-format +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"より詳しい情報は Hibernate Tools パッケージとそのドキュ" +"メントを参照してください。" + +#. Tag: para +#: toolset_guide.xml:48 +#, no-c-format +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"しかし、Hibernateのメインパッケージは SchemaExport 、 別" +"名 hbm2ddl も含みます(Hibernate内でオンザフライで使用でき" +"ます)。" + +#. Tag: title +#: toolset_guide.xml:55 +#, no-c-format +msgid "Automatic schema generation" +msgstr "スキーマの自動生成" + +#. Tag: para +#: toolset_guide.xml:57 +#, no-c-format +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"DDLはHibernateユーティリティによりマッピングファイルから生成することができま" +"す。 生成されたスキーマはエンティティやコレクションのテーブルに対する参照整合" +"性制約(主キーと外部キー)を含みます。 テーブルとシーケンスはマッピングする識別" +"子ジェネレータに対して生成されます。" + +#. Tag: para +#: toolset_guide.xml:64 +#, no-c-format +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"DDLはベンダー依存なので、このツールを使うときは、hibernate.dialect プロパティでSQLの 方言 を指定 しなけれ" +"ばなりません 。" + +#. Tag: para +#: toolset_guide.xml:70 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "" +"まず、生成されるスキーマを改善するように、マッピングファイルをカスタマイズし" +"てください。" + +#. Tag: title +#: toolset_guide.xml:75 +#, no-c-format +msgid "Customizing the schema" +msgstr "スキーマのカスタマイズ" + +#. Tag: para +#: toolset_guide.xml:77 +#, no-c-format +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"多くのHibernateのマッピング要素では、オプションの length " +"という名の属性を定義しています。 この属性でカラム長を設定することができます" +"(またはNUMERIC/DECIMAL型のデータの精度を設定できます)。" + +#. Tag: programlisting +#: toolset_guide.xml:84 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:85 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:87 +#, no-c-format +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"not-null 属性(テーブルのカラムへ NOT NULL 制約を生成する)と unique 属性(テーブルのカラム" +"へ UNIQUE 制約を生成する)が設定できるタグもあります。" + +#. Tag: programlisting +#: toolset_guide.xml:93 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:95 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:97 +#, no-c-format +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"unique-key 属性はカラムをグループ化して一つのキー制約にす" +"るために使われます。 現在、unique-key 属性で指定された値は" +"制約の指定には 使われず 、 マッピングファイルでカラムを" +"グループ化することにのみ使われます。" + +#. Tag: programlisting +#: toolset_guide.xml:105 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:107 +#, no-c-format +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"index 属性はマッピングするカラムを使って生成したインデック" +"スの名前を指定します。 複数カラムを1つのインデックスにグループ化できます。単" +"に、同じインデックス名を指定するだけです。" + +#. Tag: programlisting +#: toolset_guide.xml:113 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:115 +#, no-c-format +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"foreign-key 属性は、生成された外部キー制約の名前をオーバー" +"ライドするために使用できます。" + +#. Tag: programlisting +#: toolset_guide.xml:120 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:122 +#, no-c-format +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"多くのマッピング要素は、子 <column> 要素を記述できま" +"す。これは複数カラム型のマッピングには特に有用です。" + +#. Tag: programlisting +#: toolset_guide.xml:127 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:129 +#, no-c-format +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"default 属性はカラムのデフォルト値を指定します (マッピング" +"したクラスの新しいインスタンスを保存する前に、 マッピングしたプロパティへ同じ" +"値を代入すべきです)。" + +#. Tag: programlisting +#: toolset_guide.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"sql-type 属性で、デフォルトのHibernate型からSQLのデータ型" +"へのマッピングをオーバーライドできます。" + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "check 属性でチェック制約を指定することができます。" + +#. Tag: programlisting +#: toolset_guide.xml:150 +#, no-c-format +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:152 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:156 +#, no-c-format +msgid "Summary" +msgstr "まとめ" + +#. Tag: entry +#: toolset_guide.xml:163 +#, no-c-format +msgid "Attribute" +msgstr "属性" + +#. Tag: entry +#: toolset_guide.xml:164 +#, no-c-format +msgid "Values" +msgstr "値" + +#. Tag: entry +#: toolset_guide.xml:165 +#, no-c-format +msgid "Interpretation" +msgstr "説明" + +#. Tag: literal +#: toolset_guide.xml:170 +#, no-c-format +msgid "length" +msgstr "length" + +#. Tag: entry +#: toolset_guide.xml:171 toolset_guide.xml:176 toolset_guide.xml:181 +#, no-c-format +msgid "number" +msgstr "数値" + +#. Tag: entry +#: toolset_guide.xml:172 +#, no-c-format +msgid "column length" +msgstr "カラムの長さ" + +#. Tag: literal +#: toolset_guide.xml:175 +#, no-c-format +msgid "precision" +msgstr "precision" + +#. Tag: entry +#: toolset_guide.xml:177 +#, no-c-format +msgid "column decimal precision" +msgstr "カラムのDECIMAL型の精度(precision)" + +#. Tag: literal +#: toolset_guide.xml:180 +#, no-c-format +msgid "scale" +msgstr "scale" + +#. Tag: entry +#: toolset_guide.xml:182 +#, no-c-format +msgid "column decimal scale" +msgstr "カラムのDECIMAL型のスケール(scale)" + +#. Tag: literal +#: toolset_guide.xml:185 +#, no-c-format +msgid "not-null" +msgstr "not-null" + +#. Tag: literal +#: toolset_guide.xml:186 toolset_guide.xml:191 +#, no-c-format +msgid "true|false" +msgstr "true|false" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "カラムがnull値を取らないことを指定します" + +#. Tag: literal +#: toolset_guide.xml:190 +#, no-c-format +msgid "unique" +msgstr "unique" + +#. Tag: entry +#: toolset_guide.xml:192 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "カラムがユニーク制約を持つことを指定します" + +#. Tag: literal +#: toolset_guide.xml:195 +#, no-c-format +msgid "index" +msgstr "index" + +#. Tag: literal +#: toolset_guide.xml:196 +#, no-c-format +msgid "index_name" +msgstr "インデックス名" + +#. Tag: entry +#: toolset_guide.xml:197 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "(複数カラムの)インデックスの名前を指定します" + +#. Tag: literal +#: toolset_guide.xml:200 +#, no-c-format +msgid "unique-key" +msgstr "unique-key" + +#. Tag: literal +#: toolset_guide.xml:201 +#, no-c-format +msgid "unique_key_name" +msgstr "ユニークキー名" + +#. Tag: entry +#: toolset_guide.xml:202 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "複数カラムのユニーク制約の名前を指定します" + +#. Tag: literal +#: toolset_guide.xml:205 +#, no-c-format +msgid "foreign-key" +msgstr "foreign-key" + +#. Tag: literal +#: toolset_guide.xml:206 +#, no-c-format +msgid "foreign_key_name" +msgstr "外部キー名" + +#. Tag: entry +#: toolset_guide.xml:207 +#, fuzzy, no-c-format +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"specifies the name of the foreign key constraint generated for an " +"association, for a , , , or " +" mapping element. Note that sides will not " +"be considered by ." + +#. Tag: literal +#: toolset_guide.xml:217 +#, no-c-format +msgid "sql-type" +msgstr "sql-type" + +#. Tag: literal +#: toolset_guide.xml:218 +#, no-c-format +msgid "SQL column type" +msgstr "SQLのカラム型" + +#. Tag: entry +#: toolset_guide.xml:219 +#, fuzzy, no-c-format +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "" +"デフォルトのカラム型をオーバーライドします( 要素の属性のみ)" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "default" +msgstr "default" + +#. Tag: entry +#: toolset_guide.xml:226 toolset_guide.xml:233 +#, no-c-format +msgid "SQL expression" +msgstr "SQL式" + +#. Tag: entry +#: toolset_guide.xml:227 +#, no-c-format +msgid "specify a default value for the column" +msgstr "カラムのデフォルト値を指定します" + +#. Tag: literal +#: toolset_guide.xml:232 +#, no-c-format +msgid "check" +msgstr "check" + +#. Tag: entry +#: toolset_guide.xml:234 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "カラムかテーブルにSQLのチェック制約を作成します" + +#. Tag: para +#: toolset_guide.xml:242 +#, no-c-format +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"<comment> 要素で生成するスキーマにコメントを指定する" +"ことができます。" + +#. Tag: programlisting +#: toolset_guide.xml:247 +#, no-c-format +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:249 +#, no-c-format +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:251 +#, no-c-format +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"これにより、生成したDDLに comment on table や " +"comment on column 文が書かれます。" + +#. Tag: title +#: toolset_guide.xml:260 +#, no-c-format +msgid "Running the tool" +msgstr "ツールの実行" + +#. Tag: para +#: toolset_guide.xml:262 +#, no-c-format +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"SchemaExport は標準出力に対してDDLスクリプトを書き出し、" +"DDL文を実行したりもします。" + +#. Tag: para +#: toolset_guide.xml:267 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:273 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "" +"SchemaExport Command Line Options SchemaExport のコマンドラインオプション" + +#. Tag: entry +#: toolset_guide.xml:279 toolset_guide.xml:429 toolset_guide.xml:498 +#, no-c-format +msgid "Option" +msgstr "オプション" + +#. Tag: entry +#: toolset_guide.xml:280 toolset_guide.xml:367 toolset_guide.xml:430 +#: toolset_guide.xml:499 +#, no-c-format +msgid "Description" +msgstr "説明" + +#. Tag: literal +#: toolset_guide.xml:285 toolset_guide.xml:435 +#, no-c-format +msgid "--quiet" +msgstr "--quiet" + +#. Tag: entry +#: toolset_guide.xml:286 toolset_guide.xml:436 +#, fuzzy, no-c-format +msgid "don't output the script to stdout" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"スクリプトを標準出力に出力しません\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"標準出力にスクリプトを出力しません" + +#. Tag: literal +#: toolset_guide.xml:289 +#, no-c-format +msgid "--drop" +msgstr "--drop" + +#. Tag: entry +#: toolset_guide.xml:290 +#, no-c-format +msgid "only drop the tables" +msgstr "テーブルの削除だけを行います" + +#. Tag: literal +#: toolset_guide.xml:293 +#, no-c-format +msgid "--create" +msgstr "--create" + +#. Tag: entry +#: toolset_guide.xml:294 +#, no-c-format +msgid "only create the tables" +msgstr "テーブルの生成のみを行います。" + +#. Tag: literal +#: toolset_guide.xml:297 toolset_guide.xml:439 +#, no-c-format +msgid "--text" +msgstr "--text" + +#. Tag: entry +#: toolset_guide.xml:298 +#, no-c-format +msgid "don't export to the database" +msgstr "データベースにエクスポートしません" + +#. Tag: literal +#: toolset_guide.xml:301 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#. Tag: entry +#: toolset_guide.xml:302 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "DDLスクリプトをファイルに出力します" + +#. Tag: literal +#: toolset_guide.xml:305 toolset_guide.xml:443 toolset_guide.xml:504 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#. Tag: entry +#: toolset_guide.xml:306 toolset_guide.xml:444 toolset_guide.xml:505 +#, fuzzy, no-c-format +msgid "select a NamingStrategy" +msgstr "hibernate.properties ファイル内で" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:451 toolset_guide.xml:512 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#. Tag: entry +#: toolset_guide.xml:310 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "XMLファイルからHibernateの定義情報を読み込みます" + +#. Tag: literal +#: toolset_guide.xml:313 toolset_guide.xml:447 toolset_guide.xml:508 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#. Tag: entry +#: toolset_guide.xml:314 toolset_guide.xml:448 toolset_guide.xml:509 +#, fuzzy, no-c-format +msgid "read database properties from a file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ファイルからデータベースプロパティを読み込みます\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ファイルからデータベースプロパティを読み込みます\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"ファイルからデータベースのプロパティを読み込みます" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--format" +msgstr "--format" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "スクリプト内に生成するSQLを読みやすいようにフォーマットします" + +#. Tag: literal +#: toolset_guide.xml:321 +#, no-c-format +msgid "--delimiter=;" +msgstr "--delimiter=x" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "スクリプトの行区切り文字を設定します" + +#. Tag: para +#: toolset_guide.xml:328 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "" +"アプリケーションに SchemaExport を組み込むこともできます:" + +#. Tag: programlisting +#: toolset_guide.xml:332 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:337 +#, no-c-format +msgid "Properties" +msgstr "プロパティ" + +#. Tag: para +#: toolset_guide.xml:339 +#, no-c-format +msgid "Database properties may be specified" +msgstr "次のように、データベースのプロパティを指定することができます。" + +#. Tag: para +#: toolset_guide.xml:345 +#, no-c-format +msgid "" +"as system properties with -D<property>" +msgstr "" +"-D<property> を使って、システム" +"プロパティとして" + +#. Tag: para +#: toolset_guide.xml:348 +#, no-c-format +msgid "in hibernate.properties" +msgstr "hibernate.properties ファイル内で" + +#. Tag: para +#: toolset_guide.xml:351 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "--properties を使って指定したプロパティファイル内で" + +#. Tag: para +#: toolset_guide.xml:355 +#, no-c-format +msgid "The needed properties are:" +msgstr "必要なプロパティは以下のものです:" + +#. Tag: title +#: toolset_guide.xml:360 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "SchemaExportコネクションプロパティ" + +#. Tag: entry +#: toolset_guide.xml:366 +#, no-c-format +msgid "Property Name" +msgstr "プロパティ名" + +#. Tag: literal +#: toolset_guide.xml:372 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: entry +#: toolset_guide.xml:373 +#, no-c-format +msgid "jdbc driver class" +msgstr "jdbcのドライバークラス" + +#. Tag: literal +#: toolset_guide.xml:376 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: entry +#: toolset_guide.xml:377 +#, no-c-format +msgid "jdbc url" +msgstr "jdbcのurl" + +#. Tag: literal +#: toolset_guide.xml:380 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: entry +#: toolset_guide.xml:381 +#, no-c-format +msgid "database user" +msgstr "データベースのユーザ" + +#. Tag: literal +#: toolset_guide.xml:384 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: entry +#: toolset_guide.xml:385 +#, no-c-format +msgid "user password" +msgstr "ユーザパスワード" + +#. Tag: literal +#: toolset_guide.xml:388 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: toolset_guide.xml:389 +#, no-c-format +msgid "dialect" +msgstr "データベース方言" + +#. Tag: title +#: toolset_guide.xml:398 +#, no-c-format +msgid "Using Ant" +msgstr "Antを使用する" + +#. Tag: para +#: toolset_guide.xml:400 +#, no-c-format +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "" +"Antのビルドスクリプトから SchemaExport を呼び出すことがで" +"きます。:" + +#. Tag: programlisting +#: toolset_guide.xml:404 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:409 +#, no-c-format +msgid "Incremental schema updates" +msgstr "インクリメンタルなスキーマ更新" + +#. Tag: para +#: toolset_guide.xml:411 +#, no-c-format +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"SchemaUpdate ツールは既存のスキーマをインクリメンタルに更" +"新します。 SchemaUpdate はJDBCのメタデータAPIに強く依存し" +"ます。 そのため、すべてのJDBCドライバでうまくいくとは限らないことに注意してく" +"ださい。" + +#. Tag: para +#: toolset_guide.xml:417 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:423 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "SchemaUpdate のコマンドライン・オプション" + +#. Tag: entry +#: toolset_guide.xml:440 +#, no-c-format +msgid "don't export the script to the database" +msgstr "データベースにスクリプトをエクスポートしません" + +#. Tag: entry +#: toolset_guide.xml:452 toolset_guide.xml:513 +#, fuzzy, no-c-format +msgid "specify a .cfg.xml file" +msgstr " ファイルを指定します" + +#. Tag: para +#: toolset_guide.xml:458 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "" +"アプリケーションに SchemaUpdate を組み込むことができま" +"す。:" + +#. Tag: programlisting +#: toolset_guide.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:467 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "インクリメンタルなスキーマ更新に対するAntの使用" + +#. Tag: para +#: toolset_guide.xml:469 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "" +"Antスクリプトから SchemaUpdate を呼び出すことができます:" + +#. Tag: programlisting +#: toolset_guide.xml:473 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:478 +#, no-c-format +msgid "Schema validation" +msgstr "Schema validation" + +#. Tag: para +#: toolset_guide.xml:480 +#, no-c-format +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"SchemaValidator ツールは、既存のデータベーススキーマと作成" +"したマッピングドキュメントが\"一致する\"ことを検証します。 " +"SchemaValidator はJDBCのメタデータAPIに強く依存することに" +"注意してください。そのため、すべてのJDBCドライバーで作動するものではありませ" +"ん。このツールはテスト時に非常に有用です。" + +#. Tag: para +#: toolset_guide.xml:486 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:492 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator のコマンドライン・オプション" + +#. Tag: para +#: toolset_guide.xml:519 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "" +"SchemaValidator をアプリケーションに組み込むことが出来ま" +"す:" + +#. Tag: programlisting +#: toolset_guide.xml:523 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:528 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "スキーマのバリデーションにAntを使用します" + +#. Tag: para +#: toolset_guide.xml:530 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "Antスクリプトから SchemaValidator を呼び出せます:" + +#. Tag: programlisting +#: toolset_guide.xml:534 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "<one-to-one>" +#~ msgstr "<one-to-one>" + +#~ msgid "<many-to-one>" +#~ msgstr "<many-to-one>" + +#~ msgid "<key>" +#~ msgstr "<key>" + +#~ msgid "<many-to-many>" +#~ msgstr "<many-to-many>" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid "SchemaExport" +#~ msgstr "SchemaExport" + +#~ msgid "<column>" +#~ msgstr "<column>" + +#~ msgid "java -cp" +#~ msgstr "java -cp" + +#~ msgid "hibernate_classpaths" +#~ msgstr "hibernate_classpaths" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport" + +#~ msgid "options mapping_files" +#~ msgstr "options mapping_files" + +#~ msgid "NamingStrategy" +#~ msgstr "NamingStrategy" + +#, fuzzy +#~ msgid "select a " +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ " を選択します\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ " を選択します。\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ " を選択します" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate" + +#~ msgid ".cfg.xml" +#~ msgstr ".cfg.xml" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/transactions.po b/documentation/envers/src/main/docbook/ja-JP/content/transactions.po new file mode 100644 index 0000000000..98e412fae1 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/transactions.po @@ -0,0 +1,2070 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:29 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "トランザクションと並行性" + +#. Tag: para +#: transactions.xml:31 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"Hibernateと同時実行制御について最も重要な点は、容易に理解できることです。 " +"Hibernateは新たなロックの振る舞いを追加しておらず、直接JDBCコネクションとJTA" +"リソースを使用します。 JDBC、ANSI、およびデータベース管理システム(DBMS)のト" +"ランザクション分離の仕様を 少し時間をかけて勉強することを強く推奨します。" + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"Hibernateはメモリ内のオブジェクトをロックしません。 アプリケーションは、デー" +"タベーストランザクションの分離レベルで 定義した振る舞いを期待できます。 トラ" +"ンザクションスコープのキャッシュでもある Session のお陰" +"で、 識別子やクエリにより検索したエンティティはリピータブルリードになります " +"(スカラー値を返すようなレポートクエリは違います)。" + +#. Tag: para +#: transactions.xml:46 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"バージョニングによる自動的な楽観的同時実行制御に加えて、 SELECT FOR " +"UPDATE 文を使用して、 行を悲観的ロックするための(マイナーな)APIも" +"提供します。 楽観的同時実行制御とこのAPIについては、この章の後のほうで議論し" +"ます。" + +#. Tag: para +#: transactions.xml:53 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"データベーストランザクションや長い対話(conversation、ロングトランザクショ" +"ン)だけでなく、 ConfigurationSessionFactory、および Session という粒度でHibernateが行う同時実" +"行制御の議論を始めます。" + +#. Tag: title +#: transactions.xml:60 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "sessionスコープとtransactionスコープ" + +#. Tag: para +#: transactions.xml:62 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"SessionFactory は生成することが高価で、 スレッドセーフなオ" +"ブジェクトです。 よって、アプリケーションのすべてのスレッドで共有すべきで" +"す。 通常、アプリケーションの起動時に、 Configuration イン" +"スタンスから1度だけ生成します。" + +#. Tag: para +#: transactions.xml:68 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Session は高価ではなく、スレッドセーフなオブジェクトでもあ" +"りません。 よって、1つの要求や1つの対話、1つの作業単位(unit of work)に対" +"して1度だけ使い、 その後で捨てるべきです。 Session は必要" +"になるまで、 JDBC Connection(もしくは " +"DataSource)を獲得しません。 ゆえに、実際に使用するときま" +"でリソースを消費しません。" + +#. Tag: para +#: transactions.xml:76 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"この状況を完了させるために、 データベーストランザクションについても考えなけれ" +"ばなりません。 データベース内のロックの競合を少なくするために、 データベース" +"トランザクションは可能な限り短くするべきです。 長いデータベーストランザクショ" +"ンは、アプリケーションの高い並列実行性を阻害します。 ゆえに、ユーザーが考えて" +"いる間(作業単位が完了するまで)データベーストランザクションを 開いたままにす" +"るのは、たいていの場合よい設計とはいえません。" + +#. Tag: para +#: transactions.xml:85 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"作業単位というスコープとは何でしょうか? 1つのHibernate Session は、 いくつかのデータベーストランザクションをまたがることができるで" +"しょうか? または、スコープと一対一の関係でしょうか? いつ Session を開き、閉じるべきでしょうか? そして、データベーストランザクション" +"境界をどのように分けるのでしょうか?" + +#. Tag: title +#: transactions.xml:93 +#, no-c-format +msgid "Unit of work" +msgstr "作業単位(Unit of work)" + +#. Tag: para +#: transactions.xml:95 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"1つ目は、session-per-operation アンチパターンを使っては" +"いけません。 すなわち、1つのスレッドの中で、単純なデータベース呼び出しのたび" +"に Session を開いて、閉じてはいけません! もちろん、データ" +"ベーストランザクションについても同様です。 アプリケーション中のデータベース呼" +"び出しは、 計画されたシーケンス(planned sequence)を使い、 アトミックな作業" +"単位に分類されます。 (1つのSQL文ごとにコミットする自動コミットが、 使われな" +"いという意味でもあることに注意してください。 自動コミットは、SQLコンソールで" +"アドホックな作業をする際に使うものです。 Hibernateは直ちに自動コミットモード" +"を無効にします。 もしくは、アプリケーションサーバーが無効化することを期待しま" +"す。) データベーストランザクションはオプションではありません。 データベース" +"とのすべての通信は、データの読み込みであっても、書き込みであっても、 トランザ" +"クションの中で行わなければなりません。 説明すると、データ読み込みに対して、自" +"動コミットは避けるべきです。 なぜなら、多数の小さなトランザクションは、明確に" +"定義された1つの作業単位と比べて、 パフォーマンスがよくなることはありませ" +"ん。 後者は保守性や拡張性もよりすぐれています。" + +#. Tag: para +#: transactions.xml:111 +#, fuzzy, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is sent to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"マルチユーザーのクライアント/サーバーアプリケーションの中で、 最もよく使われ" +"るパターンは、session-per-request です。 このモデルの中" +"では、 クライアントから(Hibernate永続化層が動作する)サーバーへリクエストが" +"送られ、 新しいHibernate Session が開かれます。 そして、こ" +"の作業単位の中ですべてのデータベース処理が実行されます。 作業が完了した(そし" +"て、クライアントへのレスポンスが準備できた)時点で、 session をフラッシュし、" +"閉じます。 クライアントの要求を処理するために、1つのデータベーストランザク" +"ションを使用するでしょう。 Session を開き、閉じる際に、 " +"データベーストランザクションを開始し、コミットします。 二つの関係は一対一で" +"す。 このモデルは多くのアプリケーションに完全に適合します。" + +#. Tag: para +#: transactions.xml:123 +#, fuzzy, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is sent to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"以降の実装にチャレンジしてください。 Hibernateは単純なこのパターンのために、" +"予め組み込まれた 「current session」の管理を提供します。 サーバーリクエストを" +"処理する際はトランザクションを開始しなければなりません。 そして、レスポンスを" +"クライアントに送信する前にトランザクションを終わらせます。 好きな方法で実現で" +"きます。一般的な解決策は ServletFilter や サービスメソッド" +"をポイントカットしてAOPインターセプター、 proxy/interception コンテナです。 " +"EJBコンテナはEJBセッションビーンをトランザクション境界として アスペクトをクロ" +"スカットする実装の標準的な方法です(CMTによる宣言的)。 プログラムによるトラ" +"ンザクション境界を使うと決めた場合、 簡単に使うため、互換性のあるコードにする" +"ために、 この章の後のほうにあるHibernate Transaction APIの" +"ほうがよいです。" + +#. Tag: para +#: transactions.xml:136 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"アプリケーションのコードは、必要なときにどこでも、何回でも、 単に " +"sessionFactory.getCurrentSession() を呼び出すだけで 「現在" +"のセッション」にアクセスできます。 現在のデータベーストランザクションへの " +"セッション を常に取得します。 リソース・ローカルな環境、も" +"しくはJTA環境を構成しなければなりません ( を参照してください)。" + +#. Tag: para +#: transactions.xml:144 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"ときどき、「ビューを描画する」まで セッション とデータベー" +"ストランザクションのスコープを拡張すると便利なことがあります。 これは、要求の" +"処理と描画のフェーズを分けている サーブレットアプリケーションにおいて特に役立" +"ちます。 独自のインターセプタを実装すれば、 ビューを描画するまでデータベース" +"トランザクションを拡張するのは簡単です。 しかし、コンテナ管理トランザクション" +"のEJBに頼る場合は、簡単にはできません。 なぜなら、ビューの描画を開始する前" +"に、EJBのメソッドがリターンした際に、 トランザクションが完了するためです。 こ" +"の Open Session in View パターンに関連するヒントと例につ" +"いては、 HibernateのWebサイトやフォーラムを参照してください。" + +#. Tag: title +#: transactions.xml:159 +#, no-c-format +msgid "Long conversations" +msgstr "長い対話" + +#. Tag: para +#: transactions.xml:161 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"session-per-requestパターンは、作業単位を設計する際に役立つ考えというだけでは" +"ありません。 多くのビジネスプロセスは、ユーザーとの一連の相互作用全体を要求し" +"ます。 その相互作用には、データベースアクセスが含まれます。 Webとエンタープラ" +"イズアプリケーションでは、データベーストランザクションが ユーザとの相互作用に" +"まで渡ることは許されません。 次の例をよく考えてみてください。" + +#. Tag: para +#: transactions.xml:171 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"ダイアログの最初の画面が開き、個々の Session とデータベー" +"ストランザクションの中でロードされたデータをユーザーに見せます。 ユーザーはオ" +"ブジェクトを自由に修正できます。" + +#. Tag: para +#: transactions.xml:178 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"5分後にユーザーは「Save」をクリックし、修正が永続化されるのを期待します。 ま" +"た、この情報を編集したのは自分1人だけで、 修正のコンフリクトは発生しないと期" +"待します。" + +#. Tag: para +#: transactions.xml:186 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"この作業単位を(ユーザーの視点で)長期の 対話 (もしく" +"は、アプリケーショントランザクション )と呼びます。 アプ" +"リケーションにこれを実装する方法はたくさんあります。" + +#. Tag: para +#: transactions.xml:192 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"最初に思いつく実装は、ユーザーが考えている間、Session と" +"データベーストランザクションを開いたままにしておくことです。 同時に修正され" +"ず、分離と原子性が保証されるように、 データベース内のロックは保持したままにし" +"ます。 もちろん、これはアンチパターンです。 なぜなら、ロックの競合が発生する" +"と、 アプリケーションが同時ユーザー数に応じてスケールアップできなくなるからで" +"す。" + +#. Tag: para +#: transactions.xml:200 +#, fuzzy, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"conversation. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"明らかに、対話を実装するためには、 いくつかのデータベーストランザクションを使" +"用するべきです。 この場合、ビジネスプロセスの分離を維持することは、 アプリ" +"ケーション層の責務の1つになります。 1つの対話は、 通常いくつかのデータベー" +"ストランザクションに及びます。 データベーストランザクションの1つのみ(最後の" +"1つ)が更新したデータを保存し、 他はデータを読むだけであれば、それはアトミッ" +"クです (例えば、いくつかの要求/応答を繰り返すウィザード形式のダイアロ" +"グ)。 これは聞くより、実装したほうが簡単です。 Hibernateの機能を使うのであれ" +"ば、特に簡単です。" + +#. Tag: para +#: transactions.xml:213 +#, fuzzy, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occurred during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"自動バージョニング - Hibernateは自動的に楽観的同時実行制" +"御ができます。 ユーザーが考えている間に同時に修正がおきた場合、自動的に検出で" +"きます。 通常、対話の終了時にチェックするだけです。" + +#. Tag: para +#: transactions.xml:221 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"分離(Detached)オブジェクト - すでに議論した " +"session-per-request パターンを使うと決定した場合、 ロー" +"ドされたすべてのインスタンスは、ユーザが考えている間は、 セッションから分離さ" +"れた状態になります。 オブジェクトをセッションに再追加し、修正を永続化できま" +"す。 これを session-per-request-with-detached-objects パ" +"ターンと呼びます。 自動バージョニングを使うことで、同時に行われる修正を分離で" +"きます。" + +#. Tag: para +#: transactions.xml:231 +#, fuzzy, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitly." +msgstr "" +"拡張(もしくは、長い)セッション - Hibernateの " +"Session は、 データベーストランザクションをコミットした" +"後、 裏で結びついているJDBCコネクションを切断できます。 そして、クライアント" +"からの新しい要求が発生した際に、再接続できます。 このパターンは、" +"session-per-conversation という名で知られており、オブ" +"ジェクトをセッションへ再追加することさえ不要にします。 自動バージョニングを使" +"うことで、同時に行われる修正を分離できます。 通常 Session " +"を自動的にフラッシュさせず、 明示的にフラッシュします。" + +#. Tag: para +#: transactions.xml:244 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"session-per-request-with-detached-objects と " +"session-per-conversation の2つは、 利点と欠点を持ってい" +"ます。 これについては、この章の後のほうで、楽観的同時実行制御の文脈の中で議論" +"します。" + +#. Tag: title +#: transactions.xml:253 +#, no-c-format +msgid "Considering object identity" +msgstr "オブジェクト識別子を考える" + +#. Tag: para +#: transactions.xml:255 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"アプリケーションは、2つの異なる Session から 同じ永続状態" +"に同時にアクセスできます。 しかし、2つの Session インスタ" +"ンスが 永続性クラスの1つのインスタンスを共有することはできません。 ゆえに、" +"識別子には2つの異なる概念があるということになります。" + +#. Tag: term +#: transactions.xml:264 +#, no-c-format +msgid "Database Identity" +msgstr "データベース識別子" + +#. Tag: literal +#: transactions.xml:267 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:272 +#, no-c-format +msgid "JVM Identity" +msgstr "JVM識別子" + +#. Tag: literal +#: transactions.xml:275 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:281 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"個々のSession に追加されたオブジェク" +"トにとって (すなわち、1つの Session のスコープの中で" +"は)、2つの概念は同じです。 データベース同一性とJVM同一性が一致することを、" +"Hibernateが保証します。 しかし、アプリケーションが2つの異なるセッションから " +"「同じ」(永続性識別子の)ビジネスオブジェクトに同時にアクセスする限り、 2つ" +"のインスタンスは実際に(JVM識別子が)「異なり」ます。 楽観的アプローチによっ" +"て、(自動バージョニングの)フラッシュ/コミット時に コンフリクトが解決されま" +"す。" + +#. Tag: para +#: transactions.xml:290 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"このアプローチでは、Hibernateとデータベースに同時実行についての心配が残りま" +"す。 一方で、最高のスケーラビリティが提供されます。 なぜなら、1スレッドの作" +"業単位の中で一意性が保証されれば、 高価なロックや同期化が不要になるためで" +"す。 Session ごとに1つのスレッドを貼り付ける限り、 アプリ" +"ケーションはビジネスオブジェクトをsynchronizeする必要はありません。 " +"Session 内では、アプリケーションはオブジェクトを比較するた" +"めに、 == を安全に使用できます。" + +#. Tag: para +#: transactions.xml:299 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"けれども、Session の外で == を使うアプ" +"リケーションは、予期しない結果に遭遇します。 これは予期しない場所で起こりえま" +"す。 例えば、2つの分離インスタンスを同じ Set に putしたと" +"きなどです。 両方とも同じデータベース識別子を持ちます(すなわち、同じ行を表し" +"ます)。 しかし、分離状態のインスタンスのJVM識別子は当然保証されません。 開発" +"者は、永続性クラスの equals()hashCode() メソッドをオーバーライドし、オブジェクト等価性の概念を実装すべきで" +"す。 警告が1つあります。等価性の実装にデータベース識別子を使わないでくださ" +"い。 ユニークな(普通は不変の)属性の組み合わせであるビジネスキーを使ってくだ" +"さい。 もし、一時オブジェクトが永続化された場合、データベース識別子が変わりま" +"す。 一時オブジェクトを(通常分離インスタンスと共に) Set " +"に保持する場合、ハッシュコードが変わるということは、Set の" +"契約を破るということです。 ビジネスキーのための属性は、データベースの主キーほ" +"ど安定すべきではないです。 オブジェクトが同じ Set の中にい" +"る間だけ、安定を保証すべきです。 この問題のより徹底的な議論は、HibernateのWeb" +"サイトを参照してください。 また、これはHibernateの問題ではなく、単にJavaオブ" +"ジェクトの識別子や等価性を どのように実装すべきかということです。" + +#. Tag: title +#: transactions.xml:320 +#, no-c-format +msgid "Common issues" +msgstr "一般的な問題" + +#. Tag: para +#: transactions.xml:322 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"session-per-user-sessionsession-per-" +"application アンチパターン は使ってはいけません(もちろん、まれに" +"例外があります)。 注意:下記の問題のいくつかは、推奨されるパターンとしても出" +"現します。 設計を決定する前に、裏の意味を理解するようにしてください。" + +#. Tag: para +#: transactions.xml:331 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"Session はスレッドセーフではありません。 HTTPリクエスト、" +"セッションBean、Swingワーカーのように、 同時実行が可能なものが " +"Session インスタンスを共有すると、 競合状態を引き起こしま" +"す。 (後で議論する)HttpSession の中で Hibernate " +"Session を保持する場合、 HttpSessionへのアクセスを同期化す" +"ることを考慮すべきです。 さもなければ、ユーザーが十分早くリロードをクリックす" +"ると、 同時に走る2つのスレッドの中で、同じ Session が使わ" +"れます。" + +#. Tag: para +#: transactions.xml:342 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"Hibernateが例外を投げた場合は、データベーストランザクションをロールバック" +"し、 直ちに Session を閉じるべきです(詳細を後で議論しま" +"す)。 Session がアプリケーションに結び付けられているので" +"あれば、 アプリケーションを停止すべきです。 データベーストランザクションを" +"ロールバックしても、ビジネスオブジェクトは トランザクションを開始したときの状" +"態に戻りません。 これは、データベースの状態とビジネスオブジェクトは同期してい" +"ないことを意味します。 通常これは問題になりません。 なぜなら、例外は回復でき" +"ないからです。 とにかくロールバックした後にやり直すべきです。" + +#. Tag: para +#: transactions.xml:354 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"Session は永続(persistent)状態のすべてのオブジェクトを " +"キャッシュします(Hibernateは監視し、ダーティ状態かチェックします)。 これ" +"は、長い間セッションを開いたままにするか、 非常に多くのデータをロードし続ける" +"かした場合は、 OutOfMemoryExceptionが発生するまで無限に大きくなることを意味し" +"ます。 解決策の1つは、Session キャッシュを管理するため" +"に、 clear()evict() を呼ぶことで" +"す。 しかし、大きなデータを処理する必要があるなら、 たぶんストアドプロシー" +"ジャを考慮するべきでしょう。 いくつかの解決策は、 で" +"紹介されています。 ユーザーセッションの間、Session を開い" +"たままにするということは、 データが新鮮でなくなる確率が高くなることを意味しま" +"す。" + +#. Tag: title +#: transactions.xml:372 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "データベーストランザクション境界" + +#. Tag: para +#: transactions.xml:374 +#, fuzzy, no-c-format +msgid "" +"Database (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"データベース(もしくはシステム)トランザクションの境界は、常に必要です。 デー" +"タベーストランザクションの外で、データベースとの通信は起きません (これは自動" +"コミットモードに慣れている多くの開発者を混乱させるかもしれません)。 読み込む" +"だけの操作にでも、いつも明確なトランザクション境界を使用してください。 分離レ" +"ベルとデータベースの能力次第で、これは必要ないかもしれませんが、 常にトランザ" +"クション境界を明示的に指定しても、マイナス面は全くありません。 確かに、1つの" +"データベーストランザクションは多数の小さなトランザクションより (データの読み" +"込みであっても)パフォーマンスがすぐれています。" + +#. Tag: para +#: transactions.xml:384 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"J2EE環境に管理されていない状態 (すなわち、スタンドアロン、単純なWebやSwingア" +"プリケーション)でも、 管理された状態でも、Hibernateアプリケーションを実行で" +"きます。 管理されていない環境では、Hiberanteがデータベースのコネクションプー" +"ルを提供します。 アプリケーション開発者は、トランザクション境界を手動で設定し" +"なければなりません。 言い換えると、データベーストランザクションの開始、コミッ" +"ト、ロールバックを 開発者自身が設定する必要があるということです。 通常、管理" +"された環境では、コンテナ管理によるトランザクション(CMT)が提供されます。 例" +"えば、セッションBeanのデプロイメントディスクリプタで宣言的に定義し、 トランザ" +"クションを組み立てます。 プログラムによるトランザクション境界はもう必要ありま" +"せん。" + +#. Tag: para +#: transactions.xml:394 +#, fuzzy, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demarcation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"しかしながら、管理されていないリソース・ローカルな環境と JTAに依存したシステ" +"ム(CMTではなくBMT)の両方に、 永続化層をポータブルに保つのは、しばしば望まし" +"いことです。 デプロイ環境のネイティブのトランザクションシステムを呼び出す " +"Transaction というラッパーAPIをHibernateが提供します。 こ" +"のAPIを使うかは任意ですが、CMTのセッションBeanを使わないのであれば、使うこと" +"を強く推奨します。" + +#. Tag: para +#: transactions.xml:403 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "" +"通常、Session 終了は、4つの異なるフェーズを含みます。" + +#. Tag: para +#: transactions.xml:409 +#, no-c-format +msgid "flush the session" +msgstr "セッションのフラッシュ" + +#. Tag: para +#: transactions.xml:414 +#, no-c-format +msgid "commit the transaction" +msgstr "トランザクションのコミット" + +#. Tag: para +#: transactions.xml:419 +#, no-c-format +msgid "close the session" +msgstr "セッションのクローズ" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "handle exceptions" +msgstr "例外のハンドリング" + +#. Tag: para +#: transactions.xml:430 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"セッションのフラッシュについては、前のほうですでに議論しました。 管理された環" +"境と管理されていない環境の両方について、 トランザクション境界と例外ハンドリン" +"グをもっと詳しく見ていきましょう。" + +#. Tag: title +#: transactions.xml:437 +#, no-c-format +msgid "Non-managed environment" +msgstr "管理されていない環境" + +#. Tag: para +#: transactions.xml:439 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"Hibernate永続化層を管理されていない環境で実装する場合は、 通常単純なコネク" +"ションプール(すなわちDataSourceではない)によって、 データベースコネクション" +"を制御します。 Hibernateはそのコネクションプールから必要なコネクションを取得" +"します。 セッション/トランザクション制御のイディオムは次のようになります。" + +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:448 +#, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"明示的に Sessionflush() を呼び出す" +"べきではなく、 commit() を呼び出すことにより、自動的に同期" +"化処理が実行されます (セッションの FlushMode に依存している)。 close() を呼び出す" +"ことにより、セッションの終わりを明確にします。 close() が" +"暗黙的に行う主なことは、 セッションがJDBCコネクションを開放することです。 上" +"記のJavaコードはポータブルであり、管理されていない環境とJTA環境の両方で実行で" +"きます。" + +#. Tag: para +#: transactions.xml:457 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"より適応性のある解決策は、Hibernateに予め組み込まれている 「current session」" +"コンテキスト管理です。 言葉で説明するより下記を見たほうが速いでしょう。" + +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"正規のアプリケーションの中では、このようなコードの切れ端を決して見ないでしょ" +"う。 致命的な(システム)例外は、常に「最上位」でキャッチすべきです。 言い換" +"えれば、(永続化層で)Hibernate呼び出しを実行するコードと、 " +"RuntimeException を制御する (通常はクリーンアップと終了の" +"み行うことができる)コードは、別々の層の中にあります。 Hibernateによるカレン" +"トコンテキスト管理は、この設計をかなり単純にします。 必要なのは、" +"SessionFactory にアクセスすることだけです。 例外処理は、こ" +"の章の後のほうで議論します。" + +#. Tag: para +#: transactions.xml:474 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"注意:(デフォルトですが) org.hibernate.transaction." +"JDBCTransactionFactory を選択するべきです。 第2の用例としては、 " +"hibernate.current_session_context_class" +"\"thread\" とするとよいでしょう。" + +#. Tag: title +#: transactions.xml:483 +#, no-c-format +msgid "Using JTA" +msgstr "JTAを使用する" + +#. Tag: para +#: transactions.xml:485 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"永続化層をアプリケーションサーバー(例えば、EJBセッションBeanの背後)で実行す" +"る場合、 Hibernateから取得するすべてのデータソースコネクションは、 自動的にグ" +"ローバルJTAトランザクションの一部になります。 EJBを使わずに、スタンドアロンの" +"JTA実装を導入することもできます。 JTA統合のために、Hibernateは2つの戦略を提" +"供します。" + +#. Tag: para +#: transactions.xml:492 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"Bean管理トランザクション(BMT)を使い、Transaction APIを使" +"う場合、 HibernateはアプリケーションサーバーにBMTトランザクションの開始と終わ" +"りを告げます。 すなわち、トランザクション管理のコードは、管理されない環境と同" +"じになります。" + +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "" +"トランザクション境界として Session を使いたい場合、 簡単に" +"コンテキストを伝播する機能である getCurrentSession() があ" +"るので、 JTAの UserTransaction APIを直接使用すべきでしょ" +"う。" + +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:508 +#, fuzzy, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" +"CMTでは、トランザクション境界をセッションBeanのデプロイメントディスクリプタで" +"定義し、 プログラムでは行いません。 ゆえに、コードは次のように少なくなりま" +"す。" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"CMT/EJBの中では、常にロールバックが自動的に実施されます。 なぜなら、セッショ" +"ンビーンのメソッドにより投げられた制御されていない " +"RuntimeException は、グローバルトランザクションを ロール" +"バックするようにコンテナに伝えるためです。 これは、BMTもしくはCMTと" +"いっしょにHibernate Transaction APIを使う必要は少しもない" +"という意味です。" + +#. Tag: para +#: transactions.xml:523 +#, fuzzy, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatibility), or set to \"jta\"." +msgstr "" +"Hibernateのトランザクションファクトリを設定する際に、 JTAを直接使う(BMTの)" +"場合は org.hibernate.transaction.JTATransactionFactory " +"を、 CMTセッションビーンの中では org.hibernate.transaction." +"CMTTransactionFactory を 選択すべきだということに注意してくださ" +"い。 hibernate.transaction.manager_lookup_class をセットす" +"ることも思い出してください。 なお、hibernate." +"current_session_context_class は、 セットしないか(後方互換)、" +"\"jta\" をセットしてください。" + +#. Tag: para +#: transactions.xml:532 +#, fuzzy, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicitly " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"getCurrentSession() オペレーションは、JTA環境では1つの欠" +"点を持ちます。 デフォルトで使われる after_statement コネク" +"ションリリースモードを使用する上で、 警告が1つあります。 JTA仕様の愚かな制約" +"のために、 scroll() または iterate() が" +"返した、 閉じられていない ScrollableResults または " +"Iterator インスタンスをHibernateが自動的にクリーンアップす" +"ることはできません。 finally ブロックの中で、 " +"ScrollableResults.close() または Hibernate.close" +"(Iterator) を明示的に呼び出して、 裏に潜んだデータベースカーソルを" +"解放 しなければなりません。 (もちろん、多くのアプリケー" +"ションでは、JTAかCMTコードで scroll()iterate" +"() の使用を避けるのは容易です。)" + +#. Tag: title +#: transactions.xml:548 +#, no-c-format +msgid "Exception handling" +msgstr "例外ハンドリング" + +#. Tag: para +#: transactions.xml:550 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"Session が例外(SQLExceptionを含む)を" +"投げた場合、 直ちに、データベーストランザクションをロールバックし、" +"Session.close() を呼び、Session インス" +"タンスを破棄すべきです。 Session のいくつかのメソッドは、 " +"セッションの状態を 矛盾したまま にします。 Hibernateが投" +"げた例外を、回復できるものとして扱うことはできません。 finally ブロックの中で close() を呼んで、 " +"Session を確実に閉じてください。" + +#. Tag: para +#: transactions.xml:561 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"HibernateException は、Hibernate永続化層の中で発生する多く" +"のエラーを ラップする、検査されない例外です(Hibernateの古いバージョンは違い" +"ました)。 私たちの意見は、アプリケーション開発者に回復不可能な例外を 下層で" +"キャッチすることを強要すべきではないということです。 多くのシステムでは、検査" +"されない例外と致命的な例外は、 コールスタックの最初のフレームの1つ(例えば、" +"最上位の層で)でハンドリングし、 エラーメッセージをアプリケーションユーザーに" +"表示します (もしくは、他の適切な処理を実施します)。 Hibernateは、" +"HibernateException 以外の検査されない例外も 投げることに注" +"意してください。 これらもまた、回復不可能であり、適切な処理を実施すべきです。" + +#. Tag: para +#: transactions.xml:573 +#, fuzzy, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the exception into a more meaningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"Hibernateは、データベースとの対話中に投げられた SQLExceptionJDBCException でラップします。 実は、例外をよ" +"り意味のある JDBCException のサブクラスに 変換しようと試み" +"ます。 元の SQLException は、JDBCException." +"getCause() によりいつでも得られます。 Hibernateは、" +"SessionFactory に追加されている " +"SQLExceptionConverter を使い、SQLException を 適当な JDBCException サブクラスに変換します。 " +"デフォルトでは、SQLExceptionConverter は設定されているSQL" +"方言により 定義されます。 一方で、独自の実装に差し替えることもできます (詳細" +"は、SQLExceptionConverterFactory クラスのJavadocを参照して" +"ください)。 標準的な JDBCException のサブタイプを下記に示" +"します。" + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - 基礎となるJDBC通信のエラーを表し" +"ます。" + +#. Tag: para +#: transactions.xml:595 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - 発行するSQLの文法もしくは構文の問題" +"を表します。" + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - 何らかの形式の完全性制約違" +"反を表します。" + +#. Tag: para +#: transactions.xml:607 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - 要求された操作を実施するのに必" +"要なロックレベルを得る際のエラーを表します。" + +#. Tag: para +#: transactions.xml:613 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "" +"GenericJDBCException - 他のカテゴリに一致しなかった一般的" +"な例外です。" + +#. Tag: title +#: transactions.xml:623 +#, no-c-format +msgid "Transaction timeout" +msgstr "トランザクションのタイムアウト" + +#. Tag: para +#: transactions.xml:625 +#, fuzzy, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functionality is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"EJBのような管理された環境が提供するきわめて重要な特徴の1つは、 トランザク" +"ションのタイムアウトです。 これは管理されていないコードには提供できません。 " +"トランザクションタイムアウトは、不品行なトランザクションが ユーザーにレスポン" +"スを返さないまま、無期限にリソースを使い続けない ことを保障します。 管理され" +"た環境(JTA)の外では、Hibernateはこの機能をフルに提供できません。 しかしなが" +"ら、Hibernateは次のようなデータアクセス操作の制御くらいはできます。 データ" +"ベースレベルのデッドロックや大きなリザルトセットを返すクエリを 定義されたタイ" +"ムアウトによって確実に制限します。 管理された環境では、Hibernateはトランザク" +"ションタイムアウトをJTAに委譲します。 この機能は、Hibernateの " +"Transaction オブジェクトに よって抽象化されています。" + +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"CMTビーンの中では setTimeout() を 呼び出せないことに注意し" +"てください。 トランザクションタイムアウトは宣言的に定義されるべきです。" + +#. Tag: title +#: transactions.xml:650 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "楽観的同時実行制御" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"高い並列性と高いスケーラビリティの両方を実現するアプローチは、 バージョニング" +"を使った楽観的同時実行制御のみです。 更新の衝突を見つけるために(および、更新" +"が失われるのを防ぐために)、 バージョン番号もしくはタイムスタンプを使って、" +"バージョンをチェックします。 Hibernateは、楽観的同時実行を行うアプリケーショ" +"ンコードを書くための アプローチを3つ提供します。 私たちが見せるユースケース" +"は、長い対話を持ちますが、 バージョンチェックはまだ1つのデータベーストランザ" +"クションの中で更新を失うことを防ぐ 利点も持っています。" + +#. Tag: title +#: transactions.xml:663 +#, no-c-format +msgid "Application version checking" +msgstr "アプリケーションによるバージョンチェック" + +#. Tag: para +#: transactions.xml:665 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"Hibernateにほとんど助けてもらわずに実装するケースです。 データベースとのやり" +"取りは、それぞれ新しい Session の中で起こります。 開発者" +"は、すべての永続性インスタンスを操作する前に、 データベースから再読み込みする" +"責務があります。 このアプローチでは、対話トランザクションの分離を守るため" +"に、 アプリケーション自身がバージョンチェックを行う必要があります。 このアプ" +"ローチは、データベースアクセスの中では、最も非効率です。 エンティティEJBと最" +"も似ているアプローチです。" + +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"<version> を使って、version プロ" +"パティをマッピングします。 Hibernateは、エンティティがダーティである場合、フ" +"ラッシュし、 その間に version プロパティを自動的にインクリ" +"メントします。" + +#. Tag: para +#: transactions.xml:682 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"もちろん、データの並列性が低い環境で運用しており、バージョンチェックが不要な" +"ら、 このアプローチを使い、バージョンチェックをスキップするだけです。 その場" +"合は、長い対話には、 「最後にコミットしたものが勝つ」 が" +"デフォルトの戦略でしょう。 このアプローチは、アプリケーションのユーザーを混乱" +"させるかもしれないことを 心に留めて置いてください。それは、エラーメッセージや" +"競合した変更をマージする機会が ないまま、更新を失う経験をするためです。" + +#. Tag: para +#: transactions.xml:691 +#, fuzzy, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified objects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"確かに、マニュアルによるバージョンチェックは、些細な儀式だけで実行できます" +"が、 多くのアプリケーションにとって実用的ではありません。 しばしば、1つのイ" +"ンスタンスだけでなく、 修正されたオブジェクトの完全なグラフをチェックしなけれ" +"ばなりません。 Hibernateは、設計パラダイムとして、拡張 Session か 分離されたインスタンスを自動的にバージョンチェックします。" + +#. Tag: title +#: transactions.xml:702 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "拡張セッションと自動バージョニング" + +#. Tag: para +#: transactions.xml:704 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"1つの Session インスタンスとその永続性インスタンスは、 " +"session-per-conversation として知られる、 対話全体で使わ" +"れます。 Hibernateはフラッシュする際に、インスタンスのバージョンをチェックし" +"ます。 同時に修正されたことを検出すると、例外を投げます。 この例外をキャッチ" +"して扱うのは、開発者の責任です (一般的な選択肢は、変更をマージするか古くない" +"データでビジネス対話を 再スタートする機会をユーザーに提供することです)。" + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"ユーザーの対話を待っているときは、 Session を基礎となる" +"JDBCコネクションから切り離します。 このアプローチは、データベースアクセスの中" +"では、最も効率的です。 アプリケーションは、バージョンチェックや分離されたイン" +"スタンスを再追加すること に関心を持つ必要はありません。また、あらゆるデータ" +"ベーストランザクションの中で インスタンスを再読み込みする必要はありません。" + +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"foo オブジェクトは、自分をロードした Session をまだ知っています。 古いセッションの上で新しいデータベーストランザ" +"クションを開始することで、 新しいコネクションを取得し、そのセッションが再開さ" +"れます。 データベーストランザクションをコミットすることで、 セッションから" +"JDBCコネクションを切断し、コネクションをプールに返します。 再接続した後、更新" +"していないデータのバージョンチェックを強制するために、 他のトランザクションに" +"より更新されているかもしれないオブジェクトに関して、 LockMode.READ をつけて Session.lock() を呼び出すことができま" +"す。 更新して いる データをロックする必要はありません。 " +"通常、拡張 SessionFlushMode.MANUAL " +"をセットします。 最後のデータベーストランザクションの周期でのみ、 対話の中で" +"変更されたすべてを実際に永続化させるためです。 ゆえに、最後のデータベーストラ" +"ンザクションのみ flush() オペレーションを含みます。そし" +"て、対話を終わらせるために、 セッションも close() します。" + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"ユーザーが考慮中に、格納することができないくらい Session " +"が大きいのであれば、このパターンは問題があります。 例えば、" +"HttpSession は可能な限り小さく保つべきです。 " +"Session は(強制的に)1次キャッシュでもあり、 ロードした" +"オブジェクトをすべて保持します。 おそらく、リクエスト/レスポンスのサイクルが" +"数回であれば、この戦略が使えます。 1つの対話のためだけに Session を使うべきです。 なぜなら、すぐに新鮮でないデータを持つためです。" + +#. Tag: para +#: transactions.xml:747 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"(Hibernateの以前のバージョンは、明示的な Session の 切断" +"と再接続が必要だったことに注意してください。 これらのメソッドは非推奨になりま" +"した。 なぜなら、トランザクションの開始と終了は同じ効果があるためです。)" + +#. Tag: para +#: transactions.xml:753 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"切断した Session を永続化層の近くで保持すべきであることに " +"注意してください。 言い換えると、3層環境の中で Session を" +"保持するために、 EJBステートフルセッションBeanを使ってください。 " +"HttpSession に格納するために、Web層に転送しないでください " +"(別の層へのシリアライズもしないでください)。" + +#. Tag: para +#: transactions.xml:761 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"拡張セッションパターン(もしくは、session-per-conversation)は、 自動的なカレントセッションコンテキスト管理を実施するより難し" +"い。 このために、あなたは CurrentSessionContext の実装を供" +"給する必要があります。 Hibernate Wikiにある例を参照してください。" + +#. Tag: title +#: transactions.xml:771 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "デタッチされたオブジェクトと自動バージョニング" + +#. Tag: para +#: transactions.xml:773 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"新しい Sessionにより、永続化ストア(訳注:DB)との対話が" +"発生します。 また一方、同じ永続性インスタンスが、データベースとの対話ごとに再" +"利用されます。 アプリケーションは、元々は他の Session で" +"ロードされ、 デタッチされたインスタンスの状態を操作します。 そして、" +"Session.update() もしくは、Session.saveOrUpdate()" +"Session.merge() を使って、それらのインスタン" +"スを再追加します。" + +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:783 +#, fuzzy, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occurred." +msgstr "" +"この場合もやはり、Hibernateはフラッシュする際に、インスタンスのバージョンを" +"チェックします。 更新の競合が発生した場合には、例外を投げます。" + +#. Tag: para +#: transactions.xml:788 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"オブジェクトが修正されていないことを確信している場合は、 update() の代わりに、LockMode.READ を使って、 " +"lock() を呼び出すこともできます (すべてのキャッシュを迂回" +"し、バージョンチェックを実施します)。" + +#. Tag: title +#: transactions.xml:797 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "自動バージョニングのカスタマイズ" + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"マッピングの optimistic-lock 属性に false を設定することにより、特定のプロパティやコレクションのために 自動" +"バージョンインクリメントを無効にできます。 プロパティがダーティであっても、" +"バージョンをインクリメントしません。" + +#. Tag: para +#: transactions.xml:806 +#, fuzzy, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this conceptually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"レガシーのデータベーススキーマは、しばしば固定的であり、変更できません。 また" +"は、他のアプリケーションが同じデータベースにアクセスしなければならず、 そのア" +"プリケーションはバージョン番号やタイムスタンプさえ操作する方法を知りません。 " +"どちらの場合も、テーブルの特定のカラムを当てにして、バージョニングを行えませ" +"ん。 バージョンやタイムスタンプのプロパティをマッピングせずに、バージョン" +"チェックさせるために、 <class> マッピングに " +"optimistic-lock=\"all\" を 指定してください。 行のすべての" +"フィールドの状態を比較するようになります。 これは、Hibernateが古い状態と新し" +"い状態を比較できる場合に、 理論的に動作するだけであることに注意してくださ" +"い。 例えば、session-per-request-with-detached-objects ではなく、 1つの長い " +"Session を使う場合です。" + +#. Tag: para +#: transactions.xml:817 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"ときどき、行われた変更が重ならない限り、同時に行われた変更を受け入れることが" +"できます。 <class> マッピングに optimistic-" +"lock=\"dirty\" を設定した場合、フラッシュする際に、Hibernateはダー" +"ティフィールドのみを比較します。" + +#. Tag: para +#: transactions.xml:823 +#, fuzzy, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute unnecessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"専用のバージョン/タイムスタンプのカラムを使う場合、 もしくはすべて/ダーティ" +"のフィールドを比較する場合どちらであっても、 Hibernateはエンティティごとに1つ" +"の UPDATE 文を (適切な WHERE 節と共" +"に)使い、 バージョンチェックと情報の更新を行います。 関連するエンティティの" +"再追加をカスケードするために、 連鎖的な永続化を使用した場合、不必要な更新を実" +"行するかもしれません。 これは通常問題になりません。 しかし、分離したインスタ" +"ンスを変更していなくとも、 データベースの on update トリ" +"ガーが実行されるかもしれません。 <class> マッピング" +"に select-before-update=\"true\" を設定することによって、 " +"この振る舞いをカスタマイズできます。 確実に変更されたかを確認するために、行を" +"更新する前に、 必ずインスタンスを SELECT します。" + +#. Tag: title +#: transactions.xml:841 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "悲観的ロック" + +#. Tag: para +#: transactions.xml:843 +#, fuzzy, no-c-format +msgid "" +"It is not intended that users spend much time worrying about locking " +"strategies. It's usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"ユーザがロック戦略に悩むのに多くの時間を費やすことを意図していません。 通常" +"は、JDBCコネクションに分離レベルを指定し、 単にデータベースにすべての仕事をさ" +"せれば十分です。 しかしながら、高度なユーザは、排他的な悲観的ロックを獲得する" +"ことか、 新しいトランザクションが開始される際にロックを再獲得することを とき" +"どき望むかもしれません。" + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "" +"Hibernateはいつもデータベースのロックの仕組みを使います。 メモリ内のオブジェ" +"クトを決してロックしません!" + +#. Tag: para +#: transactions.xml:855 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"LockMode クラスは、Hibernateが獲得できる異なるロックレベル" +"を定義します。 以下の仕組みにより、ロックを獲得できます。" + +#. Tag: para +#: transactions.xml:862 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"LockMode.WRITE は、 Hibernateが行を更新もしくは挿入する際" +"に自動的に得られます。" + +#. Tag: para +#: transactions.xml:868 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"LockMode.UPGRADE は、 データベースでサポートされている文" +"法 SELECT ... FOR UPDATE を使った、明示的なユーザー要求に" +"より得られるかもしれません。" + +#. Tag: para +#: transactions.xml:874 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"LockMode.UPGRADE_NOWAIT は、 Oracle で " +"SELECT ... FOR UPDATE NOWAIT を使った、 明示的なユーザー要" +"求により得られるかもしれません。" + +#. Tag: para +#: transactions.xml:880 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"LockMode.READ は、 Repeatable ReadもしくはSerializableの分" +"離レベルで、データを読んだ際に自動的に得られます。 おそらく、明示的なユーザー" +"要求により、再取得されます。" + +#. Tag: para +#: transactions.xml:887 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE は、ロックしないことを表します。 " +"Transaction の終わりに、 すべてのオブジェクトはこのロック" +"モードに切り替わります。 update()saveOrUpdate" +"() を呼び出すことによって、 セッションに関連付けられたオブジェクト" +"も、このロックモードで出発します。" + +#. Tag: para +#: transactions.xml:896 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "「明示的なユーザー要求」とは、下記の方法の1つで言い表せます。" + +#. Tag: para +#: transactions.xml:902 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"LockMode を指定した Session.load() の呼" +"び出し。" + +#. Tag: para +#: transactions.xml:907 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "Session.lock() の呼び出し。" + +#. Tag: para +#: transactions.xml:912 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "Query.setLockMode() の呼び出し。" + +#. Tag: para +#: transactions.xml:918 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"UPGRADE もしくは UPGRADE_NOWAIT が指定" +"された Session.load() が呼び出され、 かつ要求されたオブ" +"ジェクトがセッションによってまだロードされていなかった場合は、 " +"SELECT ... FOR UPDATE を使って、オブジェクトがロードされま" +"す。 load() で呼び出されたオブジェクトが、 要求されている" +"より制限が少ないロックですでにロードされていた場合は、 Hibernateはそのオブ" +"ジェクトのために、lock() を呼び出します。" + +#. Tag: para +#: transactions.xml:927 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"指定されたロックモードが READ もしくは、UPGRADEUPGRADE_NOWAIT だった場合、Session." +"lock() は、バージョン番号のチェックを実施します。 " +"(UPGRADE もしくは UPGRADE_NOWAIT の場" +"合、 SELECT ... FOR UPDATE が使われます。)" + +#. Tag: para +#: transactions.xml:934 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"データベースが要求されたロックモードをサポートしていない場合、 Hibernateは" +"(例外を投げる代わりに、)適切な代わりのモードを使います。 これは、アプリケー" +"ションがポータブルであることを保証します。" + +#. Tag: title +#: transactions.xml:943 +#, no-c-format +msgid "Connection Release Modes" +msgstr "コネクション開放モード" + +#. Tag: para +#: transactions.xml:945 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" +"Hibernateのレガシー(2.x)のJDBCコネクション管理に関する振る舞いは、 最初に必" +"要とした際に Session がコネクションを得るというものでし" +"た。 そして、セッションが閉じられるまで、そのコネクションを保持しました。 " +"Hibernate 3.xは、セッションにJDBCコネクションをどのように制御するかを伝える " +"コネクション開放モードという概念を導入しました。 以降の議論は、構成された " +"ConnectionProvider を通して提供される コネクションに適切で" +"あることに注意してください。 異なる開放モードは、org.hibernate." +"ConnectionReleaseMode に 列挙された値により確認されます。" + +#. Tag: para +#: transactions.xml:959 +#, fuzzy, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obtains a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" +"ON_CLOSE - 本質的に上記で述べたレガシーの振る舞いです。 " +"Hibernateセッションは最初にJDBCアクセスを実行する必要がある際にコネクションを" +"得ます。 そして、セッションが閉じられるまで、コネクションを保持します。" + +#. Tag: para +#: transactions.xml:966 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" +"AFTER_TRANSACTION - org.hibernate.Transaction が完了した後、 コネクションを開放します。" + +#. Tag: para +#: transactions.xml:972 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" +"AFTER_STATEMENT (積極的な開放とも呼ばれる) - すべてのス" +"テートメントがそれぞれ実行された後、コネクションが開放されます。 ステートメン" +"トがセッションに関連するリソースを開いたままにする場合は、 この積極的な開放は" +"スキップされます。 今のところ、これが起こるのは org.hibernate." +"ScrollableResults が使われる場合のみです。" + +#. Tag: para +#: transactions.xml:982 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" +"コンフィグレーションパラメータの hibernate.connection.release_mode は、使用する開放モードを指定するために使います。 指定できる値は次の" +"通りです。" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" +"auto (デフォルト) - これを選択すると org." +"hibernate.transaction.TransactionFactory.getDefaultReleaseMode() メ" +"ソッドによって返される開放モードに委譲されます。 このメソッドは、 " +"JTATransactionFactoryにはConnectionReleaseMode.AFTER_STATEMENTを返し、 " +"JDBCTransactionFactoryにはConnectionReleaseMode.AFTER_TRANSACTIONを返しま" +"す。 このデフォルトの振る舞いを変えてうまくいった試しがありません。 それは、" +"この設定値が原因で起こる障害は、 ユーザコードの中でバグや間違った条件になりや" +"すいからです。" + +#. Tag: para +#: transactions.xml:999 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" +"on_close - ConnectionReleaseMode.ON_CLOSEを使います。 この" +"設定は後方互換のために残されていますが、使わないことを強く勧めます。" + +#. Tag: para +#: transactions.xml:1005 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" +"after_transaction - ConnectionReleaseMode." +"AFTER_TRANSACTIONを使います。 この設定はJTA環境の中では使うべきではありませ" +"ん。 ConnectionReleaseMode.AFTER_TRANSACTIONを指定し、自動コミットモードの中" +"では、 開放モードがAFTER_STATEMENTであるかのように、コネクションは開放される" +"ことに注意してください。" + +#. Tag: para +#: transactions.xml:1013 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" +"after_statement - ConnectionReleaseMode.AFTER_STATEMENTを" +"使います。 さらに、設定された ConnectionProvider は、 この" +"設定 (supportsAggressiveRelease()) をサポートするかどうか " +"を調べるために使用します。 もしそうでない場合、開放モードは" +"ConnectionReleaseMode.AFTER_TRANSACTION にリセットされます。 この設定は次の環" +"境でのみ安全です。 それは、ConnectionProvider.getConnection() を呼び出すたびに 基盤となるJDBCコネクションが同じものを取得できる" +"か、 同じコネクションが得られることが問題とならない自動コミット環境の中です。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/tutorial.po b/documentation/envers/src/main/docbook/ja-JP/content/tutorial.po new file mode 100644 index 0000000000..bbea79e3a6 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/tutorial.po @@ -0,0 +1,2777 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:7 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "Hibernateの導入" + +#. Tag: title +#: tutorial.xml:10 +#, no-c-format +msgid "Preface" +msgstr "前書き" + +#. Tag: para +#: tutorial.xml:12 +#, no-c-format +msgid "" +"This chapter is an introductory tutorial for new users of Hibernate. We " +"start with a simple command line application using an in-memory database and " +"develop it in easy to understand steps." +msgstr "" +"この章はHibernateを初めて使うユーザ向けの入門的なチュートリアルです。 インメ" +"モリデータベースを使う簡単なコマンドラインアプリケーションから始め、 一歩一歩" +"わかりやすいやり方で開発を進めます。" + +#. Tag: para +#: tutorial.xml:18 +#, no-c-format +msgid "" +"This tutorial is intended for new users of Hibernate but requires Java and " +"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party " +"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3." +msgstr "" +"このチュートリアルはHibernateを初めて使うユーザを想定していますが、 理解する" +"にはJavaとSQLについての知識が必要です。 これはMichael Gloeglの手によるチュー" +"トリアルを下敷きにしていますが、 ここでサードパーティライブラリと言っているの" +"は、JDK 1.4と5.0用のものです。 JDK 1.3を利用するのであれば他のライブラリが必" +"要かもしれません。" + +#. Tag: para +#: tutorial.xml:24 +#, no-c-format +msgid "" +"The source code for the tutorial is included in the distribution in the " +"doc/reference/tutorial/ directory." +msgstr "" +"チュートリアルのソースコードはHibernateディストリビューションの doc/" +"reference/tutorial/ にあります。" + +#. Tag: title +#: tutorial.xml:32 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "パート1 - 初めてのHibernateアプリケーション" + +#. Tag: para +#: tutorial.xml:34 +#, no-c-format +msgid "" +"First, we'll create a simple console-based Hibernate application. We use an " +"Java database (HSQL DB), so we do not have to install any database server." +msgstr "" +"最初にコンソールベースの簡単なHibernateアプリケーションを作成します。 Java" +"データベース(HSQL DB)を利用するので、 データベースサーバをインストールする" +"必要はありません。" + +#. Tag: para +#: tutorial.xml:39 +#, no-c-format +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the hosts of these events." +msgstr "" +"仮に小さなデータベースアプリケーションが必要だとしましょう。 そのアプリケー" +"ションには出席したいイベントと、 そのイベントのホストについての情報を格納する" +"ものとします。" + +#. Tag: para +#: tutorial.xml:44 +#, no-c-format +msgid "" +"The first thing we do, is set up our development directory and put all the " +"Java libraries we need into it. Download the Hibernate distribution from the " +"Hibernate website. Extract the package and place all required libraries " +"found in /lib into into the /lib " +"directory of your new development working directory. It should look like " +"this:" +msgstr "" +"まず最初にすることは開発用のディレクトリをセットアップして、 必要となるすべて" +"のJavaライブラリを配置することです。 HibernateウェブサイトからHibernateディス" +"トリビューションをダウンロードしてください。 ファイルを解凍して /" +"lib にある必要なライブラリのすべてを、 新しい開発用ディレクトリの " +"/lib ディレクトリに配置してください。 このようになっている" +"はずです:" + +#. Tag: programlisting +#: tutorial.xml:52 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:54 +#, no-c-format +msgid "" +"This is the minimum set of required libraries (note that we also copied " +"hibernate3.jar, the main archive) for Hibernate at the time of " +"writing. The Hibernate release you are using might require more " +"or less libraries. See the README.txt file in the " +"lib/ directory of the Hibernate distribution for more " +"information about required and optional third-party libraries. (Actually, " +"Log4j is not required but preferred by many developers.)" +msgstr "" +"これが 本ドキュメント執筆時点での Hibernateの必要最低限" +"のライブラリです (メインアーカイブのhibernate3.jarもコピーしていることに注意" +"してください)。 Hibernateのバージョンによってはさらに必要なライブラリや、不" +"要なライブラリがあるかもしれません。 Hibernateディストリビューションの " +"lib/ ディレクトリにある README.txt ファ" +"イルを見てください。 必須またはオプションのサードパーティライブラリについての" +"情報を載せています (実際Log4jは必須ではありませんが、多くの開発者が好んでい" +"ます)。" + +#. Tag: para +#: tutorial.xml:63 +#, no-c-format +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "次にデータベースに格納するイベントを表すクラスを作成します。" + +#. Tag: title +#: tutorial.xml:68 +#, no-c-format +msgid "The first class" +msgstr "最初のクラス" + +#. Tag: para +#: tutorial.xml:70 +#, no-c-format +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "最初の永続クラスは、プロパティをいくつか持つシンプルなJavaBeanです:" + +#. Tag: programlisting +#: tutorial.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:76 +#, no-c-format +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"ご覧のとおり、このクラスはフィールドがprivateの可視性を持っているのと同時" +"に、 JavaBean標準のゲッター、セッターメソッドの命名規約に従っています。 この" +"ような設計は推奨されていますが必須ではありません。 アクセサメソッドを設けるの" +"はリファクタリングを考えた頑健性のためで、 Hibernateはフィールドに直接アクセ" +"スすることも可能です。 引数のないコンストラクタは、リフレクションでこのクラス" +"のインスタンスを作成するために 必要です。" + +#. Tag: para +#: tutorial.xml:84 +#, no-c-format +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"id プロパティは、ある特定のイベントに対するユニークな識別" +"子の値を保持します。 Hibernateの完全な機能を使いたければ、すべての永続エン" +"ティティクラス (それほど重要ではない依存クラスというものもあります) にこの" +"ような識別子プロパティが必要になります。 事実上ほとんどのアプリケーション(特" +"にwebアプリケーション)では、 識別子でオブジェクトを区別する必要があるため、" +"これは制限というよりも特徴であると考えるべきです。 しかし通常オブジェクトのID" +"を操作するようなことはしません。 そのためセッターメソッドはprivateにするべき" +"です。 Hibernateだけがオブジェクトがセーブされたときに識別子へ値を代入しま" +"す。 Hibernateが(public, private, protected)フィールドに直接アクセスできる" +"のと同様に、 public, private, protectedのアクセサメソッドにアクセスできるとい" +"うことがわかるでしょう。 選択はあなたに任されているので、あなたのアプリケー" +"ションの設計に合わせることができます。" + +#. Tag: para +#: tutorial.xml:96 +#, no-c-format +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"引数のないコンストラクタはすべての永続クラスに必須です。 これはHibernateが" +"Javaのリフレクションを使って、オブジェクトを作成しなければならないためです。 " +"コンストラクタをprivateにすることは可能ですが、 実行時のプロキシ生成と、バイ" +"トコード操作なしの効率的なデータの抽出には、 package可視性が必要です。" + +#. Tag: para +#: tutorial.xml:103 +#, no-c-format +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"開発フォルダの src というディレクトリの適切なパッケージ" +"に、 このJavaソースファイルを配置してください。 この時点でディレクトリは以下" +"のようになっているはずです:" + +#. Tag: programlisting +#: tutorial.xml:108 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:110 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "次のステップでは、Hibernateにこの永続クラスの情報を教えます。" + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The mapping file" +msgstr "マッピングファイル" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"Hibernateは、どのように永続クラスのオブジェクトをロードし格納すればよいかを知" +"る必要があります。 ここでHibernateマッピングファイルが登場します。 マッピング" +"ファイルは、データベース内のどのテーブルにアクセスしなければならないか、 その" +"テーブルのどのカラムを使うべきかを、Hibernateに教えます。" + +#. Tag: para +#: tutorial.xml:126 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "マッピングファイルの基本的な構造はこのようになります:" + +#. Tag: programlisting +#: tutorial.xml:130 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:132 +#, no-c-format +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"Hibernate DTDが非常に洗練されていることに注目してください。 このDTDは、エディ" +"タやIDEでのXMLマッピング要素と属性のオートコンプリーション機能に利用できま" +"す。 またDTDファイルをテキストエディタで開けてみてください。 というのも、すべ" +"ての要素と属性を概観し、 コメントやデフォルトの値を見るには一番簡単な方法だか" +"らです。 Hibernateは、webからDTDファイルをロードせずに、 まずアプリケーション" +"のクラスパスからこれを探し出そうとすることに注意してください。 DTDファイルは" +"Hibernateディストリビューションの src/ ディレクトリと同" +"様、hibernate3.jar にも含まれています。" + +#. Tag: para +#: tutorial.xml:143 +#, no-c-format +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"以降の例ではコードを短くするためにDTD宣言を省略します。 当然ですがこれはオプ" +"ションではありません。" + +#. Tag: para +#: tutorial.xml:148 +#, no-c-format +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"2つの hibernate-mapping タグの間に class 要素を含めてください。 すべての永続エンティティクラス(念を押します" +"が、 ファーストクラスのエンティティではない依存クラスというものが後ほど登場し" +"ます) はSQLデータベース内のテーブルへのこのようなマッピングを必要とします。" + +#. Tag: programlisting +#: tutorial.xml:155 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:157 +#, no-c-format +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"これまで私たちは、Event クラスのオブジェクトを " +"EVENTS テーブルに対して、どのように永続化したりロードした" +"りするのかを Hibernateに教えてきました。そして個々のインスタンスはテーブルの" +"行として表現されます。 それでは引き続きテーブルの主キーに対するユニークな識別" +"子プロパティをマッピングしていきます。 さらに、この識別子の扱いに気を使いたく" +"なかったのと同様に、 代理の主キーカラムに対するHibernateの識別子生成戦略を設" +"定します。" + +#. Tag: programlisting +#: tutorial.xml:165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:167 +#, no-c-format +msgid "" +"The id element is the declaration of the identifer " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"id 要素は識別子プロパティの宣言であり、 name=\"id" +"\" でJavaプロパティの名前を宣言します。 Hibernateはこのプロパティへ" +"アクセスするためにゲッター、セッターメソッドを使います。 カラム属性では " +"EVENTS テーブルのどのカラムを主キーとして使うのかを " +"Hibernateに教えます。 入れ子になっている generator 要素" +"は、識別子を生成する時の戦略を指定します。 (この例では native を用いました)。 この要素は、設定したデータベース(dialect)に対する" +"最良な識別子生成戦略を選定するものです。 Hibernateは、アプリケーションで値を" +"割り当てる戦略(もしくは独自に拡張した戦略)と同様に、 グローバルにユニークな" +"値をデータベースに生成させる戦略もサポートしています。" + +#. Tag: para +#: tutorial.xml:180 +#, no-c-format +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"最後にクラスの永続プロパティの宣言をマッピングファイルに含めます。 デフォルト" +"では、クラスのプロパティは永続と見なされません:" + +#. Tag: programlisting +#: tutorial.xml:186 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:188 +#, no-c-format +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"id 要素の場合と同様に、 property 要素" +"の name 属性で、どのゲッターとセッターメソッドを使うべきか" +"をHibernateに教えます。 この例では、Hibernateは getDate()/setDate()" +"getTitle()/setTitle() を 探します。" + +#. Tag: para +#: tutorial.xml:195 +#, no-c-format +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"なぜ date プロパティのマッピングには column 属性があり、title プロパティにはないのでしょう" +"か? column 属性がなければ、Hibernateはプロパティ名をカラ" +"ム名として使います。 これは title では上手く行きます。 し" +"かし date はほとんどのデータベースで予約語なので、 違う名" +"前でマッピングした方がよいのです。" + +#. Tag: para +#: tutorial.xml:204 +#, no-c-format +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"次に興味深いのは title マッピングが type 属性をも欠いている点です。 マッピングファイルで宣言して使うtypeは、" +"おわかりかもしれませんがJavaのデータ型ではありません。 SQLデータベースの型で" +"もありません。 これは Hibernateマッピング型 と呼ばれ" +"る、 JavaからSQLデータの型へまたはSQLからJavaデータ型へ翻訳するコンバータで" +"す。 繰り返しになりますが、Hibernateは type 属性がマッピン" +"グファイル内になければ、 正しいコンバージョンとマッピング型を自分で解決しよう" +"とします。 (Javaクラスのリフレクションを使った)この自動検知は、 場合によっ" +"てはあなたが期待または必要とするデフォルト値にならないかもしれません。 " +"date プロパティの場合がそうでした。 Hibernateはこの" +"( java.util.Date の)プロパティを SQLの date , timestamp , time のうち、ど" +"のカラムにマッピングするべきなのかわかりません。 timestamp コンバータでプロパティをマッピングすることにより、完全な日時を保存し" +"ます。" + +#. Tag: para +#: tutorial.xml:220 +#, no-c-format +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"このマッピングファイルは、Event.hbm.xml として " +"Event Javaクラスソースファイルのすぐ隣にセーブするべきで" +"す。 マッピングファイルの命名方法は任意ですが、hbm.xml サ" +"フィックスがHibernateの開発者のコミュニティ内での習慣となっています。 現在" +"ディレクトリ構造はこのようになっているはずです:" + +#. Tag: programlisting +#: tutorial.xml:228 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:230 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "Hibernateの主要な設定を続けます。" + +#. Tag: title +#: tutorial.xml:237 +#, no-c-format +msgid "Hibernate configuration" +msgstr "Hibernateの設定" + +#. Tag: para +#: tutorial.xml:239 +#, no-c-format +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"ここまでで永続クラスとマッピングファイルが揃いました。これからHibernateの設定" +"を行いますが、 その前にデータベースが必要です。 HSQL DBはJavaベースのインメモ" +"リSQL DBMSであり、HSQL DBウェブサイトからダウンロードできます。 実際にはダウ" +"ンロードした中の hsqldb.jar だけが必要です。 このファイル" +"を開発フォルダの lib/ ディレクトリに配置してください。" + +#. Tag: para +#: tutorial.xml:247 +#, no-c-format +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"data というディレクトリを開発ディレクトリのルートに作成し" +"てください。 HSQL DBはここにデータファイルを格納します。 このデータディレクト" +"リにおいて java -classpath lib/hsqldb.jar org.hsqldb.Server を実行し、 データベースを起動させてください。 動作の開始と、TCP/IPソ" +"ケットのバインドが確認できます。 後ほど作成するアプリケーションはここに接続し" +"ます。 もしこのチュートリアル中にデータベースを初期化したければ、 HSQL DBを" +"シャットダウンして(作業ウィンドウで CTRL + C を押しま" +"す) data/ ディレクトリ内のファイルを全て消去した後、 " +"HSQL DBを再起動します。" + +#. Tag: para +#: tutorial.xml:257 +#, no-c-format +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"Hibernateはアプリケーションのデータベースに接続する層なので、 コネクションの" +"情報が必要になります。 コネクションはJDBCコネクションプールを通じて行われます" +"が、これも設定する必要があります。 Hibernateディストリビューションにはいくつ" +"かのオープンソースのJDBCコネクションプールツールが含まれていますが、 この" +"チュートリアルではHibernateに組み込まれたコネクションプールを使います。 もし" +"製品レベルの品質のサードパーティJDBCコネクションプールソフトウェアを使いたけ" +"れば、 クラスパスに必要なライブラリをコピーして、異なるコネクションプールを設" +"定しなければ ならないことに注意してください。" + +#. Tag: para +#: tutorial.xml:267 +#, no-c-format +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"Hibernateの設定では、単純な hibernate.properties ファイ" +"ル、 それより少し洗練されている hibernate.cfg.xml ファイ" +"ル、 または完全にプログラム上でセットアップする方法が利用できます。 ほとんど" +"のユーザが好むのはXML設定ファイルです:" + +#. Tag: programlisting +#: tutorial.xml:273 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:275 +#, no-c-format +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"このXMLの設定が異なるDTDを使うことに注意してください。 特定のデータベースを受" +"け持つグローバルファクトリであるHibernateの SessionFactory を設定します。 もし複数のデータベースがある場合には、 (スタートアッ" +"プを簡単にするため)通常いくつかの設定ファイル内で、 いくつかの <" +"session-factory> を使う設定にしてください。" + +#. Tag: para +#: tutorial.xml:283 +#, no-c-format +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"最初の4つの property 要素はJDBCコネクションに必要な設定を" +"含んでいます。 dialectという名前の property 要素は、" +"Hibernateが生成する特定のSQL方言を指定します。 永続的なコンテキストに対する" +"Hibernateのセッションの自動管理は、後の例ですぐにわかるように、役に立つことで" +"しょう。 hbm2ddl.auto オプションはデータベーススキーマの自" +"動生成をonにします。 これは直接データベースに対して生成されます。 当然" +"(configオプションを削除して)offにしたり、 SchemaExport " +"というAntタスクの助けを借りてファイルにリダイレクトしたりできます。 最後に永" +"続クラスのためのマッピングファイルを設定に追加します。" + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"このファイルをソースディレクトリにコピーしてください。 するとこれはクラスパス" +"のルートにあることになります。 Hibernateは、スタートアップ時にクラスパスの" +"ルートで hibernate.cfg.xml というファイルを自動的に探しま" +"す。" + +#. Tag: title +#: tutorial.xml:305 +#, no-c-format +msgid "Building with Ant" +msgstr "Antによるビルド" + +#. Tag: para +#: tutorial.xml:307 +#, no-c-format +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"それではAntを使ってチュートリアルをビルドしましょう。 それにはAntがインストー" +"ルされていなければなりません。 Antダウンロードページ からダウンロードしてくださ" +"い。 Antのインストール方法はここでは説明しませんので、 Antマニュアル を参照してくださ" +"い。 Antをインストールすれば、ビルドファイルの作成を開始できます。 このファイ" +"ルは build.xml と呼ばれ、開発ディレクトリに直接配置しま" +"す。" + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "基本的なビルドファイルはこのようになります:" + +#. Tag: programlisting +#: tutorial.xml:320 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:322 +#, no-c-format +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" +"これは .jar で終わるlibディレクトリのすべてのファイルを、 " +"コンパイルに使用するクラスパスに追加することをAntに教えます。 また、Javaソー" +"スファイルでないすべてのファイルをターゲットディレクトリにコピーするというこ" +"とでもあります。 例えば設定ファイルやHibernateマッピングファイルなどです。 今" +"Antを実行すると、このような出力があるはずです:" + +#. Tag: programlisting +#: tutorial.xml:329 +#, no-c-format +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:334 +#, no-c-format +msgid "Startup and helpers" +msgstr "スタートアップとヘルパ" + +#. Tag: para +#: tutorial.xml:336 +#, no-c-format +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"さて Event オブジェクトをロードしたり格納したりする準備が" +"できました。 しかしまずはインフラストラクチャのコードを書いて、セットアップを" +"完了する必要があります。 まずはHibernateをスタートアップしなければなりませ" +"ん。 このスタートアップには、グローバルの SessionFactory " +"オブジェクトを生成して、 それをアプリケーションのコードでアクセスしやすい場所" +"に格納することが含まれます。 SessionFactory は新しく " +"Session をオープンすることができます。 Session はシングルスレッドの作業単位(Unit of Work)を表現します。 それに対し" +"SessionFactory はスレッドセーフのグローバルオブジェクトで" +"あり、 一度だけインスタンス化されます。" + +#. Tag: para +#: tutorial.xml:346 +#, no-c-format +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "" +"ここでスタートアップを行い、 便利に SessionFactory へアク" +"セスする HibernateUtil ヘルパクラスを作成します。 実装を見" +"てみましょう:" + +#. Tag: programlisting +#: tutorial.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:354 +#, no-c-format +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"このクラスは静的初期化ブロック(クラスがロードされるときにJVMによって一度だけ" +"呼ばれる) でグローバルの SessionFactory を生成するだけで" +"はなく、 静的シングルトンの使用を隠蔽します。 アプリケーションサーバーのJNDI" +"から SessionFactory を ルックアップするのと同様です。" + +#. Tag: para +#: tutorial.xml:361 +#, no-c-format +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"設定ファイル内で SessionFactory に名前を与えると、 " +"Hibernateは SessionFactory 構築後にJNDIに対しバインドを行" +"おうとします。 このコードを完全に排除するためには、 JMXデプロイメントを利用し" +"て JMXを利用できるコンテナをインスタンス化し、 HibernateService をJNDIへバインドすることもできます。 これらの高度なオプションは、" +"Hibernateのリファレンスドキュメントで説明されています。" + +#. Tag: para +#: tutorial.xml:370 +#, no-c-format +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"HibernateUtil.java を開発ソースディレクトリにある " +"events パッケージの 隣に配置してください。" + +#. Tag: programlisting +#: tutorial.xml:375 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:377 +#, no-c-format +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"これは問題なく再コンパイルできるはずです。 最後にロギングシステムを設定する必" +"要があります。 Hibernateはcommons loggingを使うため、Log4jとJDK 1.4 loggingの" +"選択をする必要がありません。 ほとんどの開発者が好むのはLog4jです。 Hibernate" +"ディストリビューション(のetc/ ディレクトリ)から " +"log4j.properties をあなたの src ディレ" +"クトリ内の hibernate.cfg.xml の隣にコピーしてください。 設" +"定例を見て、冗長な出力がよければ設定を変更してください。 デフォルトでは" +"Hibernateのスタートアップメッセージだけが標準出力に表示されます。" + +#. Tag: para +#: tutorial.xml:387 +#, no-c-format +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "" +"チュートリアルのインフラは完全です。 Hibernateを使って実際の作業をする準備が" +"整いました。" + +#. Tag: title +#: tutorial.xml:395 +#, no-c-format +msgid "Loading and storing objects" +msgstr "オブジェクトのロードと格納" + +#. Tag: para +#: tutorial.xml:397 +#, no-c-format +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"ついにオブジェクトのロードと格納にHibernateを使うことができます。 " +"main() メソッドを持つ EventManager クラ" +"スを書きます:" + +#. Tag: programlisting +#: tutorial.xml:402 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:404 +#, no-c-format +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"新しい Event オブジェクトを生成し、それをHibernateに渡しま" +"す。 今ではHibernateがSQLを処理し、データベースで INSERT " +"を実行します。 実行前に SessionTransaction を処理するコードを確認してください。" + +#. Tag: para +#: tutorial.xml:411 +#, no-c-format +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"Session は1つの作業単位(Unit of Work)です。 当分の間、話を" +"簡単にするために、 SessionTransaction の対応を一対一と仮定します。 使用しているトランザクション・システム" +"(このケースではJTAと共存できる単純なJDBC)からコードを保護するために、 " +"Hibernate Session 上で利用可能な Transaction APIを使用します。" + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"sessionFactory.getCurrentSession() はなにをするのでしょう" +"か? まず、いったん SessionFactory を取得し保持すれば " +"( HibernateUtil のおかげで簡単です)、このメソッドを何度" +"でも、 どこからでも呼び出すことが出来ます。 getCurrentSession() メソッドは常に「現在の」作業単位(Unit of Work)を返します。 " +"hibernate.cfg.xml のこの機能の設定で、\"thread\"を指定した" +"ことを思い出してください。 このため現在の作業単位のスコープは、このアプリケー" +"ションを実行する現在のJavaスレッドです。 しかしこれで全てではありません。" + +#. Tag: para +#: tutorial.xml:430 +#, no-c-format +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"Session は最初に必要となったとき、つまり最初に " +"getCurrentSession() が 呼ばれたときに開始します。 そのとき" +"Hibernateにより現在のスレッドに結び付けられます。 トランザクションが終了(コ" +"ミットもしくはロールバック)したとき、 Hibernateもスレッドから " +"Session を切り離し、クローズします。 再び " +"getCurrentSession() を呼ぶと、 新しい Session を取得して新しい作業単位をスタートできます。 この thread-" +"bound プログラミング・モデルはHibernateを利用する上で最も人気があ" +"ります。" + +#. Tag: para +#: tutorial.xml:441 +#, no-c-format +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." + +#. Tag: para +#: tutorial.xml:452 +#, no-c-format +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"トランザクションの扱いと境界の詳しい情報については、 を見てください。 この例ではエラー処理やロールバックも割愛" +"します。" + +#. Tag: para +#: tutorial.xml:458 +#, no-c-format +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"この最初のルーチンを実行するには、Antのビルドファイルに呼び出し可能なターゲッ" +"トを 追加しなければなりません:" + +#. Tag: programlisting +#: tutorial.xml:462 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:464 +#, no-c-format +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"action 引数の値は、ターゲットを呼ぶときにコマンドラインで" +"設定します:" + +#. Tag: programlisting +#: tutorial.xml:469 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:471 +#, no-c-format +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "" +"コンパイルすると、Hibernateがスタートし、あなたの設定によりますが、 多くのロ" +"グ出力があるはずです。 その最後には以下の行があるでしょう:" + +#. Tag: programlisting +#: tutorial.xml:476 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:478 +#, no-c-format +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"これはHibernateが実行する INSERT で、 クエスチョンマークは" +"JDBCバインドパラメータを表しています。 引数としてバインドされる値を見るため、" +"あるいはログの冗長性を減らすためには、 log4j.properties を" +"チェックしてください。" + +#. Tag: para +#: tutorial.xml:484 +#, no-c-format +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"それでは同じように格納されたイベントの一覧を見ようと思います。 そのためメイン" +"メソッドにオプションを追加します:" + +#. Tag: programlisting +#: tutorial.xml:488 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "新しい listEvents()メソッド も追加します。" + +#. Tag: programlisting +#: tutorial.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:496 +#, no-c-format +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"ここですることは、データベースから存在するすべての Event " +"オブジェクトをロードするHQL (Hibernate Query Language) クエリを使うことで" +"す。 Hibernateは適切なSQLを生成し、それをデータベースに送り、 そのデータを" +"使って Event オブジェクトを生成します。 当然HQLでさらに複" +"雑なクエリを作成できます。" + +#. Tag: para +#: tutorial.xml:503 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "以下のステップで、すべての実行とテストを行います。" + +#. Tag: para +#: tutorial.xml:509 +#, no-c-format +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "" +"hbm2ddlを通す前にデータベースのデータを作成し、データベーススキーマを生成する" +"ために、 ant run -Daction=store を実行してください。" + +#. Tag: para +#: tutorial.xml:515 +#, no-c-format +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"今は hibernate.cfg.xml ファイルのプロパティをコメントアウ" +"トしてhbm2ddlを無効にしてください。 通常は継続的に単体テストをしている間は" +"hbm2ddlを有効にしておくのですが、 それ以外の場合にhbm2ddlを起動すると格納して" +"おいた全てのデータを ドロップ するでしょう。 設定を " +"create にすると、結果として 「SessionFactory生成の際、ス" +"キーマから全てのテーブルをドロップして再作成する」という設定になります。" + +#. Tag: para +#: tutorial.xml:525 +#, no-c-format +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"今 -Daction=list と指定してAntを呼ぶと、 これまで格納した" +"イベントが見えるはずです。 store アクションを数回以上呼ぶ" +"ことも可能です。" + +#. Tag: para +#: tutorial.xml:531 +#, no-c-format +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"注意:初めてHibernateに触れる人々の多くがここで失敗するため、Table " +"not found エラーメッセージに 関する質問を定期的に見かけます。 しか" +"し上記のステップに従えば、hbm2ddlが最初に実行されたときにデータベーススキーマ" +"を作成し、 その後の実行においてもこのスキーマを使用するので、問題は起こらない" +"でしょう。 マッピングやデータベーススキーマを変更したときは、もう一度hbm2ddl" +"を有効にしてください。" + +#. Tag: title +#: tutorial.xml:544 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "パート2 - 関連のマッピング" + +#. Tag: para +#: tutorial.xml:546 +#, no-c-format +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "" +"永続エンティティクラスをテーブルにマッピングしました。 さらにこの上にいくつか" +"のクラスの関連を追加しましょう。 まず初めにアプリケーションに人々を追加し、彼" +"らが参加するイベントのリストを格納します。" + +#. Tag: title +#: tutorial.xml:552 +#, no-c-format +msgid "Mapping the Person class" +msgstr "Personクラスのマッピング" + +#. Tag: para +#: tutorial.xml:554 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "最初の Person クラスは単純です:" + +#. Tag: programlisting +#: tutorial.xml:558 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:560 +#, no-c-format +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"Person.hbm.xml という新しいマッピングファイルを作成してく" +"ださい (ファイルの最初にDTDへの参照を忘れずに入れてください):" + +#. Tag: programlisting +#: tutorial.xml:565 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:567 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "最後にHibernateの設定に新しいマッピングを追加してください:" + +#. Tag: programlisting +#: tutorial.xml:571 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:573 +#, no-c-format +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"それではこれら2つのエンティティ間の関連を作成します。 人々がイベントに参加で" +"き、イベントが参加者を持つのは明らかです。 扱わなければならない設計の問題は、" +"方向、多重度、コレクションの振る舞いです。" + +#. Tag: title +#: tutorial.xml:583 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "単方向Setベース関連" + +#. Tag: para +#: tutorial.xml:585 +#, no-c-format +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "" +"イベントのコレクションを Person クラスに追加します。 こう" +"しておくと、明示的なクエリ、つまりわざわざaPerson.getEvents()を呼び出さずに、 特定の人に紐付くイベントを簡単にナビゲートすることが" +"できます。 私たちはJavaのコレクション、Set を使います。 コ" +"レクションは重複要素を持たないし、順番は私たちには意味がないからです。" + +#. Tag: para +#: tutorial.xml:592 +#, no-c-format +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "" +"Set で実装される単方向、多値関連が必要です。 Javaクラス内" +"に対応するコードを書いてマッピングしましょう:" + +#. Tag: programlisting +#: tutorial.xml:597 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:599 +#, no-c-format +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"この関連をマッピングする前に、反対側について考えてください。 明らかなことです" +"が、今はこれを単方向にしただけです。 逆に、 Event 側にも別" +"のコレクションを作ることもできます。 例えば anEvent.getParticipants" +"() のように、 双方向にナビゲートしたければ、そうすることもできま" +"す。 これは機能的にみて必要ではありません。 特定のイベントに関係するデータを" +"取得する明確なクエリを、いつでも実行することが出来ました。 この設計の選択は開" +"発者に任されていて、この議論により明らかなのは関連の多重度です。 つまり両側を" +"「多」値にする、 多対多 と呼ばれる関連です。 そのため" +"Hibernateのmany-to-manyマッピングを使います:" + +#. Tag: programlisting +#: tutorial.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:612 +#, no-c-format +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"Hibernateはありとあらゆる種類のコレクションマッピングをサポートしています" +"が、 最も一般的なものが <set> です。 多対多関連(ま" +"たは n:m エンティティリレーションシップ)には、 関連テー" +"ブルが必要です。 このテーブルのそれぞれの行は、人とイベント間のリンクを表現し" +"ます。 テーブル名は set 要素の table 属" +"性で設定します。 人側の関連の識別子カラム名は <key> " +"要素で、 イベント側のカラム名は <many-to-many> の " +"column 属性で定義します。 Hibernateにコレクションのオブ" +"ジェクトのクラス (正確には、参照のコレクションの反対側のクラス)を教えなけれ" +"ばなりません。" + +#. Tag: para +#: tutorial.xml:624 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "そのためこのマッピングのデータベーススキーマは以下のようになります。:" + +#. Tag: programlisting +#: tutorial.xml:628 +#, no-c-format +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:633 +#, no-c-format +msgid "Working the association" +msgstr "関連を働かせる" + +#. Tag: para +#: tutorial.xml:635 +#, no-c-format +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "" +"EventManager の新しいメソッドで人々とイベントを一緒にしま" +"しょう:" + +#. Tag: programlisting +#: tutorial.xml:639 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"PersonEvent をロードした後、 普通の" +"コレクションメソッドを使って単純にそのコレクションを修正してください。 ご覧の" +"とおり update()save() の明示的な呼" +"び出しはありません。 Hibernateは、修正されたことにより更新する必要のあるコレ" +"クションを自動的に検知します。 これは 自動ダーティチェック と呼ばれ、 オブジェクトの名前やdateプロパティを修正することで試すこ" +"とも可能です。 それらが 永続 状態にある限り、 つまり特定" +"のHibernate Session にバインドされている限り (例えば作業" +"単位(Unit of Work)の中で単にロードまたはセーブされた)、 Hibernateはどんな変" +"更もモニターし、遅延書き込み(write-behind)でSQLを実行します。 通常、作業単位" +"(Unit of Work)の最後にだけ行われるデータベースとメモリの状態を同期させる処理" +"は、 フラッシュ と呼ばれます。 このコードでは、作業単位" +"(Unit of Work)はデータベーストランザクションのコミット(もしくはロールバッ" +"ク)で終了します。 これは、 CurrentSessionContext クラスに" +"対して thread を設定したためです。" + +#. Tag: para +#: tutorial.xml:656 +#, no-c-format +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"異なる作業単位(Unit of Work)で人々とイベントをロードすることも当然できます。 " +"そうでなければ、永続状態にないとき(以前に永続であったなら、この状態を " +"分離(detached) と呼びます)、 Session の外部でオブジェクトを修正します。 分離されるときにはコレクションを" +"変更することも可能です:" + +#. Tag: programlisting +#: tutorial.xml:663 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:665 +#, no-c-format +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"update の呼び出しは分離オブジェクトを再び永続化します。 こ" +"れは、新しい作業単位(Unit of Work)にバインドすると言えるでしょう。 そのため分" +"離の間に加えられたどのような修正もデータベースにセーブできます。 エンティティ" +"オブジェクトのコレクションへの修正(追加・削除)も同様にセーブできます。" + +#. Tag: para +#: tutorial.xml:672 +#, no-c-format +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"これは今はあまり使いみちがありませんが、 自分のアプリケーションの設計に組み込" +"むことができる重要なコンセプトです。 それではこのエクササイズの最後に、 " +"EventManager のメインメソッドに新しいアクションを追加して " +"コマンドラインから呼び出してみましょう。 人やイベントの識別子が必要なら、 " +"save() メソッドが返してくれます (場合によっては識別子を返" +"すためにメソッドを修正する必要があるかもしれません)。" + +#. Tag: programlisting +#: tutorial.xml:680 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:682 +#, no-c-format +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"これは同じように重要な2つのクラス、つまり2つのエンティティ間の関連の例でし" +"た。 前に述べたように、典型的なモデルには、普通「比較的重要ではない」他のクラ" +"スと型があります。 これまでに見たような int や " +"String のようなものです。 このようなクラスを 値" +"型 と言います。 このインスタンスは特定のエンティティに " +"依存 します。 この型のインスタンスは独自のIDを持ちませんし、 エン" +"ティティ間で共有されることもありません (ファーストネームが同じだったとして" +"も、2人の人は同じ firstname オブジェクトを参照しませ" +"ん)。 値型はもちろんJDK内に見つかりますが、それだけではなく (実際、" +"HibernateアプリケーションにおいてすべてのJDKクラスは値型と見なせます)、 例え" +"ば AddressMonetaryAmount のような独" +"自の依存クラスを書くこともできます。" + +#. Tag: para +#: tutorial.xml:695 +#, no-c-format +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"値型のコレクションを設計することもできます。 これは他のエンティティへの参照の" +"コレクションとは概念的に非常に異なりますが、 Javaではほとんど同じように見えま" +"す。" + +#. Tag: title +#: tutorial.xml:703 +#, no-c-format +msgid "Collection of values" +msgstr "値のコレクション" + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"値型オブジェクトのコレクションを Person エンティティへ追加" +"します。 Eメールアドレスを格納したいのですが、String 型を" +"使っているので、 コレクションは再び Set です:" + +#. Tag: programlisting +#: tutorial.xml:710 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:712 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "この Set のマッピングです:" + +#. Tag: programlisting +#: tutorial.xml:716 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:718 +#, no-c-format +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"前のマッピングと比べて違うのは element の部分ですが、 " +"Hibernateにこのコレクションが他のエンティティへの参照を含まず、 " +"String 型の要素のコレクションを含むことを教えます。 (小文" +"字の名前(string)はHibernateのマッピング型またはコンバータであるということで" +"す)。 繰り返しますが、set 要素の table 属性は、 コレクションのためのテーブル名を指定します。 key 要素はコレクションテーブルの外部キーカラム名を定義します。 " +"element 要素の column 属性は " +"String の値が実際に格納されるカラムの名前を定義します。" + +#. Tag: para +#: tutorial.xml:728 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "更新したスキーマを見てください:" + +#. Tag: programlisting +#: tutorial.xml:732 +#, no-c-format +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:734 +#, no-c-format +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"コレクションテーブルの主キーは、実際は両方のカラムを使った複合キーであること" +"がわかります。 これは人ごとにEメールアドレスが重複できないということで、 Java" +"のsetに要求されるセマンティクスそのものです。" + +#. Tag: para +#: tutorial.xml:740 +#, no-c-format +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"以前人とイベントを関連づけたときと全く同じように、 今や試しにコレクションに要" +"素を追加することができるようになりました。 両方ともJavaでは同じコードです。" + +#. Tag: programlisting +#: tutorial.xml:745 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:747 +#, no-c-format +msgid "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"今回、コレクションの初期化に fetch クエリを使用しません" +"でした。 そのため、getterメソッドの呼び出しによってコレクションを初期化するた" +"めのSELECTが 実行されるので、コレクションに要素を追加できます。 SQLのログを監" +"視して、即時フェッチを使って最適化してください。" + +#. Tag: title +#: tutorial.xml:757 +#, no-c-format +msgid "Bi-directional associations" +msgstr "双方向関連" + +#. Tag: para +#: tutorial.xml:759 +#, no-c-format +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"次に双方向関連をマッピングします。 Javaで両側から人とイベントの関連を動作させ" +"ます。 もちろん、データベーススキーマは変わりませんが、多重度は多対多のままで" +"す。 リレーショナルデータベースはネットワークプログラミング言語よりも柔軟なの" +"で、 ナビゲーションの方向のようなものを必要としません。 データはあらゆるの方" +"法で見たり復元できるということです。" + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "" +"まず Event イベントクラスに参加者のコレクションを追加しま" +"す:" + +#. Tag: programlisting +#: tutorial.xml:771 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:773 +#, no-c-format +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "" +"それでは Event.hbm.xml で関連のこちら側をマッピングしてく" +"ださい。" + +#. Tag: programlisting +#: tutorial.xml:777 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:779 +#, no-c-format +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"ご覧のとおり、いずれのマッピングドキュメント(XMLファイル)でも、普通の " +"set マッピングを使っています。 key と " +"many-to-many のカラム名が、 両方のマッピングドキュメントで" +"入れ替えになっていることに注目してください。 ここで最も重要な追加項目は、 " +"Event のコレクションマッピングの set 要" +"素にある inverse=\"true\" 属性です。" + +#. Tag: para +#: tutorial.xml:787 +#, no-c-format +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"この指定の意味は、2つの間のエンティティ間のリンクについての情報を探す必要があ" +"るとき、 Hibernateは反対側のエンティティ、つまり Person ク" +"ラスから探すということです。 一度2つのエンティティ間の双方向リンクがどのよう" +"に作成されるかがわかれば、 これを理解することはとても簡単です。" + +#. Tag: title +#: tutorial.xml:796 +#, no-c-format +msgid "Working bi-directional links" +msgstr "双方向リンクの動作" + +#. Tag: para +#: tutorial.xml:798 +#, no-c-format +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"まず、Hibernateが通常のJavaのセマンティクスに影響を及ぼさないことを心に留めて" +"おいてください。 私たちは、単方向の例としてどのように PersonEvent の間のリンクを作成したでしょうか? " +"Person のインスタンスのイベントへの参照のコレクションに " +"Event のインスタンスを追加しました。 そのためこのリンクを" +"双方向にしたければ、 当たり前ですが反対側にも同じことをしなければなりませ" +"ん。 Event のコレクションに Person へ" +"の 参照を追加するということです。 この「両側でリンクを設定すること」は絶対に" +"必要なので、決して忘れないでください。" + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "" +"Many developers program defensive and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"多くの開発者は慎重にプログラムするので、 エンティティの両側に正しく関連を設定" +"するリンク管理メソッドを作成します。 例えば Person では以" +"下のようになります。:" + +#. Tag: programlisting +#: tutorial.xml:813 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:815 +#, no-c-format +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"コレクションのゲットとセットメソッドが現在protectedになっていることに注意して" +"ください。 これは同じパッケージのクラスやサブクラスのメソッドは依然アクセスが" +"可能ですが、 (ほとんど)そのパッケージ外のどのクラスでも直接そのコレクション" +"を台無しにすることを防ぎます。 おそらく反対側のコレクションにも同じことをした" +"方がいいでしょう。" + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"inverse マッピング属性とはいったい何でしょうか? 開発者と" +"Javaにとっては、双方向リンクは単に両側の参照を正しく設定するということです。 " +"しかしHibernateは(制約違反を避けるために)SQLの INSERT " +"と UPDATE 文を正確に変更するための十分な情報を持っていない" +"ので、 双方向関連プロパティを扱うための何らかの助けを必要とします。 関連の片" +"側を inverse に設定することで、Hibernateは基本的には設定し" +"た側を無視し、 反対側の として考えます。 これだけで、" +"Hibernateは方向を持つナビゲーションモデルをSQLデータベーススキーマへ変換する" +"ときの すべての問題にうまく対処できます。 覚えておかなければならないルールは" +"簡単です。 双方向関連は必ず片側を inverse にする必要がある" +"ということです。 一対多関連ではそれは多側でなければなりません。 多対多関連で" +"はどちら側でも構いません。どちらでも違いはありません。" + +#. Tag: para +#: tutorial.xml:837 +#, no-c-format +msgid "Let's turn this into a small web application." +msgstr "ではこれを小さなWebアプリケーションにしてみましょう。" + +#. Tag: title +#: tutorial.xml:844 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "パート3 - EventManager Webアプリケーション" + +#. Tag: para +#: tutorial.xml:846 +#, no-c-format +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"HibernateのWebアプリケーションは、スタンドアローンのアプリケーションのように " +"SessionTransaction を使用します。 " +"しかしいくつかの一般的なパターンが役立ちます。 ここで " +"EventManagerServlet を作成します。このサーブレットは、 " +"データベースに格納した全てのイベントをリストにでき、さらにHTMLフォームから新" +"しいイベントを入力できるものです。" + +#. Tag: title +#: tutorial.xml:854 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "基本的なServletの記述" + +#. Tag: para +#: tutorial.xml:856 +#, no-c-format +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "" +"新しいクラスを、ソースディレクトリの events パッケージに作" +"成してください。" + +#. Tag: programlisting +#: tutorial.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:863 +#, no-c-format +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"ServletはHTTPの GET リクエストのみを処理するので、 " +"doGet() を実装します。" + +#. Tag: programlisting +#: tutorial.xml:868 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:870 +#, fuzzy, no-c-format +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"これは session-per-request というパターンです。 Servlet" +"がリクエストを受け取ると、 SessionFactory の " +"getCurrentSession() の最初の呼び出しで、 Hibernateの新し" +"い Session が開かれます。 そのときデータベーストランザク" +"ションが開始されます。 データの読み書きに関わらず、すべてのデータアクセスはト" +"ランザクション内で行います。 (アプリケーション内ではオートコミットモードを使" +"用しません)。" + +#. Tag: para +#: tutorial.xml:879 +#, no-c-format +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." + +#. Tag: para +#: tutorial.xml:886 +#, no-c-format +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"次に、リクエストのアクションは処理され、レスポンスであるHTMLが描画されます。 " +"これについてはすぐに説明します。" + +#. Tag: para +#: tutorial.xml:891 +#, fuzzy, no-c-format +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"最後にリクエストの処理とHTML描画が完了したときに、作業単位(Unit of Work)を終" +"了します。 もし処理や描画中に問題が発生した場合、exceptionが投げられてデータ" +"ベーストランザクションをロールバックします。 これで session-per-" +"request パターンが完了します。 全てのサーブレットにトランザクション" +"境界のコードを書く代わりに、サーブレットフィルタに記述することも可能です。 " +"Open Session in View と呼ばれるこのパターンについては、 " +"HibernateのWebサイトやWikiを参照してください。 サーブレットではなくJSPでHTML" +"描画をしようとすると、すぐにこのパターンについての情報が必要になるでしょう。" + +#. Tag: title +#: tutorial.xml:905 +#, no-c-format +msgid "Processing and rendering" +msgstr "処理と描画" + +#. Tag: para +#: tutorial.xml:907 +#, no-c-format +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "では、リクエストの処理とページの描画を実装します。" + +#. Tag: programlisting +#: tutorial.xml:911 +#, no-c-format +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:913 +#, fuzzy, no-c-format +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "" +"JavaとHTMLが混在するコーディングスタイルは、より複雑なアプリケーションには適" +"していないでしょう (このチュートリアルでは、基本的なHibernateのコンセプトを" +"示しているだけであることを覚えておいてください)。 このコードはHTMLのヘッダー" +"とフッターの記述です。 このページには、イベントを入力するHTMLフォームと、デー" +"タベースにある全てのイベントのリストが表示されます。 最初のメソッドはごく単純" +"なHTML出力です。" + +#. Tag: programlisting +#: tutorial.xml:922 +#, no-c-format +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:924 +#, no-c-format +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"listEvents() メソッドは、現在のスレッドに結びつく " +"Hibernateの Session を使用して、クエリを実行します。" + +#. Tag: programlisting +#: tutorial.xml:930 +#, no-c-format +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:932 +#, no-c-format +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"最後に、 store アクションが createAndStoreEvent()" +" メソッドを 呼び出します。このメソッドでも現在のスレッドの " +"Session を利用します。" + +#. Tag: programlisting +#: tutorial.xml:938 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:940 +#, no-c-format +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"これでサーブレットの完成です。 サーブレットへのリクエストは、一つの " +"SessionTransaction で処理されるで" +"しょう。 最初のスタンドアローンのアプリケーションのように、 Hibernateは自動的" +"にこれらのオブジェクトを実行するスレッドに結び付けることができます。 これによ" +"り、開発者が自由にコードをレイヤー分けでき、 好きな方法で " +"SessionFactory へのアクセスができるようになります。 通常、" +"開発者はより洗練されたデザインを使用して、データアクセスのコードを データアク" +"セスオブジェクトに移動するでしょう(DAOパターン)。 より多くの例は、Hibernate" +"のWikiを参照してください。" + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Deploying and testing" +msgstr "デプロイとテスト" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"このアプリケーションのデプロイのために、Webアーカイブ(WAR)を作成してくださ" +"い。 以下のAntターゲットを build.xml に加えてください。" + +#. Tag: programlisting +#: tutorial.xml:961 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:963 +#, no-c-format +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"このターゲットは hibernate-tutorial.war というファイルを " +"プロジェクトディレクトリに作成します。 このファイルはすべてのライブラリと " +"web.xml 記述子を含んでおり、 プロジェクトのベースディレク" +"トリに置かれることを期待されます。" + +#. Tag: programlisting +#: tutorial.xml:969 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:971 +#, no-c-format +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." +msgstr "" +"Webアプリケーションのコンパイルとデプロイの前に、 jsdk.jar という 追加のライブラリが必要なことに注意してください。 これはJava" +"サーブレットの開発キットです。 もしまだこのライブラリを持っていないなら、Sun" +"のウェブサイトで入手して、 ライブラリディレクトリにコピーしてください。 しか" +"し、これはコンパイルにのみ使用され、WARパッケージからは除外されます。" + +#. Tag: para +#: tutorial.xml:979 +#, no-c-format +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"ビルドとデプロイのために、プロジェクトディレクトリで ant war を呼び出し、 hibernate-tutorial.war ファイルを" +"Tomcatの webapp ディレクトリにコピーしてください。 まだ" +"Tomcatをインストールしていなければ、ダウンロードして、以下のインストールガイ" +"ドに従ってください。 しかし、このアプリケーションのデプロイするために、Tomcat" +"の設定を変更する必要はありません。" + +#. Tag: para +#: tutorial.xml:987 +#, no-c-format +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"一度デプロイしてTomcatを起動すれば、 http://localhost:8080/" +"hibernate-tutorial/eventmanager で アプリケーションへのアクセスが可" +"能です。 最初のリクエストが作成したサーブレットに渡ったときに、Tomcatのログ" +"で Hibernateの初期化処理を確認してください ( HibernateUtil 内の静的初期化ブロックが呼ばれています)。 また、exceptionが発生した" +"なら詳細を確認してください。" + +#. Tag: title +#: tutorial.xml:1000 +#, no-c-format +msgid "Summary" +msgstr "要約" + +#. Tag: para +#: tutorial.xml:1002 +#, no-c-format +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"このチュートリアルでは、簡単なスタンドアローンのHibernateアプリケーションと " +"小規模のWebアプリケーションを書くための基本を紹介しました。" + +#. Tag: para +#: tutorial.xml:1007 +#, no-c-format +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"もうHibernateに自信があれば、リファレンスドキュメントの目次に目を通して、 面" +"白そうだと思うトピックを探してください。 最も頻繁に質問があるのは、トランザク" +"ション処理()、 フェッチのパフォーマンス" +"()、 APIの使い方()とクエリ ()で" +"す。" + +#. Tag: para +#: tutorial.xml:1015 +#, no-c-format +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" +"さらに(特別な)チュートリアルが必要なら、Hibernateウェブサイトを忘れずに" +"チェックしてください。" diff --git a/documentation/envers/src/main/docbook/ja-JP/content/xml.po b/documentation/envers/src/main/docbook/ja-JP/content/xml.po new file mode 100644 index 0000000000..0f64abc95d --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/content/xml.po @@ -0,0 +1,442 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:5 +#, no-c-format +msgid "XML Mapping" +msgstr "XMLマッピング" + +#. Tag: emphasis +#: xml.xml:7 +#, no-c-format +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "" +"XMLマッピングはHibernate3.0では試験的な機能であり、非常に活動的に開発中です。" + +#. Tag: title +#: xml.xml:13 +#, no-c-format +msgid "Working with XML data" +msgstr "XMLデータでの作業" + +#. Tag: para +#: xml.xml:15 +#, no-c-format +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"Hibernateでは永続性のPOJOを使って作業するのとほぼ同じようなやり方で、 永続性" +"のXMLデータを使って作業できます。" + +#. Tag: para +#: xml.xml:22 +#, no-c-format +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"HibernateはXMLツリーを操作するためのAPIとしてdom4jをサポートしています。 デー" +"タベースからdom4jのツリーを復元するクエリを書くことができ、 ツリーに対して" +"行った修正は自動的にデータベースと同期されます。 またXMLドキュメントを取得す" +"ることができ、dom4jを使ってドキュメントをパースし、 Hibernateの任意の基本操作" +"を使ってデータベースへ書き込むことができます。: つまり、persist(), " +"saveOrUpdate(), merge(), delete(), replicate() 操作です(マージはま" +"だサポートしていません)。" + +#. Tag: para +#: xml.xml:32 +#, no-c-format +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"データのインポート/エクスポート、 JMSによるエンティティデータの外部化やSOAP、" +"XSLTベースのレポートなど、 この機能には多くの用途があります。" + +#. Tag: para +#: xml.xml:37 +#, no-c-format +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"単一のマッピングは、クラスのプロパティとXMLドキュメントのノードを 同時にデー" +"タベースへマッピングするために使うことができます。 またマッピングするクラスが" +"なければ、 XMLだけをマッピングするために使うことができます。" + +#. Tag: title +#: xml.xml:44 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "XMLとクラスのマッピングを同時に指定する" + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "これはPOJOとXMLを同時にマッピングする例です。:" + +#. Tag: programlisting +#: xml.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:54 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "XMLマッピングだけを指定する" + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "これはPOJOクラスがないマッピングの例です。:" + +#. Tag: programlisting +#: xml.xml:60 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:62 +#, no-c-format +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"このマッピングにより、dom4jツリーか、 プロパティ名/値の組のグラフ(javaの " +"Map)として データにアクセスできます。 プロパティの名前" +"は、HQLクエリー内で参照できる純粋な論理構造です。" + +#. Tag: title +#: xml.xml:73 +#, no-c-format +msgid "XML mapping metadata" +msgstr "XMLマッピングのメタデータ" + +#. Tag: para +#: xml.xml:75 +#, no-c-format +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"多くのHibernateのマッピング要素は node 属性が使用できま" +"す。 これによりXML属性の名前やプロパティやエンティティデータを保持する要素を" +"指定できます。 node 属性のフォーマットは以下の中の1つでな" +"ければなりません。:" + +#. Tag: para +#: xml.xml:84 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "" +"\"element-name\" - 指定したXML要素へマッピングします" + +#. Tag: para +#: xml.xml:87 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" +"\"@attribute-name\" - 指定したXML属性へマッピングします" + +#. Tag: para +#: xml.xml:90 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "\".\" - 親要素へマッピングします" + +#. Tag: para +#: xml.xml:93 +#, no-c-format +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - 指定したエレメントの指" +"定した属性へマッピングします" + +#. Tag: para +#: xml.xml:100 +#, no-c-format +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"コレクションと単一の値の関連に対して、 おまけの embed-xml " +"属性があります。 デフォルトの embed-xml=\"true\" と設定し" +"た場合、 関連するエンティティ(値型のコレクション)のXMLツリーは、 直接関連を所" +"有するエンティティのXMLツリー内に埋め込まれます。 反対に、embed-xml=" +"\"false\" と設定した場合、 参照される識別子の値だけが多重度1側の関" +"連に対するXMLに現れ、 単純にコレクションはまったく現れなくなります。" + +#. Tag: para +#: xml.xml:110 +#, no-c-format +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"あまりに多くの関連に対して embed-xml=\"true\" としたままに" +"するのは注意すべきです。 XMLは循環をうまく扱えません。" + +#. Tag: programlisting +#: xml.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"この例では、実際のaccountのデータではなく、 accountのidのコレクションを埋め込" +"むことにしました。 続きのHQLクエリです:" + +#. Tag: programlisting +#: xml.xml:122 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "このようなデータセットを返すでしょう" + +#. Tag: programlisting +#: xml.xml:128 +#, no-c-format +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:130 +#, no-c-format +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"<one-to-many> マッピングで embed-xml=\"true" +"\" と設定した場合、 データはこのようになるでしょう。" + +#. Tag: programlisting +#: xml.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:141 +#, no-c-format +msgid "Manipulating XML data" +msgstr "XMLデータを扱う" + +#. Tag: para +#: xml.xml:143 +#, no-c-format +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"XMLドキュメントを、アプリケーション内で再読み込みや更新をしてみましょう。 以" +"下ではdom4jのセッションを取得することで行います。:" + +#. Tag: programlisting +#: xml.xml:148 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: xml.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:152 +#, no-c-format +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"XMLベースのデータのインポート/エクスポートを実装するために、 Hibernateの " +"replicate() 操作をこの機能を結びつけるのは 極めて有効で" +"す。" diff --git a/documentation/envers/src/main/docbook/ja-JP/legal_notice.po b/documentation/envers/src/main/docbook/ja-JP/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/ja-JP/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ko-KR/Hibernate_Reference.po b/documentation/envers/src/main/docbook/ko-KR/Hibernate_Reference.po new file mode 100644 index 0000000000..6a0159d8b1 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - 개성있는 자바를 위한 관계 영속" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "하이버네이트 참조 문서" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ko-KR/content/architecture.po b/documentation/envers/src/main/docbook/ko-KR/content/architecture.po new file mode 100644 index 0000000000..2072fdf5e0 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/architecture.po @@ -0,0 +1,622 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:21 +#, no-c-format +msgid "Architecture" +msgstr "아키텍처" + +#. Tag: title +#: architecture.xml:24 +#, no-c-format +msgid "Overview" +msgstr "개요" + +#. Tag: para +#: architecture.xml:26 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "Hibernate 아키텍처에 대한 (매우) 높은 수준의 개요::" + +#. Tag: para +#: architecture.xml:39 +#, no-c-format +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"이 다이어그램은 어플리케이션에 영속화 서비스들(과 영속 객체들)을 제공하기 위" +"해 데이터베이스와 컨피그레이션을 사용하는 Hibernate를 보여준다." + +#. Tag: para +#: architecture.xml:44 +#, no-c-format +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"우리는 런타임 아키텍처에 대한 보다 상세한 뷰를 보여주고 싶다. 불행하게도, " +"Hibernate는 유연하며 몇 가지 접근법들을 제공한다. 우리는 두 가지 극단을 보여" +"줄 것이다. \"경량급\" 아키텍처는 그것 자신의 JDBC 커넥션들을 제공하고 그것 자" +"신의 트랜잭션들을 관리하는 어플리케이션을 갖는다. 이 접근법은 Hibernate의 API" +"의 최소 부분집합을 사용한다:" + +#. Tag: para +#: architecture.xml:61 +#, no-c-format +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"\"전체 정수\" 아키텍처는 기본 JDBC/JTA로부터 어플리케이션을 추상화 시키고 " +"Hibernate로 하여금 상세한 것을 처리하게 한다." + +#. Tag: para +#: architecture.xml:75 +#, fuzzy, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "" +"다음은 다이어그램들 내에 있는 객체들에 대한 몇가지 정의들이다: " + +#. Tag: term +#: architecture.xml:80 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#. Tag: para +#: architecture.xml:82 +#, no-c-format +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"단일 데이터베이스에 대한 컴파일된 매핑들의 threadsafe (불변의) 캐시. Session" +"과 ConnectionProvider의 클라이언트를 위한 팩토리. 프로세스 레벨 또는 클러스" +"터 레벨에서 트랜잭션들 사이에 재사용 가능한 데이터의 선택적인 (second-level) " +"캐시를 보관할 수도 있다." + +#. Tag: term +#: architecture.xml:92 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#. Tag: para +#: architecture.xml:94 +#, no-c-format +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"어플리케이션과 영속 저장소 사이의 대화를 표현하는 단일 쓰레드이고, 수명이 짧" +"은 객체. JDBC 커넥션을 포장한다. Transaction 용 팩토리. 객" +"체 그래프를 네비게이트 하거나 식별자로 객체들을 룩업할 때 사용되는 영속 객체" +"들에 대한 필수적인(첫 번째 레벨의) 캐시를 보관한다." + +#. Tag: term +#: architecture.xml:104 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "영속 객체들과 콜렉션들" + +#. Tag: para +#: architecture.xml:106 +#, no-c-format +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"persistent 상태와 비지니스 기능을 포함하는 수명이 짧고, 단일 쓰레드인 객체" +"들. 이것들은 통상의 JavaBeans/POJO들일 수 있고, 오직 그것들에 대한 오직 특별" +"한 것은 그것들이 현재 (정확하게 한 개의) Session과 연관되" +"어 있다는 점이다. Session이 닫히자마자, 그것들은 분리될" +"(detached 상태가 될) 것이고 어플리케이션 레이어에서 사용하는 것이 자유로와진" +"다(예를 들면. 직접적으로 프리젠테이션 계층으로 데이터 전송 객체들로서 그리고 " +"직접적으로 프리젠테이션 계층으로부터 데이터 전송 객체들로서)." + +#. Tag: term +#: architecture.xml:117 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "전이(Transient, 필자 주-과도) 객체들과 콜렉션들" + +#. Tag: para +#: architecture.xml:119 +#, no-c-format +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"Session과 현재 연관되어 있지 않은 영속 클래스들의 인스턴스" +"들. 그것들은 어플리케이션에 의해 초기화 되었고 (아직) 영속화 되지 않았거나 그" +"것들은 닫혀진Session에 의해 초기화 되었을 수도 있다." + +#. Tag: term +#: architecture.xml:128 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "Transaction (org.hibernate.Transaction)" + +#. Tag: para +#: architecture.xml:130 +#, no-c-format +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(옵션) 작업의 원자 단위를 지정하기 위해 어플리케이션에 의해 사용되는 단일 쓰" +"레드이고, 수명이 짧은 객체. 기본 JDBC, JTA 또는 CORBA 트랜잭션으로부터 어플리" +"케이션을 추상화 시킨다. 몇몇 경우들에서 하나의 Session은 " +"여러 개의 Transaction들에 걸칠 수 있다. 하지만 기본 API 또" +"는 Transaction을 사용하는 트랜잭션 경계 설정은 결코 옵션" +"이 아니다!" + +#. Tag: term +#: architecture.xml:141 +#, no-c-format +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#. Tag: para +#: architecture.xml:143 +#, no-c-format +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(옵션) JDBC 커넥션들에 대한 팩토리(그리고 그것들의 pool). 기본 " +"Datasource 또는 DriverManager로부터 어" +"플리케이션을 추상화 시킨다. 어플리케이션에 노출되지는 않지만 개발자에 의해 확" +"장/구현 된다." + +#. Tag: term +#: architecture.xml:151 +#, no-c-format +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#. Tag: para +#: architecture.xml:153 +#, no-c-format +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(옵션) Transaction 인스턴스들에 대한 팩토리. 어플리케이션" +"에 노출되지는 않지만 개발자에 의해 확장/구현 된다." + +#. Tag: emphasis +#: architecture.xml:160 +#, no-c-format +msgid "Extension Interfaces" +msgstr "Extension Interfaces" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"Hibernate는 당신의 영속 계층의 특성을 맞춤화 시키기 위해 당신이 구현할 수 있" +"는 선택적인 확장 인터페이스들을 제공한다. 상세한 것은 API 문서를 보라." + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"주어진 \"경량급\" 아키텍처의 경우, 어플리케이션은 JTA 또는 JDBC와 직접 대화하" +"기 위해서 Transaction/TransactionFactory 그리고/또는 ConnectionProvider API들을 무시한다." + +#. Tag: title +#: architecture.xml:179 +#, no-c-format +msgid "Instance states" +msgstr "인스턴스 상태들" + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"영속 클래스들의 인스턴스는 세개의 상태들 중 하나 일 수 있다. 그것들(상태들)" +"은 영속 컨텍스트(persistence context)에 대해 정의된다. " +"Hibernate Session 객체는 영속 컨텍스트이다:" + +#. Tag: term +#: architecture.xml:188 +#, no-c-format +msgid "transient" +msgstr "transient" + +#. Tag: para +#: architecture.xml:190 +#, no-c-format +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "" +"인스턴스는 임의의 컨텍스트와 연관되어 있지 않고, 결코 연관된 적이 없었다. 그" +"것은 영속 식별자(프라이머리 키 값)을 갖지 않는다." + +#. Tag: term +#: architecture.xml:198 +#, no-c-format +msgid "persistent" +msgstr "persistent" + +#. Tag: para +#: architecture.xml:200 +#, no-c-format +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"인스턴스는 현재 영속 컨텍스트와 연관되어 있다. 그것은 영속 식별자(프라이머리 " +"키 값) 그리고 아마 데이터베이스 내에 있는 대응하는 행을 갖는다. 특별한 영속 " +"컨텍스트의 경우, Hibernate는 영속 identity가 Java identity(객체의 메모리 내 " +"위치)와 같다는 점을 보증한다." + +#. Tag: term +#: architecture.xml:212 +#, no-c-format +msgid "detached" +msgstr "detached" + +#. Tag: para +#: architecture.xml:214 +#, no-c-format +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corrsponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"인스턴스는 영속 컨텍스트와 한번 연관되었지만, 그 컨텍스트가 닫혔거나, 그 인스" +"턴스가 또 다른 프로세스로 직렬화 되었다. 그것은 영속 identity 그리고, 아마 데" +"이터베이스 내에 대응하는 행을 갖는다. detached 인스턴스들의 경우, Hibernate" +"는 영속 identity과 Java identity 사이의 관계를 보증하지 않는다." + +#. Tag: title +#: architecture.xml:229 +#, no-c-format +msgid "JMX Integration" +msgstr "JMX 통합" + +#. Tag: para +#: architecture.xml:231 +#, no-c-format +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMX는 자바 컴포넌트 관리를 위한 J2EE 표준이다. Hibernate는 JMX 표준 서비스를 " +"통해 관리될 수도 있다. 우리는 배포본 내에 MBean 구현, org.hibernate." +"jmx.HibernateService를 제공한다." + +#. Tag: para +#: architecture.xml:237 +#, no-c-format +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"JBoss 어플리케이션 서버 상에 Hibernae를 JMX 서비스로서 배치하는 방법에 대한 " +"예제는 JBoss 사용자 가이드를 보길 바란다. JBoss 어플리케이션 서버 상에서, 만" +"일 당신이 JMX를 사용하여 배치할 경우 당신은 또한 다음 이점들을 얻는다:" + +#. Tag: para +#: architecture.xml:245 +#, no-c-format +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"Session 관리: Hibernate Session의 생" +"명주기가 JTA 트랜잭션의 영역 내에 자동적으로 바인드 될 수 있다. 이것은 당신" +"이 더이상 Session을 수작업으로 열고 닫지 않아도 됨을 의미" +"하고, 이것은 JBoss EJB 인터셉터의 업무가 된다. 당신은 또한 더 이상 당신의 코" +"드 어느 곳에서든 트랜잭션 경계설정에 대해 걱정하지 않아도 된다(당신이 물론 이" +"식성 있는 영속 계층을 작성하고자 원하지 않는한, 이를 위해 옵션 Hibernate " +"Transaction API를 사용하라). 당신은 Session에 접근하기 위해 HibernateContext를 호출한다." + +#. Tag: para +#: architecture.xml:257 +#, no-c-format +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"HAR 배치: 대개 당신은 JBoss 서비스 배치 디스크립터를 사" +"용하여 Hibernate JMX 서비스를 (EAR 과/또는 SAR 파일로) 배치하고, 그것은 " +"Hibernate SessionFactory의 통상적인 구성 옵션들 모두를 지" +"원한다. 하지만 당신은 여전히 모든 당신의 매핑 파일들을 배치 디스크립터 속에 " +"명명해야 한다. 만일 당신이 옵션 HAR 배치를 사용하고자 결정하는 경우, JBoss는 " +"당신의 HAR 파일 내에 있는 모든 매핑 파일들을 자동적으로 검출해낼 것이다." + +#. Tag: para +#: architecture.xml:268 +#, no-c-format +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "" +"이들 옵션들에 대한 추가 정보는 JBoss 어플리케이션 서버 사용자 가이드를 참조하" +"라." + +#. Tag: para +#: architecture.xml:272 +#, no-c-format +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"JMX 서비스로서 이용 가능한 또다른 특징은 런타임 Hibernate 통계이다. 를 보라." + +#. Tag: title +#: architecture.xml:279 +#, no-c-format +msgid "JCA Support" +msgstr "JCA 지원" + +#. Tag: para +#: architecture.xml:280 +#, no-c-format +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hibernate는 JCA 커넥터로서 구성될 수도 있다. 상세한 것은 웹 사이트를 보길 바" +"란다. Hibernate JCA 지원은 여전히 실험적으로 검토 중에 있음을 노트하길 바란" +"다." + +#. Tag: title +#: architecture.xml:287 +#, no-c-format +msgid "Contextual Sessions" +msgstr "컨텍스트 상의 세션들" + +#. Tag: para +#: architecture.xml:288 +#, no-c-format +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"Hibernate를 사용하는 대부분의 어플리케이션들은 어떤 양식의 \"컨텍스트상의" +"(contextual)\" 세션들을 필요로 한다. 여기서 주어진 세션은 주어진 컨텍스트의 " +"영역에 걸쳐 활동을 한다. 하지만 어플리케이션들을 가로질러 컨텍스트를 구성하" +"는 것에 대한 정의는 일반적으로 다르다; 그리고 다른 컨텍스트들은 현재라고 하" +"는 개념에 대해 다른 영역들을 정의한다. 버전 3.0 전의 Hibernate를 사용하는 어" +"플리케이션들은 자가생산된 ThreadLocal-기반의 컨텍스상의 세" +"션들, HibernateUtil과 같은 helper 클래스들을 활용했거나 프" +"락시/인터셉션 기반의 컨텍스트상의 세션들을 제공해주었던 (Spring 또는 Pico와 " +"같은 )제 3의 프레임웍들을 활용하는 경향이 있었다." + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"버전 3.0.1에서부터 시작하여, Hibernate는 SessionFactory." +"getCurrentSession() 메소드를 추가했다. 초기에 이것은 JTA 트랜잭션들을 사용하는 것을 전제했다. 여기서 JTA " +"트랜잭션은 현재 세션의 영역과 컨텍스트를 정의했다. Hibernate 팀은 성숙된 다수" +"의 스탠드얼론 JTA TransactionManager 구현들이 발표되면, " +"(전부는 아니겠지만) 대부분의 어플리케이션들이 그것들이 J2EE 컨테이너 내로 배치되든 그렇지 않든 간에 JTA 트랜" +"잭션 관리를 사용하게 될 것이라고 주장한다. 그것에 기초하여, JTA에 기반한 컨텍스트상의 세션들은 언젠가 당신이 사용을 필요로 하게 될 " +"전부다." + +#. Tag: para +#: architecture.xml:307 +#, no-c-format +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"하지만 버전 3.1 이후로 SessionFactory.getCurrentSession() " +"이면의 처리과정은 이제 플러그 가능하다. 그것을 끝내기 위해, 하나의 새로운 확" +"장 인터페이스 (org.hibernate.context.CurrentSessionContext)와 하나의 새로운 구성 파라미터(hibernate." +"current_session_context_class)가 현재 세션들을 정의하는 영역과 컨텍" +"스트의 플러그 가능성을 허용하기 위해 추가되었다." + +#. Tag: para +#: architecture.xml:314 +#, no-c-format +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"그것의 계약에 대한 상세한 논의는 org.hibernate.context." +"CurrentSessionContext 인터페이스에 관한 javadocs를 보라. 그것은 하" +"나의 메소드, currentSession()를 정의하며, 그 구현은 현재" +"의 컨텍스트 상의 세션을 추적할 책임이 있다. 비공식적으로, Hibernate는 이 인터" +"페이스에 대한 세 개의 구현들을 부수적으로 포함하고 있다." + +#. Tag: para +#: architecture.xml:324 +#, no-c-format +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - 현재의 세션들은 " +"하나의 JTA에 의해 추적되고 영역화 된다. 여기서 처리과정은 " +"이전의 JTA-전용 접근과 정확하게 동일하다. 상세한 것은 javadocs를 보라." + +#. Tag: para +#: architecture.xml:332 +#, no-c-format +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - 현재의 " +"세션들은 실행 쓰레드에 의해 추적된다. 상세한 것은 다시 javadocs를 보라." + +#. Tag: para +#: architecture.xml:338 +#, no-c-format +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"NOT TRANSLATED! org.hibernate.context.ManagedSessionContext - current sessions are tracked by thread of execution. However, you " +"are responsible to bind and unbind a Session instance " +"with static methods on this class, it does never open, flush, or close a " +"Session." + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programatic " +"transaction demarcation in plain JSE without JTA, you are adviced to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"처음의 두 구현들은 session-per-request로 알려지고 사용되" +"고 있는 \"하나의 세션 - 하나의 데이터베이스 트랜잭션\" 프로그래밍 모형을 제공" +"한다. 하나의 Hibernate 세션의 시작과 끝은 데이터베이스 트랜잭션의 존속 기간" +"에 의해 정의된다. 만일 (예를 들면 순수 J2SE에서 또는 JTA/UserTransaction/BMT" +"의 경우에) 당신이 프로그램 상의 트랜잭션 경계구분을 사용할 경우, 당신은 당신" +"의 코드로부터 기본 트랜잭션 시스템을 은폐시키는데 Hibernate " +"Transaction API를 사용하는 것이 권장된다. 만일 당신이 CMT" +"를 지원하는 하나의 EJB 컨테이너에서 실행할 경우, 트랜잭션 경계들이 선언적으" +"로 정의되고 당신은 당신의 코드 내에 어떤 트랜잭션도 세션 경계구분 오퍼레이션" +"들을 필요로 하지 않는다. 추가 정보와 코드 예제들은 를 참조하라." + +#. Tag: para +#: architecture.xml:359 +#, no-c-format +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"hibernate.current_session_context_class 구성 파라미터는 " +"org.hibernate.context.CurrentSessionContext 구현이 사용될 " +"것임을 정의한다. 역호환을 위해. 만일 이 구성 파라미터가 설정되지 않았지만 하" +"나의 org.hibernate.transaction.TransactionManagerLookup이 " +"구성되어 있을 경우, Hibernate는 org.hibernate.context." +"JTASessionContext를 사용할 것임을 노트하라. 일반적으로, 이 파라미터" +"의 값은 단지 사용할 구현 클래스를 명명할 것이다; 하지만 두 가지 비공식적인 구" +"현들로서 두 개의 대응하는 짧은 이름들 \"jta\"와 \"thread\"이 존재한다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/association_mapping.po b/documentation/envers/src/main/docbook/ko-KR/content/association_mapping.po new file mode 100644 index 0000000000..5bb63d3f59 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/association_mapping.po @@ -0,0 +1,883 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:6 +#, no-c-format +msgid "Association Mappings" +msgstr "연관 매핑들" + +#. Tag: title +#: association_mapping.xml:9 +#, no-c-format +msgid "Introduction" +msgstr "개요" + +#. Tag: para +#: association_mapping.xml:11 +#, no-c-format +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"연관 매핑들은 올바른 것을 얻기가 종종 가장 어려운 것이다. 이 절에서 우리는 단" +"방향 매핑들에서 시작하고, 그런 다음 양방향 경우들을 검토함으로써, 하나씩 표준" +"적인 경우들을 상세히 논의할 것이다. 우리는 모든 예제들에서 PersonAddress를 사용할 것이다." + +#. Tag: para +#: association_mapping.xml:19 +#, no-c-format +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "" +"우리는 연관들을 중재하는 join 테이블로 매핑시킬 것인지 여부에 따라, 그리고 " +"multiplicity(다중성)에 따라 연관들을 분류할 것이다." + +#. Tag: para +#: association_mapping.xml:24 +#, no-c-format +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"null 허용 가능한 foreign 키들은 전통적인 데이터 모델링에서 좋은 실례로 간주되" +"지 않아서, 모든 우리의 예제들은 not null foreign 키들을 사용한다. 이것은 " +"Hibernate에서 필수가 아니고, 당신이 null 허용 가능 컨스트레인트들을 드롭시킬 " +"경우 매핑들은 모두 동작할 것이다." + +#. Tag: title +#: association_mapping.xml:34 +#, no-c-format +msgid "Unidirectional associations" +msgstr "단방향 연관들" + +#. Tag: title +#: association_mapping.xml:37 association_mapping.xml:108 +#, no-c-format +msgid "many to one" +msgstr "many to one" + +#. Tag: para +#: association_mapping.xml:39 +#, no-c-format +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "" +"단방향 many-to-one 연관은 가장 공통적인 종류의 단방향 연" +"관이다." + +#. Tag: programlisting +#: association_mapping.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:45 association_mapping.xml:161 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:50 association_mapping.xml:121 +#: association_mapping.xml:185 association_mapping.xml:225 +#, no-c-format +msgid "one to one" +msgstr "one to one" + +#. Tag: para +#: association_mapping.xml:52 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"foreign 키에 대한 단방향 one-to-one 연관은 대개 아주 동일하다. 유일한 차이점은 컬럼 유일(unique) 컨스트레인트이다." + +#. Tag: programlisting +#: association_mapping.xml:57 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:58 association_mapping.xml:193 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:60 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"하나의 프라이머리 키에 대한 단방향 one-to-one 연관은 대" +"개 특별한 id 생성기를 사용한다. (이 예제에서 연관의 방향이 역전되었음을 주목" +"하라.)" + +#. Tag: programlisting +#: association_mapping.xml:66 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:67 association_mapping.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:72 association_mapping.xml:94 +#, no-c-format +msgid "one to many" +msgstr "one to many" + +#. Tag: para +#: association_mapping.xml:74 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"하나의 foreign 키에 대한 단방향 one-to-many 연관은 매우 " +"색다른 경우이고, 실제로 권장되지 않는다." + +#. Tag: programlisting +#: association_mapping.xml:79 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:82 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "" +"우리는 이런 종류의 연관에 대해 하나의 join 테이블을 사용하는 것이 더 좋다고 " +"생각한다." + +#. Tag: title +#: association_mapping.xml:91 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "join 테이블들에 대한 단방향 연관들" + +#. Tag: para +#: association_mapping.xml:96 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"하나의 join 테이블에 대한 단방향 one-to-many 연관이 보" +"다 더 선호된다. unique=\"true\"를 지정함으로써 우리는 " +"many-to-many에서 one-to-many로 아중성(multiplicity)를 변경시켰음을 주목하라." + +#. Tag: programlisting +#: association_mapping.xml:102 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:110 +#, no-c-format +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"하나의 join 테이블에 대한 단방향 many-to-one 연관은 그 " +"연관이 선택적일 때 매우 공통적이다." + +#. Tag: programlisting +#: association_mapping.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:116 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:123 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"하나의 join 테이블에 대한 단방향 one-to-one 연관은 극히 " +"통상적이지 않지만 가능하다." + +#. Tag: programlisting +#: association_mapping.xml:128 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:129 association_mapping.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:134 association_mapping.xml:238 +#, no-c-format +msgid "many to many" +msgstr "many to many" + +#. Tag: para +#: association_mapping.xml:136 +#, no-c-format +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "" +"마지막으로, 우리는 단방향 many-to-many 연관을 갖는다." + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:141 association_mapping.xml:246 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:148 +#, no-c-format +msgid "Bidirectional associations" +msgstr "양방향 연관들" + +#. Tag: title +#: association_mapping.xml:151 association_mapping.xml:211 +#, no-c-format +msgid "one to many / many to one" +msgstr "one to many / many to one" + +#. Tag: para +#: association_mapping.xml:153 +#, no-c-format +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"양방향 many-to-one 연관은 가장 공통된 종류의 연관이다." +"(이것은 표준 부모/자식 관계이다. )" + +#. Tag: programlisting +#: association_mapping.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:163 +#, no-c-format +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"만일 당신이 List(또는 다른 인덱싱 된 콜렉션)을 사용할 경" +"우 당신은 foreign key의 key 컬럼을 not null로 설정하고, Hibernate로 하여금 각각의 요소의 인덱스를 유지관리하기 " +"위해 (update=\"false\"insert=\"false\"를 설정함으로써 다른 측을 가상적으로 inverse로 만들어) 그 콜렉션들 측" +"으로부터 연관을 관리하도록 할 필요가 있다:" + +#. Tag: programlisting +#: association_mapping.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:173 +#, no-c-format +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"만일 기본 외래 키 컬럼이 NOT NULL일 경우 콜렉션 매핑의 " +"<key> 요소 상에 not-null=\"true\"" +"를 정의하는 것이 중요하다. 내포된 <column> 요소 상" +"에 not-null=\"true\"를 선언하지 말고, <key>" +" 요소 상에 선언하라." + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "" +"foreign에 대한 양방향 one-to-one 연관은 꽤 공통적이다." + +#. Tag: programlisting +#: association_mapping.xml:192 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:195 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "" +"하나의 프라이머리 키에 대한 양방향 one-to-one 연관은 특" +"별한 id 생성기를 사용한다." + +#. Tag: programlisting +#: association_mapping.xml:200 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:208 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "join 테이블들에 대한 양방향 연관들" + +#. Tag: para +#: association_mapping.xml:213 +#, no-c-format +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"하나의 join 테이블에 대한 양방향 one-to-many 연관. " +"inverse=\"true\"는 연관의 어느 쪽 끝이든 콜렉션 측으로 또" +"는 join 측으로 갈 수 있다." + +#. Tag: programlisting +#: association_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:227 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"하나의 join 테이블에 대한 양방향 one-to-one 연관은 극히 " +"통상적이지 않지만, 가능하다." + +#. Tag: programlisting +#: association_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:240 +#, no-c-format +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "" +"마지막으로, 우리는 하나의 양방향 many-to-many 연관을 갖" +"는다." + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:253 +#, no-c-format +msgid "More complex association mappings" +msgstr "보다 복잡한 연관 매핑들" + +#. Tag: para +#: association_mapping.xml:255 +#, no-c-format +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"보다 복잡한 연관 조인들은 극기 드물다. Hibernate는 매핑 " +"문서들 내에 삽입된 SQL 조각들을 사용하여 보다 복잡한 상황을 처리하는 것을 가" +"능하도록 해준다. 예를 들어, 만일 계좌 내역 정보 데이터를 가진 하나이 테이블" +"이 accountNumber, effectiveEndDate 그리" +"고 effectiveStartDate 컬럼들을 정의할 경우, 다음과 같이 매" +"핑된다:" + +#. Tag: programlisting +#: association_mapping.xml:264 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:266 +#, no-c-format +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"그때 우리는 다음을 사용하여 하나의 연관을 현재 인스턴스 " +"(null effectiveEndDate을 가진 인스턴스)로 매핑시킬 수 있" +"다:" + +#. Tag: programlisting +#: association_mapping.xml:271 +#, no-c-format +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:273 +#, no-c-format +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"보다 복잡한 예제에서, EmployeeOrganization 사이의 연관이 전체 고용 내역 데이터를 가진 Employment 테이블 내에 유지된다고 가정하자. 그때 종업원의 가장 최근의" +" 고용주에 대한 하나의 연관(가장 최근의 startDate를 갖고 있는 것)이 다음 방법으로 매핑될 수 있다:" + +#. Tag: programlisting +#: association_mapping.xml:281 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:283 +#, no-c-format +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"당신은 이 기능으로 아주 생산성을 얻을 수 있지만, 그것은 대개 HQL 또는 " +"criteria 질의를 사용하여 이들 종류의 경우들을 처리하는 것이 보다 실용적이다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/basic_mapping.po b/documentation/envers/src/main/docbook/ko-KR/content/basic_mapping.po new file mode 100644 index 0000000000..84d415a9e5 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/basic_mapping.po @@ -0,0 +1,5624 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:5 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "기본 O/R 매핑" + +#. Tag: title +#: basic_mapping.xml:8 +#, no-c-format +msgid "Mapping declaration" +msgstr "매핑 선언" + +#. Tag: para +#: basic_mapping.xml:10 +#, no-c-format +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"객체/관계형 매핑들은 대개 XML 문서 내에 정의된다. 매핑 문서는 가독성이 있고 " +"수작업 편집이 가능하도록 설계되어 있다. 매핑 언어는 매핑들이 테이블 선언들이 " +"아닌, 영속 클래스 선언들로 생성된다는 의미에서 자바 중심적이다." + +#. Tag: para +#: basic_mapping.xml:17 +#, no-c-format +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"심지어 많은 Hibernate 사용자들이 수작업으로 XML을 작성하고자 선택할지라도, " +"XDoclet, Middlegen, 그리고 AndroMDA를 포함하는, 매핑 문서를 생성시키는 많은 " +"도구들이 존재한다는 점을 노트하라." + +#. Tag: para +#: basic_mapping.xml:23 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "예제 매핑으로 시작하자:" + +#. Tag: programlisting +#: basic_mapping.xml:27 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:29 +#, no-c-format +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"우리는 이제 매핑 문서의 내용을 논의할 것이다. 우리는 Hibernate에 의해 실행 시" +"에 사용되는 문서 요소들과 속성들 만을 설명할 것이다. 매핑 문서는 또한 스키마 " +"내보내기 도구에 의해 내보내진 데이터베이스 스키마에 영향을 주는 어떤 특별한 " +"옵션 속성들과 요소들을 포함한다. (예를 들어 not-null 속" +"성.)" + +#. Tag: title +#: basic_mapping.xml:40 +#, no-c-format +msgid "Doctype" +msgstr "Doctype" + +#. Tag: para +#: basic_mapping.xml:42 +#, no-c-format +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"모든 XML 매핑들은 doctype이 보이게 선언해야 한다. 실제 DTD는 위의 URL에서, " +"hibernate-x.x.x/src/org/hibernate 디렉토리 내에서 또는 " +"hibernate3.jar 내에서 찾을 수 있다. Hibernate는 항상 첫 번" +"째로 그것의 classpath 속에서 DTD를 찾게 될 것이다. 만일 당신이 인터넷 연결을 " +"사용하는 DTD에 대한 룩업들을 겪게 될 경우, 당신의 classpath의 컨텐츠에 대해 " +"당신의 DTD 선언을 체크하라." + +#. Tag: title +#: basic_mapping.xml:52 +#, no-c-format +msgid "EntityResolver" +msgstr "EntityResolver" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"앞서 언급했듯이, Hibernate는 먼저 그것의 classpath에서 DTD들을 해석하려고 시" +"도할 것이다. Hibernate가 이것을 행하는 방법은 그것이 xml 파일들을 읽어들이는" +"데 사용하는 SAXReader에 맞춤형 org.xml.sax.EntityResolver " +"구현을 등록하는 것이다. 이 맞춤형 EntityResolver는 두 개" +"의 다른 systemId namespace들을 인지해낸다." + +#. Tag: para +#: basic_mapping.xml:61 +#, no-c-format +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"hibernate namespace는 resolver가 http://" +"hibernate.sourceforge.net/로 시작하는 하나의 systemId와 만날때마다 " +"인지된다; resolver는 Hibernate 클래스들을 로드시켰던 클래스로더를 통해 이들 " +"엔티티들을 해석하려고 시도한다." + +#. Tag: para +#: basic_mapping.xml:70 +#, no-c-format +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"user namespace는 resolver가 classpath:// URL 프로토콜을 사용하는 systemId를 만날때마다 인지된다; resolver는 " +"(1)현재 쓰레드 컨텍스트 클래스로더와 (2)Hibernate 클래스들을 로드시켰던 클래" +"스로더를 통해 이들 엔티티들을 해석하려고 시도할 것이다." + +#. Tag: para +#: basic_mapping.xml:79 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "user namespacing을 활용하는 예제:" + +#. Tag: programlisting +#: basic_mapping.xml:82 +#, no-c-format +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:83 +#, no-c-format +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"여기서 types.xmlyour.domain 패키지 " +"내에 있는 리소스이고 맞춤형 typedef를 포함한다." + +#. Tag: title +#: basic_mapping.xml:91 +#, no-c-format +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#. Tag: para +#: basic_mapping.xml:93 +#, no-c-format +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"이 요소는 몇 개의 선택적인 속성들을 갖는다. schema 속성과 " +"catalog 속성은 이 매핑 내에서 참조된 테이블들이 명명된 " +"schema 와/또는 catalog에 속한다는 점을 지정한다. 만일 지정될 경우, 테이블 이" +"름들은 주어진 schema 이름과 catalog 이름에 의해 한정(수식)될 것이다. 누락될 " +"경우, 테이블 이름들은 한정되지((수식어가 붙지) 않을 것이다. default-" +"cascade 속성은 cascade 속성을 지정하지 않은 프로" +"퍼티들과 콜렉션들에 대해 전제될 cascade 스타일이 무엇인지" +"를 지정한다. auto-import 속성은 디폴트로 우리가 질의 언어 " +"속에서 수식어가 붙지 않은(unqualified) 클래스 이름들을 사용하게 할 것이다." + +#. Tag: programlisting +#: basic_mapping.xml:114 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "schema (옵션): 데이터베이스 스키마의 이름." + +#. Tag: para +#: basic_mapping.xml:122 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "catalog (옵션): 데이터베이스 카다록의 이름." + +#. Tag: para +#: basic_mapping.xml:127 +#, no-c-format +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (옵션 - 디폴트는 none): 디폴트 cascade 스타일." + +#. Tag: para +#: basic_mapping.xml:133 +#, no-c-format +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (옵션 - 디폴트는 property): Hibernate가 모든 프로퍼티들에 액세스하는데 사용하게 될 방도. " +"PropertyAccessor에 대한 맞춤형 구현일 수 있다." + +#. Tag: para +#: basic_mapping.xml:140 +#, no-c-format +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (옵션 - 디폴트는 true): " +"class 및 collection 매핑들의 지정되지 않은 lazy 속성들에 " +"대한 디폴트 값." + +#. Tag: para +#: basic_mapping.xml:147 +#, no-c-format +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import (옵션 - 디폴트는 true): 우" +"리가 질의 언어 내에 (이 매핑에서 클래스들에 대해) 수식어가 붙지 않은 클래스 " +"이름들을 사용할 수 있는지를 지정한다." + +#. Tag: para +#: basic_mapping.xml:154 +#, no-c-format +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (옵션): 매핑 문서 내에서 수식어가 붙지 않은 클래" +"스 이름들에 대해 가정할 패키지 접두어를 지정한다." + +#. Tag: para +#: basic_mapping.xml:162 +#, no-c-format +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"만일 당신이 동일한 (수식어가 붙지 않은) 이름을 가진 두 개의 영속 클래스들을 " +"갖고 있다면, 당신은 auto-import=\"false\"를 설정해야 한" +"다. 만일 당신이 두 개의 클래스들에 동일한 \"imported\" 이름을 할당하려고 시도" +"할 경우에 Hibernate는 예외상황을 던질 것이다." + +#. Tag: para +#: basic_mapping.xml:168 +#, no-c-format +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"위에 보여진 것처럼 hibernate-mapping 요소는 몇몇 영속 " +"<class> 매핑들을 내부에 포함하는 것을 허용해준다는 " +"점을 노트하라. 하지만 한 개의 매핑 파일 속에 한 개의 영속 클래스(또는 한 개" +"의 클래스 계층구조) 만을 매핑하고 영속 서브 클래스 뒤에 그것을 명명하는 것이 " +"좋은 연습이다 (그리고 몇몇 도구들에 의해 기대된다). 예를 들면 Cat." +"hbm.xml, Dog.hbm.xml 또는 상속을 사용할 경우에" +"는 Animal.hbm.xml." + +#. Tag: title +#: basic_mapping.xml:181 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:183 +#, no-c-format +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "" +"당신은 class 요소를 사용하여 영속 클래스를 선언할 수도 있" +"다:" + +#. Tag: programlisting +#: basic_mapping.xml:211 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:214 +#, no-c-format +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (옵션): 영속 클래스(또는 인터페이스)의 전체 수식어가 " +"붙은 Java 클래스 이름. 만일 이 속성이 누락될 경우, 매핑이 non-POJO 엔티티라" +"고 가정된다." + +#. Tag: para +#: basic_mapping.xml:221 +#, no-c-format +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (옵션 - 디폴트는 수식어가 붙지 않은 클래스명): 그것" +"의 데이터베이스 테이블의 이름." + +#. Tag: para +#: basic_mapping.xml:227 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (옵션 - 디폴트는 클래스 이름): 다형성" +"(polymorphic) 특징에 사용되는, 개별 서브 클래스들를 구별짓는 값. 허용가능한 " +"값들은nullnot null을 포함한다." + +#. Tag: para +#: basic_mapping.xml:234 +#, no-c-format +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (옵션 - 디폴트는 true): 클래스" +"들의 인스턴스들이 가변적인지를 (가변적이지 않은지를) 지정한다." + +#. Tag: para +#: basic_mapping.xml:240 basic_mapping.xml:2204 +#, fuzzy, no-c-format +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (옵션): 루트 <hibernate-mapping> 요소에 의해 지정된 스키마 이름을 오버라이드 시킨다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (옵션): 루트 <hibernate-mapping> 요소에 의해 지정된 스키마 이름을 오버라이드 시킨다" + +#. Tag: para +#: basic_mapping.xml:246 basic_mapping.xml:2210 +#, fuzzy, no-c-format +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (옵션): 루트 <hibernate-mapping> 요소에 의해 지정된 카다록 이름을 오버라이드 시킨다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (옵션): 루트 <hibernate-mapping> 요소에 의해 지정된 카타록 이름을 오버라이드 시킨다." + +#. Tag: para +#: basic_mapping.xml:252 +#, no-c-format +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (옵션): lazy initializing proxy들에 사용할 인터페이" +"스를 지정한다. 당신은 클래스 그 자체의 이름을 지정할 수 도 있다." + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (옵션 - 디폴트는 false): UPDATE SQL이 실행 시에 생성되고 그들 컬럼들의 " +"값들이 변경된 그들 컬럼들 만을 포함할 것인지를 지정한다." + +#. Tag: para +#: basic_mapping.xml:265 +#, no-c-format +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (옵션 - 디폴트는 false): 생성될 INSERT이 실행 시에 생성되고 그들 컬럼들" +"의 값이 null이 아닌 컬럼들 만을 포함할 것인지를 지정한다." + +#. Tag: para +#: basic_mapping.xml:272 +#, no-c-format +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (옵션 - 디폴트는 false): 객체가 실제로 변경되는 것이 확실하지 않는 한, Hibernate가 SQL " +"UPDATE결코 실행하지 않을 것임을 지" +"정한다. 어떤 경우들에서(실제로 transient 객체가 update()" +"를 사용하여 새로운 session에 연관되었을 때에만), 이것은 하나의 " +"UPDATE가 실제로 필요한 경우인지 여부를 결정하기 위해 " +"Hibernate는 특별한 SQL SELECT를 실행할 것임을 의미한다." + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"polymorphism (옵션 - 디폴트는 implicit): implicit 질의 다형성이나 explicit 질의 다형성 중 어느 것이 사용될 " +"것인지를 결정한다." + +#. Tag: para +#: basic_mapping.xml:288 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (옵션) 이 클래스의 객체들을 검색할 때 사용될 임의적" +"인 SQL WHERE 조건을 지정한다" + +#. Tag: para +#: basic_mapping.xml:294 +#, no-c-format +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (옵션): 맞춤형 ClassPersister" +"를 지정한다." + +#. Tag: para +#: basic_mapping.xml:299 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (옵션 - 디폴트는 1) 식별자" +"에 의해 이 클래스의 인스턴스들을 페치시키는 \"배치 사이즈\"를 지정한다." + +#. Tag: para +#: basic_mapping.xml:305 +#, no-c-format +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 version): optimistic 잠금 방도를 결정한다." + +#. Tag: para +#: basic_mapping.xml:311 +#, no-c-format +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (옵션): lazy=\"false\"를 설정함으" +"로써 Lazy fetching이 전체적으로 사용불가능하게 될 수 있다." + +#. Tag: para +#: basic_mapping.xml:317 +#, no-c-format +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name(옵션, 디폴트는 클래스 이름): Hibernate3는 하나" +"의 클래스가 (잠정적으로 다른 테이블들로) 여러번 매핑되는 것을 허용해주고, " +"Java 레벨에서 Map 또는 XML에 의해 표현 되는 엔티티 매핑들을 허용한다. 이들 경" +"우들에서, 당신은 그 엔티티에 대한 명시적인 임의의 이름을 제공해야 한다. " +"entity-name (옵션): Hibernate3는 하나의 클래스가 (잠정적으" +"로 다른 테이블들로) 여러 번 매핑되는 것을 허용하며, 자바 레벨에서 Map들 또는 " +"XML에 의해 표현되는 엔티티 매핑들을 허용한다. 이들 경우들에서, 당신은 그 엔티" +"티들에 대한 명시적인 임의의 이름을 제공해야 한다. 추가 정보는 을 보라." + +#. Tag: para +#: basic_mapping.xml:327 +#, no-c-format +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (옵션): 자동적인 스키마 생성을 위한 다중-행 " +"check constraint를 생성시키는데 사용되는 SQL 표현식." + +#. Tag: para +#: basic_mapping.xml:333 +#, no-c-format +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (옵션): Hibernate는 지원되는 데이터베이스들, 예를 들" +"어 Oracle 상에서 이른바 ROWID들을 사용할 수 있고, Hibernate는 당신이 이 옵션" +"을 rowid로 설정하는 경우에 빠른 업데이트를 위한 특별한 " +"rowid 컬럼을 사용할 수 있다. ROWID는 구현 상세이고 저장된 " +"튜플(tuple)의 물리적이니 위치를 표현한다." + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (옵션): 불변의 읽기 전용 엔티티를 데이터베이스 " +"subselect로 매핑시킨다. 당신이 기본 테이블 대신에 뷰를 갖고자 원할 경우에 유" +"용하지만, 사용을 자제하라. 추가 정보는 아래를 보라." + +#. Tag: para +#: basic_mapping.xml:348 +#, no-c-format +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (옵션): <union-subclass> 계층 구조들 내에서 abstract 슈퍼클래스들을 마크하는데 사용된다." + +#. Tag: para +#: basic_mapping.xml:356 +#, no-c-format +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"명명된 영속 클래스가 인터페이스가 되는 것은 완전히 수용가능하다. 그런 다음 당" +"신은 <subclass> 요소를 사용하여 그 인터페이스에 대" +"한 구현 클래스들을 선언할 것이다. 당신은 임의의 static " +"inner 클래스를 영속화 시킬 수 있다. 당신은 표준 형식, 예를 들어 eg." +"Foo$Bar를 사용하여 클래스 이름을 지정해야 한다." + +#. Tag: para +#: basic_mapping.xml:363 +#, no-c-format +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"불변의 클래스, mutable=\"false\"는 어플리케이션에 의해 업" +"데이트되지 않을 것이거나 삭제되지 않을 것이다. 이것은 Hibernate로 하여금 어" +"떤 마이너 퍼포먼스 최적화를 행하게끔 허용해준다." + +#. Tag: para +#: basic_mapping.xml:368 +#, no-c-format +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"선택적인 proxy 속성은 그 클래스의 영속 인스턴스들에 대한 " +"lazy 초기화를 가능하게 해준다. Hibernate는 명명된 인터페이스를 구현하는 " +"CGLIB 프락시들을 초기에 반환할 것이다. 실제 영속 객체는 프락시의 메소드가 호" +"출될 때 로드될 것이다. 아래 \"Lazy 초기화를 위한 프락시들\"을 보라." + +#. Tag: para +#: basic_mapping.xml:375 +#, no-c-format +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"Implicit 다형성은 클래스의 인스턴스들이 어떤 서브클래스" +"나 구현된 인터페이스 또는 클래스를 명명하는 질의에 의해 반환될 것임을 의미하" +"고 그 클래스의 어떤 서브클래스에 대한 인스턴스들이 그 클래스 자체를 명명하는 " +"질의에 의해 반환될 것임을 의미한다. Explicit 다형성은 클" +"래스 인스턴스들이 그 클래스를 명시적으로 명명하는 질의들에 의해서만 반환될 것" +"임을 의미고 그 클래스를 명명하는 질의들이 이 <class> 선언 내부에서 <subclass> 또는 <" +"joined-subclass>로 매핑된 서브 클래스들의 인스턴스들 만을 반환하" +"게 될 것임을 의미한다. 대부분의 용도로, 디폴트인 polymorphism=" +"\"implicit\"가 적절하다.두 개의 다른 클래스들이 동일한 테이블로 매" +"핑될 때 Explicit 다형성이 유용하다(이것은 테이블 컬럼들의 서브셋을 포함하는 " +"\"경량급\" 클래스를 허용한다)." + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"persister 속성은 클래스에 사용되는 영속화 방도를 당신이 커" +"스트마이징 할 수 있도록 해준다. 예를 들어 당신은 org.hibernate." +"persister.EntityPersister에 대한 당신 자신의 서브클래스를 지정할 수" +"도 있거나 당신은 심지어 예를 들어 플랫 파일들이나 LDAP로의 직렬화,내장 프로시" +"저 호출들을 통해 영속화를 구현하는 인터페이스 org.hibernate." +"persister.ClassPersister에 대한 완전히 새로운 구현을 제공할 수도 있" +"다. (Hashtable로의 \"영속성\"에 관한) 간단한 예제는 " +"org.hibernate.test.CustomPersister를 보라." + +#. Tag: para +#: basic_mapping.xml:398 +#, no-c-format +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"dynamic-update 설정과 dynamic-insert 설" +"정은 서브클래스들에 의해 상속되지 않고 따라서 또한 <subclass>" +" 또는 <joined-subclass> 요소들 상에 지정" +"될 수도 있음을 노트하라. 이들 설정들은 몇몇 경우들에서 퍼포먼스를 증가시키지" +"만 다른 경우들에서는 퍼포먼스를 실제로 감소시킬 수도 있다. 적절하게 사용하라." + +#. Tag: para +#: basic_mapping.xml:406 +#, no-c-format +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"select-before-update 사용은 대개 퍼포먼스를 감소시킬 것이" +"다. 당신이 detached 인스턴스들의 그래프를 Session에 다시 " +"첨부할 경우에 그것은 데이터베이스 업데이트 트리거가 불필요하게 호출되는 것을 " +"방지하는데 매우 유용하다." + +#. Tag: para +#: basic_mapping.xml:412 +#, no-c-format +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"dynamic-update를 사용가능하게 할 경우, 당신은 다음 " +"optimistic 잠금 전략들을 선택하게 될 것이다:" + +#. Tag: para +#: basic_mapping.xml:418 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "version은 version/timestamp 컬럼들을 체크한다" + +#. Tag: para +#: basic_mapping.xml:423 +#, no-c-format +msgid "all check all columns" +msgstr "all은 모든 컬럼들을 체크한다" + +#. Tag: para +#: basic_mapping.xml:428 +#, no-c-format +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "" +"dirty는 몇몇 동시성 업데이트들을 허용하여, 변경된 컬럼들" +"을 체크한다" + +#. Tag: para +#: basic_mapping.xml:433 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "none은 optimistic 잠금을 사용하지 않는다" + +#. Tag: para +#: basic_mapping.xml:438 +#, no-c-format +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"우리는 당신이 Hibernate에서 optimistic 잠금을 위해 version/timestamp 컬럼들" +"을 사용할 것을 매우 강력하게 권장한다. 이것은 퍼포먼스" +"에 대해 최적의 방도이고 detached 인스턴스들에 대해 행해진 변경들을 정확하게 " +"핸들링하는 유일한 방도이다(예를 들어 Session.merge()가 사" +"용될 때)." + +#. Tag: para +#: basic_mapping.xml:445 +#, no-c-format +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"Hibernate 매핑의 경우에 베이스 테이블과 뷰 사이에 차이점이 존재하지 않는다. " +"왜냐하면 이것이 데이터베이스 레벨에서는 투명하다고 기대되기 때문이다(몇몇 " +"DBMS는 뷰를 고유하게 지원하지 않고 특히 뷰 업데이트를 지원하지 않음을 노트하" +"라). 때때로 당신이 뷰를 사용하고자 원하지만, (예를 들어 리거시 스키마로) 데이" +"터베이스 속에 뷰를 생성시킬 수 없다. 이 경우에, 당신은 불변의 읽기 전용 엔티" +"티를 주어진 SQL subselect 표현식으로 매핑시킬 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:453 +#, no-c-format +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:455 +#, no-c-format +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"auto-flush가 정확하게 발생하도록 하고, 그리고 파생된 엔티티에 대한 질의들이 " +"쓸효성 없는 데이터를 반환하지 않도록 함으로써, 이 엔티티와 동기화 될 테이블" +"을 선언하라. <subselect>는 속성과 내포된 매핑 요소 " +"양자로서 이용 가능하다." + +#. Tag: title +#: basic_mapping.xml:465 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:467 +#, no-c-format +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"매핑된 클래스들은 데이터베이스 테이블의 프라이머리 키 컬럼을 선언해" +"야 한다. 대부분의 클래스들은 또한 인스턴스의 유일 식별자를 소유하" +"는 자바빈즈-스타일 프로퍼티를 가질 것이다. <id> 요소" +"는 그 프로퍼티로부터 프라이머리 키 컬럼으로의 매핑을 정의한다." + +#. Tag: programlisting +#: basic_mapping.xml:482 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:485 +#, no-c-format +msgid "" +"name (optional): The name of the identifier property." +msgstr "name (옵션): 식별자 프로퍼티의 이름." + +#. Tag: para +#: basic_mapping.xml:490 +#, no-c-format +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "type (옵션): Hibernate 타입을 나타내는 이름." + +#. Tag: para +#: basic_mapping.xml:495 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "" +"column (옵션 - 디폴트는 프로퍼티 이름): 프라이머리 키 컬럼" +"의 이름." + +#. Tag: para +#: basic_mapping.xml:501 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value (옵션 - 디폴트는 \"sensible\" 값): 이전 세션" +"에서 저장되었거나 로드되었던 detached(분리된) 인스턴스들로부터 그것을 구분지" +"우도록, 인스턴스가 새로이 초기화되어 있음(저장되어 있지 않음)을 나타내는 식별" +"자 프로퍼티 값." + +#. Tag: para +#: basic_mapping.xml:509 basic_mapping.xml:1017 basic_mapping.xml:1156 +#: basic_mapping.xml:1238 basic_mapping.xml:1345 basic_mapping.xml:1534 +#: basic_mapping.xml:1708 basic_mapping.xml:1878 basic_mapping.xml:2457 +#, fuzzy, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 액세스하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 액세스하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근 하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 액세스하는데 사용할 방도.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (옵션 - 디폴트는 property): " +"Hibernate가 프로퍼티 값에 접근하는데 사용할 방도." + +#. Tag: para +#: basic_mapping.xml:517 +#, no-c-format +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "" +"name 속성이 누락되면, 클래스는 식별자 프로퍼티를 갖지 않는" +"다고 가정된다." + +#. Tag: para +#: basic_mapping.xml:522 +#, no-c-format +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "" +"unsaved-value 속성은 Hibernate3에서는 거의 필요하지 않다." + +#. Tag: para +#: basic_mapping.xml:526 +#, no-c-format +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"composite 키들로서 리거시 데이터에 액세스하는 것을 허용해주는 대체적인 " +"<composite-id> 선언이 존재한다. 우리는 그 밖의 어떤" +"것에 대한 그것의 사용에 대해 강력하게 반대한다." + +#. Tag: title +#: basic_mapping.xml:532 +#, no-c-format +msgid "Generator" +msgstr "Generator" + +#. Tag: para +#: basic_mapping.xml:534 +#, no-c-format +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"선택적인 <generator> 자식 요소는 영속 클래스의 인스" +"턴스들에 대한 유일 식별자들을 생성시키는데 사용되는 자바 클래스를 명명한다. " +"만일 임의의 파라미터들이 생성기 인스턴스를 구성하거나 초기화 시키는데 필요할 " +"경우, 그것들은 <param> 요소 를 사용하여 전달된다." + +#. Tag: programlisting +#: basic_mapping.xml:541 +#, no-c-format +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:543 +#, fuzzy, no-c-format +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"모든 생성기들은 org.hibernate.id.IdentifierGenerator 인터" +"페이스를 구현한다. 이것은 매우 간단한 인터페이스이다; 몇몇 어플리케이션들은 " +"그것들 자신의 특화된 구현들을 제공하도록 선택할 수 있다. 하지만 Hibernate는 " +"미리 빈드된 구현들의 영역들을 제공한다. 빌드-인 생성기(generator)들에 대한 단" +"축 이름들이 존재한다: " + +#. Tag: literal +#: basic_mapping.xml:551 +#, no-c-format +msgid "increment" +msgstr "increment" + +#. Tag: para +#: basic_mapping.xml:553 +#, no-c-format +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"동일한 테이블 속으로 데이터를 입력하는 다른 프로세스가 없을 때에만 유일한 " +"long, short 또는 int 타입의 식별자들을 생성시킨다. 클러스터 내에서는 사용하지 " +"말라." + +#. Tag: literal +#: basic_mapping.xml:562 +#, no-c-format +msgid "identity" +msgstr "identity" + +#. Tag: para +#: basic_mapping.xml:564 +#, no-c-format +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"DB2, MySQL, MS SQL Server, Sybase, HypersonicSQL에서 식별 컬럼들을 지원한다. " +"반환되는 식별자는 long, short 또는 " +"int 타입이다." + +#. Tag: literal +#: basic_mapping.xml:572 +#, no-c-format +msgid "sequence" +msgstr "sequence" + +#. Tag: para +#: basic_mapping.xml:574 +#, no-c-format +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"DB2, PostgreSQL, Oracle, SAP DB, McKoi에서 시퀀스를 사용하거나 Interbase에서 " +"생성기(generator)를 사용한다. 반환되는 식별자는 long, " +"short 또는 int 타입이다." + +#. Tag: literal +#: basic_mapping.xml:582 +#, no-c-format +msgid "hilo" +msgstr "hilo" + +#. Tag: para +#: basic_mapping.xml:584 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"테이블과 컬럼(디폴트로 각각 hibernate_unique_key와 " +"next_hi)이 hi 값들의 소스로서 주어지면, long, short 또는 int 타입의 식별자" +"들을 효과적으로 생성시키는데 hi/lo 알고리즘을 사용한다. hi/lo 알고리즘은 특" +"정 데이터베이스에 대해서만 유일한 식별자들을 생성시킨다." + +#. Tag: literal +#: basic_mapping.xml:594 +#, no-c-format +msgid "seqhilo" +msgstr "seqhilo" + +#. Tag: para +#: basic_mapping.xml:596 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"명명된 데이터베이스 시퀀스가 주어지면, long, " +"short 또는 int 타입의 식별자들을 효과적" +"으로 생성시키는데 hi/lo 알고리즘을 사용한다." + +#. Tag: literal +#: basic_mapping.xml:604 +#, no-c-format +msgid "uuid" +msgstr "uuid" + +#. Tag: para +#: basic_mapping.xml:606 +#, no-c-format +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"네트웍 내에서 유일한(IP 주소가 사용된다) string 타입의 식별자들을 생성시키기 " +"위해 128 비트 UUID 알고리즘을 사용한다. UUID는 길이가 32인 16진수들의 문자열" +"로서 인코딩 된다." + +#. Tag: literal +#: basic_mapping.xml:614 +#, no-c-format +msgid "guid" +msgstr "guid" + +#. Tag: para +#: basic_mapping.xml:616 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "MS SQL Server와 MySQL 상에서 데이터베이스 생성 GUID 문자열을 사용한다." + +#. Tag: literal +#: basic_mapping.xml:622 +#, no-c-format +msgid "native" +msgstr "native" + +#. Tag: para +#: basic_mapping.xml:624 +#, no-c-format +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"기본 데이터베이스의 가용성들에 의존하여 identity, " +"sequence 또는 hilo를 찾아낸다." + +#. Tag: literal +#: basic_mapping.xml:632 +#, no-c-format +msgid "assigned" +msgstr "assigned" + +#. Tag: para +#: basic_mapping.xml:634 +#, no-c-format +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"어플리케이션으로 하여금 save()가 호출되기 전에 식별자를 객" +"체에 할당하도록 한다. <generator> 요소가 지정되지 않" +"을 경우 이것이 디폴트 방도이다." + +#. Tag: literal +#: basic_mapping.xml:642 +#, no-c-format +msgid "select" +msgstr "select" + +#. Tag: para +#: basic_mapping.xml:644 +#, no-c-format +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "" +"어떤 유일 키에 의해 행을 select하고 프라이머리 키 값을 검색함으로써 데이터베" +"이스 트리거에 의해 할당된 프라이머리 키를 검색한다." + +#. Tag: literal +#: basic_mapping.xml:651 +#, no-c-format +msgid "foreign" +msgstr "foreign" + +#. Tag: para +#: basic_mapping.xml:653 +#, no-c-format +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"또 다른 연관된 객체의 식별자를 사용한다. 대개 <one-to-one> 프라이머리 키 연관관계와 함께 사용된다." + +#. Tag: literal +#: basic_mapping.xml:660 +#, no-c-format +msgid "sequence-identity" +msgstr "sequence-identity" + +#. Tag: para +#: basic_mapping.xml:662 +#, no-c-format +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"실제 값 생성을 위해 데이터베이스 시퀀스를 활용하지만, 생성된 식별자 값을 " +"insert 문장 실행의 부분으로서 실제로 반환시키기 위해 이것을 JDBC3 " +"getGeneratedKeys와 결합시킨 특화된 시퀀스 생성 방도. 이 방도는 JDK 1.4에 대상" +"화된 Oracle 10g 드라이버들 상에서만 지원되는 거승로 알려져 있다. 이들 insert " +"문장들에 대한 주석들은 Oracle 드라이버들 내에 있는 버그 때문에 사용불가능하" +"게 되어 있음을 노트하라." + +#. Tag: title +#: basic_mapping.xml:679 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "Hi/lo algorithm" + +#. Tag: para +#: basic_mapping.xml:680 +#, no-c-format +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"hiloseqhilo 생성기들은 식별자 생성" +"에 대한 마음에 드는 접근법인, hi/lo 알고리즘에 대한 두 개의 대체 구현들은 제" +"공한다. 첫 번째 구현은 다음에 이용 가능한 \"hi\" 값을 수용하기 위한 \"특별한" +"\" 데이터베이스 테이블을 필요로 한다. 두 번째는 (지원되는) Oracle 스타일의 시" +"퀀스를 사용한다." + +#. Tag: programlisting +#: basic_mapping.xml:687 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:691 +#, no-c-format +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"불행히도 당신은 Hibernate에 당신 자신의 Connection을 제공" +"할 때 hilo를 사용할 수 없다. Hibernate가 JTA의 도움을 받" +"는 커넥션들을 얻기 위해 어플리케이션 서버 데이터소스를 사용할 때 당신은 " +"hibernate.transaction.manager_lookup_class를 적절하게 구성" +"해야 한다." + +#. Tag: title +#: basic_mapping.xml:700 +#, no-c-format +msgid "UUID algorithm" +msgstr "UUID 알고리즘" + +#. Tag: para +#: basic_mapping.xml:701 +#, no-c-format +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"UUID 는 다음을 포함한다: IP 주소, JVM의 시작 시간(정확히 1/4 초), 시스템 시간" +"과 (JVM 내에서 유일한) counter 값. Java 코드로부터 MAC 주소 또는 메모리 주소" +"를 얻는 것은 불가능하여서, 이것은 우리가 JNI를 사용하지 않고서 행할 수 있는 " +"최상의 것이다." + +#. Tag: title +#: basic_mapping.xml:710 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "식별 컬럼들과 시퀀스들" + +#. Tag: para +#: basic_mapping.xml:711 +#, no-c-format +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"식별 컬럼들을 지원하는 데이터베이스들(DB2, MySQL, Sybase, MS SQL)의 경우, 당" +"신은 identity 키 생성을 사용할 수 있다. 시퀀스들을 지원하" +"는 데이터베이스들(DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB)의 경우, " +"당신은 sequence 스타일 키 생성을 사용할 수도 있다. 이들 방" +"도들 모두 새로운 객체를 insert하기 위해 두 개의 SQL 질의들을 필요로 한다." + +#. Tag: programlisting +#: basic_mapping.xml:719 +#, no-c-format +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:721 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:723 +#, no-c-format +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"크로스 플랫폼 개발을 위해서, native 방도가 기준 데이터베이" +"스들의 가용성들에 따라 identity, sequence, hilo 방도 중에서 선택될 것이다." + +#. Tag: title +#: basic_mapping.xml:732 +#, no-c-format +msgid "Assigned identifiers" +msgstr "할당된 식별자들" + +#. Tag: para +#: basic_mapping.xml:733 +#, no-c-format +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"(Hibernate로 하여금 식별자들을 생성시키도록 하는 것과는 반대로) 당신이 어플리" +"케이션으로 하여금 식별자들을 할당하도록 원할 경우, 당신은 assigned 생성기를 사용할 수 있다. 이 특별한 생성기는 객체의 identifier 프로퍼" +"티에 이미 할당된 식별자 값을 사용할 것이다. 이 생성기(generator)는 프라이머" +"리 키가 대용(surrogate ) 키 대신에 natural 키일 때 사용된다. 당신이 " +"<generator> 요소를 지정하지 않을 경우에 이것이 디폴" +"트 특징이다" + +#. Tag: para +#: basic_mapping.xml:742 +#, no-c-format +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"assigned 생성기(generator)를 선택하는 것은 , version 또는 " +"timestamp 프로퍼티가 존재하지 않는 한 또는 당신이 Interceptor." +"isUnsaved()를 정의하지 않는 한, 하나의 인스턴스가 transient 또는 " +"detached인지를 결정하기 위해 Hibernae로 하여금 데이터베이스에 접촉하도록 강제" +"하는, unsaved-value=\"undefined\"를 Hibernate에게 사용하도" +"록 한다." + +#. Tag: title +#: basic_mapping.xml:752 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "트리거들에 의해 할당된 프라이머리 키들" + +#. Tag: para +#: basic_mapping.xml:753 +#, no-c-format +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "" +"리거시 스키마에 대해서만(Hibernate는 트리거들을 가진 DDL을 생성시키지 않는" +"다)." + +#. Tag: programlisting +#: basic_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:759 +#, no-c-format +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"위의 예제에서, natural 키로서 클래스에 의해 socialSecurityNumber로 명명된 유일 값을 가진 프로퍼티가 존재하고, 트리거에 의해 그 값이 " +"생성되는 person_id로 명명된 대용키가 존재한다." + +#. Tag: title +#: basic_mapping.xml:771 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "NOT TRANSLATED!Enhanced identifier generators" + +#. Tag: para +#: basic_mapping.xml:773 +#, no-c-format +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#. Tag: para +#: basic_mapping.xml:781 +#, fuzzy, no-c-format +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters: " +"" + +#. Tag: para +#: basic_mapping.xml:795 +#, no-c-format +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#. Tag: para +#: basic_mapping.xml:801 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#. Tag: para +#: basic_mapping.xml:808 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#. Tag: para +#: basic_mapping.xml:815 +#, no-c-format +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#. Tag: para +#: basic_mapping.xml:822 +#, no-c-format +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#. Tag: para +#: basic_mapping.xml:829 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"cascade (optional- defaults to none): " +"cascade 스타일." + +#. Tag: para +#: basic_mapping.xml:836 +#, fuzzy, no-c-format +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters: " + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#. Tag: para +#: basic_mapping.xml:852 +#, no-c-format +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#. Tag: para +#: basic_mapping.xml:858 +#, no-c-format +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#. Tag: para +#: basic_mapping.xml:865 +#, no-c-format +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#. Tag: para +#: basic_mapping.xml:872 +#, no-c-format +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#. Tag: para +#: basic_mapping.xml:878 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#. Tag: para +#: basic_mapping.xml:884 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#. Tag: para +#: basic_mapping.xml:890 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"cascade (optional- defaults to none): " +"cascade 스타일." + +#. Tag: title +#: basic_mapping.xml:900 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "NOT TRANSLATED! Identifier generator optimization" + +#. Tag: para +#: basic_mapping.xml:901 +#, fuzzy, no-c-format +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion. " + +#. Tag: para +#: basic_mapping.xml:909 +#, no-c-format +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#. Tag: para +#: basic_mapping.xml:915 +#, no-c-format +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#. Tag: para +#: basic_mapping.xml:924 +#, no-c-format +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#. Tag: title +#: basic_mapping.xml:937 +#, no-c-format +msgid "composite-id" +msgstr "composite-id" + +#. Tag: programlisting +#: basic_mapping.xml:939 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:941 +#, no-c-format +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"composite 키를 가진 테이블의 경우, 당신은 클래스의 여러 프로퍼티들을 식별자 " +"프로퍼티들로서 매핑할 수 있다. <composite-id> 요소" +"는 자식 요소들로서 <key-property> 프로퍼티 매핑과 " +"<key-many-to-one> 매핑들을 허용한다." + +#. Tag: programlisting +#: basic_mapping.xml:948 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:950 +#, no-c-format +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"당신의 영속 클래스는 composite 식별자 동등성을 구현하기 위해서 " +"equals()hashCode()를 오버라이드 " +"시켜야 한다. 그것은 또한 Serializable" +"을 구현해야 한다." + +#. Tag: para +#: basic_mapping.xml:956 +#, no-c-format +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"불행히도, composite 식별자들에 대한 이 접근법은 영속 객체가 그것 자신의 식별" +"자라는 점을 의미한다. 객체 자신 외의 다른 \"핸들\"이 존재하지 않는다. 당신은 " +"당신이 composite key로 연관된 영속 상태를 load() 할 수 있" +"기 이전에 영속 클래스 그 자체의 인스턴스를 초기화 하고 그것의 식별자 프로퍼티" +"들을 군집화 시켜야 한다. 우리는 이 접근법을 embedded " +"composite 식별자로 부르고, 중대한 어플리케이션들에 대해 그것을 억제시킨다." + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"두 번째 접근법은 우리가 mapped composite 식별자라고 부르" +"는 것인데, 여기서 <composite-id> 요소 내에 명명된 여" +"기서 식별자 프로퍼티들은 영속 클래스와 별도의 식별자 클래스 양자 상에 중복된" +"다." + +#. Tag: programlisting +#: basic_mapping.xml:971 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:973 +#, no-c-format +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"이 예제에서, composite 식별자 클래스인 MedicareId와 엔티" +"티 크래스 그 자체 양자는 medicareNumber와 " +"dependent로 명명된 프로퍼티들을 갖는다. 식별자 클래스는 " +"equals()hashCode()를 오버라이드 시켜" +"고 Serializable을 구현해야 한다. 이 접근법의 단점은 아주 " +"명백한—코드 중복이다." + +#. Tag: para +#: basic_mapping.xml:982 +#, no-c-format +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "다음 속성들은 매핑된 composite 식별자를 지정하는데 사용된다:" + +#. Tag: para +#: basic_mapping.xml:988 +#, no-c-format +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped (옵션, 디폴트는 false): 하나의 " +"매핑된 composite 식별자가 사용됨을, 그리고 포함된 프로퍼티 매핑들이 엔티티 클" +"래스와 composite 식별자 클래스 양자를 참조함을 나타낸다." + +#. Tag: para +#: basic_mapping.xml:996 +#, no-c-format +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (옵션, 하지만 하나의 매핑된 commposite 식별자에 대해" +"서는 필수적임): 하나의 composite 식별자로서 사용되는 클래스." + +#. Tag: para +#: basic_mapping.xml:1003 +#, no-c-format +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"우리는 에서 composite 식별자가 하나" +"의 component 클래스로서 구현되는 보다 편리한 접근법인 세번째 방도를 설명할 것" +"이다. 아래에 설명되어 있는 속성들은 이 대체적인 접근법에만 적용된다:" + +#. Tag: para +#: basic_mapping.xml:1011 +#, no-c-format +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (옵션, 이 접근법의 경우에는 필수임): 하나의 " +"component 식별자를 소유하는 컴포넌트 타입의 프로퍼티(9장을 보라)." + +#. Tag: para +#: basic_mapping.xml:1023 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (옵션 - 디폴트는 reflection에 의해 결정된 프로퍼티 " +"타입): 하나의 composite 식별자로서 사용되는 컴포넌트 클래스(다음 절을 보라)." + +#. Tag: para +#: basic_mapping.xml:1030 +#, no-c-format +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"이 세번째 접근법, identifier component은 거의 모든 어플" +"리케이션들에 대해 우리가 권장하는 것이다." + +#. Tag: title +#: basic_mapping.xml:1038 +#, no-c-format +msgid "discriminator" +msgstr "discriminator" + +#. Tag: para +#: basic_mapping.xml:1040 +#, no-c-format +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"<discriminator> 요소는 table-per-class-hierarchy(테" +"이블 당 클래스 계층구조) 매핑 방도를 사용하는 다형성 영속화에 필요하고 테이블" +"의 discriminator(판별자) 컬럼을 선언한다. discriminator 컬럼은 특정 행에 대" +"해 초기화 시킬 서브 클래스가 무엇인지를 영속 계층에 알려주는 표시자 값들을 포" +"함한다. 타입들의 제한적인 집합이 사용될 수 있다: string, " +"character, integer, byte, short, boolean, " +"yes_no, true_false." + +#. Tag: programlisting +#: basic_mapping.xml:1058 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1061 +#, no-c-format +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column (옵션 - 디폴트는 class) " +"discriminator 컬럼명." + +#. Tag: para +#: basic_mapping.xml:1067 +#, no-c-format +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (옵션 - 디폴트는 string) " +"Hibernate 타입을 나타내는 이름" + +#. Tag: para +#: basic_mapping.xml:1073 +#, no-c-format +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force (옵션 - 디폴트는 false) 이것은 " +"Hibernate로 하여금 루트 클래스의 모든 인스턴스들을 검색할 때조차도 허용된 " +"discriminator 값들을 지정하도록 \"강제한다\"." + +#. Tag: para +#: basic_mapping.xml:1080 +#, no-c-format +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (옵션 - 디폴트는 true) 당신의 " +"discriminator 컬럼이 또한 매핑된 composite 식별자의 부분일 경우에 이것을 " +"false로 설정하라. (Hibernate에게 SQL INSERT들 속에 그 컬럼을 포함하지 않도록 통보한다.)" + +#. Tag: para +#: basic_mapping.xml:1088 +#, no-c-format +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (옵션) 타입이 평가 되어야 할 때 실행되는 임의의 " +"SQL 표현식. 컨텐츠 기반의 판별을 허용해준다." + +#. Tag: para +#: basic_mapping.xml:1096 +#, no-c-format +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"discriminator 컬럼의 실제 값들은 <class> 요소와 " +"<subclass> 요소의 discriminator-value 속성에 의해 지정된다." + +#. Tag: para +#: basic_mapping.xml:1102 +#, no-c-format +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"force 속성은 테이블이 영속 클래스로 매핑되지 않는 \"특별한" +"\" discriminator 값들을 가진 행들을 포함할 경우에(만) 유용하다. 이것은 대개 " +"그 경우가 아닐 것이다." + +#. Tag: para +#: basic_mapping.xml:1108 +#, no-c-format +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"formula 속성을 사용하여 당신은 행의 타입을 판단하는데 사용" +"될 임의의 SQL 표현식을 선언할 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:1113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1118 +#, no-c-format +msgid "version (optional)" +msgstr "version (옵션)" + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"<version> 요소는 옵션이고 테이블이 버전화된 데이터" +"를 포함한다는 것을 나타낸다. 이것은 당신이 긴 트랜잭션(long " +"transaction)들을 사용할 계획이라면 특히 유용하다 (아래를 보라)." + +#. Tag: programlisting +#: basic_mapping.xml:1136 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1139 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column (옵션 - 디폴트는 프로퍼티 명): 버전 번호를 가진 컬" +"럼의 이름." + +#. Tag: para +#: basic_mapping.xml:1145 +#, no-c-format +msgid "" +"name: The name of a property of the persistent class." +msgstr "name: 영속 클래스의 프로퍼티 명." + +#. Tag: para +#: basic_mapping.xml:1150 +#, no-c-format +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (옵션 - 디폴트는 integer): 버전 번" +"호의 타입." + +#. Tag: para +#: basic_mapping.xml:1162 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (옵션 - 디폴트는 undefined): 이전 세션에서 저장되었거나 로드되었던 detached 인스턴스로부터 구별" +"지어서, 인스턴스가 새로이 초기화됨(unsaved)을 나타내는 version 프로퍼티 값." +"(undefined는 식별자 프로퍼티 값이 사용될 것임을 지정한다.)" + +#. Tag: para +#: basic_mapping.xml:1171 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"generated (옵션 - 디폴트는 never): 이 " +"version 프로퍼티 값이 데이터베이스에 의해 실제로 산출되는지를 지정한다. " +"산출되는 프로퍼티들에 관한 논의를 " +"보라." + +#. Tag: para +#: basic_mapping.xml:1178 +#, no-c-format +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"insert (옵션 - 디폴트는 true): version " +"컬럼이 SQL insert 문장들 속에 포함될 것인지 여부를 지정한다. 데이터베이스 컬" +"럼이 디폴트 값 0으로 정의되는 경우에만 false로 설정될 수 있다." + +#. Tag: para +#: basic_mapping.xml:1188 +#, no-c-format +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"버전 번호들은 long, integer, " +"short, timestamp 또는 " +"calendar 타입일 수 있다." + +#. Tag: para +#: basic_mapping.xml:1193 +#, no-c-format +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"version 또는 timestamp 프로퍼티는 detached 인스턴스에 대해 결코 null일 수가 " +"없어서, Hibernate는 다른 unsaved-value 방도들이 지정되는 " +"것에 상관없이, null version이나 timestamp를 가진 임의의 인스턴스를 transient" +"로서 검출할 것이다. null 허용되는 version 이나 property를 선언하는 " +"것은 Hibernate에서 transitive reattachment에 대한 임의의 문제들을 피하는 쉬" +"운 방법이고, assigned 식별자들이나 composite key들을 사용하는 사람들에게 특" +"히 유용하다!" + +#. Tag: title +#: basic_mapping.xml:1204 +#, no-c-format +msgid "timestamp (optional)" +msgstr "timestamp (옵션)" + +#. Tag: para +#: basic_mapping.xml:1206 +#, no-c-format +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"옵션 <timestamp> 요소는 테이블이 타임스탬프화 된 데" +"이터를 포함함을 나타낸다. 이것은 버전화에 대한 대체물로서 고안되었다. " +"Timestamp은 고유하게 optimistic 잠금에 대한 다소 안전한 구현이다. 하지만 때때" +"로 어플리케이션은 다른 방법들로 timestamp들을 사용할 수도 있다." + +#. Tag: programlisting +#: basic_mapping.xml:1222 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1225 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "" +"column (옵션 - 디폴트는 프로퍼티 명): 타임스탬프를 포함하" +"는 컬럼 명." + +#. Tag: para +#: basic_mapping.xml:1231 +#, no-c-format +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name: 영속 클래스에 대해 자바 Date 또" +"는 Timestamp 타입을 가진 자바빈즈 스타일의 프로퍼티 이름." + +#. Tag: para +#: basic_mapping.xml:1244 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (옵션 - 디폴트는 null): " +"이전 세션에서 저장되었거나 로드되었던 detached 인스턴스로부터 인스턴스를 구별" +"지우는, 인스턴스가 새로이 초기화됨(unsaved)을 나타내는 version 프로퍼티 값." +"(undefined는 식별자 프로퍼티 값이 사용될 것임을 지정한다.)" + +#. Tag: para +#: basic_mapping.xml:1253 +#, no-c-format +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"source (옵션 - 디폴트는 vm): Hibernate" +"는 어디서 timestamp 값을 검색할 것인가? 데이터베이스로부터인가 현재의 JVM으로" +"부터인가? 데이터베이스 기반의 timestamp들은 Hibernate가 \"다음 값\"을 결정하" +"기 위해 데이터베이스에 접속해야 하기 때문에 오버헤드를 초래하지만, 클러스터링" +"된 환경들에서의 용도로 보다 더 안전할 것이다. 또한 모든 Dialect들이 데이터베이스의 현재의 timestamp에 대한 검색을 지원하는 것으로 알" +"려져 있지 않지만, 다른 Dialect들은 정밀도 결핍 때문에 잠금" +"에 있어 사용이 안전하지 않을 수 있음을 노트하라(예를 들면 오라클 8)." + +#. Tag: para +#: basic_mapping.xml:1265 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"generated (옵션 - 디폴트는 never): 이 " +"timestamp 프로퍼티 값이 데이터베이스에 의해 실제로 생성됨을 지정한다. 산출되는 프로퍼티들에 대한 논의들 보라." + +#. Tag: para +#: basic_mapping.xml:1274 +#, no-c-format +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"<timestamp><version type=\"timestamp" +"\">과 같음을 노트하라. 그리고 <timestamp use-db=" +"\"true\"><version type=\"dbtimestamp\">과 같다" + +#. Tag: title +#: basic_mapping.xml:1284 +#, no-c-format +msgid "property" +msgstr "프로퍼티" + +#. Tag: para +#: basic_mapping.xml:1286 +#, no-c-format +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"<property> 요소는 클래스의 자바빈즈 스타일의 영속 프" +"로퍼티를 선언한다." + +#. Tag: programlisting +#: basic_mapping.xml:1308 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1311 +#, no-c-format +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "name: 첫 소문자로 시작하는 프로퍼티 이름." + +#. Tag: para +#: basic_mapping.xml:1317 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column (옵션 - 디폴트는 프로퍼티 이름): 매핑된 데이터베이" +"스 테이블 컬럼의 이름. 이것은 또한 내부에 포함되는 <column> 요소(들)에 의해 지정될 수도 있다." + +#. Tag: para +#: basic_mapping.xml:1324 +#, no-c-format +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "type (옵션): Hibernate 타입을 나타내는 이름." + +#. Tag: para +#: basic_mapping.xml:1329 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (옵션 - 디폴트는 true) : 매핑된 컬럼들이 UPDATE와/또는 " +"INSERT 문장들속에 포함될 것임을 지정한다. 둘다 " +"false로 설정하는 것은 그 값이 동일한 컬럼(들)로 매핑되는 " +"어떤 다른 프로퍼티로부터 또는 트리거에 의해 또는 다른 어플리케이션으로부터 초" +"기화 되는 순수하게 \"파생된(derived)\" 프로퍼티를 허용해준다." + +#. Tag: para +#: basic_mapping.xml:1338 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula (옵션): 계산되는 프로퍼티에 " +"대해 값을 정의하는 SQL 표현식. 계산되는 프로퍼티들은 그것들 자신에 대한 컬럼 " +"매핑을 갖지 않는다." + +#. Tag: para +#: basic_mapping.xml:1351 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (옵션 - 디폴트는 false): 인스턴스 " +"변수가 처음으로 액세스 될 때 이 프로퍼티가 lazily하게 페치될 것임을 지정한다" +"(빌드-시 바이트코드 수단을 필요로 한다)." + +#. Tag: para +#: basic_mapping.xml:1358 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (옵션): 컬럼들에 대한 유일 컨스트레인트의 DDL 생성" +"을 가능하게 만든다. 또한 이것이 property-ref의 타켓이 되" +"는 것을 허용해준다." + +#. Tag: para +#: basic_mapping.xml:1365 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (옵션): 컬럼들에 대해 null 가능 컨스트레인트의 " +"DDL 생성을 가능하게 만든다." + +#. Tag: para +#: basic_mapping.xml:1371 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 이 프로퍼티에 대한 업데이트들이 optimistic 잠금을 획득하는 것을 필" +"요로 하거나 필요로 하지 않음을 지정한다. 달리말해, 이 프로퍼티가 dirty일 때 " +"버전 증가가 발생할 경우인지를 결정한다." + +#. Tag: para +#: basic_mapping.xml:1379 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"generated (옵션 - 디폴트는 never): 이 " +"프로퍼티 값이 데이터베이스에 의해 실제로 산출되는지를 지정한다. 산출되는 프로퍼티들에 대한 논의를 보라." + +#. Tag: para +#: basic_mapping.xml:1388 +#, no-c-format +msgid "typename could be:" +msgstr "typename은 다음일 수 있다:" + +#. Tag: para +#: basic_mapping.xml:1394 +#, no-c-format +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"Hibernate 기본 타입의 이름 (예를 들어. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." + +#. Tag: para +#: basic_mapping.xml:1400 +#, no-c-format +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"디폴트 기본 타입을 가진 Java 클래스의 이름(예를 들어. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." + +#. Tag: para +#: basic_mapping.xml:1406 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "serializable Java 클래스의 이름." + +#. Tag: para +#: basic_mapping.xml:1411 +#, no-c-format +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"맞춤 타입의 클래스 이름(예를 들어. com.illflow.type.MyCustomType)." + +#. Tag: para +#: basic_mapping.xml:1417 +#, no-c-format +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"만일 당신이 타입을 지정하지 않을 경우, Hibernate는 정확한 Hibernate 타입을 추" +"정하기 위해 명명된 프로퍼티에 대해 reflection을 사용할 것이다. Hibernate는 " +"그 순서에서 2,3,4 규칙들을 사용하여 프로퍼티 getter의 반환 클래스의 이름을 해" +"석하려고 시도할 것이다. 하지만 이것은 항상 충분하지는 않다. 어떤 경우들에서, " +"당신은 여전히 type 속성을 필요로 할 것이다.(예를 들어, " +"Hibernate.DATEHibernate.TIMESTAMP 사" +"이를 구별하기 위해, 또는 맞춤 타입을 지정하기 위해.)" + +#. Tag: para +#: basic_mapping.xml:1427 +#, no-c-format +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"access 속성은 당신으로 하여금 Hibernate가 런타임 시에 프로" +"퍼티에 액세스하는 방법을 제어하도록 해준다. 디폴트로 Hibernate는 프로퍼티 " +"get/set 쌍을 호출할 것이다. 만일 당신이 access=\"field\"" +"를 지정할 경우, Hibernate는 get/set 쌍을 피하고 reflection을 사용하여 직접 필" +"드에 액세스 할 것이다. 당신은 org.hibernate.property." +"PropertyAccessor 인터페이스를 구현하는 클래스를 명명함으로써 프로퍼" +"티 접근을 위한 당신 자신의 방도를 지정할 수도 있다." + +#. Tag: para +#: basic_mapping.xml:1436 +#, no-c-format +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"특별히 강력한 특징은 파생된 플로퍼티들이다. 이들 프로퍼티들은 정의상 읽기 전" +"용이고, 그 프로퍼티 값은 로드 시에 계산된다. 당신은 그 계산을 SQL 표현식으로 " +"선언하고, 이것은 인스턴스를 로드시키는 SQL 질의 내의 SELECT 절 서브질의로 번역된다:" + +#. Tag: programlisting +#: basic_mapping.xml:1443 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1445 +#, no-c-format +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"당신은 특정 컬럼(주어진 예제에서는 customerId)에 대해 " +"alias를 선언하지 않음으로써 엔티티들 자신의 테이블을 참조할 수 있음을 노트하" +"라. 또한 당신은 만일 당신이 그 속성을 사용하고 싶지 않을 경우에 내포된 " +"<formula> 매핑 요소를 사용할 수 있음을 노트하라." + +#. Tag: title +#: basic_mapping.xml:1455 +#, no-c-format +msgid "many-to-one" +msgstr "many-to-one" + +#. Tag: para +#: basic_mapping.xml:1457 +#, no-c-format +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"또 다른 영속 클래스에 대한 정규 연관관계는 many-to-one 요" +"소를 사용하여 선언된다. 관계형 모형은 many-to-one 연관관계이다.: 하나의 테이" +"블 내에 있는 foreign 키는 대상 테이블의 프라이머리 키 컬럼(들)을 참조하고 있" +"다." + +#. Tag: programlisting +#: basic_mapping.xml:1485 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1488 basic_mapping.xml:1669 basic_mapping.xml:1855 +#, no-c-format +msgid "name: The name of the property." +msgstr "name: 프로퍼티의 이름." + +#. Tag: para +#: basic_mapping.xml:1493 basic_mapping.xml:2284 +#, fuzzy, no-c-format +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (옵션): foreign key 컬럼의 이름. 이것은 또한 내포" +"된 <column> 요소(들)에 의해 지정된다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (옵션): foreign key 컬럼의 이름. 이것은 또한 내포" +"된 <column> 요소(들)에 의해 지정될 수 있다." + +#. Tag: para +#: basic_mapping.xml:1500 basic_mapping.xml:1674 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"class (옵션 - 디폴트는 reflection에 의해 결정된 프로퍼티 " +"타입): 연관된 클래스의 이름." + +#. Tag: para +#: basic_mapping.xml:1506 +#, no-c-format +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (옵션): 어느 오퍼레이션들이 부모 객체로부터 연관" +"된 객체로 케스케이드 될 것인지를 지정한다." + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1695 +#, fuzzy, no-c-format +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (옵션 - 디폴트는 select): outer-" +"join 페칭 또는 sequential select 페칭 사이에서 선택하라.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (옵션 - 디폴트는 select): outer-" +"join 페칭 또는 순차적인 select 페칭 중에서 선택하라." + +#. Tag: para +#: basic_mapping.xml:1518 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert (옵션 - 디폴트는 true) " +"매핑된 컬럼들이 SQL UPDATE와/또는 INSERT 문장들 속에 포함될 것인지를 지정한다. 둘다 false" +"로 설정하는 것은 그 값이 동일한 컬럼(들)로 매핑시키는 어떤 다른 컬럼들로부터 " +"초기화 되거나 트리거나 다른 어플리케이션에 의해 초기화되는 단순한 \"파생된\" " +"연관관계 값을 허용한다." + +#. Tag: para +#: basic_mapping.xml:1527 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref: (옵션) 이 foreign key에 조인되는 연관된 클래" +"스의 프로퍼티 이름. 지정되지 않을 경우, 연관 클래스의 프라이머리 키가 사용된" +"다." + +#. Tag: para +#: basic_mapping.xml:1540 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique (옵션): foreign-key 컬럼을 위한 유일 컨스트레인트" +"의 DDL 생성을 가능하도록 해준다. 또한 이것이 property-ref의 대상이 되는 것을 " +"허용해준다. 이것은 연관 다중성(association multiplicity)을 효율적으로 일 대 " +"일로 만든다." + +#. Tag: para +#: basic_mapping.xml:1548 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (옵션): foreign key 컬럼들을 위한 null 가능한 컨" +"스트레인트의 DDL 생성을 가능하도록 해준다." + +#. Tag: para +#: basic_mapping.xml:1554 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 이 프로퍼티에 대한 업데이트들이 optimistic lock의 획득을 필요로 하" +"는지 아닌지 여부를 지정한다. 달리 말해 이 프로퍼티가 dirty일 때 version 증가" +"가 발생해야 할 경우인지를 결정한다." + +#. Tag: para +#: basic_mapping.xml:1562 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy (옵션 - 디폴트는 proxy): 디폴트" +"로, 단일 포인트 연관들이 프락시된다. lazy=\"no-proxy\"는 " +"인스턴스 변수가 처음으로 접근될 때 그 프로퍼티가 lazily 페치될 것임을 지정한" +"다(빌드-시 바이트코드 수단을 필요로 한다). lazy=\"false\"" +"는 그 연관이 항상 eagerly 페치될 것임을 지정한다." + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (옵션 - 디폴트는 exception): " +"누락된 행들을 참조하는 foreign key들이 어떻게 처리될 것인지를 지정한다: " +"ignore는 한 개의 누락된 행을 한 개의 null 연관으로 취급할 " +"것이다." + +#. Tag: para +#: basic_mapping.xml:1579 basic_mapping.xml:1733 +#, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "entity-name (옵션): 연관된 클래스의 엔티티 이름." + +#. Tag: para +#: basic_mapping.xml:1585 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (옵션): 계산된 foreign key에 " +"대한 값을 정의하는 SQL 표현식." + +#. Tag: para +#: basic_mapping.xml:1592 +#, no-c-format +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"cascade 속성 값을 none 아닌 어떤 의미있" +"는 다른 값으로 설정하는 것은 어떤 오퍼레이션들을 연관된 객체에게 보급할 것이" +"다. 유의미한 값들은 Hibernate의 기본 오퍼레이션들의 이름들, 즉 " +"persist, merge, delete, save-update, evict, replicate, lock, " +"refresh 뿐만 아니라 특별한 값들, 즉 delete-orphanall 그리고 오퍼레이션 이름들의 쉼표 분리된 조합" +"들, 예를 들면 cascade=\"persist,merge,evict\" 또는 " +"cascade=\"all,delete-orphan\"이다. 전체 설명은 를 보라. 단일값 연관들(many-to-one 연관" +"과 one-to-one 연관)은 orphan delete를 지원하지 않음을 노트하라." + +#. Tag: para +#: basic_mapping.xml:1605 +#, no-c-format +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "" +"일반적인 many-to-one 선언은 다음과 같이 간단하게 보여진다:" + +#. Tag: programlisting +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1611 +#, no-c-format +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"property-ref 속성은 오직 foreign key가 프라이머리 키가 아" +"닌 연관된 테이블의 유일 키를 참조하는 리거시 데이터를 매핑하는데만 사용된다. " +"이것은 꼴사나운 관계형 모형이다. 예를 들어, Product 클래스" +"가 프라이머리 키를 아닌, 유일한 시리얼 번호를 갖는다고 가정하자." +"(unique 속성은 SchemaExport 도구로 Hibernate의 DDL 생성을 " +"제어한다.)" + +#. Tag: programlisting +#: basic_mapping.xml:1620 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1622 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "" +"그런 다음 OrderItem에 대한 매핑은 다음을 사용할 것이다:" + +#. Tag: programlisting +#: basic_mapping.xml:1626 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1628 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "하지만 이것은 확실히 권장되지 않는다." + +#. Tag: para +#: basic_mapping.xml:1632 +#, no-c-format +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"만일 참조된 유일 키가 연관된 엔티티의 여러 프로퍼티들을 포함할 경우, 당신은 " +"명명된 <properties> 요소 내부에 참조된 프로퍼티들을 " +"매핑할 것이다." + +#. Tag: para +#: basic_mapping.xml:1637 +#, no-c-format +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "" +"만일 참조된 유일키가 컴포넌트의 프로퍼티일 경우, 당신은 하나의 프로퍼티 경로" +"를 지정할 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:1641 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1646 +#, no-c-format +msgid "one-to-one" +msgstr "one-to-one" + +#. Tag: para +#: basic_mapping.xml:1648 +#, no-c-format +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "" +"또 다른 영속 클래스에 대한 one-to-one 연관관계는 one-to-one 요소를 사용하여 선언된다." + +#. Tag: programlisting +#: basic_mapping.xml:1666 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1680 +#, no-c-format +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (옵션) 어느 오퍼레이션들이 부모 객체로부터 연관된 " +"객체로 케스케이드 될 것인지를 지정한다." + +#. Tag: para +#: basic_mapping.xml:1686 +#, no-c-format +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"constrained (옵션) 매핑된 테이블의 프라이머리 키에 대한 " +"foreign 키 컨스트레인트가 연관된 클래스의 테이블을 참조하는지 여부를 지정한" +"다. 이 옵션은 save()delete()가 케스" +"케이드 되는 순서에 영향을 주고, 그 연관이 프락시 될 것인지 여부를 결정한다 " +"(또한 스키마 내보내기 도구에 의해 사용된다)." + +#. Tag: para +#: basic_mapping.xml:1701 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"property-ref: (옵션) 이 클래스의 프라이머리 키에 연결된 연" +"관 클래스의 프로퍼티의 이름. 만일 지정되지 않을 경우, 연관 클래스의 프라이머" +"리 키가 사용된다." + +#. Tag: para +#: basic_mapping.xml:1714 +#, no-c-format +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"formula (옵션): 거의 모든 one to one 연관관계들은 소유하" +"는 엔티티의 프라이머리 키로 매핑된다. 이것이 그 경우가 아닌 드문 경우들에서, " +"당신은 SQL formula 사용에 결합시킬 몇몇 다른 컬럼, 컬럼들, 또는 표현식을 지정" +"할 수 있다.(예제는 org.hibernate.test.onetooneformula를 보" +"라.)" + +#. Tag: para +#: basic_mapping.xml:1722 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"lazy (옵션 - 디폴트는 proxy): 디폴트로 " +"한쪽 끝 연관들이 프락시 된다. lazy=\"no-proxy\"는 인스턴" +"스 변수가 처음 접근될 때 그 프로퍼티가 lazily 페치될 것임을 지정한다(빌드-시 " +"바이트코드 수단을 필요로 한다). lazy=\"false\"는 그 연관들" +"이 항상 eagerly 페치될 것임을 지정한다. 만일 constrained=" +"\"false\"인 경우에, 프락싱은 불가능하고 Hibernate는 그 연관을 " +"eager 페치시킬 것이다!" + +#. Tag: para +#: basic_mapping.xml:1740 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "one-to-one 연관관계에는 두 가지 변종이 존재한다:" + +#. Tag: para +#: basic_mapping.xml:1744 +#, no-c-format +msgid "primary key associations" +msgstr "프라이머리 키 연관관계들" + +#. Tag: para +#: basic_mapping.xml:1747 +#, no-c-format +msgid "unique foreign key associations" +msgstr "유일 foreign 키 연관관계들" + +#. Tag: para +#: basic_mapping.xml:1752 +#, no-c-format +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"프라이머리 키 연관들은 특별한 테이블 컬럼을 필요로 하지 않는다; 만일 두 개의 " +"행들이 그 연관에 의해 관계지워지면, 두 개의 테이블 행들은 동일한 프라이머리 " +"키 값을 공유한다. 따라서 만일 두 개의 객체들이 프라이머리 키 연관에 의해 관계" +"지워지도록 당신이 원할 경우, 당신은 그것들에 동일한 식별자 값이 할당되도록 해" +"야 한다!" + +#. Tag: para +#: basic_mapping.xml:1759 +#, no-c-format +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"프라이머리 키 연관에 대해, 다음 매핑들을 Employee와 " +"Person 각각에 추가하라." + +#. Tag: programlisting +#: basic_mapping.xml:1764 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1765 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1767 +#, no-c-format +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"이제 우리는 PERSON 과 EMPLOYEE 테이블들에서 관계지워진 행들의 프라이머리 키들" +"이 동일함을 확실히 해야 한다! 우리는 foreign로 명명되는 특" +"별한 Hibernate 식별자 생성 방도를 사용한다:" + +#. Tag: programlisting +#: basic_mapping.xml:1773 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1775 +#, no-c-format +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"그때 Person의 새로이 저장된 인스턴스는 그 " +"Personemployee 프로퍼티에 대해 참조" +"된 Employee 인스턴스와 동일한 프라이머리 키를 할당받는다." + +#. Tag: para +#: basic_mapping.xml:1781 +#, no-c-format +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"달리, Employee로부터 Person으로의 유일 " +"컨스트레인트를 가진 하나의 foreign key는 다음과 같이 표현될 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:1786 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1788 +#, no-c-format +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "" +"그리고 이 연관은 다음을 Person 매핑에 추가함으로써 양방향" +"이 될 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:1793 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1798 +#, no-c-format +msgid "natural-id" +msgstr "natural-id" + +#. Tag: programlisting +#: basic_mapping.xml:1800 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1802 +#, no-c-format +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"비록 우리가 프라이머리 키들로서 대용키들을 사용하는 것을 권장했을지라도, 당신" +"은 여전히 모든 엔티티들에 대한 natural 키들을 식별하고자 원할 것이다. " +"narutal 키는 유일(unique)하고 null이 아닌 프로퍼티 또는 프로퍼티들의 조합이" +"다. 그것이 또한 불변하는 것일 경우가 더 좋다. <natural-id> 요소 내부에 있는 natural 키의 프로퍼티들을 매핑하라. Hibernate는 필" +"수적인 유일 키와 null 허용가능한 컨스트레인트들을 생성시킬 것이고, 당신의 매" +"핑은 보다 자가 설명적이게 될 것이다." + +#. Tag: para +#: basic_mapping.xml:1811 +#, no-c-format +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"우리는 당신이 엔티티에 대한 narutal 키 프로퍼티들을 비교하는데 " +"equals()hashCode()를 구현할 것을 강" +"력하게 권장한다." + +#. Tag: para +#: basic_mapping.xml:1816 +#, no-c-format +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "" +"이 매핑은 natural 프라이머리 키들을 가진 엔티티들을 위한 용도로 고안된 것은 " +"아니다." + +#. Tag: para +#: basic_mapping.xml:1822 +#, no-c-format +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "" +"mutable (옵션, 디폴트는 false): 디폴트" +"로, narutal 식별자 프로퍼티들은 변경될 수 없는 것(상수)으로 가정된다." + +#. Tag: title +#: basic_mapping.xml:1832 +#, no-c-format +msgid "component, dynamic-component" +msgstr "component, dynamic-component" + +#. Tag: para +#: basic_mapping.xml:1834 +#, no-c-format +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "" +"<component> 요소는 자식 객체의 프로퍼티들을 부모 클" +"래스에 대한 테이블의 컬럼들로 매핑시킨다. 컴포넌트들은 그것들 자신의 프로퍼티" +"들, 컴포넌트들, 또는 콜렉션들을 선언한다. 이래 \"컴포넌트들\"을 보라." + +#. Tag: programlisting +#: basic_mapping.xml:1852 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1860 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"class (옵션 - 디폴트는 reflection에 의해 결정된 프로퍼티 " +"타입): 컴포넌트(자식) 클래스의 이름." + +#. Tag: para +#: basic_mapping.xml:1866 basic_mapping.xml:1955 +#, fuzzy, no-c-format +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert: 매핑된 컬럼들이 SQL INSERT들 속" +"에 나타나야 하는가?\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert: 매핑된 컬럼들이 SQL INSERT들 내" +"에 나타날 것인가?" + +#. Tag: para +#: basic_mapping.xml:1872 basic_mapping.xml:1961 +#, fuzzy, no-c-format +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update: 매핑된 컬럼들이 SQL UPDATE들 속" +"에 나타나야 하는가?\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update: 매핑된 컬럼들이 SQL UPDATE들 내" +"에 나타날 것인가?" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (옵션 - 디폴트는 false): 인스턴스 " +"변수가 처음으로 액세스될 때 이 컴포넌트가 lazily(느리게) 페치되어야 하는지 여" +"부를 지정한다 (빌드 시 바이트코드 수단을 필요로 한다)." + +#. Tag: para +#: basic_mapping.xml:1891 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 이 컴포넌트에 대한 업데이트들이 optimistic 잠금을 획득하는 것을 필" +"요로 하는지 여부를 지정한다. 달리 말해 이 프로퍼티가 dirty 일 때 버전 증가가 " +"발생할 것인지 여부를 결정한다." + +#. Tag: para +#: basic_mapping.xml:1899 basic_mapping.xml:1975 +#, no-c-format +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"unique (옵션 - 디폴트는 false): 유일 컨" +"스트레인트가 컴포넌트의 모든 매핑된 컬럼들에 대해 존재하는지 여부를 지정한다." + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"자식 <property> 태그들은 자식 클래스의 프로퍼티들을 " +"테이블 컬럼들로 매핑시킨다." + +#. Tag: para +#: basic_mapping.xml:1913 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component> 요소는 컴포넌트 클래스의 프로퍼티를 포함" +"하는 엔티티에 대한 참조로서 매핑시키는 <parent> 서브" +"요소를 허용한다." + +#. Tag: para +#: basic_mapping.xml:1919 +#, no-c-format +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "" +"<dynamic-component> 요소는 컴포넌트로서 매핑될" +"Map을 허용한다. 여기서 프로퍼티 이름들은 map의 키들을 참조" +"한다. 을 보라." + +#. Tag: title +#: basic_mapping.xml:1928 +#, no-c-format +msgid "properties" +msgstr "properties" + +#. Tag: para +#: basic_mapping.xml:1930 +#, no-c-format +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"<properties> 요소는 클래스의 프로퍼티들의 명명된, 논" +"리적 그룹핑에 대한 정의를 허용한다. 그 구조에 대한 가장 중요한 사용은 그것이 " +"프로퍼티들의 조합이 property-ref의 대상이 되는 것을 허용해" +"준다는 점이다. 또한 그것은 다중 컬럼 유일 컨스트레인느를 정의하는 편리한 방법" +"이다." + +#. Tag: programlisting +#: basic_mapping.xml:1946 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1949 +#, no-c-format +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"name: 그룹핑의 논리적 이름 - 실제 프로퍼티 이름이 " +"아니다." + +#. Tag: para +#: basic_mapping.xml:1967 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 이들 프로퍼티들에 대한 업데이트들이 optimistic 잠금의 획득을 필요" +"로 하는지 여부를 지정한다. 달리 말해 이 프로퍼티가 dirty 일 때 버전 증가가 발" +"생할 것인지 여부를 결정한다." + +#. Tag: para +#: basic_mapping.xml:1984 +#, no-c-format +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "" +"예를 들어, 만일 우리가 다음 <properties> 매핑을 가" +"질 경우:" + +#. Tag: programlisting +#: basic_mapping.xml:1988 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1990 +#, no-c-format +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"그 때 우리는 프라이머리 키가 아닌, Person 테이블의 이 유" +"일 키를 참조하는 어떤 리거시 데이터 연관을 가질 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:1995 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1997 +#, no-c-format +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "" +"우리는 리거시 데이터를 매핑시키는 컨텍스트 바깥에서 이런 종류의 것을 사용하" +"는 것을 권장하지 않는다." + +#. Tag: title +#: basic_mapping.xml:2005 +#, no-c-format +msgid "subclass" +msgstr "subclass" + +#. Tag: para +#: basic_mapping.xml:2007 +#, no-c-format +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "" +"마지막으로, 다형성 영속성은 루트 영속 클래스에 대한 각각의 서브클래스 선언을 " +"필요로 한다.(권장되는) table-per-class-hierarchy(테이블 당 클래스 계층구조) " +"매핑 방도의 경우, <subclass> 선언이 사용된다." + +#. Tag: programlisting +#: basic_mapping.xml:2020 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2023 basic_mapping.xml:2081 basic_mapping.xml:2144 +#, fuzzy, no-c-format +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 서브클래스의 전체 수식어가 붙은 클래스 이름.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 서브클래스의 전체 수식어가 붙은 클래스 명.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 서브클래스의 전체 수식어가 붙은 클래스 명." + +#. Tag: para +#: basic_mapping.xml:2028 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"discriminator-value (옵션 - 디폴트는 클래스 이름): 개개의 " +"서브클래스들을 구분짓는 값." + +#. Tag: para +#: basic_mapping.xml:2034 basic_mapping.xml:2091 basic_mapping.xml:2154 +#, fuzzy, no-c-format +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (옵션): lazy 초기화 프락시들을 사용하는데 클래스 또" +"는 인터페이스를 지정한다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (옵션): 프락시들을 lazy 초기화 시키는데 사용할 클래" +"스 또는 인터페이스를 지정한다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (옵션): 프락시들을 lazy 초기화 시키는데 사용할 클래" +"스 또는 인터페이스를 지정한다." + +#. Tag: para +#: basic_mapping.xml:2040 basic_mapping.xml:2097 basic_mapping.xml:2160 +#, fuzzy, no-c-format +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (옵션 - 디폴트는 true): " +"lazy=\"false\" 설정은 lazy 페칭의 사용을 불가능하게 만든" +"다.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (옵션 - 디폴트는 true): " +"lazy=\"false\" 설정은 lazy 페칭을 사용불가능하게 만든다\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (옵션 - 디폴트는 true): " +"lazy=\"false\" 설정은 lazy 페칭을 사용불가능하게 만든다." + +#. Tag: para +#: basic_mapping.xml:2048 +#, no-c-format +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"각각의 서브클래스는 그것 자신의 영속 프로퍼티들과 서브클래스들을 선언할 것이" +"다. <version> 프로퍼티와 <id> 프로퍼티는 루트 클래스로부터 상속된다고 가정된다. 계층구조 내에서 각" +"각의 서브클래스는 유일한 discriminator-value를 정의해야 한" +"다. none이 지정될 경우, 전체 수식어가 붙은 자바 클래스 이름이 사용된다." + +#. Tag: para +#: basic_mapping.xml:2056 basic_mapping.xml:2114 basic_mapping.xml:2172 +#, no-c-format +msgid "" +"For information about inheritance mappings, see ." +msgstr "상속 매핑들에 대한 정보는 을 보라." + +#. Tag: title +#: basic_mapping.xml:2063 +#, no-c-format +msgid "joined-subclass" +msgstr "joined-subclass" + +#. Tag: para +#: basic_mapping.xml:2065 +#, no-c-format +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"다른 방법으로 각각의 서브클래스는 그것 자신이 테이블로 매핑될 수 있다(table-" +"per-subclass 매핑 방도). 상속된 상태는 슈퍼클래스의 테이블과 조인함으로써 검" +"색된다. 우리는 <joined-subclass> 요소를 사용한다." + +#. Tag: programlisting +#: basic_mapping.xml:2078 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2086 basic_mapping.xml:2149 +#, no-c-format +msgid "table: The name of the subclass table." +msgstr "table: 서브클래스 테이블의 이름." + +#. Tag: para +#: basic_mapping.xml:2105 +#, no-c-format +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"판별자(discriminator) 컬럼은 이 매핑 방도에 필요하지 않다. 하지만 각각의 서브" +"클래스는 <key> 요소를 사용하여 객체 식별자를 보관하" +"는 테이블 컬럼을 선언해야 한다. 이 장의 시작 부분에 있는 매핑은 다음과 같이 " +"다시 작성될 것이다:" + +#. Tag: programlisting +#: basic_mapping.xml:2112 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2121 +#, no-c-format +msgid "union-subclass" +msgstr "union-subclass" + +#. Tag: para +#: basic_mapping.xml:2123 +#, no-c-format +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"제3의 옵션은 상속 계층구조의 concrete 클래스들 만을 테이블들로 매핑하는 것이" +"다 (table-per-concrete-class 방도). 여기서 각각의 테이블은 상속된 상태를 포함" +"하여 클래스의 모든 영속 상태를 정의한다. Hibernate에서, 그것은 그런 상속 계층" +"구조들을 명시적으로 매핑하는데 필수적이지 않다. 당신은 별도의 <" +"class> 선언을 가진 각각의 클래스를 간단히 매핑시킬 수 있다. 하지" +"만 당신이 다형성 연관관계들(예를 들면 당신의 계층구조의 슈퍼클래스에 대한 연" +"관)을 사용하고자 원할 경우, 당신은 <union-subclass> " +"매핑을 사용할 필요가 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2141 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2168 +#, no-c-format +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "이 매핑 방도에는 판별자 컬럼이나 키 컬럼이 필요하지 않다." + +#. Tag: title +#: basic_mapping.xml:2179 +#, no-c-format +msgid "join" +msgstr "join" + +#. Tag: para +#: basic_mapping.xml:2181 +#, no-c-format +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"<join>요소를 사용하면, 테이블들 사이에 1대일 관계가 " +"존재할 때, 하나의 클래스에 속한 프로퍼티들을 여러 테이블들로 매핑시키는 것이 " +"가능하다." + +#. Tag: programlisting +#: basic_mapping.xml:2195 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2199 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "table: 조인된 테이블의 이름." + +#. Tag: para +#: basic_mapping.xml:2216 +#, no-c-format +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch (옵션 - 디폴트는 join): " +"join으로 설정될 경우, 디폴트로 Hibernate는 하나의 클래스 " +"또는 그것의 슈퍼 클래스들에 의해 정의된 <join>을 검" +"색하는데 inner join을 사용하고 서브클래스에 의해 정의된 <join>" +"을 검색하는데 outer join을 사용할 것이다. 만일 select로 설정할 경우, Hibernate는 서브클래스 상에 정의된 <" +"join>에 대해 sequential select를 사용할 것이고, 그것은 한 행이 " +"서브클래스의 인스턴스를 표현하는 것으로 판명되는 경우에만 명령이 내려질 것이" +"다. inner join들은 여전히 클래스와 그것의 슈퍼클래스들에 의해 정의된 " +"<join>을 검색하는데 사용될 것이다." + +#. Tag: para +#: basic_mapping.xml:2229 +#, no-c-format +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (옵션 - 디폴트는 false): 이용 " +"가능할 경우, Hibernate는 이 조인에 의해 정의된 프로퍼티들을 삽입시키거나 업데" +"이트하려고 시도하지 않을 것이다." + +#. Tag: para +#: basic_mapping.xml:2236 +#, no-c-format +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optional (옵션 - 디폴트는 false): 이용 " +"가능할 경우, Hibernate는 이 조인에 의해 정의된 프로퍼티들이 null이 아닐 경우" +"에만 한 행을 삽입시킬 것이고 그 프로퍼티들을 검색하는데 outer join을 항상 사" +"용할 것이다." + +#. Tag: para +#: basic_mapping.xml:2245 +#, no-c-format +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"예를 들어, (모든 프로퍼티들에 대해 value 타입 의미를 유지하면서) 개인의 주소 " +"정보는 별도의 테이블에 매핑될 수 있다:" + +#. Tag: programlisting +#: basic_mapping.xml:2250 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2252 +#, no-c-format +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"이 특징은 자주 리거시 데이터 모형들에 대해서만 유용하고, 우리는 클래스들과 " +"잘 정제된 도메인 모형 보다 더 적은 테이블들을 권장한다. 하지만 뒷 부분에 설명" +"되어 있듯이, 그것은 하나의 계층구조 내에 있는 상속 매핑 방도들 사이를 전환하" +"는 것에 유용하다." + +#. Tag: title +#: basic_mapping.xml:2262 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2264 +#, no-c-format +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"우리는 지금까지 몇 번 나타났던 <key> 요소를 보았다. " +"그것은 부모 매핑 요소가 새로운 테이블에 대한 조인을 정의하는 어느 곳에서나 나" +"타나고, 그것은 조인된 테이블의 foreign 키를 정의하고, 그것은 원래의 테이블의 " +"프라이머리 키를 참조한다." + +#. Tag: programlisting +#: basic_mapping.xml:2280 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2291 +#, no-c-format +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (옵션 - 디폴트는 noaction): " +"foreign key 컨스트레인트가 데이터베이스 레벨의 cascade delete를 사용가능하도" +"록 할 것인지 여부를 지정한다." + +#. Tag: para +#: basic_mapping.xml:2298 +#, no-c-format +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (옵션): foreign key가 원래의 테이블의 프라이" +"머리 키가 아닌 컬럼들을 참조함을 지정한다. (리거시 데이터에 제공됨.)" + +#. Tag: para +#: basic_mapping.xml:2305 +#, no-c-format +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (옵션): foreign 키 컬럼들이 not null 임를 지정한" +"다(이것은 foreign 키가 또한 프라이머리 키의 부분일 때마다 함축된다)." + +#. Tag: para +#: basic_mapping.xml:2312 +#, no-c-format +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (옵션): foreign 키가 결코 업데이트되지 않아야 함을 " +"지정한다(이것은 foreign 키가 또한 프라이머리 키의 부분일 때마다 함축된다)." + +#. Tag: para +#: basic_mapping.xml:2319 +#, no-c-format +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (옵션): foreign 키가 유일 컨스트레인트를 가져야 함" +"을 지정한다 (이것은 foreign 키가 또한 프라이머리 키의 부분일 때마다 함축된" +"다)." + +#. Tag: para +#: basic_mapping.xml:2327 +#, no-c-format +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"우리는 delete 퍼포먼스가 중요한 시스템들에 대해 권장하고, 모든 키들은 " +"on-delete=\"cascade\"로 정의되고, Hibernate는 많은 " +"DELETE 문장들 대신에, 데이터베이스 레벨의 ON " +"CASCADE DELETE 컨스트레인트를 사용할 것이다. 이 특징은 Hibernate의 " +"통상적인 버전화된 데이터에 대한 optimistic 잠금 방도를 무시한다는 점을 알고 " +"있어라." + +#. Tag: para +#: basic_mapping.xml:2335 +#, no-c-format +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"not-null 속성과 update 속성들은 단방향 " +"one to many 연관관계를 매핑할 때 유용하다. 만일 당신이 단방향 one to many를 " +"null이 허용되지 않는 foreign 키로 매핑할 경우, 당신은 <key not-" +"null=\"true\">를 사용하여 그 키 컬럼을 선언해야 한다." + +#. Tag: title +#: basic_mapping.xml:2345 +#, no-c-format +msgid "column and formula elements" +msgstr "column 요소와 formula 요소" + +#. Tag: para +#: basic_mapping.xml:2346 +#, no-c-format +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"column 속성을 허용하는 임의의 매핑 요소는 대안적으로 하나의 <" +"column> 서브요소를 수용할 것이다. 비슷하게 <" +"formula>formula 속성에 대한 대안이다." + +#. Tag: programlisting +#: basic_mapping.xml:2352 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2354 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2356 +#, no-c-format +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"column 속성과 formula 속성은 예를 들어 " +"신종 조인 조건들을 표현하기 위해 동일한 property 또는 연관관계 매핑 내에 결합" +"될 수 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2362 +#, no-c-format +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"
]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2367 +#, no-c-format +msgid "import" +msgstr "import" + +#. Tag: para +#: basic_mapping.xml:2369 +#, no-c-format +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"당신의 어플리케이션이 동일한 이름을 가진 두 개의 영속 클래스들을 갖고, 당신" +"이 Hibernate 질의들 내에서 전체 수식어가 붙은 (패키지)이름을 지정하는 것을 원" +"하지 않는다고 가정하자. 클래스들은 auto-import=\"true\"에 " +"의존하기 보다 명시적으로 \"임포트 될 \" 것이다. 당신은 심지어 명시적으로 매핑" +"되지 않는 클래스들과 인터페이스들을 임포트 시킬 수(가져오기 할 수) 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2383 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "" +"class: 임의의 Java 클래스의 전체 수식어가 붙은 클래스 이" +"름." + +#. Tag: para +#: basic_mapping.xml:2391 +#, no-c-format +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename (옵션 - 디폴트는 수식어가 붙지 않은 클래스 이름): " +"질의 언어 내에서 사용될 이름." + +#. Tag: title +#: basic_mapping.xml:2402 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2404 +#, no-c-format +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"하나 이상의 프로퍼티 매핑 타입이 존재한다. <any> 매" +"핑 요소는 여러 테이블들로부터 클래스들에 대한 하나의 다형성 연관관계를 정의한" +"다. 이 매핑 타입은 언제나 하나 이상의 컬럼을 필요로 한다. 첫 번째 컬럼은 연관" +"된 엔티티의 타입을 보관한다. 나머지 컬럼들은 식별자를 보관한다. 이런 종류의 " +"연관관계들에 대해 foreign key 컨스트레인트를 지정하는 것이 불가능해서, 이것" +"은 (다형성) 연관관계들을 매핑하는 통상적인 방법으로서 가장 확실한 수단이 아니" +"다. 당신은 매우 특별한 경우들 (예를 들어 감사 로그들, 사용자 세션 데이터 등)" +"에서만 이것을 사용해야 한다." + +#. Tag: para +#: basic_mapping.xml:2414 +#, no-c-format +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"meta-type 속성은 어플리케이션으로 하여금 데이터베이스 컬" +"럼 값들을 id-type에 의해 지정된 타입의 식별자 프로퍼티들" +"을 가진 영속 클래스들로 매핑시키는 맞춤형 타입을 지정하도록 한다. 당신은 " +"meta-type의 값들로부터 클래스 이름들로의 매핑을 지정해야 한다." + +#. Tag: programlisting +#: basic_mapping.xml:2421 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2432 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2435 +#, no-c-format +msgid "name: the property name." +msgstr "name: 프로퍼티 이름." + +#. Tag: para +#: basic_mapping.xml:2440 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "id-type: 식별자 타입." + +#. Tag: para +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type (옵션 - 디폴트는 string): " +"discriminator 매핑에 허용되는 임의의 타입." + +#. Tag: para +#: basic_mapping.xml:2451 +#, no-c-format +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade (optional- defaults to none): " +"cascade 스타일." + +#. Tag: para +#: basic_mapping.xml:2463 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 이 프로퍼티에 대한 업데이트들이 optimistic 잠금 획득을 필요로 하는" +"지 여부를 지정한다. 달리 말해, 이 프로퍼티가 dirty일 경우에 버전증가가 발생" +"할 것인지 여부를 정의한다." + +#. Tag: title +#: basic_mapping.xml:2478 +#, no-c-format +msgid "Hibernate Types" +msgstr "Hibernate 타입들" + +#. Tag: title +#: basic_mapping.xml:2481 +#, no-c-format +msgid "Entities and values" +msgstr "엔티티들과 값들" + +#. Tag: para +#: basic_mapping.xml:2483 +#, no-c-format +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"영속 서비스에 관한 여러 Java 언어-레벨의 객체들을 이해하기 위해, 우리는 그것" +"들을 다음 두 개의 그룹들로 분류할 필요가 있다:" + +#. Tag: para +#: basic_mapping.xml:2488 +#, no-c-format +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +"entity는 엔티티에 대한 참조들을 보관하는 임의의 다른 객" +"체들과는 독립적으로 존재한다. 참조되지 않은 객체가 쓰레기 수집되는 통상의 자" +"바 모형과 이것은 대조적이다. (저장들과 삭제들이 부모 엔티티로부터 그것의 자식" +"으로의 케스케이드 되는 경우를 제외하면) 엔티티들은 명시적으로 저장되고 삭제되" +"어야 한다. 이것은 도달 가능성(reachablity)에 의한 객체 영속성의 ODMG 모형과" +"는 다르다 - 그리고 어플리케이션 객체들이 대형 시스템들에서 대개 어떻게 사용되" +"는가에 훨씬 더 가깝게 대응한다. 엔티티들은 순환 참조와 공유 참조들을 지원한" +"다. 그것들 또한 버전화 될 수 있다." + +#. Tag: para +#: basic_mapping.xml:2499 +#, no-c-format +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"엔티티의 영속 상태는 다른 엔티티들에 대한 참조들과 value 타입들로 구성된다. 값들은 원시 타입들, 콜렉션들(하나의 콜렉션 내부" +"에 있지 않는 것들), 컴포넌트들, 그리고 어떤 불변의 객체들이다. entities와는 " +"달리, (특별한 콜렉션들과 컴포넌트들에서) 값들은 도달가능성(reachability)에 의" +"해 영속화 되고 삭제 된다. value 객체들(과 원시 타입들)" +"이 그것들의 포함하는 엔티티에 따라 영속화 되고 삭제 되므로, 그것들은 독립적으" +"로 버전화 되지 않는다. 값들은 독립적인 엔티티를 갖지 않아서, 그것들은 두 개" +"의 엔티티들이나 콜렉션들에 의해 공유될 수 없다." + +#. Tag: para +#: basic_mapping.xml:2510 +#, no-c-format +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"지금까지 우리는 엔티티들을 참조하기 위해 \"영속 클래스\"를 사용해 왔다. 우리" +"는 그것을 계속 사용할 것이다. 하지만 엄격히 말해, 영속 상태를 가진 모든 사용" +"자 정의 클래스들은 엔티티들이 아니다. 컴포넌트는 value " +"의미를 가진 사용자 정의 클래스이다. java.lang.String 타입" +"의 자바 프로퍼티는 또한 value 의미를 갖는다. 이 정의가 주어지면, 우리는 JDK" +"에 의해 제공된 모든 타입들(클래스들)이 자바에서 value 타입 의미를 갖고, 반면" +"에 사용자 정의 타입들은 엔티티 또는 type 의미로서 매핑된다고 말할 수 있다. " +"이 판단은 어플리케이션 개발자에게 달려 있다. 도메인 모형에서 엔티티 클래스에 " +"대한 좋은 힌트는 그 클래스의 하나의 인스턴스에 대한 공유된 참조들인 반면에, " +"composition이나 aggregation은 대개 value 타입으로 변환된다." + +#. Tag: para +#: basic_mapping.xml:2524 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "우리는 문서를 통해 두 개념들을 다시 고찰할 것이다." + +#. Tag: para +#: basic_mapping.xml:2528 +#, no-c-format +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"도점점은 Java type 시스템(과 엔티티들 및 value 타입들에 대한 개발자의 정의)" +"를 SQL/데이터베이스 type 타입으로 매핑하는 것이다. 두 시스템들 사이의 다리는 " +"Hibernate에 의해 제공된다: 엔티티들의 경우 우리는 <class>, <subclass> 등을 사용한다.value 타입들의 경" +"우 우리는 대개type 속성을 가진 <property>, <component> 등을 사용한다. 이 속성의 값은 " +"Hibernate 매핑 타입의 이름이다. Hibernate는 (표준 JDK " +"value 타입들에 대해) 많은 매핑들을 제공한다. 나중에 보게 되듯이, 당신은 당신 " +"자신의 매핑 타입들을 작성할 수 있고 마찬가지로 당신의 맞춤형 변환 방도들을 구" +"현할 수 있다." + +#. Tag: para +#: basic_mapping.xml:2541 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" +"콜렉션들을 제외한 모든 미리 빌드된 Hibernate 타입들은 null 의미를 지원한다." + +#. Tag: title +#: basic_mapping.xml:2548 +#, no-c-format +msgid "Basic value types" +msgstr "기본 value 타입들" + +#. Tag: para +#: basic_mapping.xml:2550 +#, fuzzy, no-c-format +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "" +"미리-만들어진 기본 매핑 타입들은 대략 다음과 같이 카테고" +"리로 분류된다 " + +#. Tag: literal +#: basic_mapping.xml:2555 +#, no-c-format +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#. Tag: para +#: basic_mapping.xml:2558 +#, no-c-format +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"자바 원시타입들이나 wrapper 클래스들로부터 적절한(벤더-지정적인) SQL 컬럼 타" +"입들로의 타입 매핑. boolean, yes_no와 " +"true_false는 Java boolean이나 " +"java.lang.Boolean에 대한 모든 대체적인 인코딩들이다." + +#. Tag: literal +#: basic_mapping.xml:2567 +#, no-c-format +msgid "string" +msgstr "string" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"java.lang.String으로부터 VARCHAR (또는 " +"Oracle VARCHAR2)로의 타입 매핑." + +#. Tag: literal +#: basic_mapping.xml:2576 +#, no-c-format +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#. Tag: para +#: basic_mapping.xml:2578 +#, no-c-format +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"java.util.Date와 그것의 서브클래스로부터 SQL 타입들인 " +"DATE, TIME, TIMESTAMP (또는 등가물)로의 타입 매핑들." + +#. Tag: literal +#: basic_mapping.xml:2586 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#. Tag: para +#: basic_mapping.xml:2588 +#, no-c-format +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"java.util.Calendar로부터 SQL 타입들인 TIMESTAMP, DATE (또는 등가물)로의 타입 매핑들." + +#. Tag: literal +#: basic_mapping.xml:2596 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#. Tag: para +#: basic_mapping.xml:2598 +#, no-c-format +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"java.math.BigDecimaljava.math.BigInteger로부터 NUMERIC (또는 Oracle NUMBER)로의 타입 매핑들." + +#. Tag: literal +#: basic_mapping.xml:2606 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#. Tag: para +#: basic_mapping.xml:2608 +#, no-c-format +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"java.util.Locale, java.util.TimeZone, " +"그리고 java.util.Currency로부터 VARCHAR" +"(또는 Oracle VARCHAR2)로의 타입 매핑. LocaleCurrency의 인스턴스들은 그것들의 ISO 코드들로 " +"매핑된다. TimeZone의 인스턴스들은 그것들의 ID로 매핑된다." + +#. Tag: literal +#: basic_mapping.xml:2620 +#, fuzzy, no-c-format +msgid "class" +msgstr "all은 모든 컬럼들을 체크한다" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"java.lang.Class로부터 VARCHAR (또는 " +"Oracle VARCHAR2)로의 타입 매핑. Class" +"는 그것의 전체 수식어가 붙은 이름으로 매핑된다." + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "binary" +msgstr "binary" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "byte 배열들을 적절한 SQL binary 타입으로 매핑시킨다." + +#. Tag: literal +#: basic_mapping.xml:2638 +#, no-c-format +msgid "text" +msgstr "text" + +#. Tag: para +#: basic_mapping.xml:2640 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"long Java 문자열을 SQL CLOB 또는 TEXT " +"타입으로 매핑시킨다" + +#. Tag: literal +#: basic_mapping.xml:2647 +#, no-c-format +msgid "serializable" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:2649 +#, no-c-format +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"serializable Java 타입들을 적절한 SQL binary 타입으로 매핑시킨다. 당신은 또" +"한 디폴트로 기본 타입이 아닌 serializable 자바 클래스 또는 인터페이스의 이름" +"을 가진 Hibernate 타입 serializable을 나타낼 수도 있다." + +#. Tag: literal +#: basic_mapping.xml:2658 +#, no-c-format +msgid "clob, blob" +msgstr "clob, blob" + +#. Tag: para +#: basic_mapping.xml:2660 +#, no-c-format +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"java.sql.Clobjava.sql.Blob JDBC 클래" +"스들에 대한 타입 매핑들. 이들 타입들은 몇몇 어플리케이션들에서는 불편하다. 왜" +"냐하면 blob 또는 clob 객체는 트랜잭션 외부에서 재사용될 수 없기 때문이다.(게" +"다가 드라이버 지원이 비일관적이고 페치되어야 한다)" + +#. Tag: literal +#: basic_mapping.xml:2670 +#, no-c-format +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" + +#. Tag: para +#: basic_mapping.xml:2674 +#, no-c-format +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"대개 가변적인 Java 타입들로 간주되는 것에 대한 타입 매핑들. 여기서 Hibernate" +"는 불변적인 Java 타입들에 대해서만 적절한 어떤 최적화를 행하고, 어플리케이션 " +"그 객체를 변할 수 없는 것으로 취급한다. 예를 들어, 당신은 " +"imm_timestamp로서 매핑된 인스턴스에 대해 Date." +"setTime()을 호출하지 않을 것이다. 프로퍼티의 값을 변경시키고, 그 변" +"경을 영속화 시키기 위해서, 어플리케이션은 하나의 새로운 (동일하지 않은) 객체" +"를 그 프로퍼티에 할당해야 한다." + +#. Tag: para +#: basic_mapping.xml:2689 +#, no-c-format +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"엔트리들과 콜렉션들의 유일 식별자들은 binary, " +"blob 그리고 clob를 제외한 기본 타입 중 " +"어느 것일 수 있다. (Composite 식별자들이 또한 허용된다. 아래를 보라.)" + +#. Tag: para +#: basic_mapping.xml:2695 +#, no-c-format +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"기본 value 타입들은 org.hibernate.Hibernate에 정의되어 있" +"는 대응하는 Type 상수들을 갖는다. 예를 들어, " +"Hibernate.STRINGstring 타입을 표현한" +"다." + +#. Tag: title +#: basic_mapping.xml:2704 +#, no-c-format +msgid "Custom value types" +msgstr "맞춤형 value 타입들" + +#. Tag: para +#: basic_mapping.xml:2706 +#, no-c-format +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"개발자들이 그들 자신들의 value 타입들을 생성시키는 것이 상대적으로 쉽다. 예" +"를 들어, 당신은 java.lang.BigInteger 타입의 프로퍼티들을 " +"VARCHAR 컬럼들로 영속화 시키고자 원할 수 있다. Hibernate" +"는 이것을 위한 미리 만들어진 타입을 제공하지 않는다. 그러나 맞춤형 타입들은 " +"프로퍼티(또는 콜렉션 요소)를 하나의 테이블 컬럼으로의 매핑하는 것에 제약되지 " +"않는다. 따라서 예를 들어, 당신은 FIRST_NAME, " +"INITIAL, SURNAME 컬럼들로 영속화 되는 " +"java.lang.String 타입의 자바 프로퍼티getName()/ setName()를 가질 수 있다." + +#. Tag: para +#: basic_mapping.xml:2717 +#, no-c-format +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"맞춤형 타입을 구현하려면, org.hibernate.UserType 또는 " +"org.hibernate.CompositeUserType을 구현하고 그 타입의 전체 " +"수식어가 붙은 클래스명을 사용하여 프로퍼티들을 선언하라. 가능한 종류의 것들" +"을 보려면 org.hibernate.test.DoubleStringType을 체크하라." + +#. Tag: programlisting +#: basic_mapping.xml:2725 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2727 +#, no-c-format +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"하나의 프로퍼티를 여러 개의 컬럼들로 매핑시키는 <column> 태그의 사용을 주목하라." + +#. Tag: para +#: basic_mapping.xml:2732 +#, no-c-format +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"CompositeUserType, EnhancedUserType, " +"UserCollectionType, 그리고 UserVersionType 인터페이스들은 더 많은 특화된 사용들을 위한 지원을 제공한다." + +#. Tag: para +#: basic_mapping.xml:2738 +#, no-c-format +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"당신은 매핑 파일 속에 UserType에 대한 파라미터들을 제공할 " +"수도 있다. 이것을 행하기 위해, 당신의 UserType은 " +"org.hibernate.usertype.ParameterizedType 인터페이스를 구현" +"해야 한다. 당신의 맞춤형 타입에 파라미터들을 제공하기 위해, 당신은 당신의 매" +"핑 파일들 속에 <type> 요소를 사용할 수 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2746 +#, no-c-format +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2748 +#, no-c-format +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"UserType은 이제 그것에 전달된 Properties 객체로부터 default로 명명된 파라미터에 대한 값을 " +"검색할 수 있다." + +#. Tag: para +#: basic_mapping.xml:2753 +#, no-c-format +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"만일 당신이 매우 자주 어떤 UserType을 사용할 경우, 그것은 그것에 대한 더 짧" +"은 이름을 정의하는 것이 유용할 수 있다. <typedef> 요" +"소를 사용하여 이것을 행할 수 있다. Typedef들은 이름을 맞춤형 타입에 할당하" +"고, 또한 만일 그 타입이 파라미터화 된 경우에 디폴트 파라미터 값들의 리스트를 " +"포함할 수도 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2760 +#, no-c-format +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2762 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2764 +#, no-c-format +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "" +"property 매핑 상에 type 파라미터들을 사용함으로써 경우에 맞게 typedef 내에 제" +"공된 파라미터들을 오버라이드 시키는 것이 가능하다." + +#. Tag: para +#: basic_mapping.xml:2769 +#, no-c-format +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"비록 Hibernate의 풍부한 범위의 미리 만들어진 타입들과 컴포넌트들에 대한 지원" +"이 당신이 가끔 맞춤형 타입을 사용할 필요가 거의 없을 것" +"임을 의미할 지라도, 그럼에도 불구하고 그것은 당신의 어플리케이션에서 자주 발" +"생하는 (엔티티가 아닌) 클래스들에 대해 맞춤형 타입들을 사용하는 좋은 형식으" +"로 간주된다. 예를 들어 MonetaryAmount 클래스는 비록 그것" +"이 컴포넌트로서 쉽게 매핑될 수 있을지라도, CompositeUserType에 대한 좋은 후보이다. 이것에 대한 하나의 동기는 추상화이다. 맞춤형 " +"타입으로, 당신의 매핑 문서들은 화폐 값들을 표현하는 당신의 방법에서 가능한 변" +"경들에 대해 장차 검증될 것이다." + +#. Tag: title +#: basic_mapping.xml:2785 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "하나의 클래스를 한 번 이상 매핑하기" + +#. Tag: para +#: basic_mapping.xml:2786 +#, no-c-format +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"하나의 특정한 영속 클래스에 대해 하나 이상의 매핑을 제공하는 것이 가능하다. " +"이 경우에 당신은 두 개의 매핑된 엔티티들의 인스턴스들 사이를 명확하게 하기 위" +"해 하나의 엔티티 이름을 지정해야 한다. (디폴트로, 엔티" +"티 이름은 클래스 이름과 동일한 것이다.) Hibernate는 영속 객체들에 대해 작업" +"할 때, 질의들을 작성할 때, 또는 명명된 엔티티에 대한 연관들을 매핑할 때 당신" +"으로 하여금 엔티티 이름을 지정하도록 한다." + +#. Tag: programlisting +#: basic_mapping.xml:2794 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2796 +#, no-c-format +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"연관들은 이제 class 대신에 entity-name" +"을 사용하여 어떻게 지정되는지를 주목하라." + +#. Tag: title +#: basic_mapping.xml:2804 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "SQL 인용부호 표시된 식별자들" + +#. Tag: para +#: basic_mapping.xml:2805 +#, no-c-format +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"당신은 매핑 문서 내에서 테이블 또는 컬럼 이름을 역인용기호(`)들 속에 넣어서 " +"생성된 SQL에서 식별자를 인용부호 처리하도록 Hibernate에게 강제할 수도 있다. " +"Hibernate는 SQL Dialect에 대해 정확한 인용 스타일을 사용" +"할 것이다(대개 이중 인용부호 이지만, SQL Server의 경우에는 모난 괄호들이고 " +"MySQL의 경우에는 역인용부호(`))." + +#. Tag: programlisting +#: basic_mapping.xml:2812 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2818 +#, no-c-format +msgid "Metadata alternatives" +msgstr "Metadata 대안들" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XML은 모든 사람들을 위한 것이 아니지만, Hibernate에서 O/R 매핑 메타데이터를 " +"정의하는 몇몇 대안적인 방법들이 존재한다." + +#. Tag: title +#: basic_mapping.xml:2825 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "XDoclet 마크업 사용하기" + +#. Tag: para +#: basic_mapping.xml:2827 +#, no-c-format +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"많은 Hibernate 사용자들은 XDoclet @hibernate.tags를 사용하" +"여 소스 코드 속에 직접 매핑 정보를 삽입시키는 것을 선호한다. 우리는 이 문서에" +"서 이 접근법을 다루지 않을 것이다. 왜냐하면 그것은 엄격하게는 XDoclet의 부분" +"으로 간주되기 때문이다. 하지만 우리는 XDoclet 매핑들을 가진 Cat 클래스에 관한 다음 예제를 포함한다." + +#. Tag: programlisting +#: basic_mapping.xml:2834 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2836 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "XDoclet과 ibernate에 관한 추가 예제들은 Hibernate 웹 사이트를 보라." + +#. Tag: title +#: basic_mapping.xml:2843 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "JDK 5.0 Annotations 사용하기" + +#. Tag: para +#: basic_mapping.xml:2845 +#, no-c-format +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"JDK 5.0은 언어 레벨에서 XDoclet-스타일의 주석들, type-safe와 컴파일 시 체킹" +"을 도입했다. 이 메커니즘은 XDoclet 주석들 보다 더 강력하며 도구들과 IDE들에 " +"의해 더 좋게 지원된다. 예를 들어 IntelliJ IDEA는 JDK 5.0 주석들에 대한 자동-" +"완성 기능과 구문 강조를 지원한다. EJB 명세서의 새로운 개정판(JSR-220)은 엔티" +"티 빈즈에 대한 프라이머리 메타데이터 메커니즘으로서 JDK 5.0 Annotations을 사" +"용한다. Hibernate3는 JSR-220(영속 API)의 EntityManager를 " +"구현하고, 매핑 메타데이터에 대한 지원은 별도의 내려받기로서 " +"Hibernate Annotations 패키지를 통해 이용 가능하다. EJB3 " +"(JSR-220)과 Hibernate3 metadata 양자가 지원된다." + +#. Tag: para +#: basic_mapping.xml:2856 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "다음은 EJB 엔티티 빈으로서 주석이 붙은 POJO 클래스에 관한 예제이다:" + +#. Tag: programlisting +#: basic_mapping.xml:2860 +#, no-c-format +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2862 +#, no-c-format +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"JDK 5.0 Annotations(그리고 JSR-220)에 대한 지원은 여전히 작업이 진행 중이고 " +"완성되지 않았음을 노트하라. 상세한 것은 Hibernate Anotations를 참조하라." + +#. Tag: title +#: basic_mapping.xml:2871 +#, no-c-format +msgid "Generated Properties" +msgstr "산출되는 프로퍼티들" + +#. Tag: para +#: basic_mapping.xml:2872 +#, no-c-format +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"산출되는 프로퍼티들은 데이터베이스에 의해 산출되는 그것들의 값들을 갖는 프로" +"퍼티들이다. 전형적으로, Hibernate 어플리케이션들은 데이터베이스가 값들을 생성" +"시켰던 임의의 프로퍼티들을 포함하는 객체들을 갱신시킬 필요" +"가 있었다.하지만 generated로 마크된 프로퍼티들은 어플리케이션으로 하여금 이 " +"책임을 Hibernate에게 위임시키도록 한다. 본질적으로 Hibernate가 산출되는 프로" +"퍼티들을 정의했던 엔티티에 대해 SQL INSERT 또는 UPDATE 명령을 내릴 때마다 바" +"로 직후에 산출되는 값들을 검색하기 위해 하나의 select 명령을 내린다." + +#. Tag: para +#: basic_mapping.xml:2881 +#, no-c-format +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"generated로 마크된 프로퍼티들은 부가적으로 inser 가능하지 않아야 하고 update " +"불가능해야 한다. 오직 Properties marked as generated must additionally be " +"non-insertable and non-updateable. versions, timestamps, 그리고 " +"단순 프로퍼티들 만이 generated로 마크될 수 있다." + +#. Tag: para +#: basic_mapping.xml:2888 +#, no-c-format +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "" +"never (디폴트) - 는 주어진 프로퍼티 값이 데이터베이스 내" +"에 생성되지 않을 것임을 의미한다." + +#. Tag: para +#: basic_mapping.xml:2892 +#, no-c-format +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - 는 주어진 프로퍼티 값이 insert 시에 생성되지만, " +"차후의 업데이트들에서 다시 생성되지 않을 것임을 기술한다. 생성-날짜와 같은 것" +"들이 이 카테고리 내로 포함될 것이다. 비록 versiontimestamp 프로퍼티들이 생성되는 것으로서 마크될 수 있을 지" +"라도, 이 옵션은 거기서 이용 불가능함을 노트하라..." + +#. Tag: para +#: basic_mapping.xml:2900 +#, no-c-format +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "" +"always - 는 프로퍼티 값이 insert 시와 update 시 모두에 생" +"성됨을 기술한다." + +#. Tag: title +#: basic_mapping.xml:2907 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "보조 데이터베이스 객체들" + +#. Tag: para +#: basic_mapping.xml:2908 +#, no-c-format +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Hibernate 매핑 파일들 내에 사용자 스키마를 완전하게 정의하기 위한 능력을 제공" +"하기 위해서, Hibernate의 스키마 방출 도구들과 함께 임의적인 데이터베이스 객체" +"들에 대한 CREATE와 DROP을 허용해준다. 비록 트리거들 또는 내장 프로시저들과 같" +"은 것들을 생성시키고 드롭시키기 이해 특별히 고안되었을지라도 하나의 " +"java.sql.Statement.execute() 메소드를 통해 실행될 수 있는 " +"SQL 명령이 여기서 유효하다(ALTERs, INSERTS, 기타). 보조 데0이터베이스 객체들" +"을 정의하는 두 가지 모드들이 본질적으로 존재한다..." + +#. Tag: para +#: basic_mapping.xml:2917 +#, no-c-format +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "" +"첫 번째 모드는 매핑 파일 바깥에서 CREATE 및 DROP 명령들을 명시적으로 나열하" +"는 것이다:" + +#. Tag: programlisting +#: basic_mapping.xml:2921 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2922 +#, no-c-format +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"두번째 모드는 CREATE 및 DROP 명령들을 생성시키는 방법을 알고 있는 하나의 맞" +"춤 클래스를 제공하는 것이다. 이 맞춤 클래스는 org.hibernate.mapping." +"AuxiliaryDatabaseObject 인터페이스를 구현해야 한다." + +#. Tag: programlisting +#: basic_mapping.xml:2927 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2928 +#, no-c-format +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "" +"덧붙여 이들 데이터베이스 객체들은 어떤 dialect들이 사용될 때 그것들이 단지 적" +"용될 수 있도록 선택적으로 변동될 수 있다." + +#. Tag: programlisting +#: basic_mapping.xml:2932 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "class" +#~ msgstr "class" + +#~ msgid "id" +#~ msgstr "id" + +#~ msgid "" +#~ "optimizer (optional, defaults to none): See " +#~ msgstr "" +#~ "optimizer (optional, defaults to none): See " + +#~ msgid "" +#~ "optimizer (optional, defaults to ): See " +#~ "" +#~ msgstr "" +#~ "optimizer (optional, defaults to ): See " +#~ "" + +#~ msgid "key" +#~ msgstr "key" + +#~ msgid "any" +#~ msgstr "any" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/batch.po b/documentation/envers/src/main/docbook/ko-KR/content/batch.po new file mode 100644 index 0000000000..608a2f1c7d --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/batch.po @@ -0,0 +1,636 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:5 +#, no-c-format +msgid "Batch processing" +msgstr "Batch 처리" + +#. Tag: para +#: batch.xml:7 +#, no-c-format +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"Hibernate를 사용하여 데이터베이스 내에서 100 000 개의 행들을 삽입시키는 본래" +"의 접근법은 다음과 같다:" + +#. Tag: programlisting +#: batch.xml:12 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:14 +#, no-c-format +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"이것은 50 000번째 행 가까운 곳에서 OutOfMemoryException으" +"로 떨어질 것이다. 그것은 Hibernate가 session-level 캐시 속에 모든 새로이 삽입" +"된 Customer 인스턴스들을 캐시시키기 때문이다." + +#. Tag: para +#: batch.xml:20 +#, no-c-format +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"이 장에서 우리는 이 문제를 피하는 방법을 당신에게 보여줄 것이다. 하지만 먼저 " +"당신이 배치 처리를 행하는 중이라면, 당신이 적당한 퍼포먼스를 성취하려고 할 경" +"우에 당신이 JDBC 배치 사용을 가능하게 하는 것은 절대적으로 필요하다. JDBC 배" +"치 사이즈를 적당한 숫자(10-50)로 설정하라:" + +#. Tag: programlisting +#: batch.xml:27 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:29 +#, no-c-format +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"만일 당신이 identiy 식별자 생성자를 사용할 경우 Hibernate" +"가 JDBC 레벨에서 투명하게 insert 배치작업을 사용불가능하게 한다는 점을 노트하" +"라." + +#. Tag: para +#: batch.xml:34 +#, no-c-format +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "" +"당신은 또한 second-level 캐시를 가진 상호작용이 완전하게 불가능한 프로세스 내" +"에서 이런 종류의 작업을 행하고 싶어할 수도 있다:" + +#. Tag: programlisting +#: batch.xml:39 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:41 +#, no-c-format +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"하지만 이것은 절대적으로 필요하지 않다. 왜냐하면 우리는 second-level 캐시와" +"의 상호작용을 불가능하도록 하기 위해 명시적으로 CacheMode" +"를 설정할 수 있기 때문이다." + +#. Tag: title +#: batch.xml:47 +#, no-c-format +msgid "Batch inserts" +msgstr "Batch inserts" + +#. Tag: para +#: batch.xml:49 +#, no-c-format +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"새로운 객체들을 영속화 시킬 때, 당신은 first-level 캐시의 사이즈를 제어하기 " +"위해 세션을 정기적으로 flush() 시키고 나서 clear" +"() 시켜야 한다." + +#. Tag: programlisting +#: batch.xml:55 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:60 +#, no-c-format +msgid "Batch updates" +msgstr "Batch updates" + +#. Tag: para +#: batch.xml:62 +#, no-c-format +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"데이터 검색과 업데이트의 경우 동일한 개념들이 적용된다. 게다가 당신은 많은 데" +"이터 행들을 반환하는 질의들에 대해 서버-측 커서들의 장점을 취하는데 " +"scroll()을 사용할 필요가 있다." + +#. Tag: programlisting +#: batch.xml:68 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:73 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "StatelessSession 인터페이스" + +#. Tag: para +#: batch.xml:74 +#, no-c-format +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"다른 방법으로 Hibernate는 분리된(detached) 객체들의 형식으로 데이터베이스로 " +"그리고 데이터베이스로부터 데이터를 스트리밍하는데 사용될 수 있는 하나의 명령 " +"지향 API를 제공한다. StatelessSession은 그것과 연관된 영" +"속 컨텍스트를 갖지 않고 많은 보다 높은 레벨의 생명 주기 의미를 제공하지 않는" +"다. 특히 하나의 상태 없는 세션은 첫 번째 레벨 캐시를 구현하지 않거나 임의의 " +"두 번째 레벨 캐시 또는 질의 캐시와 상호작용하지 않는다. 그것은 전통적인 쓰기-" +"이면(write-behind)의 체킹이나 자동적인 dirty 체킹을 구현하지 않는다. 하나의 " +"상태 없는 세션을 사용하여 수행된 연산들은 연관된 인스턴스들에 대해 케스케이" +"드 되지 않는다. 콜렉션들은 상태 없는 세션에 의해 무시된다. 상태없는 세션을 통" +"해 수행된 연산들은 Hibernate의 이벤트 모형과 인터셉터들을 우회한다. 상태없는 " +"세션들은 첫번째-레벨의 캐시의 부족으로 인해 데이터 alias 효과들에 취약하다. " +"상태없는 세션은 기본 JDBC에 훨씬 더 가까운 하나의 보다 낮은 레벨의 추상화" +"(abstraction)이다." + +#. Tag: programlisting +#: batch.xml:89 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:91 +#, no-c-format +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "" +"이 코드 예제에서, 질의에 의해 반환된 Customer 인스턴스들" +"은 곧바고 분리된다(detached). 그것들은 임의의 영속 컨텍스트와 결코 연관되지 " +"않는다." + +#. Tag: para +#: batch.xml:97 +#, no-c-format +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"StatelessSession 인터페이스에 의해 정의된 insert" +"(), update() 그리고 delete() 연산들은 직접적인 " +"데이터베이스 저급 연산들로 갖주되고, 그것은 각각 하나의 SQL INSERT, " +"UPDATE 또는 DELETE의 즉각적인 실행으로 귀결된" +"다. 따라서 그것들은 Session 인터페이스에 의해 정의된 " +"save(), saveOrUpdate()delete() 연산" +"들과는 매우 다른 의미들을 갖는다." + +#. Tag: title +#: batch.xml:110 +#, no-c-format +msgid "DML-style operations" +msgstr "DML-스타일 연산들" + +#. Tag: para +#: batch.xml:112 +#, no-c-format +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" +"이미 논의했듯이, 자동적이고 투명한 객체/관계형 매핑은 객체 상태에 대한 관리" +"에 관계된다. 이것은 객체 상태가 메모리 내에서 이용 가능함을 의미하므로, (SQL " +"Data Manipulation Language(DML) 문장들 : INSERT, UPDATE, DELETE를 사용하여) 데" +"이터베이스에서 직접 데이터를 업데이트하거나 삭제하는 것은 메모리 내 상태에 영" +"향을 주지 않을 것이다. 하지만 Hibernate는 Hibernate Query Language (HQL)를 통해 실행되는 대량 SQL-스타일의 DML 문장 " +"실행을 위한 메소드들을 제공한다." + +#. Tag: para +#: batch.xml:122 +#, no-c-format +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"UPDATEDELETE 문장들에 대한 유사 구문" +"은 다음과 같다: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. 노트할 몇 가지:" + +#. Tag: para +#: batch.xml:130 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "from-절에서, FROM 키워드는 옵션이다" + +#. Tag: para +#: batch.xml:135 +#, no-c-format +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "" +"from-절 내에 한 개의 명명된 엔티티가 오직 존재할 수 있다; 그것은 선택적으로 " +"alias될 수 있다. 만일 엔티티 이름이 alias되면, 그때 임의의 프로퍼티 참조들은 " +"그 alias를 사용하여 수식되어야 한다; 만일 엔티티 이름이 alias되지 않을 경우, " +"임의의 프로퍼티 참조들에 대해 수식되는 것은 규칙에 어긋난다." + +#. Tag: para +#: batch.xml:143 +#, no-c-format +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"join들은 (함축적이든 명시적이" +"든) 대량 HQL 질의 속에 지정될 수 없다. 서브-질의들이 where-절에 사용될 수 있" +"다; 서브질의들 그 자신들은 조인들을 포함할 수 있다." + +#. Tag: para +#: batch.xml:150 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "where-절 또한 옵션이다." + +#. Tag: para +#: batch.xml:156 +#, no-c-format +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"하나의 예제로서, 한 개의 HQL UPDATE를 실행하기 위해, " +"Query.executeUpdate() 메소드(이 메소드는 JDBC의 " +"PreparedStatement.executeUpdate()와 유사하게 명명된다)를 " +"사용하라:" + +#. Tag: programlisting +#: batch.xml:162 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:164 +#, no-c-format +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"HQL UPDATE 문장들은 디폴트로 영향받는 엔티티들에 대한 " +"version 또는 timestamp 프로퍼티 값들에 영" +"향을 주지 않는다; 이것은 EJB3 명세서에서 유지되고 있다. 하지만 당신은 하이버" +"네이트로 하여금 versioned update의 사용을 통해 " +"version 또는 timestamp 프로퍼티 값들을 " +"적절하게 재설정하도록 강제할 수 있다. 이것은 UPDATE 키워" +"드 뒤에 VERSIONED 키워드를 추가시켜서 성취된다." + +#. Tag: programlisting +#: batch.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:176 +#, no-c-format +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"맞춤형 version 타입들(org.hibernate.usertype.UserVersionType)은 update versioned 문장과 함께 사용하는 것이 허" +"용되지 않음을 노트하라." + +#. Tag: para +#: batch.xml:181 +#, no-c-format +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"HQL DELETE를 실행하려면, 같은 메소드 Query." +"executeUpdate()를 사용하라:" + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"Query.executeUpdate() 메소드에 의해 반환되는 " +"int 값은 그 오퍼레이션에 의해 영향받은 엔티티들의 개수를 " +"나타낸다. 이것이 데이터베이스 내에서 영향받은 행들의 개수와 상관이 있는지 없" +"는지 여부를 살펴보자. HQL 대량 오퍼레이션은 예를 들어 joined-subclass의 경우" +"에 실행 중인 여러 개의 실제 SQL 문장들로 귀결될 수 있다. 반환되는 숫자는 그 " +"문장에 의해 영향받은 실제 엔티티들의 개수를 나타낸다. joined-subclass 예제로 " +"되돌아가면, 서브 클래스들 중 하나에 대한 삭제는 단지 그 서브클래스가 매핑되" +"어 있는 테이블에 대한 삭제 뿐만 아니라 또한 \"루트\" 테이블과 상속 계층에서 " +"더 내려온 잠정적으로 조인된-서브클래스 테이블들에 대한 삭제들로 귀결될 수 있" +"다." + +#. Tag: para +#: batch.xml:199 +#, no-c-format +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"장래의 배포본들에서 전달될 대량 HQL 오퍼레이션들에 대한 몇 가지 제한들이 현" +"재 존재함을 노트하라; 상세한 것은 JIRA 로드맵을 참조하라. INSERT 문장들을 위한 유사-구문은 다음과 같다: INSERT INTO " +"EntityName properties_list select_statement. 노트할 몇 가지:" + +#. Tag: para +#: batch.xml:207 +#, no-c-format +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" +"오직 INSERT INTO ... SELECT ... 형식 만일 지원된다; INSERT INTO ... " +"VALUES ... 형식은 지원되지 않는다." + +#. Tag: para +#: batch.xml:210 +#, no-c-format +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" +"properties_list는 SQL INSERT 내에서 column " +"speficiation과 유사하다. 매핑된 상속에 참여하는 엔티티들의 경우, " +"그 주어진 클래스-레벨 상에 직접 정의된 프로퍼티들 만이 properties_list에 사용" +"될 수 있다. 슈퍼클래스 프로퍼티들은 허용되지 않는다; 그리고 서브클래스 프로퍼" +"티들은 의미가 없다. 달리 말해 INSERT 문장들은 본래적으로 " +"다형적이지 않다." + +#. Tag: para +#: batch.xml:220 +#, no-c-format +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "" +"select_statement는 반환 타입들이 insert에 의해 기대되는 타입들과 일치해야 한" +"다는 단서 하에 임의의 유효한 HQL select 질의일 수 있다. 현재 이것은 체크를 데" +"이터베이스로 이관시키는 것을 허용하기 보다는 질의 컴파일 동안에 체크된다. 하" +"지만 이것은 equal과는 대조적으로 등가인" +"(equivalent) Hibernate Type들 사이에서 문제점들" +"을 일으킬 수도 있음을 노트하라. 비록 데이터베이스가 구별짓지 않을 수 있거나 " +"변환을 처리할 수 있을 지라도, 이것은 org.hibernate.type.DateType로서 정의된 프로퍼티와 org.hibernate.type.TimestampType으로 정의된 프로퍼티 사이에 불일치 쟁점들을 일으킨다." + +#. Tag: para +#: batch.xml:232 +#, no-c-format +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" +"id 프로퍼티의 경우, insert 문장은 당신에게 두 개의 옵션을 준다. 당신은 " +"properties_list 내에 id 프로퍼티를 명시적으로 지정할 수 있거나(그것의 값이 대" +"응하는 select 표현식으로부터 얻어진 경우) 또는 properties_list에서 그것을 생" +"략할 수도 있다 (산출된 값이 사용되는 경우). 이 후자의 옵션은 데이터베이스 내" +"에서 연산되는 id 연산자들을 사용할 때에만 이용 가능하다; 임의의 \"메모리 내" +"\" 타입 연산자들과 함께 이 옵션을 사용하려고 시도하는 것은 파싱 동안에 예외상" +"황을 일으킬 것이다. 이 논의의 목적 상, 데이터베이스 내 산출자(generator)들은 " +"org.hibernate.id.SequenceGenerator (그리고 그것의 서브클래" +"스들) 그리고 임의의 org.hibernate.id.PostInsertIdentifierGenerator의 구현자들이라고 간주됨을 노트하라. 여기서 가장 주목할 만한 예외상황" +"은 그것이 그것의 값들을 얻기 위한 select 가능한 방법을 노출시키지 않기 때문ㅇ" +"에 사용될 수 없는 org.hibernate.id.TableHiLoGenerator이다." + +#. Tag: para +#: batch.xml:247 +#, no-c-format +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" +"version 또는 timestamp로서 매핑된 프로" +"퍼티들의 경우에, insert 문장은 당신에게 두 개의 옵션들을 준다. 당신은 " +"properties_list 내에 그 프로퍼티를 지정할 수 있거나 (그 것의 값이 대응하는 " +"select 표현식으로부터 얻어진 경우) 또는 properties_list에서 그것을 생략할 수 " +"있다 (org.hibernate.type.VersionType에 의해 정의된 " +"seed value 값이 사용되는 경우)." + +#. Tag: para +#: batch.xml:257 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "예제 HQL INSERT 문장 실행:" + +#. Tag: programlisting +#: batch.xml:261 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/best_practices.po b/documentation/envers/src/main/docbook/ko-KR/content/best_practices.po new file mode 100644 index 0000000000..cbf10b37d7 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/best_practices.po @@ -0,0 +1,452 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:5 +#, no-c-format +msgid "Best Practices" +msgstr "최상의 실전 경험들" + +#. Tag: term +#: best_practices.xml:9 +#, no-c-format +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"fine-grained 클래스들을 작성하고 <component>를 사용" +"하여 그것들을 매핑하라." + +#. Tag: para +#: best_practices.xml:11 +#, no-c-format +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"street, suburb, state, postcode를 캡슐화 시키는데 Address 클래스를 사용하라. 이것은 코드 재사용성을 촉진시키고 리팩토링을 단순" +"화 시킨다." + +#. Tag: term +#: best_practices.xml:19 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "영속 클래스들에 대해 식별자 프로퍼티들을 선언하라." + +#. Tag: para +#: best_practices.xml:21 +#, no-c-format +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"Hibernate는 식별자 프로퍼티들을 옵션으로 만든다. 왜 우리가 그것들을 사용해야 " +"하는가에 대한 모든 종류의 이유들이 존재한다. 우리는 식별자들이 '합성" +"(synthetic)'이 되는(비지니스 의미 없이 생성되는) 것을 권장한다." + +#. Tag: term +#: best_practices.xml:29 +#, no-c-format +msgid "Identify natural keys." +msgstr "고유 키들을 식별하라." + +#. Tag: para +#: best_practices.xml:31 +#, no-c-format +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"모든 엔티티들에 대해 고유 키들을 식별하고, <natural-id>를 사용하여 그것들을 매핑하라. 고유 키를 구성하는 프로퍼티들을 비교하" +"기 위해 equals()hashCode()를 구현하" +"라." + +#. Tag: term +#: best_practices.xml:39 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "각각의 클래스 매핑을 그것 자신의 파일 내에 위치지워라." + +#. Tag: para +#: best_practices.xml:41 +#, no-c-format +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"하나의 한덩어리 매핑 문서를 사용하지 말라. com/eg/Foo.hbm.xml 파일 속에 com.eg.Foo를 매핑하라. 이것은 팀 환경에" +"서 특히 좋은 의미를 준다." + +#. Tag: term +#: best_practices.xml:49 +#, no-c-format +msgid "Load mappings as resources." +msgstr "매핑들을 리소스들로서 로드시켜라." + +#. Tag: para +#: best_practices.xml:51 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "그것들이 매핑하는 클래스들에 따라서 매핑들을 배치하라" + +#. Tag: term +#: best_practices.xml:57 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "질의 문자열들을 객관화 시키는 것을 고려하라." + +#. Tag: para +#: best_practices.xml:59 +#, no-c-format +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"당신의 질의들이 ANSI 표준이 아닌 SQL 함수들을 호출하는 경우는 좋은 실전연습이" +"다. 질의 문자열들을 매핑 파일들에다가 외부화 시키는 것은 어플리케이션을 보다 " +"이식성 있도록 만들어줄 것이다." + +#. Tag: term +#: best_practices.xml:67 +#, no-c-format +msgid "Use bind variables." +msgstr "바인드 변수들을 사용하라." + +#. Tag: para +#: best_practices.xml:69 +#, no-c-format +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"JDBC에서처럼, 상수 아닌 값들을 \"?\"로 대체시켜라. 질의 속에 상수 아닌 값을 " +"바인드 시키는데 문자열 처리를 결코 사용하지 말라! 더 좋게는 질의들 속에 명명" +"된 파라미터들을 사용하는 것을 고려하라." + +#. Tag: term +#: best_practices.xml:77 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "당신 자신의 JDBC 커넥션들을 관리하지 말라." + +#. Tag: para +#: best_practices.xml:79 +#, no-c-format +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"Hibernate는 어플리케이션으로 하여금 JDBC 커넥션들을 관리하도록 한다. 이 접근" +"법은 마지막 수단으로서 고려되어야 한다. 만일 당신이 미리 만들어진 커넥션 프로" +"바이더들을 사용할 수 없을 경우, org.hibernate.connection." +"ConnectionProvider에 대한 당신 자신의 구현을 제공하는 것을 고려하" +"라." + +#. Tag: term +#: best_practices.xml:87 +#, no-c-format +msgid "Consider using a custom type." +msgstr "맞춤형 타입 사용을 고려하라." + +#. Tag: para +#: best_practices.xml:89 +#, no-c-format +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"당신이 자바 타입을 갖고 있고, 어떤 라이브러리로부터 말하고, 그것이 영속화 될 " +"필요가 있지만 그것을 컴포넌트로서 매핑시키는데 필요한 accessor들을 제공할 필" +"요가 없다고 가정하자. 당신은 org.hibernate.UserType을 구현" +"하는 것을 고려해야 할 것이다. 이 접근법은 Hibernate 타입으로/으로부터 변환들" +"을 구현하는 것으로부터 어플리케이션 코드를 자유롭게 해준다." + +#. Tag: term +#: best_practices.xml:98 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "병목 지점들에서 수작업으로 코딩된 JDBC를 사용하라." + +#. Tag: para +#: best_practices.xml:100 +#, no-c-format +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"시스템의 퍼포먼스가 중대한 영역들에서, 몇몇 종류의 오퍼레이션들은 직접적인 " +"JDBC에서 이득을 본다. 그러나 당신이 어떤 것이 병목인지를 알기 전까지 기다리길 바란다. 그리고 직접적인 JDBC가 반드시 더 빠르다고 " +"가정하지 말라. 만일 당신이 직접적인 JDBC를 사용할 필요가 있을 경우, " +"Hibernate Session을 열고 그 SQL 커넥션을 사용할 가치가 있" +"다. 그 방법으로 당신은 동일한 트랜잭션 방도와 기본 커넥션 프로바이더를 여전" +"히 사용할 수 있다" + +#. Tag: term +#: best_practices.xml:110 +#, no-c-format +msgid "Understand Session flushing." +msgstr "Session flushing을 이해하라." + +#. Tag: para +#: best_practices.xml:112 +#, no-c-format +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"시간이 지남에 따라 Session은 그것의 영속 상태를 데이터베이스와 동기화 시킨" +"다. 만일 이 과정이 너무 자주 발생할 경우 퍼포먼스가 영향을 받을 것이다. 당신" +"은 때때로 자동적인 flushing을 사용 불가능하게 만들거나 특정 트랜잭션 내에서 " +"질의들의 순서와 다른 오퍼레이션들의 순서를 변경시켜서 불필요한 flushing을 최" +"소화 시킬 수 있다." + +#. Tag: term +#: best_practices.xml:121 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "" +"3-tier 아키텍처에서, saveOrUpdate() 사용을 고려하라." + +#. Tag: para +#: best_practices.xml:123 +#, no-c-format +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"servlet / session 빈 아키텍처를 사용할 때, 당신은 sesson bean 내에 로드된 영" +"속 객체들을 서블릿/JSP 계층으로/으로부터 전달할/받을 수 있다. 각각의 요청을 " +"서비스하는데 새로운 세션을 사용하라. 객체들을 데이터베이스와 동기화 시키기 위" +"해서 Session.merge() 또는 Session.saveOrUpdate()" +"를 사용하라." + +#. Tag: term +#: best_practices.xml:132 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "" +"2-tier 아키텍처에서, 수명이 긴 영속 컨텍스트들을 사용하는 것을 고려하라." + +#. Tag: para +#: best_practices.xml:134 +#, no-c-format +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"데이터베이스 트랜잭션들은 최상의 가용성을 위해 가능한 한 짧아야 한다. 하지만 " +"장기간 실행되는 어플리케이션 트랜잭션들, 사용자의 뷰 관" +"점에서 한 개의 단위 작업을 구현하는 것이 가끔 필수적이다. 하나의 어플리케이" +"션 트랜잭션은 몇 개의 클라이언트 요청들과 응답 주기들에 걸칠 수도 있다. 어플" +"리케이션 트랜잭션들을 구현하는데 detached 객체들을 사용하는 것이 공통적이다. " +"2-티어 아키텍처에서 매우 적절한 대안은 어플리케이션 트랜잭션의 전체 생명주기 " +"동안에 한 개의 열려진 영속 접속 (세션)을 유지하는 것이고 각각의 요청의 끝에" +"서 JDBC 커넥션을 간단하게 연결해제하고 차후의 요청의 시작 시에 다시 연결하는 " +"것이다. 한 개 이상의 어플리케이션 트랜잭션을 가로질러서 하나의 단일 세션을 결" +"코 공유하지 말라. 공유할 경우에 당신은 실효성이 없는 데이터로 작업하게 될 것" +"이다." + +#. Tag: term +#: best_practices.xml:148 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "예외상황들을 복구가능한 것으로서 다루지 말라." + +#. Tag: para +#: best_practices.xml:150 +#, no-c-format +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"이것은 \"최상의\" 실전이 아닌 보다 필수적인 실전이다. 예외상황이 발생할 때, " +"Transaction을 롤백시키고 Session을 닫아" +"라. 만일 당신이 그렇게 하지 않을 경우, Hibernate는 메모리 내 상태가 영속 상태" +"를 정확하게 표현하는 것을 보증할 수 없다. 이 특별한 경우처럼, 만일 주어진 식" +"별자를 가진 인스턴스가 데이터베이스 상에 존재하는지 여부를 결정하는데 " +"Session.load()를 사용하지 말라; 대신에 Session." +"get() 또는 하나의 질의를 사용하라." + +#. Tag: term +#: best_practices.xml:160 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "연관들에 대한 lazy 페칭을 선호하라." + +#. Tag: para +#: best_practices.xml:162 +#, no-c-format +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"eager 페칭을 관대하게 사용하라. second-level 캐시 내에 완전하게 보관되지 않" +"을 것 같은 클래스들에 대한 대붑분의 연관들에 대해 프락시들과 lazy 콜렉션들을 " +"사용하라. 캐시된 클래스들에 대한 연관들의 경우, 이곳은 캐시 성공의 매우 높은 " +"확률이 존재하는 곳이며, lazy=\"false\"를 사용하여 eager 페" +"칭을 명시적으로 사용 불가능하게 하라. 한의 join 페칭이 특정 쓰임새에 대해 적" +"절할 때, 하나의 left join fetch를 가진 질의를 사용하라." + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"페치되지 않은 데이터 문제점들을 피하기 위해 뷰 내에 열려진 세션" +"(open session in view) 패턴 또는 하나의 정리된 어셈블리 " +"단계(assembly phase)를 사용하라." + +#. Tag: para +#: best_practices.xml:177 +#, no-c-format +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernate는 개발자들이 Data Transfer Objects (DTO)를 지" +"루하게 작성하는 것으로부터 자유롭게 해준다. 전통적인 EJB 아키텍처에서, DTO는 " +"이중 용도로 기능한다: 첫 번째로 그것들은 엔티티 빈즈가 직렬화 가능하지 않는 " +"문제점에 대해 착수한다; 두 번째로 그것들은 뷰에 의해 사용되는 모든 데이터가 " +"프리젠테이션 티어로 컨트롤을 반환하기 전에 DTO들 속으로 페치되고 마샬링되는 " +"어셈블리 단계를 암묵적으로 정의한다. Hibernate는 첫 번째 용도를 제거시킨다. " +"하지만 당신이 뷰 렌더링 프로세스를 가로질러 열려져 있는 영속 컨텍스트(세션)" +"을 보관할 준비가 되어 있지 않는 한, 당신은 여전히 어셈블리 단계를 필요로 할 " +"것이다(detached 객체들에서 이용가능한 데이터가 무엇인지에 대해 프리젠테이션 " +"티어와 엄격하게 계약을 갖도록 당신의 비지니스 메소드들을 고려하라) 이것은 " +"Hibernate의 한계점이 아니다! 그것은 안전한 트랜잭션 데이터 접근의 필수 조건이" +"다." + +#. Tag: term +#: best_practices.xml:191 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "Hibernate에서 당신의 비지니스 로직을 추상화 시키는 것을 고려하라." + +#. Tag: para +#: best_practices.xml:193 +#, no-c-format +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"(Hibernate) 데이터 액세스 코드를 인터페이스 이면에 은폐시켜라. " +"DAOThread Local Session 패턴들" +"을 결합시켜라. 당신은 심지어 UserType을 통해 Hibernate에 " +"연관된, 수작업으로 코딩된 JDBC로서 몇몇 클래스들을 영속화 시킬 수도 있다. " +"(이 충고는 \"충분히 큰\" 어플리케이션들에 대한 것이다; 그것은 5개의 테이블들" +"을 가진 어플리케이션에 대해서는 적절하지 않다!)" + +#. Tag: term +#: best_practices.xml:203 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "신종의 연관 매핑을 사용하지 말라." + +#. Tag: para +#: best_practices.xml:205 +#, no-c-format +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"실제의 many-to-many 연관들에 대한 좋은 쓰임새들은 드물다. 대부분의 시간 동안 " +"당신은 \"연결 테이블\" 내에 저장된 추가적인 정보를 필요로 한다. 이 경우에, 매" +"개하는 연결 클래스에 대해 두 개의 one-to-many 연관들을 사용하는 것이 훨씬 더 " +"좋다. 사실 우리는 대부분의 연관들이 one-to-many와 many-to-one이라고 생각하" +"며, 당신은 다른 연관 스타일을 사용할 때 주의해야 하고 그것이 진정 필수적인지" +"를 당신 스스로 질문하라." + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "양방향 연관들을 선호하라." + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"단방향 연관들은 질의하기가 더 어렵다. 많은 어플리케이션에서, 거의 모든 연관들" +"은 질의들 내에서 양 방향으로 네비게이트 가능해야 한다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/collection_mapping.po b/documentation/envers/src/main/docbook/ko-KR/content/collection_mapping.po new file mode 100644 index 0000000000..10f8351de0 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/collection_mapping.po @@ -0,0 +1,1892 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:5 +#, no-c-format +msgid "Collection Mapping" +msgstr "콜렉션 매핑" + +#. Tag: title +#: collection_mapping.xml:8 +#, no-c-format +msgid "Persistent collections" +msgstr "영속 콜렉션들" + +#. Tag: para +#: collection_mapping.xml:10 +#, no-c-format +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"예를 들어 Hibernate는 영속 콜렉션-값을 가진 필드들이 인터페이스 타입으로서 선" +"언될 것을 필요로 한다:" + +#. Tag: programlisting +#: collection_mapping.xml:15 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:17 +#, no-c-format +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"실제 인터페이스는 java.util.Set, java.util." +"Collection, java.util.List, java.util." +"Map, java.util.SortedSet, java.util." +"SortedMap 또는 당신이 좋아하는 어떤 것일 수 있다!(여기서 \"당신이 " +"좋아하는 어떤 것\"이란 당신이 org.hibernate.usertype." +"UserCollectionType에 대한 구현을 작성해야 함을 의미한다.)" + +#. Tag: para +#: collection_mapping.xml:26 +#, no-c-format +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"우리가 HashSet의 인스턴스를 가진 인스턴스 변수를 초기화 시" +"켰던 방법을 주목하라. 이것은 새로이 초기화 된(비-영속) 인스턴스들을 가진 콜렉" +"션 값 프로퍼티들을 초기화 시키는 최선의 방법이다. 당신이 -예를 들어 " +"persist()를 호출하여- 인스턴스를 영속화 시킬 때 Hibernate" +"는 실제로 HashSetSet에 대한 " +"Hibernate 자신의 구현의 인스턴스로 대체시킬 것이다. 다음과 같은 오류들을 관찰" +"하라:" + +#. Tag: programlisting +#: collection_mapping.xml:36 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:38 +#, no-c-format +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"Hibernate에 의해 도입된 영속 콜렉션들은 인터페이스 타입에 따라 " +"HashMap, HashSet, TreeMap, TreeSet 또는 ArrayList와 같" +"이 행위한다." + +#. Tag: para +#: collection_mapping.xml:45 +#, no-c-format +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"콜렉션 인스턴스들은 value 타입들을 가진 통상의 특징을 갖는다. 그것들은 영속 " +"객체에 의해 참조될 때 자동적으로 영속화 되고 참조 해제될 때 자동적으로 삭제된" +"다. 만일 하나의 콜렉션이 하나의 영속 객체로부터 또 다른 영속 객체로 전달될 " +"때, 그것의 요소들은 하나의 테이블로부터 다른 테이블로 이동될 수 있다. 두 개" +"의 엔티티들은 동일한 콜렉션 인스턴스에 대한 참조를 공유하지 않는다. 기본 관계" +"형 모형 때문에 콜렉션 값 프로퍼티들은 null 값 의미들을 지원하지 않는다; " +"Hibernate는 null 콜렉션 참조와 공백의 콜렉션 사이를 구별 짓지 않는다." + +#. Tag: para +#: collection_mapping.xml:56 +#, no-c-format +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"당신은 이것의 어떤 것에 대해 너무 많이 걱정하지 않아도 될 것이다. 당신이 통상" +"의 자바 콜렉션들을 사용하는 것과 동일한 방법으로 영속 콜렉션들을 사용하라. 단" +"지 당신이 양방향 연관관계들에 대한 의미를 확실히 이해하도록 하라(나중에 논의" +"됨)." + +#. Tag: title +#: collection_mapping.xml:65 +#, no-c-format +msgid "Collection mappings" +msgstr "콜렉션 매핑들" + +#. Tag: para +#: collection_mapping.xml:67 +#, no-c-format +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"콜렉션을 매핑하는데 사용되는 Hiberante 매핑 요소는 인터페이스의 타입에 의존한" +"다. 예를 들어<set> 요소는 Set 타" +"입의 매핑 프로퍼티들에 사용된다" + +#. Tag: programlisting +#: collection_mapping.xml:73 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:75 +#, no-c-format +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"<set>과는 별도로, 또한 <list>, <map>, <bag>, " +"<array>, 그리고 <map> 매핑 " +"요소들이 존재한다. <map> 요소가 대표적이다:" + +#. Tag: programlisting +#: collection_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:103 +#, no-c-format +msgid "name the collection property name" +msgstr "name 콜렉션 프로퍼티 이름" + +#. Tag: para +#: collection_mapping.xml:108 +#, no-c-format +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (옵션 - 디폴트는 프로퍼티 이름) 콜렉션 테이블의 이름" +"(one-to-many 연관관계들에 대해서는 사용되지 않음)" + +#. Tag: para +#: collection_mapping.xml:114 +#, no-c-format +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (옵션) 루트 요소 상에 선언된 스키마를 오버라이드 시" +"키는 테이블 스키마의 이름" + +#. Tag: para +#: collection_mapping.xml:120 +#, no-c-format +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (옵션 - 디폴트는 true)는 lazy 페칭" +"을 사용 불가능하도록 하고 그 연관이 항상 eagerly 페치됨을 지정하는데 , 또는 " +"대부분의 연산들이 콜렉션을 초기화시키지 않는 곳에서 \"extra-lazy\" 페칭을 이" +"용 가능하도록 하는데(매우 큰 콜렉션들에 적당함) 사용될 수 있다" + +#. Tag: para +#: collection_mapping.xml:129 +#, no-c-format +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (옵션 - 디폴트는 false) 이 콜렉" +"션을 양방향 연관관계의 \"inverse\" 끝(end)으로 표시한다" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (옵션 - 디폴트는 none) 오퍼레이" +"션들이 자식 엔티티들에 대해 케스케이드하는 것을 이용 가능하게 한다" + +#. Tag: para +#: collection_mapping.xml:141 +#, no-c-format +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort (옵션) natural 정렬 순서로 정렬된" +"(sorted) 콜렉션 또는 주어진 comparator 클래스를 지정한다" + +#. Tag: para +#: collection_mapping.xml:147 +#, no-c-format +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (옵션, JDK1.4에서만) asc 또는 " +"desc 옵션과 함께 Map, Set 또는 bag의 반복 순서를 정의하는 테이블 컬럼(또는 컬럼들)을 지정한다" + +#. Tag: para +#: collection_mapping.xml:154 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (옵션) 콜렉션을 검색하거나 제거할 때 사용될 임의적" +"인 SQL WHERE 조건을 지정한다 (콜렉션이 오직 이용 가능한 데" +"이터의 부분집합 만을 포함할 경우에 유용하다)" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch (옵션, 디폴트는 select) outer-" +"join 페칭, sequential select 페칭, 그리고 sequential subselect 페칭 사이에서 " +"선택하라." + +#. Tag: para +#: collection_mapping.xml:168 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (옵션, 디폴트는 1) 이 콜렉션" +"의 lazily fetching 인스턴스에 대해 \"배치 사이즈\"를 지정하라." + +#. Tag: para +#: collection_mapping.xml:174 +#, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access (옵션 - 디폴트는 property): " +"Hibernate가 콜렉션 프로퍼티 값에 접근하는데 사용할 방도." + +#. Tag: para +#: collection_mapping.xml:180 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"optimistic-lock (옵션 - 디폴트는 true): 콜렉션의 상태에 대한 변경들이 소유하는 엔티티의 버전의 증가로 귀결" +"될 것인지를 지정한다. (one to many 연관들에 대해, 이 설정을 사용 불가능하게 " +"하는 것이 종종 합당하다.)" + +#. Tag: para +#: collection_mapping.xml:188 +#, no-c-format +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable (옵션 - 디폴트는 true): " +"false 값은 콜렉션의 요소들이 결코 변경되지 않음을 지정한" +"다. (몇몇 경우들에서 마이너 퍼포먼스 최적화)." + +#. Tag: title +#: collection_mapping.xml:198 +#, no-c-format +msgid "Collection foreign keys" +msgstr "콜렉션 foreign 키들" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"콜렉션 인스턴스들은 그 콜렉션을 소유하는 엔티티의 foreign 키에 의해 데이터베" +"이스 내에서 구별지워진다. 이 foreign 키는 그 콜렉션 테이블의 콜렉" +"션 키 컬럼 (또는 컬럼들)로서 참조된다. 그 콜렉션 키 컬럼은 " +"<key> 요소에 의해 매핑된다." + +#. Tag: para +#: collection_mapping.xml:208 +#, no-c-format +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"foreign 키 컬럼에 대한 null 허용 가능 컨스트레인트가 존재할 수 있다. 대부분" +"의 콜렉션들에 대해, 이것이 당연히 수반된다. 단방향 one to many 연관들의 경" +"우, foreign 키는 디폴트로 null 허용 가능하여서, 당신은 not-null=" +"\"true\"를 지정할 필요가 있을 수 있다." + +#. Tag: programlisting +#: collection_mapping.xml:215 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:217 +#, no-c-format +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "" +"foreign 키 컨스트레인트는 ON DELETE CASCADE를 사용할 수도 " +"있다." + +#. Tag: programlisting +#: collection_mapping.xml:221 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:223 +#, no-c-format +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "<key> 요소에 대한 전체 정의는 앞 장을 보라." + +#. Tag: title +#: collection_mapping.xml:231 +#, no-c-format +msgid "Collection elements" +msgstr "콜렉션 요소들" + +#. Tag: para +#: collection_mapping.xml:233 +#, no-c-format +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"콜렉션들은 모든 기본 타입들, 컴포넌트들, 그리고 물론 다른 엔티티들에 대한 참" +"조들을 포함하여 거의 대부분의 어떤 다른 Hibernate 타입을 포함할 수도 있다. 이" +"것은 중요한 구분이다: 콜렉션 내에 있는 객체는 \"값(value)\" 의미로 처리될 수" +"도 있거나(그것의 생명주기는 콜렉션 소유자에 의존한다) 그것은 그것 자신의 생명" +"주기를 가진 또 다른 엔티티에 대한 참조일 수 있다. 후자의 경우, 두 개의 객체" +"들 사이의 \"링크\" 만이 그 콜렉션에 의해 소유된 상태로 간주된다." + +#. Tag: para +#: collection_mapping.xml:242 +#, no-c-format +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"포함된 타입은 콜렉션 요소 타입으로서 불려진다. 콜렉션 요소들은 <" +"element> 또는 <composite-element>에 의" +"해 매핑되거나, 엔티티 참조들의 경우에 <one-to-many> " +"또는 <many-to-many>로서 매핑된다. 앞의 두 개는 " +"value 의미를 가진 요소들을 매핑시키고, 뒤의 두개는 엔티티 연관들을 매핑하는" +"데 사용된다." + +#. Tag: title +#: collection_mapping.xml:254 +#, no-c-format +msgid "Indexed collections" +msgstr "인덱싱 된 콜렉션들" + +#. Tag: para +#: collection_mapping.xml:256 +#, no-c-format +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"set 과 bag 의미들을 가진 것들을 제외하면, 모든 콜렉션 매핑들은 콜렉션 테이블 " +"내에 인덱스 컬럼- 배열 인덱스, 또는 List 인덱스 또는 Map 키로 매핑되는 컬럼-을 필요로 한" +"다. Map의 인덱스는 <map-key>로 매" +"핑된, 어떤 기본 타입일 수 있고, 그것은 <map-key-many-to-many>" +"로 매핑된 엔티티 참조일 수 있거나, 그것은 <composite-" +"map-key>로 매핑된 composite 타입일 수 있다. 배열 또는 리스트의 " +"인덱스는 항상 integer 타입이고 <list-index>" +" 요소를 사용하여 매핑된다. 매핑된 컬럼은 순차적인 정수들을 포함한다" +"(디폴트로 0에서 시작하는 번호가 붙여짐)." + +#. Tag: sect2 +#: collection_mapping.xml:267 +#, no-c-format +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:348 +#, no-c-format +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"만일 당신의 테이블이 인덱스 컬럼을 가지 않고, 당신이 여전히 프로퍼티 타입으로" +"서 List를 사용하고자 원할 경우, 당신은 그 프로퍼티를 " +"Hibernate <bag>으로서 매핑해야 한다. bag이 데이터" +"베이스로부터 검색될 때 그것은 그것의 순서를 보유하지 않지만, 그것은 선택적으" +"로 정렬(sorting)되거나 ordering될 수도 있다." + +#. Tag: para +#: collection_mapping.xml:357 +#, no-c-format +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"많은 공통된 관계형 모형들을 다루는, 콜렉션들에 대해 생성될 수 있는 매핑들의 " +"영역이 꽤 존재한다. 여러가지 매핑 선언들이 데이터베이스 테이블들로 변환되는 " +"방법을 당신이 느끼려면 스키마 생성 도구로 실험할 것을 우리는 제안한다." + +#. Tag: title +#: collection_mapping.xml:364 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "값들을 가진 콜렉션들과 many-to-many 연관들" + +#. Tag: para +#: collection_mapping.xml:366 +#, no-c-format +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "" +"어떤 값들을 가진 콜렉션 또는 many-to-many 연관은 foreign 키 컬럼이나 컬럼들, " +"콜렉션 요소 컬럼이나 컬럼들 그리고 가능하면 인덱스 컬럼" +"들이나 컬럼들을 가진 전용 콜렉션 테이블을 필요로 한다." + +#. Tag: para +#: collection_mapping.xml:373 +#, no-c-format +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "" +"값들을 가진 콜렉션의 경우, 우리는 <element> 태그를 " +"사용한다." + +#. Tag: sect2 +#: collection_mapping.xml:375 +#, no-c-format +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:480 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "몇몇 예제들, 먼저 문자열들을 가진 set:" + +#. Tag: programlisting +#: collection_mapping.xml:484 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:486 +#, no-c-format +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"(order-by 속성에 의해 결정되는 반복 순서를 가진) 정수들을 " +"포함하는 bag :" + +#. Tag: programlisting +#: collection_mapping.xml:491 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:493 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "엔티티들을 가진 배열 - 이 경우에, many to many 연관 :" + +#. Tag: programlisting +#: collection_mapping.xml:497 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:499 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "날짜들에 대한 문자열 인덱스들을 가진 map :" + +#. Tag: programlisting +#: collection_mapping.xml:503 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:505 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "컴포넌트들의 리스트(다음 장에서 논의됨):" + +#. Tag: programlisting +#: collection_mapping.xml:509 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:514 +#, no-c-format +msgid "One-to-many associations" +msgstr "One-to-many 연관들" + +#. Tag: para +#: collection_mapping.xml:516 +#, no-c-format +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "" +"one to many 연관은 중재하는 콜렉션 테이블 없이 foreign " +"키를 통해 두 개의 클래스들의 테이블들을 연결시킨다. 이 매핑은 통상의 자바 콜" +"렉션들의 어떤 의미를 상실한다:" + +#. Tag: para +#: collection_mapping.xml:524 +#, no-c-format +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "" +"포함된 엔티티 클래스의 인스턴스는 그 콜렉션의 하나 이상의 인스턴스에 속하지 " +"않을 수 있다" + +#. Tag: para +#: collection_mapping.xml:530 +#, no-c-format +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"포함된 엔티티 클래스의 인스턴스는 콜렉션 인덱스의 하나 이상의 값에서 나타나" +"지 않을 수 있다" + +#. Tag: para +#: collection_mapping.xml:537 +#, no-c-format +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "" +"Product로부터 Part로의 연관은 foreign " +"키 컬럼과 Part 테이블에 대한 인덱스 컬럼의 존재를 필요로 " +"한다. <one-to-many> 태그는 이것이 one to many 연관임" +"을 나타낸다." + +#. Tag: programlisting +#: collection_mapping.xml:550 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:553 +#, no-c-format +msgid "class (required): The name of the associated class." +msgstr "class (필수): 연관된 클래스의 이름." + +#. Tag: para +#: collection_mapping.xml:558 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (옵션 - 디폴트는 exception): " +"누락된 행들을 참조하는 캐시된 식별자들이 어떻게 처리될 것인지를 지정한다: " +"ignore는 누락된 한 행을 한 개의 연관으로 다룰 것이다." + +#. Tag: para +#: collection_mapping.xml:565 +#, fuzzy, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (옵션): class에 대한 하나" +"의 대안으로서, 연관된 클래스의 엔티티 이름.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"entity-name (옵션): class에 대한 대안으" +"로서, 연관된 클래스의 엔티티 이름." + +#. Tag: para +#: collection_mapping.xml:573 +#, no-c-format +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"<one-to-many> 요소는 어떤 컬럼들을 선언하는데 필요하" +"지 않음을 주목하라. 어딘가에 table 이름을 지정하는 것도 필" +"수적이지 않다." + +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"매우 중요한 노트: 만일 <one-to-many> 연관의 foreign 키 컬럼이 NOT NULL로 선언될 경우, " +"당신은 <key> 매핑을 not-null=\"true\"로 선언해야 하거나 inverse=\"true\"로 마크된 콜렉" +"션 매핑을 가진 양방향 연관을 사용해야 한다. 양방향 연관" +"들에 대한 논의는 이 장의 뒷부분을 보라." + +#. Tag: para +#: collection_mapping.xml:588 +#, no-c-format +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"이 예제는 name으로 Part 엔티티들을 가진 map을 보여준다(여" +"기서 partNamePart의 영속 프로퍼티이" +"다). formula-기반 index의 사용을 주목하라." + +#. Tag: programlisting +#: collection_mapping.xml:594 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:600 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "개선된 콜렉션 매핑들" + +#. Tag: title +#: collection_mapping.xml:603 +#, no-c-format +msgid "Sorted collections" +msgstr "Sorted 콜렉션들" + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernate는 java.util.SortedMapjava.util." +"SortedSet를 구현하는 콜렉션들을 지원한다. 당신은 매핑 파일 속에 하" +"나의 comparator를 지정해야 한다:" + +#. Tag: programlisting +#: collection_mapping.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:612 +#, no-c-format +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"sort 속성에 허용되는 값들은 unsorted, " +"natural, 그리고 java.util.Comparator를 " +"구현하는 클래스의 이름이다." + +#. Tag: para +#: collection_mapping.xml:618 +#, no-c-format +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"Sorted 콜렉션들은 java.util.TreeSet 또는 java." +"util.TreeMap처럼 행동한다." + +#. Tag: para +#: collection_mapping.xml:623 +#, no-c-format +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"만일 당신이 데이터베이스 그 자체가 콜렉션 요소들을 순서지우도록(order)원할 경" +"우 set, bag 또는map " +"매핑들에 대해 order-by 속성을 사용하라. 이 해결책은 JDK " +"1.4 이상의 버전에서만 이용 가능하다(그것은 LinkedHashSet " +"또는 LinkedHashMap을 사용하여 구현된다). 이것은 메모리 내" +"가 아닌, SQL 질의 내에서 순서지움(ordering)을 수행한다." + +#. Tag: programlisting +#: collection_mapping.xml:632 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:634 +#, no-c-format +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"order-by 속성의 값은 HQL 순서지움(ordering)이 아니라 SQL " +"순서지움(ordering)임을 노트하라!" + +#. Tag: para +#: collection_mapping.xml:639 +#, no-c-format +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"연관들은 콜렉션 filter()를 사용하여 실행 시에 어떤 임의의 " +"criteria(기준)을 사용하여 정렬(sort)될 수도 있다." + +#. Tag: programlisting +#: collection_mapping.xml:644 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:649 +#, no-c-format +msgid "Bidirectional associations" +msgstr "양방향 연관들" + +#. Tag: para +#: collection_mapping.xml:651 +#, fuzzy, no-c-format +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"양방향 연관은 연관의 양 \"끝(end)들\"로부터 네비게이션" +"을 허용한다. 두 가지 종류의 양방향 연관들이 지원된다: " + +#. Tag: term +#: collection_mapping.xml:658 +#, no-c-format +msgid "one-to-many" +msgstr "one-to-many" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "한쪽 끝에 set 또는 bag 값을 갖고, 다른 쪽 긑에 단일 값을 가진 연관" + +#. Tag: term +#: collection_mapping.xml:666 +#, no-c-format +msgid "many-to-many" +msgstr "many-to-many" + +#. Tag: para +#: collection_mapping.xml:668 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "양 끝에서 set 또는 bag 값을 가진 연관" + +#. Tag: para +#: collection_mapping.xml:677 +#, no-c-format +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"당신은 동일한 두 개의 many-to-many 연관들을 동일한 데이터베이스 테이블로 간단" +"하게 매핑하고 한 쪽 끝을 inverse(당신의 선택은 하나이지" +"만, 그것은 인덱싱된 콜렉션일 수 없다)로 선언함으로써 하나의 양방향 many-to-" +"many 연관을 지정할 수도 있다." + +#. Tag: para +#: collection_mapping.xml:684 +#, no-c-format +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"다음은 양방향 many-to-many 연관에 관한 예제이다; 각각의 카테고리는 많은 아이" +"템들을 가질 수 있고 각각의 아이템은 많은 카테고리들 속에 있을 수 있다:" + +#. Tag: programlisting +#: collection_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:691 +#, no-c-format +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"연관의 inverse 끝(end)에 대해서만 행해진 변경들은 영속화 되지 않는" +"다. 이것은 Hibernate가 모든 양방향 연관에 대해 메모리 내에 두 개" +"의 표상들을 갖는다는 점을 의미한다: A로부터 B로의 하나의 링크와 B로부터 A로" +"의 또 다른 링크. 만일 당신이 자바 객체 모형에 대해 그리고 자바에서 many-to-" +"many 관계를 생성시키는 방법에 대해 생각하면 이것은 이해하기가 더 쉽다:" + +#. Tag: programlisting +#: collection_mapping.xml:699 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:701 +#, no-c-format +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "non-inverse 측은 메모리 내 표상을 데이터베이스로 저장하는데 사용된다." + +#. Tag: para +#: collection_mapping.xml:705 +#, no-c-format +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"당신은 하나의 one-to-many 연관을 하나의 many-to-one 연관으로서 동일한 테이블 " +"컬럼(들)로 매핑하고 many-값을 가진 끝(end)을 inverse=\"true\"로 선언함으로써 하나의 양방향 연관을 정의할 수도 있다." + +#. Tag: programlisting +#: collection_mapping.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:713 +#, no-c-format +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"연관의 한쪽 끝을 inverse=\"true\"로 매핑하는 것은 cascade" +"들을 가진 오퍼레이션에 영향을 주지 않으며, 이것들은 orthogonal(직교) 개념들이" +"다!" + +#. Tag: title +#: collection_mapping.xml:721 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "인덱싱된 콜렉션들을 가진 양방향 연관들" + +#. Tag: para +#: collection_mapping.xml:722 +#, no-c-format +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"한쪽 끝이 하나의 <list> 또는 <map>으로서 표현되는 양방향 연관은 특별한 검토를 필요로 한다. 만일 인덱스 " +"컬럼으로 매핑되는 child 클래스의 프로퍼티가 하나 존재한다면 문제가 없고, 우리" +"는 콜렉션 매핑 상에 inverse=\"true\"를 사용하여 계속할 수 " +"있다:" + +#. Tag: programlisting +#: collection_mapping.xml:729 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"그러나 만일 child 클래스 상에 그런 프로퍼티가 존재하지 않을 경우, 우리는 그 " +"연관을 진정하게 양방향으로 간주할 수 없다 (다른 쪽 끝에서 이용가능하지 않은 " +"그 연관의 끝에서 이용 가능한 정보가 존재한다). 이 경우에 우리는 그 콜렉션을 " +"inverse=\"true\"로 매핑시킬 수 없다. 대신에 우리는 다음 매" +"핑을 사용할 수 있다:" + +#. Tag: programlisting +#: collection_mapping.xml:738 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:740 +#, no-c-format +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"이 매핑에서 그 연관의 콜렉션 값을 가진 끝이 foreign 키에 대한 업데이트 책임" +"이 있음을 노트하라." + +#. Tag: title +#: collection_mapping.xml:748 +#, no-c-format +msgid "Ternary associations" +msgstr "Ternary associations(세겹 연관들)" + +#. Tag: para +#: collection_mapping.xml:750 +#, no-c-format +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"세 겹의 연관을 매핑하는 세 가지 가능한 접근법들이 존재한다. 하나의 접근법은 " +"그것의 인덱스로서 연관관계를 가진 Map을 사용하는 것이다:" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:759 +#, no-c-format +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"두 번째 접근법은 그 연관을 엔티티 클래스로서 단순하게 리모델링 하는 것이다. " +"이것은 우리가 가장 공통적으로 사용하는 접근법이다." + +#. Tag: para +#: collection_mapping.xml:764 +#, no-c-format +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "" +"마지막 대안은 우리가 나중에 논의하게 될 composite 요소들을 사용하는 것이다." + +#. Tag: literal +#: collection_mapping.xml:771 +#, no-c-format +msgid "Using an <idbag>" +msgstr "<idbag> 사용하기" + +#. Tag: para +#: collection_mapping.xml:773 +#, no-c-format +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"만일 당신이 composite 키들이 나쁜 것이고 엔티티들이 합성 식별자들(대용 키들, " +"surrogate keys)을 가져야 한다는 우리의 견해를 전적으로 수용할 경우, 당신은 우" +"리가 지금까지 보여주었던 값들을 가진 콜렉션들과 many to many 연관들이 모두 " +"composite 키들을 가진 테이블들로 매핑된다는 약간 이상한 점을 발견할 수도 있" +"다! 이제 이 점은 꽤 논의의 여지가 있다; 순수한 연관 테이블은 (비록 composite " +"값들을 가진 콜렉션일 수도 있을지라도) 대용 키로부터 많" +"은 이점을 취하지 않는 것처럼 보인다. 그럼에도 불구하고 Hibernate는 당신이 값" +"들을 가진 콜렉션들과 many to many 연관들을 대용 키를 가진 테이블로 매핑시키" +"는 것을 당신에게 허용해주는 특징을 제공한다." + +#. Tag: para +#: collection_mapping.xml:784 +#, no-c-format +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"<idbag> 요소는 bag 의미를 가진 List(또는 Collection)을 매핑하도록 당신에게 허용해준" +"다." + +#. Tag: programlisting +#: collection_mapping.xml:789 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:791 +#, no-c-format +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"당신이 볼 수 있듯이, <idbag>은 마치 엔티티 클래스인" +"양 synthetic id generator(합성 id 생성기)를 갖는다! 다른 대용 키는 각각의 콜" +"렉션 행에 할당된다. 하지만 Hibernate는 특정 행의 대용 키 값을 발견하는 메커니" +"즘을 제공하지 않는다." + +#. Tag: para +#: collection_mapping.xml:798 +#, no-c-format +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"<idbag>의 업데이트 퍼포먼스는 정규 <" +"bag> 보다 훨씬 좋다는 점을 노트하라! Hibernate는 마치 list, " +"map, 또는 set인양, 개별 행들을 효율적으로 위치지울 수 있고 그것들을 개별적으" +"로 업데이트 하거나 삭제시킬 수 있다." + +#. Tag: para +#: collection_mapping.xml:805 +#, no-c-format +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"현재 구현에서, native 식별자 생성 방도는 <" +"idbag> 콜렉션 식별자들에 대해 지원되지 않는다." + +#. Tag: title +#: collection_mapping.xml:829 +#, no-c-format +msgid "Collection examples" +msgstr "콜렉션 예제들" + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "앞의 절들은 꽤 혼동스럽다. 따라서 예제를 살펴보자. 다음 클래스:" + +#. Tag: programlisting +#: collection_mapping.xml:836 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:838 +#, no-c-format +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"는 Child 인스턴스들을 가진 하나의 콜렉션을 갖고 있다. 만" +"일 각각의 자식이 최소한 한 개의 부모를 가질 경우, 대부분의 고유한 매핑은 one-" +"to-many 연관이다:" + +#. Tag: programlisting +#: collection_mapping.xml:844 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:846 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "이것은 다음 테이블 정의들로 매핑된다:" + +#. Tag: programlisting +#: collection_mapping.xml:850 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:852 +#, no-c-format +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"만일 부모가 필수적이라면, 양방향 one-to-many 연관관계를 " +"사용하라:" + +#. Tag: programlisting +#: collection_mapping.xml:857 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:859 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "NOT NULL 컨스트레인트를 주목하라:" + +#. Tag: programlisting +#: collection_mapping.xml:863 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:865 +#, no-c-format +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"대안적으로, 만일 당신이 이 연관관계가 단방향이어야 함을 절대적으로 역설할 경" +"우, 당신은 <key> 매핑 상에 NOT NULL 컨스트레인트를 선언할 수 있다:" + +#. Tag: programlisting +#: collection_mapping.xml:871 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:873 +#, no-c-format +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "" +"반면에, 만일 자식이 여러 부모들을 가질 수 있을 경우, many-to-many 연관이 적절" +"하다:" + +#. Tag: programlisting +#: collection_mapping.xml:878 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:880 +#, no-c-format +msgid "Table definitions:" +msgstr "테이블 정의들:" + +#. Tag: programlisting +#: collection_mapping.xml:884 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:886 +#, no-c-format +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"부모/자식 관계 매핑을 연습하는 더 많은 예제들과 전체 리허설은 를 보라." + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "" +"비록 더 많은 신종 연관 매핑들이 가능할지라도, 우리는 다음 장에서 모든 가능성" +"들을 분류할 것이다." + +#~ msgid "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." +#~ msgstr "" +#~ "column_name (필수): 콜렉션 인덱스 값들을 보관하는 컬럼" +#~ "의 이름." + +#~ msgid "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." +#~ msgstr "" +#~ "base (옵션, 디폴트는 0): 리스트 또" +#~ "는 배열의 첫 번째 요소에 대응하는 인덱스 컬럼의 값." + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." +#~ msgstr "" +#~ "column (옵션): 콜렉션 인덱스 값들을 보관하는 컬럼의 이" +#~ "름." + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." +#~ msgstr "" +#~ "formula (옵션): map의 키를 평가하는데 사용되는 SQL " +#~ "formula." + +#~ msgid "type (reguired): The type of the map keys." +#~ msgstr "type (필수): The type of the map 키들의 타입" + +#~ msgid "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." +#~ msgstr "" +#~ "column (옵션): 콜렉션 인덱스 값들에 대한 foreign 키 컬" +#~ "럼의 이름." + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." +#~ msgstr "" +#~ "formula (옵션): map의 foreign 키를 평가하는데 사용되는 " +#~ "SQL formula." + +#~ msgid "" +#~ "class (required): The entity class used as the map key." +#~ msgstr "class (필수): map 키로서 사용되는 엔티티 클래스." + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." +#~ msgstr "" +#~ "column (옵션): 콜렉션 요소 값들을 소유하는 컬럼의 이름." + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." +#~ msgstr "" +#~ "formula (옵션): 요소를 평가하는데 사용되는 SQL formula." + +#~ msgid "" +#~ "type (required): The type of the collection element." +#~ msgstr "type (필수): 콜렉션 요소의 타입." + +#~ msgid "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." +#~ msgstr "" +#~ "many-to-many association 연관은 <many-to-" +#~ "many> 요소를 사용하여 지정된다." + +#~ msgid "" +#~ "column (optional): The name of the element foreign key " +#~ "column." +#~ msgstr "column (옵션): 요소 foreign 키 컬럼의 이름." + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." +#~ msgstr "" +#~ "formula (옵션): 요소 foreign 키 값을 평가하는데 사용되" +#~ "는 SQL formula." + +#~ msgid "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." +#~ msgstr "" +#~ "fetch (옵션 - 디폴트는 join): 이 연" +#~ "관에 대해 outer-join 페칭 또는 sequential select 페칭을 이용 가능하게 만든" +#~ "다. 이것은 특별한 경우이다; 엔티티 그리고 다른 엔티티들과 그것의 many-to-" +#~ "many 관계들에 대한 (하나의 SELECT 내에서) 전체 eager 페" +#~ "칭의 경우, 당신은 콜렉션 그 자체에 대해서 뿐만 아니라 내포된 요소 " +#~ "<many-to-many> 상의 이 속성에 대해 " +#~ "join 페칭을 이용 가능하게 할 것이다." + +#~ msgid "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." +#~ msgstr "" +#~ "unique (옵션): foreign-key 컬럼에 대한 유일 컨스트레인" +#~ "트의 DDL 생성을 가능하도록 한다. 이것은 연관 다중성 (association " +#~ "multiplicity)을 효율적으로 one to many로 만든다." + +#~ msgid "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." +#~ msgstr "" +#~ "not-found (옵션 - 디폴트는 exception): 누락된 행들을 참조하는 foreign 키들이 어떻게 처리될 것인지를 지" +#~ "정한다: ignore는 누락된 한 행을 한 개의 연관으로 다룰 " +#~ "것이다." + +#~ msgid "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." +#~ msgstr "" +#~ "property-ref: (옵션) 이 foreign 키에 조인된 연관 클래스" +#~ "의 프로퍼티의 이름. 지정되지 않을 경우, 연관 클래스의 프라이머리 키가 사용" +#~ "된다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/component_mapping.po b/documentation/envers/src/main/docbook/ko-KR/content/component_mapping.po new file mode 100644 index 0000000000..eec938d9f4 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/component_mapping.po @@ -0,0 +1,676 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Component Mapping" +msgstr "Component 매핑" + +#. Tag: para +#: component_mapping.xml:7 +#, no-c-format +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"component의 개념은 Hibernate에서 다른 용도로 몇몇 다른 " +"컨텍스트들 내에서 재사용된다." + +#. Tag: title +#: component_mapping.xml:13 +#, no-c-format +msgid "Dependent objects" +msgstr "종속 객체들" + +#. Tag: para +#: component_mapping.xml:15 +#, no-c-format +msgid "" +"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-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:23 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: component_mapping.xml:25 +#, no-c-format +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"이제 NamePerson의 컴포넌트로서 영속" +"화 될 수도 있다. Name이 그것의 영속 프로퍼티들에 대한 " +"getter 메소드와 setter 메소드를 정의하지만, 어떤 인터페이스들이나 식별자 프로" +"퍼티들을 선언하는 것을 필요로 하지 않음을 주목하라." + +#. Tag: para +#: component_mapping.xml:32 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "우리의 Hibernate 매핑은 다음과 같을 것이다:" + +#. Tag: programlisting +#: component_mapping.xml:36 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:38 +#, no-c-format +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"person 테이블은 pid, birthday, " +"initial, first, last 컬럼들을 가질 것이다." + +#. Tag: para +#: component_mapping.xml:46 +#, no-c-format +msgid "" +"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 ad hoc. 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 값 의미는 특별한 용도를 위한 것이다. 포함된 " +"객체를 다시 로드시킬 때, Hibernate는 모든 컴포넌트 컬럼들이 null일 경우에 전" +"체 컴포넌트가 null이라고 가정할 것이다. 이것은 대부분의 용도에 맞을 것이다." + +#. Tag: para +#: component_mapping.xml:55 +#, no-c-format +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"컴포넌트의 프로퍼티들은 임의의 Hibernate 타입일 수 있다(콜렉션들, many-to-" +"one 연관들, 다른 컴포넌트들, 기타). 내포된 컴포넌트들은 신종의 사용례로 간주" +"되지 않을 것이다. Hibernate는 매우 잘 정제된 객체 모형" +"을 지원하도록 고안되어있다." + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component> 요소는 컴포넌트 클래스의 프로퍼티를 포함" +"되는 엔티티에 대한 역 참조로서 매핑시키는 <parent> " +"서브요소를 허용한다." + +#. Tag: programlisting +#: component_mapping.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:84 +#, no-c-format +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"노트: 만일 당신이 composite 요소를 가진 하나의 Set를 정의" +"할 경우, equals()hashCode()를 정확하" +"게 구현하는 것이 매우 중요하다." + +#. Tag: para +#: component_mapping.xml:90 +#, no-c-format +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 요소 자체가 컴포넌트들을 포함할 경우, <nested-" +"composite-element> 태그를 사용하라. 이것은 꽤 신종의 경우-그것" +"들 자체가 컴포넌트들을 갖고 있는 컴포넌트들의 콜렉션-이다. 이 단계에서 당신" +"은 one-to-many 연관이 더 적절한지를 당신 스스로에게 질문하게 될 것이다. 하나" +"의 엔티티로서 composite 요소를 다시 모델링하려고 시도하라 - 그러나 자바 모형" +"들이 동일할지라도, 관계형 모형과 영속화 의미들은 여전히 약간 다르다." + +#. Tag: para +#: component_mapping.xml:102 +#, no-c-format +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"당신이 하나의 <set>을 사용 중이라면, 하나의 " +"composite 요소 매핑은 null 가능한 프로퍼티들을 지원하지 않음을 노트하길 바란" +"다. Hibernate는 객체들을 삭제할 때 하나의 레코드를 식별하는데 각각의 컬럼들 " +"값을 사용해야 하며 (composite 요소 테이블 내에 별도의 프라이머리 키 컬럼이 존" +"재하지 않는다), 그것은 null 값들에 대해서는 불가능하다. 당신은 하나의 " +"composite-요소 내에 not-null 프로퍼티들 만을 사용해야 하거나 하나의 " +"<list>, <map>, " +"<bag> 또는 <idbag>을 선택해" +"야 한다." + +#. Tag: para +#: component_mapping.xml:113 +#, no-c-format +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"composite 요소에 대한 하나의 특별한 경우는 내포된 <many-to-" +"one> 요소를 가진 composite 요소이다. 이같은 매핑은 many-to-many " +"연관 테이블의 특별한 컬럼들을 composite 요소 클래스로 매핑시키는 것을 당신에" +"게 허용해준다. 다음은 Order로부터 Item" +"으로의 many-to-many 연관이다. 여기서 purchaseDate, " +"price, 그리고 quantity는 연관의 프로퍼" +"티들이다:" + +#. Tag: programlisting +#: component_mapping.xml:123 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:125 +#, no-c-format +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"물론, 양방향 연관 네비게이션의 경우, 다른 측 상에 있는 purchase에 대한 참조" +"가 존재할 수 없다. 컴포넌트들이 값(value) 타입들이고 공유된 참조들을 허용하" +"지 않음을 기억하라. 하나의 PurchaseOrder를 가진 set 내에 있을 수 있지만, 그것은 동시에 Item에 의해 참조될 수 없다." + +#. Tag: para +#: component_mapping.xml:133 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "심지어 세겹의(또는 네 겹의, 기타) 연관들이 가능하다:" + +#. Tag: programlisting +#: component_mapping.xml:135 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "" +"composite 요소들은 다른 엔티티들에 대한 연관들과 동일한 구문을 사용하여 질의" +"들 내에 나타날 수도 있다." + +#. Tag: title +#: component_mapping.xml:145 +#, no-c-format +msgid "Components as Map indices" +msgstr "Map 인덱스들로서 컴포넌트들" + +#. Tag: para +#: component_mapping.xml:147 +#, no-c-format +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"<composite-map-key> 요소는 당신에게 하나의 컴포넌트 " +"클래스를 하나의 Map의 키로서 매핑시키도록 한다. 당신은 컴" +"포넌트 클래스 상에서 hashCode()equals()를 정확하게 오버라이드 시키도록 하라." + +#. Tag: title +#: component_mapping.xml:156 +#, no-c-format +msgid "Components as composite identifiers" +msgstr "composite 식별자들로서 컴포넌트들" + +#. Tag: para +#: component_mapping.xml:158 +#, no-c-format +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"당신은 하나의 컴포넌트를 하나의 엔티티 클래스에 대한 하나의 식별자로서 사용" +"할 수도 있다. 당신의 컴포넌트 클래스는 어떤 사양들을 충족시켜야 한다:" + +#. Tag: para +#: component_mapping.xml:165 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "그것은 java.io.Serializable을 구현해야 한다." + +#. Tag: para +#: component_mapping.xml:170 +#, no-c-format +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"그것은 composite 키 등가(equality)에 대한 데이터베이스 개념과 일치되게, " +"equals()hashCode()를 다시 구현해야 " +"한다." + +#. Tag: emphasis +#: component_mapping.xml:179 +#, no-c-format +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"노트: Hibernate3에서, 두 번째 사양은 Hibernate의 절대적으로 엄격한 사양이 아" +"니다. 그러나 아무튼 그것을 행하라." + +#. Tag: para +#: component_mapping.xml:183 +#, no-c-format +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"당신은 compsite 키들을 생성시키는데 IdentifierGenerator를 " +"사용할 수 없다. 대신에 어플리케이션은 그것 자신의 식별자들을 할당해야 한다." + +#. Tag: para +#: component_mapping.xml:188 +#, no-c-format +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"통상의 <id> 선언 위치에 (내포된 <key-" +"property> 요소들을 가진) <composite-id> 태그를 사용하라. 예를 들어, OrderLine 클래스는 " +"Order의 (composite) 프라이머리 키에 의존하는 프라이머리 키" +"를 갖는다." + +#. Tag: programlisting +#: component_mapping.xml:196 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:198 +#, no-c-format +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"이제 OrderLine 테이블을 참조하는 임의의 foreign 키들이 또" +"한 compsite이다. 당신은 다른 클래스들에 대한 당신의 매핑들 속에 이것을 선언해" +"야 한다. OrderLine에 대한 하나의 연관은 다음과 같이 매핑" +"될 것이다:" + +#. Tag: programlisting +#: component_mapping.xml:204 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:206 +#, no-c-format +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(<column> 태그가 모든 곳에서 column 속성에 대한 대안임을 노트하라.)" + +#. Tag: para +#: component_mapping.xml:211 +#, no-c-format +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"OrderLine에 대한 many-to-many 연관은 또" +"한 composite foreign 키를 사용한다:" + +#. Tag: programlisting +#: component_mapping.xml:216 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:218 +#, no-c-format +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"Order에서 OrderLine들의 콜렉션이 사용" +"될 것이다:" + +#. Tag: programlisting +#: component_mapping.xml:223 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:225 +#, no-c-format +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "" +"(통상적으로 <one-to-many> 요소는 컬럼들을 선언하지 " +"않는다.)" + +#. Tag: para +#: component_mapping.xml:229 +#, no-c-format +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "" +"만일 OrderLine 자체가 하나의 콜렉션을 소유할 경우, 그것은 " +"또한 하나의 composite foreign 키를 갖는다." + +#. Tag: programlisting +#: component_mapping.xml:234 +#, no-c-format +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:239 +#, no-c-format +msgid "Dynamic components" +msgstr "동적인 컴포넌트들" + +#. Tag: para +#: component_mapping.xml:241 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "당신은 Map 타입의 프로퍼티를 매핑시킬 수도 있다:" + +#. Tag: programlisting +#: component_mapping.xml:245 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:247 +#, no-c-format +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"<dynamic-component> 매핑의 의미는 <" +"component>와 동일하다. 이런 종류의 매핑의 장점은 배치 시에 단지 " +"매핑 문서를 편집함으로써 그 bean의 실제 프로퍼티들을 결정하는 가용성이다. 매" +"핑 문서에 대한 런타임 처리는 또한 DOM 파서를 사용하여 가능하다. 더 좋게는 당" +"신이 Configuration 객체를 통해 Hibernate의 구성-시 메타모" +"형에 접근할 수 있다(그리고 변경시킬 수 있다)" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/configuration.po b/documentation/envers/src/main/docbook/ko-KR/content/configuration.po new file mode 100644 index 0000000000..4b7dd5bd15 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/configuration.po @@ -0,0 +1,3255 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:5 +#, no-c-format +msgid "Configuration" +msgstr "구성" + +#. Tag: para +#: configuration.xml:7 +#, no-c-format +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"Hibernate가 많은 다른 환경들에서 동작하도록 설계되어 있으므로, 많은 개수의 구" +"성 파라미터들이 존재한다. 다행히 대부분은 유의미한 디폴트 값들이고 Hibernate" +"는 다양한 옵션들을 보여주는 etc/ 내의 예제 파일 " +"hibernate.properties로 배포된다. 당신은 단지 당신의 " +"classpath 경로 속에 그 파일을 집어넣고 그것을 커스트마이징하기만 해야 한다." + +#. Tag: title +#: configuration.xml:16 +#, no-c-format +msgid "Programmatic configuration" +msgstr "프로그램 상의 구성" + +#. Tag: para +#: configuration.xml:18 +#, no-c-format +msgid "" +"An instance of org.hibernate.cfg.Configuration represents " +"an entire set of mappings of an application's Java types to an SQL database. " +"The Configuration is used to build an (immutable) " +"SessionFactory. The mappings are compiled from various " +"XML mapping files." +msgstr "" +"org.hibernate.cfg.Configuration의 인스턴스는 어플리케이션" +"의 Java 타입들을 SQL 데이터베이스 타입으로의 전체 매핑 집합을 표현한다. " +"Configuration은 (불변의) SessionFactory" +"를 빌드하는데 사용된다. 매핑들은 여러 XML 매핑 파일들로부터 컴파일 된다." + +#. Tag: para +#: configuration.xml:26 +#, no-c-format +msgid "" +"You may obtain a Configuration instance by instantiating " +"it directly and specifying XML mapping documents. If the mapping files are " +"in the classpath, use addResource():" +msgstr "" +"당신은 Configuration 인스턴스를 초기화 시키고 XML 매핑 문" +"서들을 지정함으로써 Configuration 인스턴스를 얻을 수 있" +"다. 만일 매핑 파일들이 classpath 내에 있다면, addResource()를 사용하라:" + +#. Tag: programlisting +#: configuration.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:34 +#, no-c-format +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"(때때로 더 나은) 다른 방법은 매핑된 클래스를 지정하는 것이고, Hibernate로 하" +"여금 당신을 위해 매핑 문서를 찾도록 하라:" + +#. Tag: programlisting +#: configuration.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:41 +#, no-c-format +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"그때 Hibernate는 classpath 내에서 /org/hibernate/auction/Item.hbm." +"xml/org/hibernate/auction/Bid.hbm.xml로 명명" +"된 매핑 파일들을 룩업할 것이다. 이 접근법은 임의의 하드코딩된 파일 이름들을 " +"제거한다." + +#. Tag: para +#: configuration.xml:48 +#, no-c-format +msgid "" +"A Configuration also allows you to specify configuration " +"properties:" +msgstr "" +"Configuration은 또한 구성 프로퍼티들을 지정하는 것을 허용" +"해준다:" + +#. Tag: programlisting +#: configuration.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:55 +#, no-c-format +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "" +"이것은 컨피그레이션 프로퍼티들을 Hibernate에 전달하는 유일한 방법이 아니다. " +"여러 가지 옵션들은 다음을 포함한다:" + +#. Tag: para +#: configuration.xml:62 +#, no-c-format +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"java.util.Properties의 인스턴스를 Configuration." +"setProperties()에 전달한다 ." + +#. Tag: para +#: configuration.xml:68 +#, no-c-format +msgid "" +"Place hibernate.properties in a root directory of the " +"classpath." +msgstr "" +"classpath의 루트 디렉토리에 hibernate.properties를 위치지" +"운다." + +#. Tag: para +#: configuration.xml:74 +#, no-c-format +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"java -Dproperty=value를 사용하여 System 프로퍼티들을 설정한다." + +#. Tag: para +#: configuration.xml:80 +#, no-c-format +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"hibernate.cfg.xml<property> 요" +"소들을 포함한다 (나중에 논의됨)." + +#. Tag: para +#: configuration.xml:87 +#, no-c-format +msgid "" +"hibernate.properties is the easiest approach if you want " +"to get started quickly." +msgstr "" +"당신이 빠르게 시작하고 원할 경우 hibernate.properties는 가" +"장 쉬운 접근법이다." + +#. Tag: para +#: configuration.xml:92 +#, no-c-format +msgid "" +"The Configuration is intended as a startup-time object, " +"to be discarded once a SessionFactory is created." +msgstr "" +"Configuration은 시작 시(startup-time) 객체로서 일단 " +"SessionFactory가 생성되면 폐기되게끔 예정되어 있다." + +#. Tag: title +#: configuration.xml:100 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "SessionFactory 얻기" + +#. Tag: para +#: configuration.xml:102 +#, no-c-format +msgid "" +"When all mappings have been parsed by the Configuration, " +"the application must obtain a factory for Session " +"instances. This factory is intended to be shared by all application threads:" +msgstr "" +"모든 매핑들이 Configuration에 의해 파싱되었을 때, 어플리케" +"이션은 Session 인스턴스들에 대한 팩토리를 얻어야 한다. 이 " +"팩토리는 모든 어플리케이션 쓰레드들에 의해 공유되도록 고안되었다:" + +#. Tag: programlisting +#: configuration.xml:108 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:110 +#, no-c-format +msgid "" +"Hibernate does allow your application to instantiate more than one " +"SessionFactory. This is useful if you are using more than " +"one database." +msgstr "" +"하지만 Hibernate는 당신의 어플리케이션이 하나 이상의 " +"SessionFactory를 초기화 시키는 것을 허용한다. 이것은 당신" +"이 하나 이상의 데이터베이스를 사용하는 경우에 유용하다." + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "JDBC connections" +msgstr "JDBC 커넥션들" + +#. Tag: para +#: configuration.xml:121 +#, no-c-format +msgid "" +"Usually, you want to have the SessionFactory create and " +"pool JDBC connections for you. If you take this approach, opening a " +"Session is as simple as:" +msgstr "" +"대개 당신은 SessionFactory로 하여금 당신을 위한 JDBC 커넥" +"션들을 생성시키고 풀링시키는 것을 원한다. 만일 당신이 이 접근법을 취할 경우, " +"한 개의 Session을 여는 것은 다음과 같이 간단하다:" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, no-c-format +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"당신이 데이터베이스에 대한 접근을 요청하는 어떤 것을 행하자 마자, 한 개의 " +"JDBC 커넥션이 그 풀로부터 얻어질 것이다." + +#. Tag: para +#: configuration.xml:134 +#, no-c-format +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now describe " +"the most important settings for JDBC connection configuration." +msgstr "" +"이것이 동작하도록 하기 위해서, 우리는 몇몇 JDBC 커넥션 프로퍼티들을 Hibernate" +"에 전달할 필요가 있다. 모든 Hibernate 프로퍼티 이름들과 의미론들은 " +"org.hibernate.cfg.Environment 클래스 상에 정의되어 있다. " +"우리는 이제 JDBC 커넥션 구성을 위한 가장 중요한 설정들을 설명할 것이다." + +#. Tag: para +#: configuration.xml:141 +#, no-c-format +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"만일 당신이 다음 프로퍼티들을 설정할 경우 Hibernate는 java.sql." +"DriverManager를 사용하여 커넥션들을 얻을 것이다(그리고 풀링시킬 것" +"이다):" + +#. Tag: title +#: configuration.xml:147 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "Hibernate JDBC 프로퍼티들" + +#. Tag: entry +#: configuration.xml:153 configuration.xml:241 configuration.xml:338 +#: configuration.xml:529 configuration.xml:725 configuration.xml:832 +#: configuration.xml:920 +#, no-c-format +msgid "Property name" +msgstr "프로퍼티 이름" + +#. Tag: entry +#: configuration.xml:154 configuration.xml:242 configuration.xml:339 +#: configuration.xml:530 configuration.xml:726 configuration.xml:833 +#: configuration.xml:921 +#, no-c-format +msgid "Purpose" +msgstr "용도" + +#. Tag: literal +#: configuration.xml:160 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: emphasis +#: configuration.xml:163 +#, no-c-format +msgid "JDBC driver class" +msgstr "jdbc 드라이버 클래스" + +#. Tag: literal +#: configuration.xml:168 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: emphasis +#: configuration.xml:171 +#, no-c-format +msgid "JDBC URL" +msgstr "jdbc URL" + +#. Tag: literal +#: configuration.xml:176 configuration.xml:272 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: emphasis +#: configuration.xml:179 +#, no-c-format +msgid "database user" +msgstr "데이터베이스 사용자" + +#. Tag: literal +#: configuration.xml:184 configuration.xml:280 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: emphasis +#: configuration.xml:187 +#, no-c-format +msgid "database user password" +msgstr "데이터베이스 사용자 패스워드" + +#. Tag: literal +#: configuration.xml:192 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#. Tag: emphasis +#: configuration.xml:195 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "풀링된 커넥션들의 최대 개수" + +#. Tag: para +#: configuration.xml:202 +#, no-c-format +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property with " +"connection pool specific settings. This will turn off Hibernate's internal " +"pool. For example, you might like to use C3P0." +msgstr "" +"하지만 Hibernate 자신의 커넥션 풀링 알고리즘은 아주 기본적이다. 그것은 당신" +"이 시작하는 것을 도와주려고 의도되었고 제품 시스템 용도 또는 퍼포먼" +"스 테스트용으로는 고안되지 않았다. 최상의 퍼포먼스와 안정성을 위해" +"서는 제 3의 풀을 사용하라. 즉 hibernate.connection.pool_size 프로퍼티를 커넥션 풀 지정 설정들로 대체하라. 이것은 Hibernate의 내" +"부 pool을 오프시킬 것이다. 예를 들어 당신은 C3P0를 사용할 수도 있다." + +#. Tag: para +#: configuration.xml:212 +#, no-c-format +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"C3P0ConnectionProvider for connection pooling if you set " +"hibernate.c3p0.* properties. If you'd like to use Proxool " +"refer to the packaged hibernate.properties and the " +"Hibernate web site for more information." +msgstr "" +"C3P0는 lib 디펙토리 속에 Hibernate에 배포된 오픈 소스 " +"JDBC 커넥션 풀이다. 당신이 hibernate.c3p0.* 프로퍼티들을 " +"설정할 경우 Hibernate는 커넥션 풀링을 위해 그것의 " +"C3P0ConnectionProvider를 사용할 것이다. 만일 당신이 " +"Proxool을 사용하고자 원할 경우 패키지화 된 hibernate.properties를 참조하고 추가 정보는 Hibernate 웹 사이트를 참조하라." + +#. Tag: para +#: configuration.xml:221 +#, no-c-format +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "" +"다음은 C3P0에 대한 사용하는 예제 hibernate.properties 파일" +"이다:" + +#. Tag: programlisting +#: configuration.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:227 +#, no-c-format +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"Datasource registered in JNDI. You'll need to set at " +"least one of the following properties:" +msgstr "" +"어플리케이션 서버 내부의 용도로, 당신은 JNDI로 등록된 어플리케이션 서버 " +"Datasource로부터 커넥션을 얻기 위해 항상 Hibernate를 구성" +"해야 한다. 당신은 적어도 다음 프로퍼티들 중 하나를 최소한으로 설정할 필요가 " +"있을 것이다." + +#. Tag: title +#: configuration.xml:235 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "Hibernate Datasource Properties" + +#. Tag: literal +#: configuration.xml:248 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#. Tag: emphasis +#: configuration.xml:251 +#, no-c-format +msgid "datasource JNDI name" +msgstr "데이터소스 JNDI 이름" + +#. Tag: literal +#: configuration.xml:256 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#. Tag: entry +#: configuration.xml:258 +#, fuzzy, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "JNDI 프로바이더의 URL" + +#. Tag: literal +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#. Tag: entry +#: configuration.xml:266 +#, no-c-format +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:274 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:290 +#, no-c-format +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"다음은 어플리케이션 서버 제공 JNDI 데이터소스용 예제 hibernate." +"properties 파일이다:" + +#. Tag: programlisting +#: configuration.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:297 +#, no-c-format +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"JNDI datasource로부터 얻어진 JDBC 커넥션들은 어플리케이션 서버의 컨테이너에 " +"의해 관리되는 트랜잭션들에 자동적으로 참여할 것이다." + +#. Tag: para +#: configuration.xml:302 +#, no-c-format +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the property name. For " +"example, you may specify a charSet using " +"hibernate.connection.charSet." +msgstr "" +"임의의 커넥션 프로퍼티들은 프로퍼티 이름 앞에 \"hibernate." +"connnection\"을 첨가하여 부여될 수 있다. 예를 들어 당신은 " +"hibernate.connection.charSet을 사용하여 charSet을 지정할 수도 있다." + +#. Tag: para +#: configuration.xml:308 +#, no-c-format +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider. You may select a custom implementation by " +"setting hibernate.connection.provider_class." +msgstr "" +"당신은 org.hibernate.connection.ConnectionProvider 인터페" +"이스를 구현함으로써 JDBC 커넥션들을 얻는 당신 자신의 플러그인 방도를 정의할수" +"도 있다. 당신은 hibernate.connection.provider_class를 설정" +"하여 맞춤형 구현을 선택할 수도 있다." + +#. Tag: title +#: configuration.xml:317 +#, no-c-format +msgid "Optional configuration properties" +msgstr "선택적인 구성 프로퍼티들" + +#. Tag: para +#: configuration.xml:319 +#, no-c-format +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"실행 시에 Hibernate의 행위를 제어하는 많은 다른 프로퍼티들이 존재한다. 모든 " +"것이 옵션이지만 합당한 디폴트 값들을 갖는다." + +#. Tag: para +#: configuration.xml:324 +#, no-c-format +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"경고: 이들 프로퍼티들 중 몇몇은 \"system-level\" 전용이다. 시스템 레벨 프로퍼티들은 오직 java -Dproperty=value 또는 hibernate.properties를 통해서만 설정될 수 있" +"다. 그것들은 위에 설명된 다른 기법들에 의해 설정될 수 없다." + +#. Tag: title +#: configuration.xml:332 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "Hibernate 구성 프로퍼티들" + +#. Tag: literal +#: configuration.xml:345 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: configuration.xml:347 +#, fuzzy, no-c-format +msgid "" +"The classname of a Hibernate Dialect which allows " +"Hibernate to generate SQL optimized for a particular relational database." +msgstr "" +"특정 관계형 데이터베이스에 최적화 된 SQL을 생성시키는 것을 Hibernate에게 허용" +"해주는 Hibernate 의 클래스명. " + +#. Tag: para +#: configuration.xml:351 +#, fuzzy, no-c-format +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:359 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#. Tag: entry +#: configuration.xml:361 +#, fuzzy, no-c-format +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"모든 SQL 문장들을 콘솔에 기록한다. 이것은 로그 카테고리 를 " +"로 설정하는 것에 대한 하나의 다른 방법이다. " + +#. Tag: para +#: configuration.xml:365 configuration.xml:377 configuration.xml:471 +#: configuration.xml:484 configuration.xml:497 configuration.xml:510 +#: configuration.xml:564 configuration.xml:591 configuration.xml:605 +#: configuration.xml:660 configuration.xml:888 configuration.xml:903 +#: configuration.xml:993 +#, fuzzy, no-c-format +msgid "" +"eg. true | " +"false" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:373 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#. Tag: entry +#: configuration.xml:375 +#, fuzzy, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "로그와 콘솔 속에 SQL을 깔끔하게 프린트한다. " + +#. Tag: literal +#: configuration.xml:385 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#. Tag: entry +#: configuration.xml:387 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"생성된 SQL 내에 주어진 schema/tablespace로서 수식이 없는 테이블이름들을 수식" +"한다. " + +#. Tag: para +#: configuration.xml:390 +#, fuzzy, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:398 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#. Tag: entry +#: configuration.xml:400 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" +"주어진 SQL 내에 주어진 카타록으로서 수식이 없는 테이블이름들을 수식한다. " +"" + +#. Tag: para +#: configuration.xml:403 +#, fuzzy, no-c-format +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:411 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#. Tag: entry +#: configuration.xml:413 +#, fuzzy, no-c-format +msgid "" +"The SessionFactory will be automatically bound to this " +"name in JNDI after it has been created." +msgstr "" +"는 그것이 생성된 후에 JNDI 내에서 이 이름에 자동적으로 바인" +"드 될 것이다. " + +#. Tag: para +#: configuration.xml:416 configuration.xml:859 +#, fuzzy, no-c-format +msgid "" +"eg. jndi/composite/name" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:424 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#. Tag: entry +#: configuration.xml:426 +#, fuzzy, no-c-format +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"single-ended 연관관계들(one-to-one, many-to-one)의 경우에 outer join fetch 트" +"리의 최대 \"깊이\"를 설정한다. 은 디폴트 outer join fetching" +"을 사용불가능하게 만든다. " + +#. Tag: para +#: configuration.xml:430 +#, no-c-format +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"예.03 사이의 값들이권장된다" + +#. Tag: literal +#: configuration.xml:439 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#. Tag: entry +#: configuration.xml:441 +#, fuzzy, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "" +"연관들의 Hibernate 배치 페칭에 대한 디폴트 크기를 설정한다. " + +#. Tag: para +#: configuration.xml:443 +#, no-c-format +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"예. 권장되는 값들은 4, 8, 16" + +#. Tag: literal +#: configuration.xml:452 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#. Tag: entry +#: configuration.xml:454 +#, fuzzy, no-c-format +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +"이 로부터 열려진 모든 세션들에 대해 엔티티 표현을 디폴트 모드" +"로 설정한다 " + +#. Tag: para +#: configuration.xml:457 +#, no-c-format +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"dynamic-map, dom4j, pojo" + +#. Tag: literal +#: configuration.xml:465 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#. Tag: entry +#: configuration.xml:467 +#, fuzzy, no-c-format +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"업데이트 중인 항목들의 프라이머리 키 값에 의해 SQL 업데이트들이 순서" +"(ordering)지워지도록 Hibernate에게 강제시킨다. 이것은 고도의 동시성 시스템들" +"에서 더 적은 트랜잭션 데드락(deadlock)들로 귀결될 것이다 " + +#. Tag: literal +#: configuration.xml:479 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#. Tag: entry +#: configuration.xml:481 +#, fuzzy, no-c-format +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" +"이용 가능하게 되면, Hibernate는 퍼포먼스 튜닝에 유용한 통계들을 수집할 것이" +"다. " + +#. Tag: literal +#: configuration.xml:492 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#. Tag: entry +#: configuration.xml:494 +#, fuzzy, no-c-format +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"이용 가능하게 되면, 객체가 삭제될 때 생성된 식별자 프로퍼티들은 디폴트 값들" +"로 재설정될 것이다. " + +#. Tag: literal +#: configuration.xml:505 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#. Tag: entry +#: configuration.xml:507 +#, fuzzy, no-c-format +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"이용 가능하게 되면, Hibernate는 보다 쉬운 디버깅을 위해 SQL 내에 주석들을 생" +"성시킬 것이다. 디폴트는 . " + +#. Tag: title +#: configuration.xml:521 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "Hibernate JDBC 및 커넥션 프로퍼티들" + +#. Tag: literal +#: configuration.xml:536 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#. Tag: entry +#: configuration.xml:538 +#, fuzzy, no-c-format +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "" +"0 아닌 값은 JDBC fetch 사이즈를 결정한다(을 호출한다 )." + +#. Tag: literal +#: configuration.xml:545 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#. Tag: entry +#: configuration.xml:547 +#, fuzzy, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" +"0 아닌 값은 Hibernate에 의한 JDBC2 배치 업데이트의 사용을 이용 가능하게 한" +"다. " + +#. Tag: para +#: configuration.xml:549 +#, no-c-format +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"예.530 사이의 값들이 권장된다" + +#. Tag: literal +#: configuration.xml:557 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#. Tag: entry +#: configuration.xml:559 +#, fuzzy, no-c-format +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"당신의 JDBC 드라이버가 로부터 정확한 행 카운트들을 반환할 경" +"우에 이 프로퍼티를 로 설정하라(대개 이 옵션을 사용 가능하게 " +"하는 것이 안전하다). 그러면 Hibernate는 자동적으로 버전화 된 데이터에 대해 배" +"치화된(batched) DML을 사용할 것이다. 디폴트는 . " + +#. Tag: literal +#: configuration.xml:572 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#. Tag: entry +#: configuration.xml:574 +#, fuzzy, no-c-format +msgid "" +"Select a custom Batcher. Most applications will not need " +"this configuration property." +msgstr "" +"맞춤형 를 선택한다. 대부분의 어플리케이션들은 이 구성 프로퍼" +"티를 필요로 하지 않을 것이다. " + +#. Tag: para +#: configuration.xml:577 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:585 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#. Tag: entry +#: configuration.xml:587 +#, fuzzy, no-c-format +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"Hibernate에 의한 JDBC2 스크롤 가능한 결과셋들의 사용을 가능하게 해준다. 이 프" +"로퍼티는 사용자가 제공한 JDBC커넥션들을 사용할 때에만 필수적이고, 그 밖의 경" +"우 Hibernate는 커넥션 메타데이터를 사용한다. " + +#. Tag: literal +#: configuration.xml:599 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#. Tag: entry +#: configuration.xml:601 +#, fuzzy, no-c-format +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC (system-level property)." +msgstr "" +"FUZZY! 또는 타입들을 읽어들일 때 스트림들" +"을 사용한다(시스템-레벨 프로퍼티). " + +#. Tag: literal +#: configuration.xml:613 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#. Tag: entry +#: configuration.xml:615 +#, fuzzy, no-c-format +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"insert 후에 고유하게 생성된 키들을 검색하는데 JDBC3 의 사용" +"을 이용 가능하도록 만든다. JDBC3+ 드라이버와 JRE1.4+를 필요로 하고, 당신의 드" +"라이버가 Hibernate 식별자 생성자들에 문제가 있을 경우에 false로 설정하라. 디" +"폴트로 커넥션 메타 데이터를 사용하여 드라이버 가용성들을 결정하려고 시도하" +"라. " + +#. Tag: para +#: configuration.xml:621 configuration.xml:751 configuration.xml:763 +#: configuration.xml:777 configuration.xml:815 +#, fuzzy, no-c-format +msgid "eg. true|false" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:629 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#. Tag: entry +#: configuration.xml:631 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom ConnectionProvider which " +"provides JDBC connections to Hibernate." +msgstr "" +"Hibernate에 JDBC 커넥션들을 제공하는 맞춤형 의 클래스명. " +"" + +#. Tag: para +#: configuration.xml:634 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:642 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#. Tag: entry +#: configuration.xml:644 +#, fuzzy, no-c-format +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most databases do " +"not support all isolation levels." +msgstr "" +"JDBC transaction isolation 레벨을 설정한다. 의미있는 값들로 " +"을 체크하지만 대부분의 데이터베이스들이 모든 격리(isolate) 레벨들을 지원하지 " +"않음을 노트하라. " + +#. Tag: para +#: configuration.xml:648 +#, fuzzy, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:656 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#. Tag: entry +#: configuration.xml:658 +#, fuzzy, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"JDBC 풀링된 커넥션들에 대해 자동커밋을 이용 가능하도록 한다(권장되지 않음). " +"" + +#. Tag: literal +#: configuration.xml:668 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#. Tag: entry +#: configuration.xml:670 +#, fuzzy, no-c-format +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"Hibernate가 JDBC 커넥션들을 해제하게 될 시점을 지정한다. 디폴트로 한 개의 " +"JDBC 커넥션은 그 세션이 명시적으로 닫히거나 연결해제되기 전까지 보관된다. 어" +"플리케이션 트랜잭션 서버 JTA 데이터소스의 경우, 당신은 모든 JDBC 호출 후에 커" +"넥션들을 과감하게 해제시키기 위해 를 사용해야 한다. 비-JTA 연" +"결의 경우, 을 사용하여 각각의 트랜잭션의 끝에서 커넥션들을 해" +"제시키는 것이 종종 의미가 있다. 는 JTA 및 CMT 트랜잭션 방도들" +"의 경우에 를 선택하고 JDBC 트랜잭션 방도에 대해 를 선택할 것이다. " + +#. Tag: para +#: configuration.xml:681 +#, fuzzy, no-c-format +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"eg.auto (디폴트) | " +"on_close | after_transaction | " +"after_statement" + +#. Tag: para +#: configuration.xml:686 +#, fuzzy, no-c-format +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"이 설정이 SessionFactory.openSession로부터 반환된 " +"Session들에만 영향을 준다는 점을 노트하라. " +"SessionFactory.getCurrentSession을 통해 얻어진 " +"Session들의 경우, 사용하기 위해 구성된 " +"CurrentSessionContext 구현이 그들 Session들에 대한 연결 해제를 제어한다. 를 보라." + +#. Tag: entry +#: configuration.xml:697 +#, no-c-format +msgid "" +"hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:700 +#, no-c-format +msgid "" +"Pass the JDBC property <propertyName> to " +"DriverManager.getConnection()." +msgstr "" + +#. Tag: entry +#: configuration.xml:706 +#, no-c-format +msgid "" +"hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:709 +#, no-c-format +msgid "" +"Pass the property <propertyName> to the JNDI " +"InitialContextFactory." +msgstr "" + +#. Tag: title +#: configuration.xml:719 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "Hibernate Cache 프로퍼티들" + +#. Tag: literal +#: configuration.xml:732 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#. Tag: entry +#: configuration.xml:734 +#, fuzzy, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "맞춤형 의 클래스명. " + +#. Tag: para +#: configuration.xml:736 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:744 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#. Tag: entry +#: configuration.xml:746 +#, fuzzy, no-c-format +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"읽기가 매우 빈번한 경우에, 쓰기를 최소화 시키기 위해 second-level 캐시 연산" +"을 최적화 시킨다. 이 설정은 Hibernate3에서 클러스터링 된 캐시들에 가장 유용하" +"고, Hibernate3에서는 클러스터링된 캐시 구현들에 대해 디폴트로 이용 가능하다. " +"" + +#. Tag: literal +#: configuration.xml:759 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#. Tag: entry +#: configuration.xml:761 +#, fuzzy, no-c-format +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "" +"질의 캐시를 가능하게 만든다. 개별 질의들은 여전히 캐시 가능한 것으로 설정되어" +"야 한다. " + +#. Tag: literal +#: configuration.xml:771 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#. Tag: entry +#: configuration.xml:773 +#, fuzzy, no-c-format +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"second-level 캐시를 완전히 사용 불가능하게 하는데 사용될 수 있고, 그것은 " +" 매핑을 지정하는 클래스들에 대해 디폴트로 이용 가능이다. " +"" + +#. Tag: literal +#: configuration.xml:785 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#. Tag: entry +#: configuration.xml:787 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"맞춤형 인터페이스의 클래스명. 디폴트는 미리 빌드된 " +". " + +#. Tag: para +#: configuration.xml:790 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:798 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#. Tag: entry +#: configuration.xml:800 +#, fuzzy, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "second-level 캐시 영역 이름들에 사용할 접두어. " + +#. Tag: para +#: configuration.xml:802 +#, fuzzy, no-c-format +msgid "eg. prefix" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:810 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#. Tag: entry +#: configuration.xml:812 +#, fuzzy, no-c-format +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "" +"인간에게 보다 더 친숙한 형식으로 second-level 캐시 속에 데이터를 저장하도록 " +"Hibernate에게 강제시킨다.. " + +#. Tag: title +#: configuration.xml:826 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "Hibernate 트랜잭션 프로퍼티들" + +#. Tag: literal +#: configuration.xml:839 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#. Tag: entry +#: configuration.xml:841 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"Hibernate API 에 사용할 의 클래스 이름.(디폴" +"트는 ). " + +#. Tag: para +#: configuration.xml:845 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:853 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#. Tag: entry +#: configuration.xml:855 +#, fuzzy, no-c-format +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"어플리케이션 서버로부터 JTA 을 얻기 위해 에 " +"의해 사용되는 JNDI 이름. " + +#. Tag: literal +#: configuration.xml:867 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#: configuration.xml:869 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +"의 클래스명- JVM 레벨의 캐싱이 이용 가능할 때 또는 JTA 환경에" +"서 hilo generator를 사용할 때 필요하다. " + +#. Tag: para +#: configuration.xml:873 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:881 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#. Tag: entry +#: configuration.xml:883 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"만일 사용가능하도록 되면, 세션은 트랜잭션의 before completion 단계 동안에 자" +"동적으로 flush 될 것이다. 빌드되어 있는 자동적인 세션 컨텍스트 관리가 선호되" +"는데, 를 보라. " + +#. Tag: literal +#: configuration.xml:896 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#. Tag: entry +#: configuration.xml:898 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"만일 사용가능토록 하면, after completion 단계 동안에 세션이 자동적으로 닫혀" +"질 것이다. (CMT에 대해 Hibernate를 사용할 때 매우 유용하다.) " + +#. Tag: title +#: configuration.xml:914 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "여러가지 프로퍼티들" + +#. Tag: literal +#: configuration.xml:927 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#. Tag: entry +#: configuration.xml:929 +#, fuzzy, no-c-format +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"\"현재\" 의 영역화를 위한 하나의 (맞춤) 방도를 제공한다. 빌드" +"되어 있는 방도들에 대한 추가 정보는 를 보라. " + +#. Tag: para +#: configuration.xml:934 +#, fuzzy, no-c-format +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"예.jta | " +"thread | managed | custom." +"Class" + +#. Tag: literal +#: configuration.xml:943 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#. Tag: entry +#: configuration.xml:945 +#, fuzzy, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "Chooses the HQL 파서 구현을 선택한다. " + +#. Tag: para +#: configuration.xml:947 +#, fuzzy, no-c-format +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"예.org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#. Tag: literal +#: configuration.xml:956 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#. Tag: entry +#: configuration.xml:958 +#, fuzzy, no-c-format +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"Hibernate 질의들 내의 토큰들로부터 SQL 토큰들로의 매핑 (예를 들어 토큰들은 함" +"수 이름 또는 리터럴 이름일 수 있다). " + +#. Tag: para +#: configuration.xml:961 +#, fuzzy, no-c-format +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"예.true | " +"false" + +#. Tag: literal +#: configuration.xml:969 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#. Tag: entry +#: configuration.xml:971 +#, fuzzy, no-c-format +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +"가 생성될 때, 자동적으로 유효성을 검사하거나 schema DDL을 데" +"이터베이스로 내보내기 한다. 의 경우, 가 명시" +"적으로 닫혀질 때 데이터베이스 스키마가 드롭될 것이다. " + +#. Tag: para +#: configuration.xml:977 +#, fuzzy, no-c-format +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"예.validate | " +"update | create | create-" +"drop" + +#. Tag: literal +#: configuration.xml:986 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#: configuration.xml:988 +#, fuzzy, no-c-format +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"런타임 reflection 대신에 CGLIB의 사용을 가능하도록 만든다(시스템 레벨 프로퍼" +"티). Reflection은 문제가 발생할 시에 때때로 유용할 수 있고, 당신이 optimizer" +"를 사용하지 않을 경우조차도 Hibernate는 항상 필요로 함을 유의하라. 당신은 " +" 속에 이 프로퍼티를 설정할수 없다. " + +#. Tag: title +#: configuration.xml:1004 +#, no-c-format +msgid "SQL Dialects" +msgstr "SQL Dialects" + +#. Tag: para +#: configuration.xml:1006 +#, no-c-format +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"당신은 항상 당신의 데이터베이스를 위해 hibernate.dialect " +"프로퍼티를 정확한 org.hibernate.dialect.Dialect 서브클래스" +"로 설정해야 한다. 만일 당신이 dialect를 지정할 경우, 당신이 프로퍼티들을 수작" +"업으로 지정하는 노력을 절약하도록 Hibernate는 위에 열거된 다른 프로퍼티들 중 " +"몇몇에 대해 의미있는 디폴트들을 사용할 것이다." + +#. Tag: title +#: configuration.xml:1014 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Hibernate SQL Dialects (hibernate.dialect)" + +#. Tag: entry +#: configuration.xml:1022 +#, no-c-format +msgid "RDBMS" +msgstr "RDBMS" + +#. Tag: entry +#: configuration.xml:1023 +#, no-c-format +msgid "Dialect" +msgstr "Dialect" + +#. Tag: entry +#: configuration.xml:1028 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1028 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#. Tag: entry +#: configuration.xml:1031 +#, no-c-format +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#. Tag: literal +#: configuration.xml:1031 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#. Tag: entry +#: configuration.xml:1034 +#, no-c-format +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#. Tag: literal +#: configuration.xml:1034 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#. Tag: entry +#: configuration.xml:1037 +#, no-c-format +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#. Tag: literal +#: configuration.xml:1037 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "MySQL" +msgstr "MySQL" + +#. Tag: literal +#: configuration.xml:1040 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#. Tag: entry +#: configuration.xml:1043 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "MySQL with InnoDB" + +#. Tag: literal +#: configuration.xml:1043 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "MySQL with MyISAM" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "Oracle (any version)" +msgstr "Oracle (any version)" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "Sybase" +msgstr "Sybase" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "SAP DB" +msgstr "SAP DB" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Informix" +msgstr "Informix" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Ingres" +msgstr "Ingres" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Progress" +msgstr "Progress" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "Interbase" +msgstr "Interbase" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Pointbase" +msgstr "Pointbase" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "FrontBase" +msgstr "FrontBase" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Firebird" +msgstr "Firebird" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#. Tag: title +#: configuration.xml:1100 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "Outer Join Fetching" + +#. Tag: para +#: configuration.xml:1102 +#, no-c-format +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"만일 당신의 데이터베이스가 ANSI, Oracle, 또는 Sybase 스타일의 outer join들을 " +"지원할 경우, outer join fetching은 (데이터베이스 그 자체" +"에 의해 보다 더 많은 작업이 수행되는 비용으로) 데이터베이스로의 그리고 데이터" +"베이스로부터의 라운드 트립들의 개수를 제한함으로써 종종 퍼포먼스를 증가시킬 " +"것이다. Outer join fetching은 many-to-one, one-to-many, many-to-many,one-to-" +"one 연관관계들이 에 의해 연결된 객체들의 전체 그래프가 하나의 SQL " +"SELECT 속에서 검색되게끔 허용해준다." + +#. Tag: para +#: configuration.xml:1111 +#, no-c-format +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"Outer join fetching은 hibernate.max_fetch_depth 프로퍼티를 0으로 설정함으로써 전역적으로 사용 불가능하게 할 " +"수 있다. 1 이상의 값을 설정하는 것은 fetch=\"join" +"\"으로 매핑되었던 모든 one-to-one 및 many-to-one 연관관계들에 대해 " +"outer join fetching을 사용 가능하도록 만든다." + +#. Tag: para +#: configuration.xml:1119 +#, no-c-format +msgid "See for more information." +msgstr "추가 정보는 를 보라." + +#. Tag: title +#: configuration.xml:1126 +#, no-c-format +msgid "Binary Streams" +msgstr "Binary Streams" + +#. Tag: para +#: configuration.xml:1128 +#, no-c-format +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"Oracle은 JDBC 드라이버 로/부터 전달되는 byte 배열들의 크기" +"를 제한시킨다. 만일 당신이 binary 또는 " +"serializable 타입의 대형 인스턴스를 사용하고자 원할 경우" +"에, 당신은 hibernate.jdbc.use_streams_for_binary를 사용 가" +"능하게 해야 할 것이다. 이것은 오직 시스템 레벨 설정이다." + +#. Tag: title +#: configuration.xml:1139 +#, no-c-format +msgid "Second-level and query cache" +msgstr "Second-level 캐시와 query 캐시" + +#. Tag: para +#: configuration.xml:1141 +#, no-c-format +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"hibernate.cache 접두어가 붙은 프로퍼티들은 Hibernate에 대" +"해 프로세스 또는 클러스터 범위의 두 번째 레벨 캐시 시스템을 사용하는 것을 허" +"용해준다. 상세한 것은 를 보라." + +#. Tag: title +#: configuration.xml:1151 +#, no-c-format +msgid "Query Language Substitution" +msgstr "Query Language 치환" + +#. Tag: para +#: configuration.xml:1153 +#, no-c-format +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"당신은 hibernate.query.substitutions을 사용하여 새로운 " +"Hibernate 질의 토큰들을 정의할 수 있다. 예를 들어:" + +#. Tag: programlisting +#: configuration.xml:1158 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions true=1, false=0" + +#. Tag: para +#: configuration.xml:1160 +#, no-c-format +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"은truefalse 토큰들이 생성된 SQL 내에" +"서 정수 리터럴들로 번역되도록 강제할 것이다." + +#. Tag: programlisting +#: configuration.xml:1165 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#. Tag: para +#: configuration.xml:1167 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "" +"은 SQL LOWER function 함수 이름을 변경하는 것을 당신에게 " +"허용해 줄 것이다" + +#. Tag: title +#: configuration.xml:1174 +#, no-c-format +msgid "Hibernate statistics" +msgstr "Hibernate 통계" + +#. Tag: para +#: configuration.xml:1176 +#, no-c-format +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"만일 당신이 hibernate.generate_statistics를 사용 가능하도" +"록 할 경우, Hibernate는 SessionFactory.getStatistics()를 " +"통해 가동 중인 시스템을 튜닝할 때 유용한 많은 통계들을 노출시킬 것이다. " +"Hibernate는 심지어 JMX를 통해 이들 통계들을 노출시키도록 구성될 수 있다. 추" +"가 정보는 org.hibernate.stats에 있는 인터페이스들에 관한 " +"Javadoc를 읽어라." + +#. Tag: title +#: configuration.xml:1188 +#, no-c-format +msgid "Logging" +msgstr "로깅" + +#. Tag: para +#: configuration.xml:1190 +#, no-c-format +msgid "Hibernate logs various events using Apache commons-logging." +msgstr "" +"Hibernate는 Apache commons-logging를 사용하여 다양한 이벤트들을 로그시킨다." + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "" +"The commons-logging service will direct output to either Apache Log4j (if " +"you include log4j.jar in your classpath) or JDK1.4 " +"logging (if running under JDK1.4 or above). You may download Log4j from " +"http://jakarta.apache.org. To use Log4j you will need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" +"commons-logging 서비스는 (만일 당신이 classpath 내에 log4j.jar를 포함할 경우) Apache Log4j로 또는 (JDK1.4 이상의 버전에서 실행될 경" +"우) JDK 1.4 로깅으로 직접 출력할 것이다. 당신은 http://jakarta." +"apache.org에서 Log4j를 다운로드 할 수 있다. Log4j를 사용하기 위해, " +"당신은 log4j.properties 파일을 당신의 classpath 내에 위치" +"지울 필요가 있을 것이고, 예제 properties 파일은 Hibernate의 src/ 디렉토리 내에 배포되어 있다." + +#. Tag: para +#: configuration.xml:1204 +#, no-c-format +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"우리는 당신이 Hibernate의 로그 메시지들에 익숙해지기를 강력히 권장한다. 읽기 " +"불가능하지 않게끔 가능한 한 상세하게 Hibernate 로그를 만들도록 많은 작업이 행" +"해졌다. 그것은 본질적인 문제던지기 장치이다. 가장 흥미로운 로그 카테고리들이 " +"다음에 있다:" + +#. Tag: title +#: configuration.xml:1213 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "Hibernate 로그 카테고리들" + +#. Tag: entry +#: configuration.xml:1219 +#, no-c-format +msgid "Category" +msgstr "카테고리" + +#. Tag: entry +#: configuration.xml:1220 +#, no-c-format +msgid "Function" +msgstr "기능" + +#. Tag: literal +#: configuration.xml:1225 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#. Tag: entry +#: configuration.xml:1226 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "SQL DML 문장들이 실행될 때 그것들 모두를 로그 시킨다" + +#. Tag: literal +#: configuration.xml:1229 +#, no-c-format +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#. Tag: entry +#: configuration.xml:1230 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "모든 JDBC 파라미터들을 로그시킨다" + +#. Tag: literal +#: configuration.xml:1233 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "SQL DDL 문장들이 실행될 때 그것들 모두를 로그 시킨다" + +#. Tag: literal +#: configuration.xml:1237 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#. Tag: entry +#: configuration.xml:1238 +#, no-c-format +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "" +"flush 시점에서 세션과 연관된 모든 엔티티들(최대 20개의 엔티티들)의 상태를 로" +"그 시킨다" + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "모든 second-level 캐시 액티비티를 로그시킨다" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log transaction related activity" +msgstr "트랜잭션 관련 액티비티를 로그 시킨다" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "모든 JDBC 리소스 취득을 로그 시킨다" + +#. Tag: literal +#: configuration.xml:1256 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.ast.AST" + +#. Tag: entry +#: configuration.xml:1257 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "질의 파싱 동안에 HQL AST와 SQL AST를 로그시킨다" + +#. Tag: literal +#: configuration.xml:1262 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#. Tag: entry +#: configuration.xml:1263 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "모든 JAAS 허가 요청들을 로그시킨다" + +#. Tag: literal +#: configuration.xml:1266 +#, no-c-format +msgid "org.hibernate" +msgstr "org.hibernate" + +#. Tag: entry +#: configuration.xml:1267 +#, no-c-format +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "모든 것을 로그시킨다(많은 정보이지만, 문제해결에 매우 유용하다)" + +#. Tag: para +#: configuration.xml:1276 +#, no-c-format +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"Hibernate로 어플리케이션들을 개발할 때, 당신은 거의 항상 org." +"hibernate.SQL 카테고리에 대해 이용 가능한 debug " +"모드로 작업하거나, 다른 방법으로 hibernate.show_sql 프로퍼" +"티를 이용가능하게 하여 작업해야 할 것이다." + +#. Tag: title +#: configuration.xml:1286 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "NamingStrategy 구현하기" + +#. Tag: para +#: configuration.xml:1288 +#, no-c-format +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"org.hibernate.cfg.NamingStrategy 인터페이스는 데이터베이" +"스 객체들과 스키마 요소들에 대한 \"네이밍 표준\"을 지정하는 것을 당신에게 허" +"용해준다." + +#. Tag: para +#: configuration.xml:1293 +#, no-c-format +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"당신은 Java 식별자들로부터 데이터베이스 식별자들을 자동적으로 생성시키거나 매" +"핑 파일에 주어진 \"논리적\" 컬럼과 테이블 이름들을 \"물리적\" 테이블과 컬럼 " +"이름들로 자동적으로 처리하는 규칙들을 제공할 수 있다. 이 특징은 반복되는 잡음" +"(예를 들어 TBL_접두어들)을 제거함으로써, 매핑 문서의 말많" +"은 장황함을 감소시키도록 도와준다. Hibernate에 의해 사용되는 디폴트 방도는 아" +"주 작은 작품이다." + +#. Tag: para +#: configuration.xml:1302 +#, no-c-format +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"당신은 매핑들을 추가하기 이전에 Configuration.setNamingStrategy()를 호출함으로써 다른 방도를 지정할 수 있다:" + +#. Tag: programlisting +#: configuration.xml:1307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1309 +#, no-c-format +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"org.hibernate.cfg.ImprovedNamingStrategy는 어떤 어플리케이" +"션들에 대한 유용한 시작점일 수 있는 미리 빌드된 방도이다." + +#. Tag: title +#: configuration.xml:1317 +#, no-c-format +msgid "XML configuration file" +msgstr "XML 구성 파일" + +#. Tag: para +#: configuration.xml:1319 +#, no-c-format +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"구성에 대한 다른 접근법은 hibernate.cfg.xml로 명명된 파일 " +"속에 전체 구성을 지정하는 것이다. 이 파일은 hibernate.properties 파일에 대한 대용물로서 사용될 수 있거나, 만일 둘 다 존재할 경우에 프" +"로퍼티들을 중복정의하는데 사용될 수 있다." + +#. Tag: para +#: configuration.xml:1326 +#, no-c-format +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"XML 구성 파일은 디폴트로 당신의 CLASSPATH의 루트에 존재하" +"는 것이 기대된다. 다음은 예제이다:" + +#. Tag: programlisting +#: configuration.xml:1331 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1333 +#, no-c-format +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"당신이 볼 수 있듯이, 이 접근법의 장점은 구성에 대한 매핑 파일 이름들을 구체" +"화 시키는 것이다. hibernate.cfg.xml은 또한 당신이 " +"Hibernate 캐시를 튜닝해야할 때 보다 편리하다. hibernate.properties 또는 hibernate.cfg.xml 중 어느 것을 사용하는가는 " +"당신의 선택이다. XML 구문을 사용하는 위에 언급된 이점들을 제외하면 둘다 같은 " +"것임을 노트하라." + +#. Tag: para +#: configuration.xml:1342 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "Hibernate 구성으로, Hibernate를 시작하는 것은 다음과 같이 간단하다" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "당신은 다음을 사용하여 다른 XML 구성 파일을 찾아낼 수 있다" + +#. Tag: programlisting +#: configuration.xml:1352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: configuration.xml:1357 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "J2EE 어플리케이션 서버 통합" + +#. Tag: para +#: configuration.xml:1359 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "Hibernate는 J2EE 인프라스트럭처에 대한 다음 통합 점들을 갖고 있다:" + +#. Tag: para +#: configuration.xml:1365 +#, no-c-format +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"Container-managed datasources: Hibernate는 컨테이너에 의" +"해 관리되는 JDBC 커넥션들을 사용할 수 있고 JNDI를 통해 제공된다. 대개 JTA 호" +"환 TransactionManagerResourceManager" +"는 트랜잭션 관리(CMT), 특히 몇몇 데이터소스들을 가로질러 분산된 트랜잭션 핸들" +"링을 처리한다. 물론 당신은 또한 프로그램 상으로 트랜잭션 경계들을 한정할 수" +"도 있거나(BMT) 당신은 당신의 코드가 이식성을 유지하도록 이것에 대한 선택적인 " +"Hibernate Transaction API를 사용하고자 원할 수도 있다." + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"자동적인 JNDI 바인딩: Hibernate는 시작 후에 그것의 " +"SessionFactory를 JNDI에 바인드 시킬 수 있다." + +#. Tag: para +#: configuration.xml:1389 +#, no-c-format +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"JTA Session 바인딩: Hibernate Session" +"은 JTA 트랜잭션들의 영역(scope)에 자동적으로 바인드 시킬 수도 있다. 간단하게 " +"JNDI로부터 SessionFactory를 룩업하고 현재 " +"Session을 얻어라. Hibernate로 하여금 당신의 JTA 트랜잭션" +"이 완료될 때 Session을 flush시키고 닫는 것을 처리하도록 하" +"라. 트랜잭션 경계 구분은 선언적(CMT)이거나 프로그래밍적((BMT/" +"UserTransaction))이다." + +#. Tag: para +#: configuration.xml:1402 +#, no-c-format +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"JMX 배치: 만일 당신이 JMX 가용성이 있는 어플리케이션 서" +"버(예를 들면 JBoss AS)를 갖고 있다면, 당신은 Hibernate를 하나의 managed MBean" +"으로서 배치하는 것을 선택할 수 있다. 이것은 Configuration" +"으로부터 당신의 SessionFactory를 빌드 시키는 한 줄의 시작 " +"코드를 절약해준다. 컨테이너는 당신의 HibernateService를 시" +"작할 것이고, 또한 이상적으로 서비스 의존성들을 처리할 것이다(데이터소스는 " +"Hibernate가 시작되기 전에 이용 가능해야 한다)." + +#. Tag: para +#: configuration.xml:1413 +#, no-c-format +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"당신의 환경에 따라, 당신은 당신의 어플리케이션 서버가 \"connection " +"containment(연결 봉쇄)\" 예외상황들을 보일 경우에 구성 옵션 " +"hibernate.connection.aggressive_release를 true로 설정해야 " +"될 수도 있다." + +#. Tag: title +#: configuration.xml:1420 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "트랜잭션 방도 구성" + +#. Tag: para +#: configuration.xml:1422 +#, no-c-format +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"Hibernate Session API는 당신의 아카텍처 내에서 임의의 트랜" +"잭션 관할 시스템에 독립적이다. 만일 당신이 Hibernate로 하여금 커넥션 풀을 통" +"해 직접 JDBC를 사용하도록 강제할 경우, 당신은 JDBC API를 호출하여 당신의 트랜" +"잭션을 시작하고 끝낼 수 있다. 만일 당신이 J2EE 어플리케이션 서버를 실행 중이" +"라면, 당신은 필요할 때 bean-managed 트랜잭션들을 사용하고 JTA API와 " +"UserTransaction을 호출하고자 원할 수 있다." + +#. Tag: para +#: configuration.xml:1430 +#, no-c-format +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"이들 두 개의 (그리고 다른) 환경들에서 당신의 코드에 이식성을 유지하기 위해 우" +"리는 기본 시스템을 포장하고 은폐시키는 선택적인 Hibernate " +"Transaction API를 권장한다. 당신은 Hibernate 구성 프로퍼" +"티 hibernate.transaction.factory_class를 사용하여 " +"Transaction 인스턴스들에 대한 팩토리 클래스를 지정해야 한" +"다." + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "세 개의 표준(미리 만들어진) 선택들이 존재한다:" + +#. Tag: literal +#: configuration.xml:1443 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "org.hibernate.transaction.JDBCTransactionFactory" + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "데이터베이스 (JDBC) 트랜잭션들에게 위임시킨다(디폴트)" + +#. Tag: literal +#: configuration.xml:1449 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#. Tag: para +#: configuration.xml:1451 +#, no-c-format +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"기존의 트랜잭션이 이 컨텍스트(예를 들면 EJB session bean 메소드) 내에서 진행 " +"중일 경우에 container-managed transaction에게 위임시키고, 그 밖의 경우 새로" +"운 트랜잭션이 시작되고 bean-managed transaction이 사용된다." + +#. Tag: literal +#: configuration.xml:1459 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#. Tag: para +#: configuration.xml:1461 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "container-managed JTA 트랜잭션들에게 위임시킨다" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "" +"당신은 또한 당신 자신의 트랜잭션 방도들(예를 들면 CORBA 트랜잭션 서비스)을 정" +"의할 수도 있다." + +#. Tag: para +#: configuration.xml:1471 +#, no-c-format +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Hibernate에 있는 몇몇 특징들(예를 들면. second level 캐시, JTA를 가진 컨텍스" +"트 상의 세션들, 기타.)은 관리되는 환경에서 JTA TransactionManager에 대한 접근을 필요로 한다. 어플리케이션 서버에서 당신은 Hibernate가 " +"TransactionManager에 대한 참조를 획득하는 방법을 지정해야 " +"한다. 왜냐하면 J2EE가 한 개의 메커니즘을 표준화 시키고 있지 않기 때문이다:" + +#. Tag: title +#: configuration.xml:1479 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "JTA TransactionManagers" + +#. Tag: entry +#: configuration.xml:1485 +#, no-c-format +msgid "Transaction Factory" +msgstr "트랜잭션 팩토리" + +#. Tag: entry +#: configuration.xml:1486 +#, no-c-format +msgid "Application Server" +msgstr "어플리케이션 서버" + +#. Tag: literal +#: configuration.xml:1491 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1492 +#, no-c-format +msgid "JBoss" +msgstr "JBoss" + +#. Tag: literal +#: configuration.xml:1495 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1496 +#, no-c-format +msgid "Weblogic" +msgstr "Weblogic" + +#. Tag: literal +#: configuration.xml:1499 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "WebSphere" +msgstr "WebSphere" + +#. Tag: literal +#: configuration.xml:1503 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#. Tag: entry +#: configuration.xml:1504 +#, no-c-format +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#. Tag: literal +#: configuration.xml:1507 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1508 +#, no-c-format +msgid "Orion" +msgstr "Orion" + +#. Tag: literal +#: configuration.xml:1511 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1512 +#, no-c-format +msgid "Resin" +msgstr "Resin" + +#. Tag: literal +#: configuration.xml:1515 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1516 +#, no-c-format +msgid "JOTM" +msgstr "JOTM" + +#. Tag: literal +#: configuration.xml:1519 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1520 +#, no-c-format +msgid "JOnAS" +msgstr "JOnAS" + +#. Tag: literal +#: configuration.xml:1523 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1524 +#, no-c-format +msgid "JRun4" +msgstr "JRun4" + +#. Tag: literal +#: configuration.xml:1527 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1528 +#, no-c-format +msgid "Borland ES" +msgstr "Borland ES" + +#. Tag: title +#: configuration.xml:1537 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "JNDI-bound SessionFactory" + +#. Tag: para +#: configuration.xml:1539 +#, no-c-format +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"하나의 JNDI 바인드된 Hibernate SessionFactory는 그 팩토리" +"에 대한 룩업과 새로운 Session들의 생성을 단순화 시킬 수 있" +"다. 이것은 JNDI 바인드된 Datasource에 관련되어 있지 않고, " +"단순하게 둘 다 동일한 레지스트리를 사용한다는 점을 노트하라!" + +#. Tag: para +#: configuration.xml:1546 +#, no-c-format +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"만일 당신이 SessionFactory를 하나의 JNDI namespace에 바인" +"드 시키고자 원할 경우, hibernate.session_factory_name 프로" +"퍼티를 사용하여 한 개의 이름(예를 들면. java:hibernate/" +"SessionFactory)을 지정하라. 만일 이 프로퍼티가 생략될 경우, " +"SessionFactory는 JNDI에 바인드 되지 않을 것이다. (이것은 " +"읽기-전용 JNDI 디폴트 구현을 가진 환경들, 예를 들면 Tomcat에서 특히 유용하" +"다.)" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"SessionFactory를 JNDI에 바인드 시킬 때, Hibernate는 초기 " +"컨텍스트를 초기화 시키기 위해 hibernate.jndi.url, " +"hibernate.jndi.class의 값들을 사용할 것이다. 만일 그것들" +"이 지정되어 있지 않을 경우, 디폴트 InitialContext가 사용" +"될 것이다." + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"Hibernate는 당신이 cfg.buildSessionFactory()를 호출한 후" +"에 SessionFactory를 JNDI 내에 자동적으로 위치지울 것이다. " +"이것은 당신이 (나중에 논의되는) HibernateService를 가진 " +"JMX 배치를 사용하지 않는 한, 당신이 적어도 당신의 어플리케이션 내에 있는 어" +"떤 시작 코드 (또는 유틸리티 클래스) 내에서 이것을 호출할 것임을 의미한다." + +#. Tag: para +#: configuration.xml:1568 +#, no-c-format +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"만일 당신이 하나의 JNDI SessionFactory를 사용할 경우, 하나" +"의 EJB 또는 어떤 다른 클래스는 JNDI 룩업을 사용하여 SessionFactory를 얻을 수 있다." + +#. Tag: para +#: configuration.xml:1573 +#, no-c-format +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"우리는 관리되는 환경들에서 SessionFactory를 JNDI에 바인드 " +"시키고 그 밖의 경우에는 하나의 static 싱글톤을 사용하는 것" +"을 권장한다. 이들 상세로부터 당신의 어플리케이션 코드를 은폐시키기 위해, 우리" +"는 또한 HibernateUtil.getSessionFactory()과 같은 하나의 " +"helper 클래스 내에서 SessionFactory에 대한 실제 룩업 코드" +"를 은폐시키기를 권장한다. 그런 클래스는 또한 Hibernate를 시작하는 편리한 방법" +"임을 노트하라— 1장을 보라." + +#. Tag: title +#: configuration.xml:1585 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "Current Session context management with JTA" + +#. Tag: para +#: configuration.xml:1587 +#, no-c-format +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"당신 자신의 ThreadLocal 유틸리티를 작동시키는 대신에, 우리" +"는 또한 Hibernate Session를 얻기 위해 " +"SessionFactory 상의 getCurrentSession() 메소드 사용을 권장한다. 현재 세션들에 관한 논의를 보라. \"jta\" 세션 컨" +"텍스트를 사용하고 있는 경우에, 현재의 JTA 트랜잭션으로 시작되고 연관된 " +"Hibernate Session이 존재하지 않을 경우, 우리는 JTA 트랜잭" +"션으로 시작되고 연관될 것이다. \"jta\" 컨텍스트에서 " +"getCurrentSession()를 통해 검색된 Session들은 그 트랜잭션이 완료되기 전에 자동적으로 flush될 것이고 트랜잭션 " +"완료 후에 닫혀질 것이고, 그리고 각각의 문장 뒤에 JDBC 커넥션들을 적극적으로 " +"해제할 것이다. 이것은 그런 관리 사항들에 대해 사용자 코드를 명료하게 유지시켜" +"서, 연관되어 있는 JTA 트랜잭션의 생명주기에 의해 Session들" +"이 관리되도록 허용해준다. 이것은 그런 관리 사항들에 대해 사용자 코드를 명료하" +"게 유지시켜서, 세션이 연관되어 있는 JTA 트랜잭션의 생명주기에 의해 관리되는 " +"것을 Session들에게 허용해준다. 당신의 코드는 " +"Session들과 트랜잭션들을 처리하는 가장 손쉬운 방법은 " +"Hibernate의 자동적인 \"현재\" Session이다. current sessions에 관한 논의를 보라. " +"\"jta\" 세션 컨텍스트를 사용하는 경우, 현재의 JTA 트랜잭션" +"으로 시작되고 연관된 Hibernate Session들이 존재하지 않을 " +"경우, 당신이 sessionFactory.getCurrentSession()을 처음 호" +"출할 때 하나의 세션이 현재의 JTA 트랜잭션에 대해 시작되고 연관될 것이다. " +"\"jta\" 컨텍스트에서 getCurrentSession()을 통해 검색된 Session들은 그 트랜잭션이 완료되기 " +"전에 자동적으로 flush될 것이고 그 트랜잭션 완료들 후에 닫혀질 것이고 각각의 " +"문장 후에 JDBC 커넥션들을 적극적으로 해제할 것이다. 이것은 그런 관리 사항들" +"에 대해 사용자 코드를 명료하게 유지시켜서, 연관되어 있는 JTA 트랜잭션의 생명" +"주기에 의해 Session들이 관리되도록 허용해준다. 이것은 그" +"런 관리 사항들에 대해 사용자 코드를 명료하게 유지시켜서, 세션이 연관되어 있" +"는 JTA 트랜잭션의 생명주기에 의해 관리되는 것을 Session들" +"에게 허용해준다. 당신의 코드는 트랜잭션 경계들을 설정하는데 " +"UserTransaction을 통해 프로그램 상으로 JTA를 사용하거나, " +"Hibernate Transaction API를 (이식성을 위한 코드로 권장됨) " +"사용할 수 있다. 만일 당신이 하나의 EJB 컨테이너에서 실행하고 있을 경우, CMT" +"의 경우에 선언적인 트랜잭션 경계설정이 선호된다." + +#. Tag: title +#: configuration.xml:1610 +#, no-c-format +msgid "JMX deployment" +msgstr "JMX 배치" + +#. Tag: para +#: configuration.xml:1612 +#, no-c-format +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"cfg.buildSessionFactory() 줄은 여전히 JNDI에 붙은 하나의 " +"SessionFactory를 얻기 위해 어딘가에서 실행되어야 한다. 당" +"신은 (HibernateUtil 내에 있는 것처럼) static initializer 블록 속에서 이것을 행할 수 있거나 당신은 Hibernate를 " +"managed service로서 배치할 수 있다." + +#. Tag: para +#: configuration.xml:1620 +#, no-c-format +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"Hibernate는 JBoss AS와 같은 JMX 가용성들을 가진 어플리케이션 서버 상의 배치" +"를 위해 org.hibernate.jmx.HibernateService를 배포하고 있" +"다. 실제 배치와 구성은 벤더 지정적이다. 다음은 JBoss 4.0.x를 위한 " +"jboss-service.xml 예제이다:" + +#. Tag: programlisting +#: configuration.xml:1627 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1629 +#, no-c-format +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"이 파일은 META-INF로 명명된 디렉토리 속에 배치되고 확장자 " +".sar (service archive)를 가진 한 개의 JAR 파일 속에 패키징" +"된다. 당신은 또한 Hibernate, 그것의 필요한 제 3의 라이브러리들, 당신의 컴파일" +"된 영속 클래스들 뿐만 아니라 당신의 매핑 파일들을 동일한 아카이브 속에 패키징" +"할 필요가 있다. 당신의 엔터프라이즈 빈즈(대개 session beans)는 그것들 자신의 " +"JAR 파일 속에 유지될 수 있지만, 당신은 한 개의 (hot-)배치 가능한 단위를 얻기 " +"위해 메인 서비스 아카이브 속에 이 EJB JAR 파일을 포함시킬 수도 있다. JMX 서비" +"스와 EJB 배치에 관한 추가 정보는 JBoss AS 문서를 참조하라." + +#~ msgid " (optional)" +#~ msgstr " (옵션)" + +#~ msgid "InitialContextFactory" +#~ msgstr "InitialContextFactory" + +#~ msgid "class of the JNDI " +#~ msgstr "JNDI 의 클래스" + +#~ msgid "eg." +#~ msgstr "예." + +#~ msgid "full.classname.of.Dialect" +#~ msgstr "full.classname.of.Dialect" + +#~ msgid "debug" +#~ msgstr "debug" + +#~ msgid "SCHEMA_NAME" +#~ msgstr "SCHEMA_NAME" + +#~ msgid "CATALOG_NAME" +#~ msgstr "CATALOG_NAME" + +#~ msgid "SessionFactory" +#~ msgstr "SessionFactory" + +#~ msgid "jndi/composite/name" +#~ msgstr "jndi/composite/name" + +#~ msgid "0" +#~ msgstr "0" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "Statement.setFetchSize()" +#~ msgstr "Statement.setFetchSize()" + +#~ msgid "true" +#~ msgstr "executeBatch()" + +#~ msgid "executeBatch()" +#~ msgstr "true" + +#~ msgid "Batcher" +#~ msgstr "Batcher" + +#~ msgid "classname.of.BatcherFactory" +#~ msgstr "classname.of.BatcherFactory" + +#~ msgid "binary" +#~ msgstr "binary" + +#~ msgid "serializable" +#~ msgstr "serializable" + +#~ msgid "PreparedStatement.getGeneratedKeys()" +#~ msgstr "PreparedStatement.getGeneratedKeys()" + +#~ msgid "true|false" +#~ msgstr "true|false" + +#~ msgid "ConnectionProvider" +#~ msgstr "ConnectionProvider" + +#~ msgid "classname.of.ConnectionProvider" +#~ msgstr "classname.of.ConnectionProvider" + +#~ msgid "java.sql.Connection" +#~ msgstr "java.sql.Connection" + +#~ msgid "1, 2, 4, 8" +#~ msgstr "1, 2, 4, 8" + +#~ msgid "after_statement" +#~ msgstr "after_statement" + +#~ msgid "after_transaction" +#~ msgstr "after_transaction" + +#~ msgid "auto" +#~ msgstr "auto" + +#~ msgid "hibernate.connection." +#~ msgstr "<propertyName>" + +#, fuzzy +#~ msgid "<propertyName>" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.connection.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.jndi.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName" + +#~ msgid "DriverManager.getConnection()" +#~ msgstr "DriverManager.getConnection()" + +#~ msgid "Pass the JDBC property to ." +#~ msgstr "JDBC 프로퍼티 에 전달한다." + +#~ msgid "hibernate.jndi." +#~ msgstr "<propertyName>" + +#~ msgid "Pass the property to the JNDI ." +#~ msgstr " 프로퍼티를 JNDI 에 전달한다." + +#~ msgid "CacheProvider" +#~ msgstr "CacheProvider" + +#~ msgid "classname.of.CacheProvider" +#~ msgstr "classname.of.CacheProvider" + +#~ msgid "<cache>" +#~ msgstr "<cache>" + +#~ msgid "QueryCache" +#~ msgstr "QueryCache" + +#~ msgid "StandardQueryCache" +#~ msgstr "StandardQueryCache" + +#~ msgid "classname.of.QueryCache" +#~ msgstr "classname.of.QueryCache" + +#~ msgid "prefix" +#~ msgstr "prefix" + +#~ msgid "TransactionFactory" +#~ msgstr "Transaction" + +#~ msgid "Transaction" +#~ msgstr "TransactionFactory" + +#~ msgid "JDBCTransactionFactory" +#~ msgstr "JDBCTransactionFactory" + +#~ msgid "classname.of.TransactionFactory" +#~ msgstr "classname.of.TransactionFactory" + +#~ msgid "JTATransactionFactory" +#~ msgstr "UserTransaction" + +#~ msgid "UserTransaction" +#~ msgstr "JTATransactionFactory" + +#~ msgid "TransactionManagerLookup" +#~ msgstr "TransactionManagerLookup" + +#~ msgid "classname.of.TransactionManagerLookup" +#~ msgstr "classname.of.TransactionManagerLookup" + +#~ msgid "Session" +#~ msgstr "Session" + +#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" + +#~ msgid "create-drop" +#~ msgstr "create-drop" + +#~ msgid "hibernate.cfg.xml" +#~ msgstr "hibernate.cfg.xml" + +#~ msgid "DB2" +#~ msgstr "DB2" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/events.po b/documentation/envers/src/main/docbook/ko-KR/content/events.po new file mode 100644 index 0000000000..8a05689866 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/events.po @@ -0,0 +1,473 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:5 +#, no-c-format +msgid "Interceptors and events" +msgstr "인터셉터들과 이벤트들" + +#. Tag: para +#: events.xml:7 +#, no-c-format +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"어플리케이션이 Hibernate 내부에서 발생하는 어떤 이벤트들에 대해 반응하는 것" +"에 흔히 유용하다. 이것은 어떤 종류의 일반적인 기능, 그리고 Hibernate의 확장 " +"기능의 구현을 허용해준다." + +#. Tag: title +#: events.xml:14 +#, no-c-format +msgid "Interceptors" +msgstr "인터셉터들" + +#. Tag: para +#: events.xml:16 +#, no-c-format +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"Interceptor 인터페이스는 영속 객체가 저장되고, 업데이트되" +"고, 삭제되거나 로드되기 전에 영속 객체의 프로퍼티들을 조사하고/하거나 처리하" +"는 것을 어플리케이션에 허용해줌으로써 세션으로부터 어플리케이션으로의 콜백들" +"을 제공한다. 이것에 대한 한 가지 가능한 사용은 감사 정보를 추적하는 것이다. " +"예를 들어, 다음 InterceptorAuditable" +"이 생성될 때 createTimestamp를 자동적으로 설정하고 " +"Auditable이 업데이트될 때 lastUpdateTimestamp 프로퍼티를 업데이트 한다." + +#. Tag: para +#: events.xml:27 +#, no-c-format +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"당신은 Interceptor를 직접 구현해야 하거나 (더 좋게는) " +"EmptyInterceptor를 확장(extend)해야 한다." + +#. Tag: programlisting +#: events.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:34 +#, no-c-format +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"인터셉터들은 다음 두 개의 특징들로 나타난다: Session-영역" +"화 그리고 SessionFactory-영역화." + +#. Tag: para +#: events.xml:39 +#, no-c-format +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"Session-영역의 인터셉터는 세션이 하나의 " +"Interceptor를 수용하는 오버로드된 SessionFactory." +"openSession() 메소드들 중 하나를 사용하여 열릴 때 지정된다." + +#. Tag: programlisting +#: events.xml:45 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:47 +#, no-c-format +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"SessionFactory-영역의 인터셉터는 SessionFactory을 빌드하기에 앞서 Configuration 객체에 등록된다. " +"이 경우에, 공급되는 인터셉터는 그 SessionFactory로부터 열" +"려진 모든 세션들에 적용될 것이다; 하나의 세션이 사용할 인터셉터를 명시적으로 " +"지정하여 열리지 않는 한 이것은 참이다. SessionFactory-영역" +"의 인터셉터들은 세션-지정적인 상태를 저장하지 않도록 주의하여 쓰레드-안전해" +"야 한다. 왜냐하면 다중 세션들은 (잠정적으로) 이 인터셉터를 동시적으로 사용할 " +"것이기 때문이다." + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: events.xml:61 +#, no-c-format +msgid "Event system" +msgstr "이벤트 시스템" + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"만일 당신이 당신의 영속 계층에서 특정 이벤트들에 대해 반응해야 한다면, 당신" +"은 또한 Hibernate3 event 아키텍처를 사용할 수도 있다. 이" +"벤트 시스템은 부가물로 사용될 수 있거나 인터셉터들에 대한 대체물로 사용될 수 " +"있다." + +#. Tag: para +#: events.xml:69 +#, no-c-format +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"본질적으로 Session 인터페이스의 모든 메소드들은 이벤트와 " +"서로 관련되어 있다. 당신은 LoadEvent, " +"FlushEvent, 등을 갖는다 (정의된 이벤트 타입들의 전체 리스" +"트에 대해서는 XML 구성 파일 DTD 또는 org.hibernate.event " +"패키지를 참조하라). 하나의 요청이 이들 메소드들 중 하나에 의해 만들어질 때, " +"Hibernate Session은 적절한 이벤트를 생성시키고 그것을 그 " +"타입의 구성된 이벤트 리스너에게 전달한다. 박싱없이, 이들 리스너들은 그들 메소" +"드들이 항상 귀결되었던 동일한 프로세싱을 구현한다. 하지만 당신이 리스너 인터" +"페이스들 중 하나의 맞춤을 구현하는 것이 자유롭고(예를 들어 " +"LoadEventLoadEventListener 인터페이" +"스의 등록된 구현에 의해 처리된다), 그 경우에 그들 구현은 Session에 대해 행해진 임의의 load() 요청들을 처리할 책임" +"이 있을 것이다." + +#. Tag: para +#: events.xml:84 +#, no-c-format +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"리스너들은 효율적이게끔 싱글톤(singleton)들로 간주되어야 할 것이다; 이것은 그" +"것들이 요청들 사이에서 공유되고, 따라서 임의의 상태를 인스턴스 변수들로서 저" +"장하지 말아야 함을 의미한다." + +#. Tag: para +#: events.xml:89 +#, no-c-format +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"맞춤형 리스너는 그것이 편의적인 기저 클래스들(또는 리스너들이 이 용도로 final" +"이 아닌 것으로 선언되므로 Hibernate out-of-the-box에 의해 사용된 디폴트 이벤" +"트 리스너들) 중 하나를 처리하고/하거나 확장하고자 원하는 이벤트들에 대해 적절" +"한 인터페이스를 구현해야 한다. 맞춤형 리스너들은 Configuration 객체를 통해 프로그램 상으로 등록될 수 있거나, Hibernate 구성 XML 속" +"에 지정될 수 있다 (properties 파일을 통한 선언적인 구성은 지원되지 않는다). " +"다음은 맞춤형 load 이벤트 리스너에 대한 예제이다:" + +#. Tag: programlisting +#: events.xml:99 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:101 +#, no-c-format +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "" +"당신은 또한 디폴트 리스너에 덧붙여 그 리스너를 사용하도록 Hibernate에게 알려" +"주는 구성 엔트리를 필요로 한다:" + +#. Tag: programlisting +#: events.xml:106 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "대신에 당신은 그것을 프로그래밍 방식으로 등록할 수도 있다:" + +#. Tag: programlisting +#: events.xml:112 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:114 +#, no-c-format +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"선언적으로 등록된 리스너들은 인스턴스들을 공유할 수 없다. 만일 동일한 클래스 " +"이름이 여러 개의 <listener/> 요소들에서 사용될 경" +"우, 각각의 참조는 그 클래스에 대한 별도의 인스턴스로 귀결될 것이다. 만일 당신" +"이 리스너 타입들 사이에서 리스너 인스턴스들을 공유할 가용성을 필요로 할 경우 " +"당신은 프로그래밍 방식의 등록 접근법을 사용해야 한다." + +#. Tag: para +#: events.xml:122 +#, no-c-format +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"구성 동안에 왜 인터페이스를 구현하고 특정 타입을 지정하는가? 물론 리스너 구현" +"은 여러 개의 이벤트 리스너 인터페이스들을 구현할 수 있다. 등록 동안에 추가적" +"으로 타입을 정의하는 것은 컨피그레이션 동안에 맞춤형 리스너들의 사용 여부를 " +"전환시키는 것을 더 쉽게 해준다." + +#. Tag: title +#: events.xml:132 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "Hibernate 선언적인 보안" + +#. Tag: para +#: events.xml:133 +#, no-c-format +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"대개 Hibernate 어플리케이션들에서 선언적인 보안은 session facade 계층 내에서 " +"관리된다. 이제, Hibernate3는 어떤 액션들이 JACC를 통해 퍼미션을 주어지고, " +"JAAS를 통해 인가되는 것을 허용해준다. 이것은 모든 아키텍처의 상단에 빌드된 옵" +"션 기능이다." + +#. Tag: para +#: events.xml:139 +#, no-c-format +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"먼저, 당신은 JAAS authorization 사용을 이용 가능하도록 하기 위해 적절한 이벤" +"트 리스터들을 구성해야 한다." + +#. Tag: programlisting +#: events.xml:144 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"<listener type=\"...\" class=\"...\"/>는 특정 이벤" +"트 타입에 대해 정확히 한 개의 리스너가 존재할 때 단지 <event " +"type=\"...\"><listener class=\"...\"/></event>의 단" +"축형임을 노트하라." + +#. Tag: para +#: events.xml:152 +#, no-c-format +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"다음으로, 여전히 hibernate.cfg.xml 내에서 퍼미션들을 role" +"들에 바인드 시킨다 :" + +#. Tag: programlisting +#: events.xml:156 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:158 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "" +"역할(role) 이름들은 당신의 JACC 프로바이더에 의해 인지된 역할(role)들이다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/example_mappings.po b/documentation/envers/src/main/docbook/ko-KR/content/example_mappings.po new file mode 100644 index 0000000000..1f3a2ad532 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/example_mappings.po @@ -0,0 +1,795 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Example: Various Mappings" +msgstr "예제: 여러 가지 매핑들" + +#. Tag: para +#: example_mappings.xml:22 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "이 장은 몇몇 보다 복잡한 연관 매핑들을 보여준다." + +#. Tag: title +#: example_mappings.xml:27 +#, no-c-format +msgid "Employer/Employee" +msgstr "Employer/Employee" + +#. Tag: para +#: example_mappings.xml:29 +#, no-c-format +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"EmployerEmployee 사이의 관계에 대한 " +"다음 모형은 그 연관를 표현하는 데 실제 엔티티 클래스(Employment)를 사용한다. 동일한 두 부분들에 대해 하나 이상의 채용 주기가 존재할 " +"수 있기 때문에 이것이 행해진다. 컴포넌트들이 화폐 값들과 종업원 이름들을 모형" +"화 시키는데 사용된다." + +#. Tag: para +#: example_mappings.xml:46 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "다음은 가능한 매핑 문서이다:" + +#. Tag: programlisting +#: example_mappings.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:52 +#, no-c-format +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "" +"그리고 다음은 SchemaExport에 의해 생성된 테이블 스키마이" +"다." + +#. Tag: programlisting +#: example_mappings.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:61 +#, no-c-format +msgid "Author/Work" +msgstr "Author/Work" + +#. Tag: para +#: example_mappings.xml:63 +#, no-c-format +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"Work, Author 그리고 Person 사이의 관계들에 대한 다음 모형을 검토하자. 우리는 WorkAuthor 사이의 관계를 many-to-many 연관으로 표현" +"한다. 우리는 AuthorPerson 사이의 관" +"계를 one-to-one 연관으로 표현하고자 선택한다. 또 다른 가능성은 " +"AuthorPerson을 확장하도록 하는 것일 " +"것이다." + +#. Tag: para +#: example_mappings.xml:81 +#, no-c-format +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "다음 매핑 문서는 이들 관계들을 정확하게 표현한다:" + +#. Tag: programlisting +#: example_mappings.xml:85 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:87 +#, no-c-format +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"이 매핑에는 네 개의 테이블들이 존재한다. works, " +"authorspersons은 각각 작업 데이터, " +"저자 데이터, 개인 데이터를 보관한다. author_work는 저자들" +"을 작업들에 연결시키는 연관 테이블이다. 다음은 SchemaExport에 의해 생성된 테이블 스키마이다." + +#. Tag: programlisting +#: example_mappings.xml:95 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:100 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "Customer/Order/Product" + +#. Tag: para +#: example_mappings.xml:102 +#, no-c-format +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"이제 Customer, Order와 " +"LineItem 그리고 Product 사이의 관계들" +"에 관한 모형을 검토하자. CustomerOrder 사이의 one-to-many 연관이 존재하지만, 우리는 어떻게 Order / LineItem / Product를 표현할 " +"것인가? 나는 OrderProduct 사이의 " +"many-to-many 연관를 나타내는 하나의 연관 클래스로서 LineItem을 매핑하기로 선택했다. Hibernate에서 이것은 composite 요소로 명명된" +"다." + +#. Tag: para +#: example_mappings.xml:122 +#, no-c-format +msgid "The mapping document:" +msgstr "매핑 문서:" + +#. Tag: programlisting +#: example_mappings.xml:126 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:128 +#, no-c-format +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers, orders, " +"line_items 그리고 products는 각각 고객 " +"데이터, 주문 데이터, 주문 라인 아이템 데이터, 그리고 제품 데이터를 보관한다. " +"line_items는 또한 주문들을 제품들과 연결시키는 연관 테이블" +"로서 동작한다." + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:140 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "기타 예제 매핑들" + +#. Tag: para +#: example_mappings.xml:142 +#, no-c-format +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"이들 예제들은 모두 Hiberante test suite로부터 취했다. 당신은 거기서 많은 다" +"른 유용한 예제 매핑들을 발견할 것이다. Hibernate 배포본의 test 폴더를 살펴보라." + +#. Tag: para +#: example_mappings.xml:148 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "TODO: 이 내용을 둘러싼 말들을 집어넣을 것." + +#. Tag: title +#: example_mappings.xml:151 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "\"형식화된(Typed)\" one-to-one 연관" + +#. Tag: programlisting +#: example_mappings.xml:152 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:156 +#, no-c-format +msgid "Composite key example" +msgstr "Composite 키 예제" + +#. Tag: programlisting +#: example_mappings.xml:157 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:161 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "공유된 합성 키 속성을 가진 Many-to-many" + +#. Tag: programlisting +#: example_mappings.xml:162 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:166 +#, no-c-format +msgid "Content based discrimination" +msgstr "내용 기반 판별" + +#. Tag: programlisting +#: example_mappings.xml:167 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:171 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "대체 키들에 대한 연관들" + +#. Tag: programlisting +#: example_mappings.xml:172 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/example_parentchild.po b/documentation/envers/src/main/docbook/ko-KR/content/example_parentchild.po new file mode 100644 index 0000000000..3ad8504b67 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/example_parentchild.po @@ -0,0 +1,603 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:5 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "예제: 부모/자식" + +#. Tag: para +#: example_parentchild.xml:7 +#, no-c-format +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"새로운 사용자들이 Hibernate로 행하고자 시도하는 바로 첫 번째 것들 중 하나는 " +"부모/자식 타입의 관계를 모형화 시키는 것이다. 이것에 대한 두 가지 다른 접근법" +"들이 존재한다. 여러가지 이유들로 인해 특히 새로운 사용자들에게 가장 편한 접근" +"법은 Parent로부터 Child로의 " +"<one-to-many> 연관을 가진 엔티티 클래스들로서 " +"ParentChild 양자를 모형화 시키는 것" +"이다. (다른 접근법은 Child<composite-" +"element>로 선언하는 것이다.) 이제, (Hibernate에서) one to many " +"연관에 대한 디폴트 의미는 composite 요소 매핑의 의미보다 부모/자식 관계의 통" +"상적인 의미에 훨씬 덜 가깝다는 것이 판명된다. 우리는 부모/자식 관계를 효율적" +"이고 강력하게 모형화 시키기 위해 케스케이드들을 가진 양방향 one to " +"many 연관을 사용하는 방법을 설명할 것이다. 그것은 전혀 어렵지 않" +"다!" + +#. Tag: title +#: example_parentchild.xml:21 +#, no-c-format +msgid "A note about collections" +msgstr "콜렉션들에 관한 노트" + +#. Tag: para +#: example_parentchild.xml:23 +#, no-c-format +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Hibernate 콜렉션들은 그것들의 소유하고 있는 엔티티의 논리적 부분으로 간주된" +"다; 결코 포함된 엔티티들의 부분이 아니다. 이것은 중대한 구분점이다! 그것은 다" +"음은 다음 결과들을 갖는다:" + +#. Tag: para +#: example_parentchild.xml:30 +#, no-c-format +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "" +"콜렉션으로부터 객체를 제거하고/콜렉션에 객체를 추가 시킬 때, 콜렉션 소유자의 " +"버전 번호가 증가된다." + +#. Tag: para +#: example_parentchild.xml:36 +#, no-c-format +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"만일 콜렉션으로부터 제거되었던 객체가 하나의 값 타입의 인스턴스(예를 들어 " +"composite 요소)이면, 그 객체는 영속상태를 끝내고 그것의 상태가 데이터베이스로" +"부터 완전히 제거될 것이다. 마찬가지로 하나의 값 타입의 인스턴스를 콜렉션에 추" +"가시키는 것은 그것의 상태가 즉시 영속화 되도록 강제시킬 것이다." + +#. Tag: para +#: example_parentchild.xml:44 +#, no-c-format +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"반면에, 만일 엔티티가 콜렉션으로부터 제거될 경우(one-to-many 또는 many-to-" +"many 연관), 그것은 디폴트로 삭제되지 않을 것이다. 이 특징은 완전하게 일관적이" +"다 - 다른 엔티티의 내부 상태에 대한 변경은 연관된 엔티티를 사라지도록 강제하" +"지 않을 것이다! 마찬가지로 콜렉션에 엔티티를 추가시키는 것은 디폴트로 그 엔티" +"티가 영속화 되도록 강제시키지 않는다." + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"대신에 콜렉션으로의 엔티티 추가가 두 엔티티들 사이에 단지 하나의 링크를 생성" +"시키는 반면에, 그것을 제거하는 것은 링크를 제거한다는 점이 디폴트 특징이다. " +"이것은 모든 종류의 경우들에 대해 매우 적절하다. 그것이 전혀 적절하지 않은 곳" +"은 부모/자식 관계인 경우이고, 여기서 자식의 생애는 부모의 생명주기에 묶여져 " +"있다." + +#. Tag: title +#: example_parentchild.xml:64 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "양방향 one-to-many" + +#. Tag: para +#: example_parentchild.xml:66 +#, no-c-format +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "" +"Parent로부터 Child로의 간단한 " +"<one-to-many> 연관관계로 시작한다고 가정하자." + +#. Tag: programlisting +#: example_parentchild.xml:71 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:73 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "우리가 다음 코드를 실행시켰다면" + +#. Tag: programlisting +#: example_parentchild.xml:77 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:79 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernate는 두 개의 SQL 문장들을 실행할 것이다:" + +#. Tag: para +#: example_parentchild.xml:85 +#, no-c-format +msgid "" +"an INSERT to create the record for c" +msgstr "" +"c에 대한 레코드를 생성시키는 INSERT" + +#. Tag: para +#: example_parentchild.xml:88 +#, no-c-format +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"p로부터 c로의 링크를 생성시키는 " +"UPDATE" + +#. Tag: para +#: example_parentchild.xml:95 +#, no-c-format +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"이것은 비효율적일 뿐만 아니라, 또한 parent_id 컬럼 상의 임" +"의의 NOT NULL 컨스트레인트에 위배된다. 우리는 콜렉션 매핑" +"에서 not-null=\"true\"를 지정함으로써 null 허용 가능 컨스" +"트레인트 위반을 정정할 수 있다:" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "하지만 이것은 권장되는 해결책이 아니다." + +#. Tag: para +#: example_parentchild.xml:106 +#, no-c-format +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"이 행위의 기본 원인은 p로부터 c로의 링" +"크(foreign key parent_id)가 Child 객체" +"의 상태의 부분으로 간주되지 않고 그러므로 INSERT로 생성되" +"지 않는다는 점이다. 따라서 해결책은 Child 매핑의 링크 부분" +"을 만드는 것이다." + +#. Tag: programlisting +#: example_parentchild.xml:113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:115 +#, no-c-format +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(우리는 또한 parent 프로퍼티를 Child 클" +"래스에 추가시킬 필요가 있다.)" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"이제 Child 엔티티가 링크의 상태를 관리한다는 점을 노트하" +"고, 우리는 링크를 업데이트 시키지 말도록 콜렉션에게 통보한다. 우리는 " +"inverse 속성을 사용한다." + +#. Tag: programlisting +#: example_parentchild.xml:124 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:126 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "" +"다음 코드는 새로운 Child를 추가시키는데 사용될 것이다" + +#. Tag: programlisting +#: example_parentchild.xml:130 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:132 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "" +"그리고 이제, 유일하게 한 개의 SQL INSERT가 실행될 것이다!" + +#. Tag: para +#: example_parentchild.xml:136 +#, no-c-format +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"약간 거칠게, 우리는 ParentaddChild() 메소드를 생성시킬 수 있다." + +#. Tag: programlisting +#: example_parentchild.xml:141 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "이제, Child를 추가하는 코드는 다음과 같다" + +#. Tag: programlisting +#: example_parentchild.xml:147 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:152 +#, no-c-format +msgid "Cascading life cycle" +msgstr "케스케이딩 생명주기" + +#. Tag: para +#: example_parentchild.xml:154 +#, no-c-format +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"save()에 대한 명시적인 호출은 여전히 성가시다. 우리는 케스" +"케이딩을 사용하여 이것을 얘기할 것이다." + +#. Tag: programlisting +#: example_parentchild.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:161 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "다음은 위의 코드를 단순화 시킨다" + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"유사하게, 우리는 Parent를 저장하거나 삭제할 때 자식들에 대" +"해 반복하는 것을 필요로 하지 않는다. 다음은 데이터베이스로부터 p와 모든 그것의 자식들을 제거시킨다." + +#. Tag: programlisting +#: example_parentchild.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:174 +#, no-c-format +msgid "However, this code" +msgstr "하지만, 다음 코드" + +#. Tag: programlisting +#: example_parentchild.xml:178 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:180 +#, no-c-format +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"는 데이터베이스로부터 c를 제거하지 않을 것이다; 그것은 오" +"직 p에 대한 링크만을 제거할 것이다(그리고 이 경우에 " +"NOT NULL 컨스트레인트 위반을 일으킬 것이다 ). 당신은 명시" +"적으로 Childdelete() 시킬 필요가 있" +"다." + +#. Tag: programlisting +#: example_parentchild.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:188 +#, no-c-format +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"이제 우리의 경우에 Child는 그것의 부모 없이는 진정으로 존" +"재할 수 없다. 따라서 만일 우리가 콜렉션으로부터 하나의 Child를 제거할 경우, 우리는 그것이 정말로 삭제되기를 원한다. 이를 위해 우" +"리는 cascade=\"all-delete-orphan\"을 사용해야 한다." + +#. Tag: programlisting +#: example_parentchild.xml:194 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:196 +#, no-c-format +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"노트: 비록 콜렉션 매핑이 inverse=\"true\"를 지정할 지라" +"도, 케스케이드들은 여전히 콜렉션 요소들을 반복함으로써 처리된다. 따라서 객체" +"가 케스케이드에 의해 저장되고, 삭제되거나 업데이트 되는 것을 당신이 필요로 " +"할 경우, 당신은 그것을 그 콜렉션에 추가해야 한다. 단순히 setParent()" +"를 호출하는 것으로는 충분하지 않다." + +#. Tag: title +#: example_parentchild.xml:206 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "케스케이드들과 unsaved-value" + +#. Tag: para +#: example_parentchild.xml:208 +#, no-c-format +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"우리가 하나의 Session 속에 Parent를 로" +"드시켰고 UI 액션에서 어떤 변경들을 행했고, update()를 호출" +"하여 새로운 세션에서 이들 변경들을 영속화 시키는 것을 원한다고 가정하자. " +"Parent는 자식들을 가진 콜렉션을 포함할 것이고, 케스케이딩 " +"업데이트가 사용 가능하기 때문에, Hibernate는 어느 자식들이 새로이 초기화 되는" +"지 그리고 어느 것이 데이터베이스에서 현재 행들을 표현하는지를 알 필요가 있" +"다. ParentChild 모두 Long 타입의 식별자 프로퍼티들을 생성시켰다고 가정하자. Hibernate는 어느 " +"자식들이 새로운 것인지를 결정하는데 식별자와 version/timestamp 프로퍼티 값을 " +"사용할 것이다.(을 보라.) " +"Hibernate3에서는unsaved-value를 더이상 명시적으" +"로 지정할 필요가 없다." + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"다음 코드는 parentchild를 업데이트하" +"고 newChild를 삽입시킬 것이다." + +#. Tag: programlisting +#: example_parentchild.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:227 +#, no-c-format +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"물론 그것은 생성되는 식별자의 경우에는 모두 매우 좋지만, 할당되는 식별자들과 " +"composite 식별자들에 대해서는 어떠한가? 이것은 보다 어렵다. 왜냐하면 " +"Hibernate는 (사용자에 의해 할당된 식별자를 가진) 새로이 초기화 된 객체와 이" +"전 세션에서 로드되었던 객체 사이를 구별짓는데 식별자 프로퍼티를 사용할 수 없" +"기 때문이다. 이 경우에, Hibernate는 timestamp 프로퍼티 또는 version 프로퍼티" +"를 사용하거나 실제로 second-level 캐시를 질의하거나 가장 나쁜 경우에는 행이 " +"존재하는지를 알기 위해 데이터베이스를 질의할 것이다." + +#. Tag: title +#: example_parentchild.xml:260 +#, no-c-format +msgid "Conclusion" +msgstr "결론" + +#. Tag: para +#: example_parentchild.xml:262 +#, no-c-format +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"여기에 숙지할 것이 약간 있고 그것은 처음에는 혼동스러운 것처럼 보일 수 있다. " +"하지만 실제로 그것은 모두 매우 좋게 동작한다. 대부분의 Hibernate 어플리케이션" +"들은 많은 장소들에서 부모/자식 패턴을 사용한다." + +#. Tag: para +#: example_parentchild.xml:267 +#, no-c-format +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"우리는 첫 번째 단락에서 대안을 언급했다. 위의 쟁점들 중 어느 것도 정확하게 부" +"모/자식 관계의 의미를 가진, <composite-element> 매핑" +"들의 경우에는 존재하지 않는다. 불행히도, composite 요소 클래스들에 대한 두 개" +"의 커다란 제약들이 존재한다: composite 요소들은 콜렉션들을 소유하지 않고, 그" +"것들은 유일한 부모가 아닌 다른 어떤 엔티티의 자식일 수는 없다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/example_weblog.po b/documentation/envers/src/main/docbook/ko-KR/content/example_weblog.po new file mode 100644 index 0000000000..8690903c26 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/example_weblog.po @@ -0,0 +1,484 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:5 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "예제: Weblog 어플리케이션" + +#. Tag: title +#: example_weblog.xml:8 +#, no-c-format +msgid "Persistent Classes" +msgstr "영속 클래스들" + +#. Tag: para +#: example_weblog.xml:10 +#, no-c-format +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"영속 클래스들은 웹로그, 그리고 웹 로그 내에 게시된 항목을 표현한다.그것들은 " +"표준 부모/자식 관계로 모형화 될 것이지만, 우리는 set 대신에 순서지워진 bag를 " +"사용할 것이다." + +#. Tag: programlisting +#: example_weblog.xml:16 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:18 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_weblog.xml:23 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "Hibernate 매핑들" + +#. Tag: para +#: example_weblog.xml:25 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "XML 매핑들은 이제 매우 간단해질 것이다." + +#. Tag: programlisting +#: example_weblog.xml:29 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:31 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:36 +#, no-c-format +msgid "Hibernate Code" +msgstr "Hibernate 코드" + +#. Tag: para +#: example_weblog.xml:38 +#, no-c-format +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "" +"다음 클래스는 우리가 Hibernate를 사용하여 이들 클래스들로 행할 수 있는 몇몇 " +"종류의 것들을 설명한다." + +#. Tag: programlisting +#: example_weblog.xml:43 +#, no-c-format +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/filters.po b/documentation/envers/src/main/docbook/ko-KR/content/filters.po new file mode 100644 index 0000000000..6016fc21fc --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/filters.po @@ -0,0 +1,294 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:5 +#, no-c-format +msgid "Filtering data" +msgstr "데이터 필터링하기" + +#. Tag: para +#: filters.xml:7 +#, no-c-format +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"Hibernate3은 혁신적인 \"가시성(visibility)\" 규칙들로서 데이터를 처리하는 새" +"로운 접근법을 제공한다. Hibernate 필터는 특정 Hibernate " +"세션에 대해 이용 가능하게 되거나 이용 불가능하게 될 수도 있는 전역, 명명된 파" +"라미터화 된 필터이다." + +#. Tag: title +#: filters.xml:14 +#, no-c-format +msgid "Hibernate filters" +msgstr "Hibernate 필터들" + +#. Tag: para +#: filters.xml:16 +#, no-c-format +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"Hibernate3은 필터 기준(criteria)을 미리 정의하고 클래스 레벨과 콜렉션 레벨 양" +"자에서 그들 필터들을 첨부할 능력을 추가시킨다. 필터 기준(criteria)은 클래스 " +"요소와 다양한 콜렉션 요소들에 대해 이용 가능한 기존의 \"where\" 속성과 매우 " +"유사한 하나의 제한 절을 정의하는 능력이다. 이것들을 제외하면 필터 조건들은 파" +"라미터화 될 수 있다. 그때 어플리케이션은 주어진 필터들이 이용 가능한지 여부 " +"그리고 그들 파라미터 값들이 무엇이어야 하는지를 실행 시에 결정할 수 있다. 필" +"터들은 데이터베이스 뷰들 처럼 사용될 수 있지만, 어플리케이션 내부에 파라미터" +"화 된다." + +#. Tag: para +#: filters.xml:26 +#, no-c-format +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"필터들을 사용하기 위해서, 그것들은 먼저 정의되고 나서 적절한 매핑 요소들에 첨" +"가되어야 한다. 필터를 정의하기 위해, <hibernate-mapping/> 요소 내부에 <filter-def/> 요소를 사용하라:" + +#. Tag: programlisting +#: filters.xml:32 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:34 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "그때 이 필터는 클래스에 첨가될 수 있다:" + +#. Tag: programlisting +#: filters.xml:38 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "or, to a collection:" +msgstr "또는 콜렉션에 첨가될 수 있다:" + +#. Tag: programlisting +#: filters.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:46 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "또는 동시에 양자에(또는 각각의 여러번) 첨가될 수 있다." + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enabledFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Session 상의 메소드들은 다음과 같다: enableFilter" +"(String filterName), getEnabledFilter(String filterName), disableFilter(String filterName). 디폴트로, 필터" +"들은 주어진 세션에 대해 이용 가능하지 않다; 그것들은 " +"Session.enableFilter() 메소드의 사용을 통해 명시적으로 이" +"용 가능하게 되어야 한다. Session.enableFilter()는 " +"Filter 인터페이스의 인스턴스를 반환한다. 위에 정의된 간단" +"한 필터를 사용하면, 이것은 다음과 같을 것이다:" + +#. Tag: programlisting +#: filters.xml:59 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: filters.xml:61 +#, no-c-format +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"org.hibernate.Filter 인터페이스 상의 메소드들은 Hibernate에 매우 공통된 " +"method-chaining을 허용한다는 점을 노트하라." + +#. Tag: para +#: filters.xml:65 +#, no-c-format +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "유효한 기록 날짜 패턴을 가진 시간 데이터를 사용하는 전체 예제 :" + +#. Tag: programlisting +#: filters.xml:69 +#, no-c-format +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:71 +#, no-c-format +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"그때 당신이 현재 유효한 레코드들을 항상 얻는 것을 확실히 하기 위해, employee " +"데이터를 검색하기 전에 세션 상에 필터를 간단하게 이용 가능하게 하라:" + +#. Tag: programlisting +#: filters.xml:76 +#, no-c-format +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:78 +#, no-c-format +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"위의 HQL 에서, 심지어 비록 우리가 결과들에 대한 봉급 컨스트레인트를 명시적으" +"로 언급만 했을지라도, 이용 가능한 필터 때문에 그 질의는 봉급이 백만달러 이상" +"인 현재 채용중인 직원들만을 반환할 것이다." + +#. Tag: para +#: filters.xml:84 +#, no-c-format +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"노트: 만일 당신이 outer 조인에 대해 필터들을 사용할 계획이라면 (HQL이든 로드 " +"페칭이든) 조건 표현식의 방향을 주의하라. 이것을 left outer join으로 설정하는 " +"것이 가장 안전하다; 일반적으로 오퍼레이터 뒤에 있는 컬럼 이름(들)이 뒤따르는 " +"첫번째에 파라미터를 위치지워라." + +#. Tag: para +#: filters.xml:91 +#, no-c-format +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "" +"필터가 정의된 후에는 그것 자신의 조건에 대해 각각 여러 개의 엔티티들 그리고/" +"또는 콜렉션들에 첨가될 수 있다. 조건들이 매번 동일할 때 그것은 지루할 수 있" +"다. 따라서 <filter-def/>은 attribute 든 CDATA 든 어" +"느것이든 디폴트 조건을 정의하는 것을 허용해준다:" + +#. Tag: programlisting +#: filters.xml:98 +#, no-c-format +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:100 +#, no-c-format +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" +"그때 이 디폴트 조건은 그 필터가 어떤 조건을 지정함이 없이 어떤 것에 첨가될때" +"마다 사용될 수 있다. 이것은 당신이 특정한 경우에 디폴트 조건을 오버라이드 시" +"키는 필터의 첨가 부분으로서 특정 조건을 부여할 수 있음을 의미함을 노트하라." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/ko-KR/content/inheritance_mapping.po new file mode 100644 index 0000000000..95f0f44716 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/inheritance_mapping.po @@ -0,0 +1,829 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:5 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "상속 매핑" + +#. Tag: title +#: inheritance_mapping.xml:8 +#, no-c-format +msgid "The Three Strategies" +msgstr "세 가지 방도들" + +#. Tag: para +#: inheritance_mapping.xml:10 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "Hibernate는 세 가지 기본적인 상속 매핑 방도들을 지원한다:" + +#. Tag: para +#: inheritance_mapping.xml:16 +#, no-c-format +msgid "table per class hierarchy" +msgstr "table per class hierarchy" + +#. Tag: para +#: inheritance_mapping.xml:21 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "table per subclass" + +#. Tag: para +#: inheritance_mapping.xml:26 +#, no-c-format +msgid "table per concrete class" +msgstr "table per concrete class" + +#. Tag: para +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "게다가 Hibernate는 네 번째의 약간 다른 종류의 다형성을 지원한다:" + +#. Tag: para +#: inheritance_mapping.xml:39 +#, no-c-format +msgid "implicit polymorphism" +msgstr "implicit polymorphism(함축적인 다형성)" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, no-c-format +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"동일한 상속 계층구조의 다른 가지들에 대해 다른 매핑 방도들을 사용하는 것이 가" +"능하고, 그런 다음 전체 계층 구조를 가로질러 다형성을 성취하는데 함축적인 다형" +"성을 사용하라. 하지만 Hibernate는 동일한 루트 <class> 요소 하에서 <subclass> 그리고 <" +"joined-subclass> 그리고 <union-subclass> 매핑들을 혼합하는 것을 지원하지 않는다. 동일한 <" +"class> 요소 하에서 <subclass> 요소와 " +"<join> 요소를 결합시킴으로써 table per hierarchy 방" +"도와 table per subclass 방도를 함께 혼합시키는 것이 가능하다(아래를 보라)." + +#. Tag: para +#: inheritance_mapping.xml:59 +#, no-c-format +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"별도의 매핑 문서 내에, hibernate-mapping 바로 밑에 " +"subclass, union-subclass, 그리고 " +"joined-subclass 매핑들을 정의하는 것이 가능하다. 이것은 단" +"지 하나의 새로운 매핑 파일을 추가시켜서 하나의 class 계층구조를 확장하는 것" +"을 당신에게 허용해준다. 당신은 subclass 매핑 내에 앞서 매핑된 슈퍼클래스를 명" +"명하여 extends 속성을 지정해야 한다. 노트 : 명백하게 이 특" +"징은 매핑 문서들의 순서를 중요하게끔 만들었다. Hibernate3 이후로, 매핑 파일들" +"의 순서는 extends 키워드를 사용할 때 상관없다. 하나의 매핑 파일 내의 순서는 " +"여전히 서브클래스들에 앞서 슈퍼클래스들을 정의하는데 여전히 필요하다." + +#. Tag: programlisting +#: inheritance_mapping.xml:70 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:74 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "Table per class hierarchy" + +#. Tag: para +#: inheritance_mapping.xml:76 +#, no-c-format +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"우리가 CreditCardPayment, CashPayment, " +"ChequePayment 구현자들을 가진 하나의 인터페이스 " +"Payment를 갖고 있다고 가정하자. table per hierarchy 매핑" +"은 다음과 같을 것이다:" + +#. Tag: programlisting +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:85 +#, no-c-format +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"정확히 하나의 테이블이 필요하다. 이 매핑 방도에는 다음의 하나의 큰 제약이 존" +"재한다: CCTYPE과 같이, 서브 클래스들에 의해 선언된 컬럼들" +"은 NOT NULL 컨스트레인트들을 가질 수 없다." + +#. Tag: title +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "Table per subclass" +msgstr "Table per subclass" + +#. Tag: para +#: inheritance_mapping.xml:96 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "table per subclass 매핑은 다음과 같을 것이다:" + +#. Tag: programlisting +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:102 +#, 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 +#: inheritance_mapping.xml:111 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "discriminator를 사용하는, table per subclass" + +#. Tag: para +#: inheritance_mapping.xml:113 +#, no-c-format +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"table-per-subclass에 대한 Hibernate의 구현은 discriminator(판별자) 컬럼을 필" +"요로 하지 않음을 노트하라. 다른 객체/관계형 매핑기들은 슈퍼클래스 테이블 속" +"에 하나의 타입 판별자 컬럼을 필요로 하는 table-per-subclass에 대한 다른 구현" +"을 사용한다. Hibernate에 의해 채택된 접근법은 구현하기가 훨씬 더 어렵지만 관" +"계형 관점에서는 아마 틀림없이 보다 더 정확하다. 만일 당신이 table per " +"subclass 방도에 대해 하나의 판별자 컬럼을 사용하고 싶다면, 당신은 다음과 같" +"이 <subclass><join>의 사" +"용을 결합시킬 수도 있다:" + +#. Tag: programlisting +#: inheritance_mapping.xml:125 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:127 +#, no-c-format +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"선택적인 fetch=\"select\" 선언은 슈퍼클래스를 질의할 때 " +"outer join을 사용하여 ChequePayment 서브클래스 데이터를 페" +"치시키지 않도록 Hibernate에게 알려준다." + +#. Tag: title +#: inheritance_mapping.xml:136 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "table per class hierarchy와 table per subclass를 혼합하기" + +#. Tag: para +#: inheritance_mapping.xml:138 +#, no-c-format +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"당신은 이 접근법을 사용하여 table per hierarchy 방도와 table per subclass 방" +"도를 혼합시킬 수 있다:" + +#. Tag: programlisting +#: inheritance_mapping.xml:143 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:145 +#, no-c-format +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"이들 매핑 방도들 중 어떤 것에 대해, 루트 Payment 클래스에 " +"대한 하나의 다형성 연관은 <many-to-one>을 사용하여 " +"매핑된다." + +#. Tag: programlisting +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:156 +#, no-c-format +msgid "Table per concrete class" +msgstr "Table per concrete class" + +#. Tag: para +#: inheritance_mapping.xml:158 +#, no-c-format +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"우리가 table per concrete class 방도 매핑에 대해 취할 수 있는 두 가지 방법들" +"이 존재한다. 첫 번째는 <union-subclass>를 사용하는 " +"것이다." + +#. Tag: programlisting +#: inheritance_mapping.xml:163 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:165 +#, 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 +#: inheritance_mapping.xml:170 +#, 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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"이 접근법의 제약은 만일 하나의 프로퍼티가 슈퍼클래스 상으로 매핑될 경우, 그 " +"컬럼 이름이 모든 서브클래스 테이블들 상에서 같아야 한다는 점이다.(장래의 " +"Hibernate 배포본에서 우리는 이 제약을 풀 수도 있다.) identity 생성기 방도는 " +"union 서브클래스 상속에서 허용되지 않으며, 진정 프라이머리 키 시드는 하나의 " +"계층구조의 모든 unioned 서브클래스들을 가로질러 공유되어야 한다." + +#. Tag: para +#: inheritance_mapping.xml:179 +#, no-c-format +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"만일 당신의 슈퍼클래스가 abstract일 경우에, 그것을 abstract=\"true" +"\"로 매핑하라. 물론 만일 그것이 abstract가 아닐 경우, 추가적인 테이" +"블(위의 예제에서는 디폴트로 PAYMENT)이 슈퍼클래스의 인스턴" +"스들을 소유하는데 필요하다." + +#. Tag: title +#: inheritance_mapping.xml:189 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "함축적인 다형성을 사용하는, table per concrete class" + +#. Tag: para +#: inheritance_mapping.xml:191 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "대안적인 접근법은 함축적인 다형성을 사용하는 것이다:" + +#. Tag: programlisting +#: inheritance_mapping.xml:195 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:197 +#, no-c-format +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"어느 곳에서도 우리가 명시적으로 Payment 인터페이스를 언급" +"하지 않음을 주목하라. 또한 Payment의 프로퍼티들이 서브클래" +"스들 각각에서 매핑된다는 점을 주목하라. 만일 당신이 중복을 피하고자 원한다" +"면, XML 엔티티들을 사용하는 것을 고려하라(예를 들어 매핑에서 " +"DOCTYPE 선언과 &allproperties;에서 " +"[ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ])." + +#. Tag: para +#: inheritance_mapping.xml:207 +#, no-c-format +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"이 접근법의 단점은 다형성 질의들을 수행할 때 Hibernate가 생성된 SQl " +"UNION들을 생성시키는 않는다는 점이다." + +#. Tag: para +#: inheritance_mapping.xml:212 +#, no-c-format +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"이 매핑 방도의 경우, Payment에 대한 하나의 다형성 연관은 " +"대개 <any>를 사용하여 매핑된다." + +#. Tag: programlisting +#: inheritance_mapping.xml:217 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:222 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "함축적인 다형성을 다른 상속 매핑들과 혼합하기" + +#. Tag: para +#: inheritance_mapping.xml:224 +#, no-c-format +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"이 매핑에 대해 주목할 하나 이상의 것이 존재한다. 서브클래스들이 그것들 자신의" +"<class> 요소 내에 각각 매핑되므로(그리고 " +"Payment가 단지 인터페이스이므로), 서브클래스들 각각은 쉽" +"게 또 다른 상속 계층구조의 부분일 수 있다! (그리고 당신은 Payment 인터페이스에 대해 여전히 다형성 질의들을 사용할 수 있다.)" + +#. Tag: programlisting +#: inheritance_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:234 +#, no-c-format +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"다시 한번, 우리는 Payment를 명시적으로 언급하지 않는다. 만" +"일 우리가 Payment 인터페이스에 대해 하나의 질의를 실행할 " +"경우-예를 들어, from Payment-, Hibernate는 CreditCardPayment (와 그것의 서브클래스들, 왜냐하면 그것들 또한 Payment를 구현하므로), CashPayment 그리고 " +"ChequePayment 인스턴스들을 자동적으로 반환할 것이지만 " +"NonelectronicTransaction의 인스턴스들을 반환하지 않는다." + +#. Tag: title +#: inheritance_mapping.xml:249 +#, no-c-format +msgid "Limitations" +msgstr "제약들" + +#. Tag: para +#: inheritance_mapping.xml:251 +#, no-c-format +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"table per concrete-class 매핑 방도에 대한 \"함축적인 다형성\" 접근법에는 어" +"떤 제약들이 존재한다. <union-subclass> 매핑들에 대해" +"서는 다소 덜 제한적인 제약들이 존재한다:" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, 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 +#: inheritance_mapping.xml:264 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "상속 매핑들의 특징들" + +#. Tag: entry +#: inheritance_mapping.xml:276 +#, no-c-format +msgid "Inheritance strategy" +msgstr "상속 방도" + +#. Tag: entry +#: inheritance_mapping.xml:277 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "다형성 다대일" + +#. Tag: entry +#: inheritance_mapping.xml:278 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "다형성 일대일" + +#. Tag: entry +#: inheritance_mapping.xml:279 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "다형성 일대다" + +#. Tag: entry +#: inheritance_mapping.xml:280 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "다형성 다대다" + +#. Tag: entry +#: inheritance_mapping.xml:281 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "Polymorphic queries" +msgstr "다형성 질의들" + +#. Tag: entry +#: inheritance_mapping.xml:283 +#, no-c-format +msgid "Polymorphic joins" +msgstr "다형성 조인들" + +#. Tag: entry +#: inheritance_mapping.xml:284 +#, no-c-format +msgid "Outer join fetching" +msgstr "Outer 조인 페칭" + +#. Tag: entry +#: inheritance_mapping.xml:289 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "table per class-hierarchy" + +#. Tag: literal +#: inheritance_mapping.xml:290 inheritance_mapping.xml:301 +#: inheritance_mapping.xml:312 +#, no-c-format +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:291 inheritance_mapping.xml:302 +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:292 inheritance_mapping.xml:303 +#, no-c-format +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:293 inheritance_mapping.xml:304 +#: inheritance_mapping.xml:315 +#, no-c-format +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:294 inheritance_mapping.xml:305 +#: inheritance_mapping.xml:316 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#. Tag: literal +#: inheritance_mapping.xml:295 inheritance_mapping.xml:306 +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 +#, no-c-format +msgid "from Payment p" +msgstr "from Payment p" + +#. Tag: literal +#: inheritance_mapping.xml:296 inheritance_mapping.xml:307 +#: inheritance_mapping.xml:318 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#. Tag: emphasis +#: inheritance_mapping.xml:297 inheritance_mapping.xml:308 +#: inheritance_mapping.xml:319 +#, no-c-format +msgid "supported" +msgstr "지원됨" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "table per subclass" + +#. Tag: entry +#: inheritance_mapping.xml:311 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "table per concrete-class (union-subclass)" + +#. Tag: entry +#: inheritance_mapping.xml:314 +#, no-c-format +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:322 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "table per concrete class (implicit polymorphism)" + +#. Tag: literal +#: inheritance_mapping.xml:323 +#, no-c-format +msgid "<any>" +msgstr "<any>" + +#. Tag: emphasis +#: inheritance_mapping.xml:324 inheritance_mapping.xml:325 +#: inheritance_mapping.xml:329 inheritance_mapping.xml:330 +#, no-c-format +msgid "not supported" +msgstr "지원되지 않음" + +#. Tag: literal +#: inheritance_mapping.xml:326 +#, no-c-format +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#. Tag: literal +#: inheritance_mapping.xml:327 +#, no-c-format +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +#~ msgid "load()/get()" +#~ msgstr "load()/get()" + +#~ msgid "Polymorphic " +#~ msgstr "다형성 " + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid " (for only)" +#~ msgstr " (for only)" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/performance.po b/documentation/envers/src/main/docbook/ko-KR/content/performance.po new file mode 100644 index 0000000000..a081b1d3d8 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/performance.po @@ -0,0 +1,2604 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:5 +#, no-c-format +msgid "Improving performance" +msgstr "퍼포먼스 개선하기" + +#. Tag: title +#: performance.xml:8 +#, no-c-format +msgid "Fetching strategies" +msgstr "페칭 방도들" + +#. Tag: para +#: performance.xml:10 +#, no-c-format +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"페칭 방도는 어플리케이션이 연관을 네비게이트할 필요가 있" +"을 때 Hibernate가 연관된 객체들을 검색하는데 사용하게 될 방도이다.페치 방도들" +"은 O/R 매핑 메타데이터 내에서 선언될 수 있거나 하나의 특정 HQL 또는 " +"Criteria 질의에 의해 오버라이드 될 수도 있다." + +#. Tag: para +#: performance.xml:17 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3는 다음 페칭 방도들을 정의한다:" + +#. Tag: para +#: performance.xml:23 +#, no-c-format +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"Join 페칭 - Hibernate는 OUTER JOIN을 " +"사용하여 연관된 인스턴스 또는 동일한 SELECT 내에서 콜렉션" +"을 검색한다." + +#. Tag: para +#: performance.xml:30 +#, no-c-format +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"Select 페칭 - 두 번째 SELECT는 연과" +"된 엔티티 또는 콜렉션을 검색하는데 사용된다. 당신이 lazy=\"false\"를 지정함으로써 명시적으로 lazy 페칭을 사용 불가능하게 하지 않는 한, " +"이 두 번째 select는 당신이 그 연관에 실제로 액세스할 때 오직 실행될 것이다." + +#. Tag: para +#: performance.xml:39 +#, no-c-format +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"Subselect 페칭 - 두 번째 SELECT는 이" +"전 질의 또는 페치에서 검색된 모든 엔티티들에 대해 연관된 콜렉션들을 검색하는" +"데 사용된다. 당신이 lazy=\"false\"를 지정하여 명시적으로 " +"lazy 페칭을 사용 불가능하게 하지 않는 한, 이 두 번째 select는 당신이 실제로 " +"그 연관에 접근할 때 오직 실행될 것이다." + +#. Tag: para +#: performance.xml:48 +#, no-c-format +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"Batch 페칭 - select 페칭을 위한 최적화 방도 - Hibernate" +"는 프라이머리 키들이나 foreign 키들의 리스트를 지정함으로써 하나의" +"SELECT 내에서 엔티티 인스턴스들이나 콜렉션들에 대한 batch" +"를 검색한다." + +#. Tag: para +#: performance.xml:57 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "Hibernate는 또한 다음 사이를 구별 짓는다:" + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"즉각적인 페칭 - 소유자가 로드될 때, 연관, 콜렉션 또는 속" +"성이 즉시 페치된다." + +#. Tag: para +#: performance.xml:69 +#, no-c-format +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"Lazy 콜렉션 페칭 - 어플리케이션이 그 콜렉션에 대해 하나" +"의 오퍼레이션을 호출할 때 콜렉션이 페치된다.(이것은 콜렉션들에 대해 디폴트이" +"다.)" + +#. Tag: para +#: performance.xml:76 +#, no-c-format +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"\"Extra-lazy\" 콜렉션 페칭 - 콜렉션의 개별 요소들은 필요" +"할 때 데이터베이스로부터 접근된다. Hibernate는 절대적으로 필요하지 않은 한 전" +"체 콜렉션을 메모리 내로 페치하려고 시도하지 않는다(매우 큰 콜렉션에 적합함)" + +#. Tag: para +#: performance.xml:84 +#, no-c-format +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"프락시 페칭 - 식별자 getter가 아닌 다른 메소드가 연관된 " +"객체에 대해 호출될 때 단일 값 연관이 페치된다." + +#. Tag: para +#: performance.xml:91 +#, no-c-format +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"\"No-proxy\" 페칭 - 인스턴스 변수가 접근될 때 단일 값 연" +"관이 페치된다. 프락시 페칭과 비교할 때, 이 접근법은 다소 덜 lazy하지만(그 연" +"관은 심지어 유일하게 식별자가 접근될 때에도 페치된다)보다 투명하다. 왜냐하면 " +"프락시는 어플리케이션에 가시적이지 않기 때문이다. 이 접근법은 빌드 시 바이트" +"코드 수단을 필요로 하며 드물게 필요하다." + +#. Tag: para +#: performance.xml:101 +#, no-c-format +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"Lazy 속성 페칭 - 인스턴스 변수가 접근될 때 속성 또는 단" +"일 값 연관이 페치된다 이 접근법은 빌드시 바이트코드 수단을 필요로 하며 드물" +"게 필요하다." + +#. Tag: para +#: performance.xml:110 +#, no-c-format +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"우리는 여기서 두 개의 직교하는 개념들을 갖는다: 연관이 페치될 , 그리고 그것이 페치되는 방법(사용되는 SQL). 그" +"것들을 혼동하지 말라! 우리는 퍼포먼스를 튜팅하는데 페치를 " +"사용한다. 우리는 특정 클래스의 어떤 detached 인스턴스 내에서 항상 이용 가능" +"한 데이터가 무엇인지에 대한 계약을 정의하는데 lazy를 사용" +"할 수 있다." + +#. Tag: title +#: performance.xml:119 +#, no-c-format +msgid "Working with lazy associations" +msgstr "lazy 연관들로 작업하기" + +#. Tag: para +#: performance.xml:121 +#, no-c-format +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"디폴트로 Hibernate3는 콜렉션들에 대해 lazy select 페칭을 사용하고, 단일 값 연" +"관들에 대해 lazy 프락시 페칭을 사용한다. 이들 디폴트들은 거의 모든 어플리케이" +"션들에서 거의 모든 연관들에 대해 유의미하다." + +#. Tag: para +#: performance.xml:127 +#, no-c-format +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"노트: 만일 당신이 hibernate." +"default_batch_fetch_size를 설정하는 경우, Hibernate는 lazy 페칭을 " +"위한 batch 페치 최적화를 사용할 것이다(이 최적화는 또한 더 많은 과립상의 레벨" +"에서 이용 가능할 수 있다)." + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"하지만, lazy 페칭은 당신이 알고 있어야 하는 한 가지 문제를 제기한다. 열려진 " +"Hibernate 세션 컨텍스트 외부에서 lazy 연관에 대한 접근은 예외상황으로 귀결될 " +"것이다. 예를 들면 :" + +#. Tag: programlisting +#: performance.xml:140 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:142 +#, no-c-format +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"Session이 닫혔을 때 permissions 콜렉션이 초기화 되지 않았" +"으므로, 그 콜렉션은 그것의 상태를 로드시킬 수가 없을 것이다. " +"Hibernate 는 detached 객체들에 대한 lazy 초기화를 지원하지 않는다." +" 정정은 콜렉션으로부터 읽어들이는 코드를 커밋 바로 직전으로 이동시" +"키는 것이다." + +#. Tag: para +#: performance.xml:150 +#, no-c-format +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"다른 방법으로 연관 매핑에 대해 lazy=\"false\"를 지정함으로" +"써, non-lazy 콜렉션 또는 non-lazy 연관을 사용할 수 있다. 하지만 lazy 초기화" +"는 거의 모든 콜렉션들과 연관들에 대해 사용되도록 고안되어 있다. 만일 당신이 " +"당신의 객체 모형 내에 너무 많은 non-lazy 연관들을 정의할 경우, Hibernate는 모" +"든 트랜잭션에서 전체 데이터베이스를 메모리 속으로 페치하는 필요성을 끝내게 " +"될 것이다!" + +#. Tag: para +#: performance.xml:159 +#, no-c-format +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"다른 한편으로, 우리는 특정 트랜잭션 내에서 select 페칭 대신에 (고유하게 non-" +"lazy인) join 페칭을 선택하기를 자주 원한다. 우리는 이제 페칭 방도를 맞춤화 시" +"키는 방법을 알게 될 것이다. Hibernate3에서, 페치 방도를 선택하는 메커니즘은 " +"단일 값 연관들과 콜렉션들에 대해 동일하다." + +#. Tag: title +#: performance.xml:170 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "페치 방도들을 튜닝하기" + +#. Tag: para +#: performance.xml:172 +#, no-c-format +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"select 페칭(디폴트)은 N+1 selects 문제점들에 매우 취약해서, 우리는 매핑 문서" +"에서 join 페칭을 사용 가능하게 하기를 원할 수도 있다:" + +#. Tag: programlisting +#: performance.xml:177 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:179 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:181 +#, no-c-format +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"매핑 문서 내에 정의된 fetch 방도는 다음에 영향을 준다:" + +#. Tag: para +#: performance.xml:187 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "get() 또는 load()를 통한 검색" + +#. Tag: para +#: performance.xml:192 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "연관이 네비게이트될 때 함축적으로 발생하는 검색" + +#. Tag: para +#: performance.xml:197 +#, no-c-format +msgid "Criteria queries" +msgstr "Criteria 질의들" + +#. Tag: para +#: performance.xml:202 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "subselect 페칭이 사용될 경우에 HQL 질의들" + +#. Tag: para +#: performance.xml:208 +#, no-c-format +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"당신이 사용하는 페칭 방도가 무엇인가에 상관없이, 정의된 비-lazy 그래프가 메모" +"리 내로 로드되는 것이 보장된다. 이것은 하나의 특별한 HQL 질의를 실행시키는데 " +"사용되는 몇몇 즉시적인 select들로 귀결될 수 있음을 노트하라." + +#. Tag: para +#: performance.xml:214 +#, no-c-format +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"대개, 우리는 페칭을 맞춤화 시키는데 매핑 문서를 사용하지 않는다. 대신에, 우리" +"는 디폴트 특징을 유지하고, HQL에서 left join fetch를 사용" +"하여, 특정 트랜잭션에 대해 그것을 오버라이드 시킨다. 이것은 outer join을 사용" +"하여 첫 번째 select에서 초기에 그 연관을 eagerly 페치시킬 것을 Hibernate에게 " +"알려준다. Criteria query API에서, 우리는 " +"setFetchMode(FetchMode.JOIN)을 사용한다." + +#. Tag: para +#: performance.xml:223 +#, no-c-format +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"만일 당신이 get() 또는 load()에 의해 사" +"용된 페칭 방도를 변경시킬 수 있기를 당신이 원한다고 느낄 경우, 단순하게 " +"Criteria 질의를 사용하라. 예를 들면:" + +#. Tag: programlisting +#: performance.xml:229 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:231 +#, no-c-format +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(이것은 몇몇 ORM 솔루션들이 \"페치 계획\"이라고 부르는 것에 대한 Hibernate의 " +"등가물이다.)" + +#. Tag: para +#: performance.xml:235 +#, no-c-format +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "" +"N+1 개의 select들을 가진 문제점들을 피하는 완전히 다른 방법은 second-level 캐" +"시를 사용하는 것이다." + +#. Tag: title +#: performance.xml:243 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "Single-ended 연관 프락시" + +#. Tag: para +#: performance.xml:245 +#, no-c-format +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"콜렉션들에 대한 Lazy 페칭은 영속 콜렉션들에 대한 Hibernate 자신의 구현을 사용" +"하여 구현된다. 하지만 다른 메커니즘은 single-ended 연관들에서 lazy 특징에 필" +"요하다. 연관의 대상 엔티티는 프락시 되어야 한다. Hibernate는 (훌륭한 CGLIB 라" +"이브러리를 통해) 런타임 바이트코드 증진을 사용하여 영속 객체들에 대한 lazy 초" +"기화 프락시들을 구현한다." + +#. Tag: para +#: performance.xml:253 +#, no-c-format +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"디폴트로, Hibernate3는 모든 영속 클래스들에 대해 (시작 시에) 프락시들을 생성" +"시키고 many-to-one 연관과 one-to-one 연" +"관에 대해 lazy 페칭을 이용 가능하게 하는데 그것들을 사용한다." + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"매핑 파일은 그 클래스에 대한 프락시 인터페이스로서 사용할, proxy 속성을 가진, 인터페이스를 선언할 수도 있다. 디폴트로 Hibernate는 그 " +"클래스의 서브클래스를 사용한다. 프락시된 클래스는 최소한의 패키지 " +"가시성 (visibility)을 가진 디폴트 생성자를 구현해야 함을 노트하라. 우리는 모" +"든 영속 클래스들에 대해 이 생성자를 권장한다!" + +#. Tag: para +#: performance.xml:266 +#, no-c-format +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "" +"다형성 클래스들에 대해 이 접근법을 확장할 때 의식해야 하는 몇몇 난처함들이 존" +"재한다. 예를 들면." + +#. Tag: programlisting +#: performance.xml:271 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:273 +#, no-c-format +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"첫 번째로, 심지어 기본 인스턴스가 DomesticCat의 인스턴스" +"인 경우조차도, Cat의 인스턴스들은 결코 " +"DomesticCat으로 타입캐스트가 가능하지 않을 것이다:" + +#. Tag: programlisting +#: performance.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:281 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "두번째로, 프락시 ==를 파기할 가능성이 있다." + +#. Tag: programlisting +#: performance.xml:285 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:287 +#, no-c-format +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"하지만, 그 경우는 보이는 만큼 그렇게 나쁘지는 않다. 심지어 우리가 이제 다른 " +"프락시 객체들에 대한 두 개의 참조를 가질지라도, 기본 인스턴스는 여전히 동일" +"한 객체들일 것이다:" + +#. Tag: programlisting +#: performance.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:294 +#, no-c-format +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "" +"세번째로, 당신은 final 클래스 또는 임의의 final 메소드들을 가진 클래스에 대해 CGLIB 프락시를 사용하지 않을 수 있다." + +#. Tag: para +#: performance.xml:299 +#, no-c-format +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"마지막으로, 만일 당신의 영속 객체가 초기화 시에 어떤 리소스들을 필요로 할 경" +"우(예를 들어, initializer들 또는 디폴트 생성자 내에서), 그때 그들 리소스들이 " +"또한 프락시에 의해 획득될 것이다. 프락시 클래스는 영속 클래스에 대한 실제 서" +"브클래스이다." + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"이들 문제점들은 모두 자바의 단일 상속 모형의 기본적인 제약 때문이다. 만일 당" +"신이 이들 문제점들을 피하고자 원할 경우 당신의 영속 클래스들은 각각 그것의 비" +"지니스 메소드들을 선언하는 인터페이스를 구현해야 한다. 당신은 매핑 파일 속에 " +"이들 인터페이스들을 지정해야 한다. 예를 들면." + +#. Tag: programlisting +#: performance.xml:311 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:313 +#, no-c-format +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"여기서 CatImplCat 인터페이스를 구현" +"하고 DomesticCatImplDomesticCat 인터" +"페이스를 구현한다. 그때 CatDomesticCat의 인스턴스들에 대한 프락시들은 load() 또는 " +"iterate()에 의해 반환될 수 있다. (list()가 대개 프락시들을 반환하지 않음을 노트하라.)" + +#. Tag: programlisting +#: performance.xml:321 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"관계들은 또한 lazy 초기화 된다. 이것은 당신이 임의의 프로퍼티들을 " +"CatImpl 타입이 아닌 Cat 타입으로 선언해" +"야 함을 의미한다." + +#. Tag: para +#: performance.xml:328 +#, no-c-format +msgid "" +"Certain operations do not require proxy initialization" +msgstr "" +"어떤 오퍼레이션들은 프락시 초기화를 필요로 하지 않는다" + +#. Tag: para +#: performance.xml:334 +#, no-c-format +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals(), 만일 영속 클래스가 equals()" +"를 오버라이드 시키지 않는 경우" + +#. Tag: para +#: performance.xml:340 +#, no-c-format +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode(), 만일 영속 클래스가hashCode()를 오버라이드 시키지 않는 경우" + +#. Tag: para +#: performance.xml:346 +#, no-c-format +msgid "The identifier getter method" +msgstr "식별자 getter 메소드" + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"Hibernate는 equals() 또는 hashCode()를 " +"오버라이드 시키는 영속 클래스들을 검출할 것이다." + +#. Tag: para +#: performance.xml:357 +#, no-c-format +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"디폴트 lazy=\"proxy\" 대신에 lazy=\"no-proxy\"를 선택하여, 우리는 타입캐스팅과 연관된 문제점들을 피할 수 있다. 하지" +"만 우리는 빌드 시 바이트코드 수단을 필요로 할 것이고, 모든 연산들은 즉각적인 " +"프락시 초기화로 귀결될 것이다." + +#. Tag: title +#: performance.xml:367 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "콜렉션들과 프락시들을 초기화 시키기" + +#. Tag: para +#: performance.xml:369 +#, no-c-format +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"만일 초기화 되지 않은 콜렉션이나 프락시가 Session 영역의 " +"외부에서 접근될 경우에, 예를 들어 콜렉션을 소유하거나 프락시에 대한 참조를 가" +"진 엔티티가 detached 상태에 있을 때, LazyInitializationException이 Hibernate에 의해 던져질 것이다." + +#. Tag: para +#: performance.xml:375 +#, no-c-format +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"때때로 우리는Session을 닫기 전에 프락시 또는 콜렉션이 초기" +"화 됨을 확실히 할 필요가 있다. 물론 우리는 예를 들어 cat.getSex() 또는 cat.getKittens().size()를 호출하여 항상 초기" +"화를 강제시킬 수 있다. 그러나 그것은 코드의 독자들에게는 혼동스럽고 일반적인 " +"코드로 편의적이지 않다." + +#. Tag: para +#: performance.xml:382 +#, no-c-format +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"static 메소드들 Hibernate.initialize()와 " +"Hibernate.isInitialized()는 lazy 초기화 된 콜렉션들이나 프" +"락시들에 대해 작업하는 편리한 방법을 어플리케이션에 제공한다. " +"Hibernate.initialize(cat)은 그것의 Session이 여전히 열려져 있는 한 프락시 cat의 초기화를 강" +"제할 것이다. Hibernate.initialize( cat.getKittens())는 " +"kittens의 콜렉션에 대해 유사한 효과를 갖는다." + +#. Tag: para +#: performance.xml:391 +#, no-c-format +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"또 다른 옵션은 모든 필요한 콜렉션들과 프락시들이 로드되기 전까지 " +"Session을 열린 채로 유지하는 것이다. 몇몇 어플리케이션 아" +"키텍처들, 특히 Hibernate를 사용하여 데이터에 접근하는 코드, 그리고 다른 어플" +"리케이션 계층들이나 다른 물리적 프로세스들 내에서 그것을 사용하는 코드에서, " +"그것은 콜렉션이 초기화 될 때 Session이 열려져 있음을 확실" +"히 하는 문제일 수 있다. 이 쟁점을 다루는 두 가지 기본 방법들이 존재한다:" + +#. Tag: para +#: performance.xml:402 +#, no-c-format +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"웹 기반 어플리케이션에서, 서블릿 필터는 뷰 렌더링이 완료되는, 사용자 요청의 " +"바로 끝에서만 Session을 닫는데 사용될 수 있다" +"(Open Session in View 패턴). 물론 이것은 당신의 어플리케" +"이션 인프라스트럭처의 예외상황 처리의 정정에 관한 무거운 요구를 부과한다. 뷰 " +"렌더링 동안에 하나의 예외상황이 발생할때에도 사용자에게 반환되기 전에 " +"Session이 닫혀지고 트랜잭션이 종료되는 것은 지극히 중요하" +"다. 이 \"Open Session in View\" 패턴에 관한 예제들은 Hibernate 위키를 보라." + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"별도의 비지니스 티어를 가진 어플리케이션에서, 비지니스 로직은 반환 전에 웹 티" +"어에 필요한 모든 콜렉션들을 \"준비\"해야 한다. 이것은 비지니스 티어가 모든 데" +"이터를 로드시키고 이미 초기화된 모든 데이터를 특정 쓰임새에 필요한 프리젠테이" +"션/웹 티어로 반환해야 함을 의미한다. 대개 어플리케이션은 웹 티어에 필요하게 " +"될 각각의 콜렉션에 대해 Hibernate.initialize()를 호출하거" +"나(이 호출은 세션이 닫히기 전에 발생해야 한다) 또는 FETCH " +"절을 갖거나 또는 Criteria 내에 FetchMode.JOIN을 가진 Hibernate 질의를 사용하여 콜렉션을 열심히 검색한다. 이것은 대" +"개 당신이 Session Facade 대신 Command 패턴을 채택할 경우에 더 쉽다." + +#. Tag: para +#: performance.xml:430 +#, no-c-format +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"당신은 또한 초기화 되지 않은 콜렉션들(또는 다른 프락시들)에 접근하기 전에 " +"merge() 또는 lock()으로 앞서 로드된 객" +"체를 새로운 Sessionn에 첨부할 수도 있다. 아니다. Hibernate" +"는 이것을 자동적으로 행하지 않고, 확실히 자동적으로 행하지 않을 것" +"이다. 왜냐하면 그것은 특별한 목적을 위한 트랜잭션 의미를 도입할 것" +"이기 때문이다!" + +#. Tag: para +#: performance.xml:440 +#, no-c-format +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"때때로 당신은 거대한 콜렉션을 초기화 시키는 것을 원하지 않지만, 여전히 (그것" +"의 사이즈와 같은) 그것에 대한 어떤 정보 또는 데이터의 부분집합을 필요로 한다." + +#. Tag: para +#: performance.xml:445 +#, no-c-format +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "" +"당신은 그것을 초기화 시키지 않고서 콜렉션의 사이즈를 얻는데 콜렉션 필터를 사" +"용할 수 있다:" + +#. Tag: programlisting +#: performance.xml:449 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:451 +#, no-c-format +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"createFilter() 메소드는 또한 전체 콜렉션을 초기화 시킬 필" +"요 없이 콜렉션의 부분집합들을 효율적으로 검색하는데 사용된다:" + +#. Tag: programlisting +#: performance.xml:456 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:461 +#, no-c-format +msgid "Using batch fetching" +msgstr "batch 페칭 사용하기" + +#. Tag: para +#: performance.xml:463 +#, no-c-format +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"Hibernate는 배치 페칭을 효율적으로 사용할 수 있다. 즉 하나의 프락시가 액세스 " +"될 경우에 Hibernate는 몇몇 초기화 되지 않은 프락시들을 로드시킬 수 있다(또는 " +"콜렉션들). batch 페칭은 lazy select 페칭 방도에 대한 최적화이다. 당신이 " +"batch 페칭을 튜닝시킬 수 있는 두 가지 방법들이 존재한다: 클래스 레벨에서 그리" +"고 콜렉션 레벨에서." + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"클래스들/엔티티들에 대한 batch 페칭은 이해하기가 더 쉽다. 당신이 실행 시에 다" +"음 상황에 처한다고 상상하라: 당신은 하나의 Session 속에 로" +"드된 25개의 Cat 인스턴스들을 갖고 있고, 각각의 " +"Cat은 그것의 소유자 즉, " +"Person에 대한 참조를 갖고 있다. Person " +"클래스는 프락시 lazy=\"true\"로서 매핑된다. 만일 당신이 이" +"제 모든 cat들을 통해 반복하고 각각의 cat에 대해 getOwner()" +"를 호출할 경우, Hibernate는 프락시된 소유자들을 검색하기 위해 25개의 " +"SELECT 문장들을 디폴트로 실행시킬 것이다. 당신은 " +"Person 매핑에서 batch-size를 지정함으로" +"써 이 동작을 튜닝시킬 수 있다:" + +#. Tag: programlisting +#: performance.xml:479 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:481 +#, no-c-format +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" +"Hibernate는 이제 세 개의 질의들 만을 실행시킬 것이고, 그 패턴은 10,10, 5 이" +"다." + +#. Tag: para +#: performance.xml:485 +#, no-c-format +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Sesssion, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"당신은 또한 콜렉션들에 대해 batch 페칭을 이용 가능하게 할 수도 있다. 예를 들" +"어, 만일 각각의 PersonCat들을 가진 " +"lazy 콜렉션을 갖고, 10개의 person들이 Sesssion 내에 현재 " +"로드되어 있을 경우, 모든 person들에 대한 반복은 10개의 SELECT들을 생성시킬 것이고, getCats()에 대한 매번의 호출" +"에 대해 하나의 SELECT를 생성시킬 것이다. 만일 당신이 " +"Person 매핑에서 cats 콜렉션에 대해 " +"batch 페칭을 사용가능하게 할 경우, Hibernate는 콜렉션들을 미리-페치 시킬 수 " +"있다:" + +#. Tag: programlisting +#: performance.xml:494 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:496 +#, no-c-format +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"batch-size 8로서, Hibernate는 4개의 SELECT들에서 3, 3, 3, " +"1 개의 콜렉션들을 로드시킬 것이다. 다시 그 속성의 값은 특정 " +"Session 내에서 초기화 되지 않은 콜렉션들의 예상되는 개수" +"에 의존한다." + +#. Tag: para +#: performance.xml:502 +#, no-c-format +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"만일 당신이 항목들의 포개진 트리를 가질 경우, 예를 들어 전형적인 bill-of-" +"materials 패턴인 경우, (비록 내포된 set 또는 " +"실체화된 경로(materialized path)가 주로-읽기-트리들에 대해 더 좋" +"은 옵션일 수 있을지라도) 콜렉션들에 대한 batch 페칭이 특히 유용하다." + +#. Tag: title +#: performance.xml:511 +#, no-c-format +msgid "Using subselect fetching" +msgstr "subselect 페칭 사용하기" + +#. Tag: para +#: performance.xml:513 +#, no-c-format +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"만일 한 개의 lazy 콜렉션이나 단일 값 프락시가 페치되어야 한다면, Hibernate는 " +"하나의 subselect 내에서 원래의 질의를 다시 실행하여 그것들 모두를 로드시킨" +"다. 이것은 조각난 로딩 없이 batch 페칭과 동일한 방식으로 동작한다." + +#. Tag: title +#: performance.xml:524 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "lazy 프로퍼티 페칭 사용하기" + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"Hibernate3은 개별적인 프로퍼티들에 대한 lazy 페칭을 지원한다. 이 최적화 기술" +"은 또한 fetch groups 으로 알려져 있다. 이것이 대개 마케" +"팅 특징임을 노트하길 바란다. 왜냐하면 실제로 행 읽기를 최적화 시키는 것이 컬" +"럼 읽기에 대한 최적화 보다 훨씬 더 중요하기 때문이다. 하지만 리거시 테이블들" +"이 수백 개의 컬럼들을 갖고 데이터 모형이 개선될 수 없을 때, 오직 클래스의 몇" +"몇 프로퍼티들을 로드시키는 것 만이 유용할 수도 있다." + +#. Tag: para +#: performance.xml:535 +#, no-c-format +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"lazy 프로퍼티 로딩을 이용가능하게 하려면, 당신의 특정 property 매핑들에 대해 " +"lazy 속성을 설정하라:" + +#. Tag: programlisting +#: performance.xml:540 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:542 +#, no-c-format +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"Lazy property 로딩은 빌드 시 바이트코드 수단을 필요로 한다! 만일 당신의 영속 " +"클래스들이 개선되지 않을 경우, Hibernate는 조용하게 lazy 프로퍼티 설정들을 무" +"시하고 즉각적인 페칭으로 후퇴할 것이다." + +#. Tag: para +#: performance.xml:548 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "bytecode 수단으로, 다음 Ant 태스크를 사용하라:" + +#. Tag: programlisting +#: performance.xml:552 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:554 +#, no-c-format +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a prefered solution." +msgstr "" +"불필요한 컬럼 읽기를 피하는 다른 (더 좋은?) 방법은 적어도 읽기 전용 트랜잭션" +"의 경우에 HQL 질의 또는 Criteria 질의의 투사(projection) 특징들을 사용하는 것" +"이다. 이것은 빌드 시 바이트코드 처리에 대한 필요성을 피하게 해주고 확실히 선" +"호되는 해결책이다." + +#. Tag: para +#: performance.xml:561 +#, no-c-format +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"당신은 HQL에서 fetch all properties를 사용하여 프로퍼티들" +"에 대한 통상의 eager 페칭을 강제시킬 수 있다." + +#. Tag: title +#: performance.xml:571 +#, no-c-format +msgid "The Second Level Cache" +msgstr "두번째 레벨 캐시" + +#. Tag: para +#: performance.xml:573 +#, no-c-format +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"Hibernate Session은 영속 데이터에 대한 트랜잭션 레벨 캐시" +"이다. class-by-class와 collection-by-collection 기반 위에 클러스터 또는 JVM-" +"레벨(SessionFactory-레벨) 캐시를 구성하는 것이 가능하다. " +"당신은 클러스터링 된 캐시 속에 플러그인 할 수도 있다. 주의하라. 캐시들은 (비" +"록 그것들이 캐시된 데이터를 정기적으로 만료되도록 구성되어 있을지라도) 또 다" +"른 어플리케이션에 의해 영속 저장소에 대해 행해진 변경들을 결코 알지 못한다." + +#. Tag: para +#: performance.xml:581 +#, no-c-format +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"디폴트로, Hibernate는 JVM-레벨의 캐싱에 EHCache를 사용한다. (JCS 지원은 이제 " +"진부하게 되었고 Hibernate의 장래 버전에서 제거될 것이다.) 당신은 " +"hibernate.cache.provider_class 프로퍼티를 사용하여 " +"org.hibernate.cache.CacheProvider를 구현하는 클래스의 이름" +"을 지정함으로써 다른 구현을 선택할 수도 있다. You have the option to tell " +"Hibernate which caching implementation to use by specifying the name of a " +"class that implements org.hibernate.cache.CacheProvider " +"using the property hibernate.cache.provider_class. " +"Hibernate comes bundled with a number of built-in integrations with open-" +"source cache providers (listed below); additionally, you could implement " +"your own and plug it in as outlined above. Note that versions prior to 3.2 " +"defaulted to use EhCache as the default cache provider; that is no longer " +"the case as of 3.2. 당신은 hibernate.cache.provider_class " +"프로퍼티를 사용하여 org.hibernate.cache.CacheProvider를 구" +"현하는 클래스의 이름을 지정함으로써 어느 캐싱 구현을 사용할 것인지를 " +"Hibernate에게 알려주는 옵션을 갖는다. Hibernate는 (아래에 열거된) 오픈-소스 " +"프로바이더들을 가진 많은 빌드되어 있는 통합들을 번들로 갖고 있다; 추가적으로 " +"당신은 위에서 언급했듯이 그것에 당신 자신의 것을 구현할 수 있고 그것에 플러" +"그 시킬 수 있다. 3.2 이번 버전들은 디플트 캐시 프로바이더로서 EhCache를 사용" +"하도록 디포릍로 내장되어 있음을 노트하라; 버전 3.2의 경우에 그것은 더이상 디" +"폴트 내장이 아니다." + +#. Tag: title +#: performance.xml:592 +#, no-c-format +msgid "Cache Providers" +msgstr "캐시 프로바이더들" + +#. Tag: entry +#: performance.xml:601 performance.xml:774 +#, no-c-format +msgid "Cache" +msgstr "캐시" + +#. Tag: entry +#: performance.xml:602 +#, no-c-format +msgid "Provider class" +msgstr "프로바이더 클래스" + +#. Tag: entry +#: performance.xml:603 +#, no-c-format +msgid "Type" +msgstr "타입" + +#. Tag: entry +#: performance.xml:604 +#, no-c-format +msgid "Cluster Safe" +msgstr "클러스터 안전" + +#. Tag: entry +#: performance.xml:605 +#, no-c-format +msgid "Query Cache Supported" +msgstr "질의 캐시 지원" + +#. Tag: entry +#: performance.xml:610 performance.xml:783 +#, fuzzy, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Hashtable (제품 용도로 고안되어 있지 않음)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Hashtable (제품용으로 고안되지 않음)" + +#. Tag: literal +#: performance.xml:611 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#. Tag: entry +#: performance.xml:612 +#, no-c-format +msgid "memory" +msgstr "memory" + +#. Tag: entry +#: performance.xml:614 performance.xml:621 performance.xml:628 +#: performance.xml:784 performance.xml:785 performance.xml:786 +#: performance.xml:791 performance.xml:792 performance.xml:793 +#: performance.xml:798 performance.xml:799 performance.xml:800 +#: performance.xml:805 performance.xml:806 performance.xml:812 +#: performance.xml:815 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:617 performance.xml:790 +#, no-c-format +msgid "EHCache" +msgstr "EHCache" + +#. Tag: literal +#: performance.xml:618 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:619 performance.xml:626 +#, no-c-format +msgid "memory, disk" +msgstr "memory, disk" + +#. Tag: entry +#: performance.xml:624 performance.xml:797 +#, no-c-format +msgid "OSCache" +msgstr "OSCache" + +#. Tag: literal +#: performance.xml:625 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#. Tag: entry +#: performance.xml:631 performance.xml:804 +#, no-c-format +msgid "SwarmCache" +msgstr "SwarmCache" + +#. Tag: literal +#: performance.xml:632 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#. Tag: entry +#: performance.xml:633 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "clustered (ip multicast)" + +#. Tag: entry +#: performance.xml:634 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "yes (clustered invalidation)" + +#. Tag: entry +#: performance.xml:638 performance.xml:811 +#, no-c-format +msgid "JBoss TreeCache" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:639 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#. Tag: entry +#: performance.xml:640 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "clustered (ip multicast), transactional" + +#. Tag: entry +#: performance.xml:641 +#, no-c-format +msgid "yes (replication)" +msgstr "yes (replication)" + +#. Tag: entry +#: performance.xml:642 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "yes (clock sync req.)" + +#. Tag: title +#: performance.xml:649 +#, no-c-format +msgid "Cache mappings" +msgstr "Cache 매핑들" + +#. Tag: para +#: performance.xml:651 +#, no-c-format +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "" +"클래스 또는 콜렉션 매핑의 <cache> 요소는 다음 형식" +"을 갖는다:" + +#. Tag: programlisting +#: performance.xml:662 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:665 +#, no-c-format +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage(필수) 캐싱 방도를 지정한다: transactional, read-write, nonstrict-read-write 또는 read-only" + +#. Tag: para +#: performance.xml:674 +#, no-c-format +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (옵션, 디폴트는 class 또는 콜렉션 role 이름) " +"second level 캐시 영역의 이름을 지정한다" + +#. Tag: para +#: performance.xml:681 +#, no-c-format +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (옵션, 디폴트는 all) " +"non-lazylazy=\"true\"로 매핑된 엔티" +"티의 프로퍼티들을 지정하며 속성-레벨 lazy 페칭이 이용 가능할 때 키시될 수 없" +"다" + +#. Tag: para +#: performance.xml:691 +#, no-c-format +msgid "" +"Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"다른 방법으로 (선호적으로?), 당신은 hibernate.cfg.xml 내" +"에 <class-cache><collection-cache>" +" 요소들을 지정할 수도 있다." + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"usage 속성은 캐시 동시성 방도를 지정" +"한다." + +#. Tag: title +#: performance.xml:703 +#, no-c-format +msgid "Strategy: read only" +msgstr "방도: 읽기 전용" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"당신의 어플리케이션이 영속 클래스의 인스턴스들을 읽어들일 필요가 있지만 결코 " +"변경할 필요가 없을 경우에 read-only 캐시가 사용될 수 있" +"다. 이것은 가장 간단한 최상의 퍼포먼스를 위한 방도이다. 그것은 클러스터 내 사" +"용에는 완벽하게 안전하다." + +#. Tag: programlisting +#: performance.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:717 +#, no-c-format +msgid "Strategy: read/write" +msgstr "방도: 읽기/쓰기" + +#. Tag: para +#: performance.xml:719 +#, no-c-format +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"어플리케이션이 데이터를 업데이트 할 필요가 있을 경우, read-write 캐시가 적절하다. 만일 직렬화 가능한(serializable) 트랜잭션 격리 레벨" +"이 필요한 경우에는 이 캐시 방도가 결코 사용되지 말아야 한다. 만일 캐시가 JTA " +"환경에서 사용될 경우, 당신은 JTA TransactionManager를 얻" +"는 방도를 명명하는 hibernate.transaction.manager_lookup_class 프로퍼티를 지정해야 한다. 다른 환경들에서, 당신은Session." +"close() 또는 Session.disconnect()가 호출될 때 트" +"랜잭션이 완료되는 것을 확실히 해야 한다. 만일 당신이 클러스터 내에 이 방도를 " +"사용하고자 원할 경우, 당신은 기본 캐시 구현이 잠금을 지원하도록 하는 것을 확" +"실히 해야 한다. 미리 만들어진 캐시 프로바이더들은 그렇게 행하지 않" +"는다." + +#. Tag: programlisting +#: performance.xml:730 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:735 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "방도: 엄격하지 않은 읽기/쓰기" + +#. Tag: para +#: performance.xml:737 +#, no-c-format +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"만일 어플리케이션이 오직 데이터를 자주 업데이트할 필요가 있고(예를 들어, 만" +"일 두 개의 트랜잭션들이 동시에 동일한 항목을 업데이트 하려고 시도하는 정말 있" +"음직하지 않은 경우) 그리고 엄격한 트랜잭션 격리가 필요하지 않은 경우, " +"nonstrict-read-write 캐시가 적절할 수 있다. 만일 그 캐시" +"가 JTA 환경에서 사용될 경우, 당신은 hibernate.transaction." +"manager_lookup_class를 지정해야 한다. 다른 환경들에서, 당신은 " +"Session.close() 또는 Session.disconnect()가 호출될 때 트랜잭션이 완료되도록 확실히 해야 한다." + +#. Tag: title +#: performance.xml:749 +#, no-c-format +msgid "Strategy: transactional" +msgstr "방도: transactional" + +#. Tag: para +#: performance.xml:751 +#, no-c-format +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"transactional 캐시 방도는 JBoss TreeCache와 같은 전체 트랜" +"잭션적인 캐시 프로바이더들에 대한 지원을 제공한다. 그런 캐시는 오직 JTA 환경 " +"내에서 사용될 수 있고 당신은 hibernate.transaction." +"manager_lookup_class를 지정해야 한다." + +#. Tag: para +#: performance.xml:759 +#, no-c-format +msgid "" +"None of the cache providers support all of the cache concurrency strategies. " +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"캐시 프로바이더들 중 어느 것도 모든 캐시 동시성 방도들을 지원하지 않는다. 다" +"음 테이블은 어느 프로바이더들이 어느 동시성 방도들과 호환되는지를 보여준다." + +#. Tag: title +#: performance.xml:765 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "캐시 동시성 방도 지원" + +#. Tag: entry +#: performance.xml:775 +#, no-c-format +msgid "read-only" +msgstr "읽기 전용" + +#. Tag: entry +#: performance.xml:776 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "엄격하지 않은 읽기-쓰기" + +#. Tag: entry +#: performance.xml:777 +#, no-c-format +msgid "read-write" +msgstr "읽기-쓰기" + +#. Tag: entry +#: performance.xml:778 +#, no-c-format +msgid "transactional" +msgstr "transactional" + +#. Tag: title +#: performance.xml:824 +#, no-c-format +msgid "Managing the caches" +msgstr "캐시들을 관리하기" + +#. Tag: para +#: performance.xml:826 +#, no-c-format +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"당신이 객체를 save(), update() 또는 " +"saveOrUpdate()에 전달할 때마다 그리고 당신이 load" +"(), get(), list(), " +"iterate() 또는 scroll()을 사용하여 객체" +"를 검색할 때마다, 그 객체는 Session의 내부 캐시에 추가된" +"다." + +#. Tag: para +#: performance.xml:833 +#, no-c-format +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"flush()가 차후적으로 호출될 때, 그 객체의 상태는 데이터베" +"이스와 동기화 될 것이다. 만일 당신이 이 동기화가 발생되는 것을 원하지 않거나 " +"만일 당신이 대량의 객체들을 처리 중이고 메모리를 효율적으로 관리할 필요가 있" +"을 경우, evict() 메소드는 first-level 캐시로부터 그 객체" +"와 그것의 콜렉션들을 제거하는데 사용될 수 있다." + +#. Tag: programlisting +#: performance.xml:841 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:843 +#, no-c-format +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"Session은 또한 인스턴스가 세션 캐시에 속하는지 여부를 결정" +"하는데 contains() 메소드를 제공한다." + +#. Tag: para +#: performance.xml:848 +#, no-c-format +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"세션 캐시로부터 모든 객체들을 완전하게 퇴거시키기 위해, Session." +"clear()를 호출하라." + +#. Tag: para +#: performance.xml:852 +#, no-c-format +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"second-level 캐시의 경우, 하나의 인스턴스, 전체 클래스, 콜렉션 인스턴스 또는 " +"전체 콜렉션 role의 캐시된 상태를 퇴거시키는 SessionFactory 상에 정의된 메소드들이 존재한다." + +#. Tag: programlisting +#: performance.xml:858 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:860 +#, no-c-format +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"CacheMode는 특정 세션이 second-level 캐시와 어떻게 상호작" +"용하는지를 제어한다" + +#. Tag: para +#: performance.xml:867 +#, no-c-format +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "" +"CacheMode.NORMAL - second-level 캐시로부터 아이템들을 읽어" +"들이고 second-level 캐시로 아이템들을 기록한다" + +#. Tag: para +#: performance.xml:872 +#, no-c-format +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - second-level 캐시로부터 아이템들을 읽어들" +"이지만, 데이터를 업데이트할 때를 제외하면 second-level 캐시로 기록하지 않는다" + +#. Tag: para +#: performance.xml:878 +#, no-c-format +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - 아이템들을 second-level 캐시에 기록하지" +"만, second-level 캐시로부터 읽어들이지 않는다" + +#. Tag: para +#: performance.xml:884 +#, no-c-format +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - 아이템들을 second-level 캐시로기록하지" +"만, second-level 캐시로부터 읽어들이지 않고, 데이터베이스로부터 읽어들인 모" +"든 아이템들에 대한 second-level 캐시의 갱신을 강제시켜, hibernate." +"cache.use_minimal_puts의 효과를 무시한다" + +#. Tag: para +#: performance.xml:892 +#, no-c-format +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"second-level 캐시 또는 질의 캐시 영역의 내용물을 브라우징하려면 " +"Statistics API를 사용하라:" + +#. Tag: programlisting +#: performance.xml:897 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:899 +#, no-c-format +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"당신은 통계를 이용 가능하게 하고, 선택적으로 Hibernate로 하여금 캐시 엔트리들" +"을 보다 인간에게 이해가능한 형식으로 유지시키도록 강제시키는 것이 필요할 것이" +"다:" + +#. Tag: programlisting +#: performance.xml:904 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:909 +#, no-c-format +msgid "The Query Cache" +msgstr "질의 캐시" + +#. Tag: para +#: performance.xml:911 +#, no-c-format +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"질의 결과 셋들이 또한 캐시될 수도 있다. 이것은 동일한 파라미터들을 가지고 자" +"주 실행되는 질의들에만 유용하다. 질의 캐시를 사용하기 위해 당신은 먼저 그것" +"을 이용 가능하도록 해야 한다:" + +#. Tag: programlisting +#: performance.xml:916 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:918 +#, no-c-format +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"이 설정은 두 개의 새로운 캐시 영역들 - 캐시된 질의 결과 셋들을 보관하는 것 " +"(org.hibernate.cache.StandardQueryCache), 질의 가능한 테이" +"블들에 대한 가장 최신 업데이트들에 대한 timestamp들을 보관하는 다른 것 " +"(org.hibernate.cache.UpdateTimestampsCache)-의 생성을 강제" +"한다 . 질의 캐시는 결과 셋 내에 실제 엔티티들의 상태를 캐시시키지 않음을 노트" +"하라; 그것은 오직 식별자 값들과 값 타입의 결과들 만을 캐시시킨다. 따라서 질" +"의 캐시는 항상 second-level 캐시와 함께 사용되어야 한다." + +#. Tag: para +#: performance.xml:928 +#, no-c-format +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"대부분의 질의들은 캐싱으로부터 이점이 없기에, 디폴트로 질의들은 캐시되지 않는" +"다. 캐싱을 이용 가능하도록 하려면, Query.setCacheable(true)를 호출하라. 이 호출은 기존 캐시 결과들을 찾는 것을 질의에게 허용해주" +"거나 질의가 실행될 때 그것의 결과들을 캐시에 추가하는 것을 허용해준다." + +#. Tag: para +#: performance.xml:935 +#, no-c-format +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"만일 당신이 질의 캐시 만료 정책들에 대한 세밀한 제어를 필요로 할 경우, 당신" +"은 Query.setCacheRegion()을 호출함으로써 특별한 질의에 대" +"해 명명되니 캐시 영역을 지정할 수도 있다." + +#. Tag: programlisting +#: performance.xml:941 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:943 +#, no-c-format +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"만일 질의가 그것의 질의 캐시 영역의 갱신을 강제시켜야 하는 경우에, 당신은 " +"Query.setCacheMode(CacheMode.REFRESH)를 호출해야 한다. 이" +"것은 기본 데이터가 별도의 프로세스를 통해 업데이트되었고(예를 들면, Hibernate" +"를 통해 변경되지 않았고) 특정 질의 결과 셋들을 선택적으로 갱신하는 것을 어플" +"리케이션에게 허용해주는 경우들에서 특별히 유용하다. 이것은 " +"SessionFactory.evictQueries()를 통해 질의 캐시 영역을 퇴거" +"시키는 보다 효과적인 대안이다." + +#. Tag: title +#: performance.xml:955 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "콜렉션 퍼포먼스 이해하기" + +#. Tag: para +#: performance.xml:957 +#, no-c-format +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"우리는이미 콜렉션들에 관해 얘기하는데 꽤 많은 시간을 소요했다. 이 절에서 우리" +"는 콜렉션들이 실행 시에 어떻게 행위하는지에 관한 한 쌍의 쟁점들을 조명할 것이" +"다." + +#. Tag: title +#: performance.xml:964 +#, no-c-format +msgid "Taxonomy" +msgstr "분류" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernate는 세 가지 기본적인 종류의 콜렉션들을 정의한다:" + +#. Tag: para +#: performance.xml:970 +#, no-c-format +msgid "collections of values" +msgstr "값들을 가진 콜렉션들" + +#. Tag: para +#: performance.xml:973 +#, no-c-format +msgid "one to many associations" +msgstr "one to many 연관들" + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "many to many associations" +msgstr "many to many 연관들" + +#. Tag: para +#: performance.xml:980 +#, no-c-format +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"이 분류는 여러 가지 테이블과 foreign key 관계들을 구별짓지만 우리가 관계형 모" +"형에 대해 알 필요가 있는 모든 것을 우리에게 말해주지 않는다. 관계형 구조와 퍼" +"포먼스 특징들을 완전하게 이해하기 위해, 우리는 또한 콜렉션 행들을 업데이트하" +"거나 삭제하기 위해 Hibernate에 의해 사용되는 프라이머리 키의 구조를 검토해야 " +"한다. 이것은 다음 분류를 제안한다:" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "indexed collections" +msgstr "인덱싱 된 콜렉션들" + +#. Tag: para +#: performance.xml:994 +#, no-c-format +msgid "sets" +msgstr "set들" + +#. Tag: para +#: performance.xml:997 +#, no-c-format +msgid "bags" +msgstr "bag들" + +#. Tag: para +#: performance.xml:1001 +#, no-c-format +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"모든 인덱싱된 콜렉션들(map들, list들, array들)은 <key><index> 컬럼들로 이루어진 프라이머리 키" +"를 갖는다. 이 경우에 콜렉션 업데이트들은 대개 극히 효율적이다 - Hibernate가 " +"그것을 업데이트나 삭제를 시도할 때 프라이머리 키는 효율적으로 인덱싱될 수 있" +"고 특정 행은 효율적으로 위치지워질 수 있다." + +#. Tag: para +#: performance.xml:1009 +#, no-c-format +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"Set들은 <key>와 요소 컬럼들로 구성된 프라이머리 키" +"를 갖는다. 이것은 몇몇 유형의 콜렉션 요소, 특히 composite 요소들 또는 대형 텍" +"스트 또는 바이너리 필드들에 대해 덜 효율적일 수 있다; 데이터베이스는 복잡한 " +"프라이머리 키를 효율적으로 인덱싱하는 것이 불가능할 수도 있다. 반면에 one to " +"many 또는 many to many 연관들의 경우, 특히 합성 식별자들의 경우에는 효율적일 " +"수 있을 것 같다.(부수-노트: 만일 당신이 당신을 위한 <set>의 프라이머리 키를 실제로 생성시키기 위해 SchemaExport를 원한다면 당신은 모든 컬럼들을 not-null=\"true\"" +"로 선언해야 한다.)" + +#. Tag: para +#: performance.xml:1020 +#, no-c-format +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"<idbag> 매핑들은 대용 키를 정의하여서, 그것들은 항" +"상 업데이트에 매우 효율적이다. 사실, 그것들은 최상의 경우이다." + +#. Tag: para +#: performance.xml:1025 +#, no-c-format +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"Bag들은 가장 나쁜 경우이다. 왜냐하면 하나의 bag은 중복 요소 값들을 허용하고 " +"인덱스 컬럼을 갖지 않기 때문에, 프라이머리 키가 정의될 수 없다. Hibernate는 " +"중복 행들 사이를 구분 짓는 방법을 갖고 있지 않다. Hibernate는 그것이 변경될 " +"때마다 (한 개의 DELETE로) 콜렉션을 완전하게 제거하고 다시 생성시킴으로써 이 " +"문제를 해결한다. 이것은 매우 비효율적이다." + +#. Tag: para +#: performance.xml:1033 +#, no-c-format +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"one-to-many 연관의 경우, \"프라이머리 키\"는 데이터베이스 테이블의 물리적인 " +"프라이머리 키가 아닐 수도 있지만- 이 경우에서도 위의 분류는 여전히 유용하다. " +"(그것은 여전히 Hibernate가 콜렉션의 개별 행들을 어떻게 \"위치지우는\"지를 반" +"영한다.)" + +#. Tag: title +#: performance.xml:1043 +#, no-c-format +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "List, map, idbag, set들은 update에 가장 효율적인 콜렉션들이다" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"위의 논의에서, 인덱싱된 콜렉션들과 (대개) set들이 요소들을 추가하고, 제거하" +"고 업데이트함에 있어 가장 효율적인 오퍼레이션을 허용해준다." + +#. Tag: para +#: performance.xml:1051 +#, no-c-format +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"아마 인덱싱 된 콜렉션들이 many to many 연관들을 위한 또는 값들을 가진 콜렉션" +"들을 위한 set들에 대해 갖고 있는 하나 이상의 장점들이 존재한다. " +"Set의 구조 때문에, Hibernate는 요소가 \"변경\"될 때 행을 " +"UPDATE 하지 않는다. Set에 대한 변경들" +"은 항상 (개별 행들에 대한) INSERTDELETE를 통해 동작한다. 다시 이 검토는 one to many 연관들에 적용되지 않는" +"다." + +#. Tag: para +#: performance.xml:1060 +#, no-c-format +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"배열들이 lazy 될 수 없음을 관찰 한 후에, 우리는 list들, map들, 그리고 idbag들" +"이 단독이 아닌 set들을 가진 가장 퍼포먼스가 좋은(non-inverse) 콜렉션 타입들임" +"을 결론 지을 것이다. Set들은 Hibernate 어플리케이션들에서 가장 공통된 종류의 " +"콜렉션이 될 것이라 예상된다. 이것은 \"set\" 의미가 관계형 모형에서 가장 고유" +"한 것이기 때문이다." + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"하지만, 잘 설계된 Hibernate 도메인 모형들에서, 우리는 대개 대부분의 콜렉션들" +"이 사실 inverse=\"true\"를 가진 one-to-many 연관들임을 보" +"게 된다. 이들 연관들의 경우, 업데이트는 연관의 many-to-one 엔드에 의해 처리되" +"고, 따라서 콜렉션 업데이트 퍼포먼스에 대한 검토들은 단순히 적용되지 않는다." + +#. Tag: title +#: performance.xml:1078 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "Bag들과 list들은 가장 효율적인 inverse 콜렉션들이다" + +#. Tag: para +#: performance.xml:1080 +#, no-c-format +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"단지 당신이 영원히 bag들을 버리기 전에, bag들(과 또한 list들)이 set들보다 훨" +"씬 더 성능이 좋은 특별한 경우들이 존재한다. inverse=\"true\"를 가진 콜렉션들(예를 들어, 표준 양방향 one-to-many 관계 특질)의 경" +"우, 우리는 bag 요소들을 초기화(페치) 시킬 필요 없이 bag 또는 list에 요소들을 " +"추가시킬 수 있다! 이것은 Collection.add() 또는 " +"Collection.addAll()이 (Set과는 달리) 항" +"상 bag 또는 List에 대해 true를 반환해야하기 때문이다. 이것" +"은 훨씬 다음 공통적인 코드를 더 빠르게 만들 수 있다." + +#. Tag: programlisting +#: performance.xml:1090 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:1095 +#, no-c-format +msgid "One shot delete" +msgstr "원 샷 delete" + +#. Tag: para +#: performance.xml:1097 +#, no-c-format +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"종종 콜렉션 요소들을 하나씩 삭제하는 것은 극히 비효율적일 수 있다! Hibernate" +"는 완전하게 바보가 아니어서, 그것은 새로운 공백의 콜렉션의 경우(예를 들어 당" +"신이 list.clear()를 호출했을 경우)에 그것을 행하지 않을 것" +"임을 알고 있다. 이 경우에, Hibernate는 하나의 DELETE 명령" +"을 내릴 것이고 우리는 모두 행했다!" + +#. Tag: para +#: performance.xml:1104 +#, no-c-format +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"우리가 길이 20인 하나의 콜렉션에 한 개의 요소를 추가하고 그런 다음 두 개의 요" +"소들을 제거한다고 가정하자. Hibernate는 (콜렉션이 bag가 아닌 한) 한 개의 " +"INSERT 문장과 두 개의 DELETE 문장을 명" +"령 내릴 것이다. 이것은 확실히 마음에 든다." + +#. Tag: para +#: performance.xml:1110 +#, no-c-format +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"하지만, 우리가 두 개의 요소들을 남겨둔채 18 개의 요소들을 제거하고 나서 세 개" +"의 새로운 요소들을 추가한다고 가정하자. 두 가지 가능한 처리 방법들이 존재한" +"다." + +#. Tag: para +#: performance.xml:1117 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "하나씩 열 여덟 개의 행들을 삭제한 다음에 세 개의 행들을 삽입시킨다" + +#. Tag: para +#: performance.xml:1120 +#, no-c-format +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "" +"(한 개의 SQL DELETE로)전체 콜렉션을 삭제하고 모든 다섯개" +"의 현재 요소들을 (하나씩) insert 시킨다" + +#. Tag: para +#: performance.xml:1125 +#, no-c-format +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernate는 두 번째 옵션이 아마 이 경우에 더 빠르다는 점을 알 만큼 충분히 영" +"리하지 않다.(그리고 Hibernate가 그렇게 영리해지는 것을 희망 하는 것은 가능하" +"지 않을 것이다; 그런 특징은 데이터베이스 트리거들 등을 혼동스럽게 할 수도 있" +"다.)" + +#. Tag: para +#: performance.xml:1131 +#, no-c-format +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"다행히, 당신은 원래의 콜렉션을 폐기시키고(예를 들어 참조 해제하고) 모든 현재 " +"요소들을 가진 새로이 초기화된 콜렉션을 반환함으로써 아무때든지 이 특징을 강제" +"시킬 수 있다. 이것은 시간이 흐름에 따라 매우 유용하고 강력해질 수 있다." + +#. Tag: para +#: performance.xml:1137 +#, no-c-format +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"물론 단 한번의 삭제(one-shot-delete)는 inverse=\"true\"로 " +"매핑된 콜렉션들에 적용되지 않는다." + +#. Tag: title +#: performance.xml:1146 +#, no-c-format +msgid "Monitoring performance" +msgstr "퍼포먼스 모니터링하기" + +#. Tag: para +#: performance.xml:1148 +#, no-c-format +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"최적화는 퍼포먼스 관련 숫자들에 대한 모니터링과 접근 없이는 많이 사용되지 않" +"는다. Hibernate는 그것의 내부적인 오퍼레이션들에 대한 전체 영역의 특징들을 제" +"공한다. Hibernate에서 Statistics는 SessionFactory에 대해 " +"이용 가능하다." + +#. Tag: title +#: performance.xml:1155 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "SessionFactory 모니터링 하기" + +#. Tag: para +#: performance.xml:1157 +#, no-c-format +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"당신은 두 가지 방법들로 SessionFactory metrics에 접근할 " +"수 있다. 당신의 첫 번째 옵션은 sessionFactory.getStatistics()를 호출하고 당신 스스로 Statistics를 읽거나 디스플" +"레이 하는 것이다." + +#. Tag: para +#: performance.xml:1163 +#, no-c-format +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"만일 당신이 StatisticsService MBean을 이용 가능하도록 할 " +"경우 Hibernate는 또한 metrics를 발표하는데 JMX를 사용할 수 있다. 당신은 모든 " +"당신의SessionFactory에 대해 한 개의 MBean 또는 팩토리 당 " +"한 개를 이용 가능하게 할 수 있다. 최소한의 구성 예제들은 다음 코드를 보라:" + +#. Tag: programlisting +#: performance.xml:1170 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1173 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1175 +#, no-c-format +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"TODO: 이것은 의미가 없다: 첫번째 경우에, 우리는 직접 MBean을 검색하고 사용한" +"다. 두 번째 경우에 우리는 JNDI 이름을 사용하기 전에 세션 팩토리가 보관하고 있" +"는 JNDI 이름을 부여해야 한다. hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")을 사용하라." + +#. Tag: para +#: performance.xml:1180 +#, no-c-format +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"당신은 SessionFactory에 대한 모니터링을 (비)활성화 시킬 " +"수 있다" + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"구성 시 : hibernate.generate_statistics, 디폴트는 " +"false" + +#. Tag: para +#: performance.xml:1192 +#, no-c-format +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"실행 시 : sf.getStatistics().setStatisticsEnabled(true) 또" +"는 hibernateStatsBean.setStatisticsEnabled(true)" + +#. Tag: para +#: performance.xml:1199 +#, no-c-format +msgid "" +"Statistics can be reset programatically using the clear() " +"method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"Statistics(통계량들)은 clear() 메소드를 사용하여 프로그래" +"밍 방식으로 재설정 될 수 있다. 요약은 logSummary() 메소드" +"를 사용하여 logger(info 레벨)에게 전송될 수 있다." + +#. Tag: title +#: performance.xml:1208 +#, no-c-format +msgid "Metrics" +msgstr "Metrics" + +#. Tag: para +#: performance.xml:1210 +#, no-c-format +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"Hibernate는 매우 기본적인 것에서부터 어떤 시나리오들에만 관련된 전문 정보에 " +"이르는 많은 metrics를 제공한다. 모든 이용 가능한 카운터들은 " +"Statistics interface API에서 3개의 카테고리로 설명되어 있" +"다:" + +#. Tag: para +#: performance.xml:1217 +#, no-c-format +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"열려진 세션들의 개수, 검색된 JDBC 커넥션들의 개수 등과 같은 일반적인 " +"Session 사용에 관련된 metrics." + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "" +"전체적으로 엔티티들, 콜렉션들, 질의들, 그리고 캐시들에 관련된 metrics(전역 " +"metrics로 알려져 있음)," + +#. Tag: para +#: performance.xml:1229 +#, no-c-format +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "특정한 엔티티, 콜렉션, 질의 또는 캐시 영역에 관련된 상세 metrics." + +#. Tag: para +#: performance.xml:1236 +#, no-c-format +msgid "" +"For exampl,e you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"예를 들어 당신은 엔티티, 콜렉션, 질의들의 캐시 성공율 및 실패율, put(역자 " +"주, 캐시 시도, putt) 비율, 콜렉션들과 질의들, 그리고 평균 질의 요구 시간 등" +"을 찾을 수 있다. 수 밀리초들가 자바에서 근사치에 종속됨을 의식하라. Hibernate" +"는 JVM 정밀도에 묶여 있고, 몇몇 플랫폼들에서 이것은 심지어 약 10초가 될 수도 " +"있다." + +#. Tag: para +#: performance.xml:1243 +#, no-c-format +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"간단한 getter들은 (예를 들어 특정 엔티티, 콜렉션, 캐시 영역에 묶이지 않은) 전" +"역 metrics에 접근하는데 사용된다. 당신은 그것(특정 엔티티, 콜렉션, 또는 캐시 " +"영역)의 이름을 통해, 그리고 질의들에 대한 그것의 HQL 또는 SQL 표현을 통해 특" +"정 엔티티, 콜렉션, 또는 캐시 영역의 metrics에 접근할수 있다. 추가 정보는 " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, 그리고 " +"QueryStatistics를 참조하라. 다음 코드는 간단한 예제를 보여" +"준다:" + +#. Tag: programlisting +#: performance.xml:1253 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1255 +#, no-c-format +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"모든 엔티티들, 콜렉션들, 콜렉션들,질의들 그리고 영역 캐시들에 대해 작업하기 " +"위해, 당신은 다음 메소드들로서 엔티티들, 콜렉션들, 질의들, 그리고 영역 캐시들" +"에 대한 이름들의 목록을 검색할 수 있다: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), 그리고 getSecondLevelCacheRegionNames()." + +#, fuzzy +#~ msgid "yes" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "yes\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "yes\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "yes\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "예" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/persistent_classes.po b/documentation/envers/src/main/docbook/ko-KR/content/persistent_classes.po new file mode 100644 index 0000000000..e30441f876 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/persistent_classes.po @@ -0,0 +1,857 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:5 +#, no-c-format +msgid "Persistent Classes" +msgstr "영속 클래스들" + +#. Tag: para +#: persistent_classes.xml:7 +#, no-c-format +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"영속 클래스들은 비지니스 문제의 엔티티들(예를 들어 E-Commerce 어플리케이션에" +"서 고객이나 주문)을 구현하는 어플리케이션 내의 클래스들이다. 영속 클래스들의 " +"인스턴스들은 영속 상태에 있는 것으로 전혀 간주되지 않는다 - 대신에 하나의 인" +"스턴스는 transient 또는 detached 상태일 수 있다." + +#. Tag: para +#: persistent_classes.xml:14 +#, no-c-format +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"Hibernate는 이들 클래스들이 Plain Old Java Object (POJO) 프로그래밍 모형으로" +"서 알려진, 몇몇 간단한 규칙들을 따를 경우에 가장 잘 동작한다. 하지만 이들 규" +"칙들 중 어떤 것도 어려운 사양들이 아니다. 진정 Hibernate3는 당신의 영속 객체" +"들의 특징에 대해 매우 적은 것을 가정한다. 당신은 다른 방법들로 도메인 모형을 " +"표현할 수 있다 : 예를 들어 Map 인스턴스의 트리들을 사용하" +"기." + +#. Tag: title +#: persistent_classes.xml:23 +#, no-c-format +msgid "A simple POJO example" +msgstr "간단한 POJO 예제" + +#. Tag: para +#: persistent_classes.xml:25 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "" +"대부분의 자바 어플리케이션들은 고양이과들을 표현하는 영속 클래스를 필요로 한" +"다." + +#. Tag: programlisting +#: persistent_classes.xml:29 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "준수할 네 개의 주요 규칙들이 다음에 있다:" + +#. Tag: title +#: persistent_classes.xml:37 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "아규먼트 없는 생성자를 구현하라" + +#. Tag: para +#: persistent_classes.xml:39 +#, no-c-format +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat은 아규먼트 없는 생성자를 갖는다. 모든 영속 클래스들은 " +"Hibernate는 Constructor.newInstance()를 사용하여 그것들을 " +"초기화 시킬 수 있도록 디폴트 생성자 (public이 아닐 수 있다)를 가져야 한다. 우" +"리는 Hibernate 내에서 런타임 프락시 생성을 위한 최소한의 패키지 가시성(visibility)를 가진 디폴트 생성자를 가질 것을 강력하게 권장한" +"다." + +#. Tag: title +#: persistent_classes.xml:49 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "identifier 프로퍼티를 제공하라(옵션)" + +#. Tag: para +#: persistent_classes.xml:51 +#, no-c-format +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Catid로 명명된 하나의 프로퍼티를 갖" +"는다. 이 프로퍼티는 데이터베이스 테이블의 프라이머리 키 컬럼으로 매핑된다. " +"이 프로퍼티는 어떤 것으로 명명될 수도 있고, 그것의 타입은 임의의 원시 타입, " +"원시 \"wrapper\" 타입, java.lang.String 또는 " +"java.util.Date일 수 있다. (만일 당신의 리거시 데이터베이" +"스 테이블이 composite 키들을 갖고 있다면, 당신은 이들 타입들을 가진 사용자 정" +"의 클래스를 사용할 수도 있다 - 나중에 composite 식별자들에 대한 절을 보라)" + +#. Tag: para +#: persistent_classes.xml:60 +#, no-c-format +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"identifier 프로퍼티는 엄격하게 옵션이다. 당신은 그것을 생략할 수도 있고, " +"Hibernate로 하여금 내부적으로 객체 식별자들을 추적하도록 할 수 있다. 하지만 " +"우리는 이것을 권장하지 않는다." + +#. Tag: para +#: persistent_classes.xml:65 +#, no-c-format +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "" +"사실, 어떤 기능은 identifier 프로퍼티를 선언하는 클래스들에 대해서만 이용 가" +"능하다:" + +#. Tag: para +#: persistent_classes.xml:72 +#, fuzzy, no-c-format +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"detached 객체들에 대한 Transitive reattachment(cascade update 또는 cascade " +"merge) - " + +#. Tag: literal +#: persistent_classes.xml:79 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#. Tag: literal +#: persistent_classes.xml:84 +#, no-c-format +msgid "Session.merge()" +msgstr "Session.merge()" + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"우리는 당신이 영속 클래스들에 대해 일관되게 명명된 identifier 프로퍼티들을 선" +"언할 것을 권장한다. 게다가 우리는 당신이 nullable 타입(예를 들어 non-" +"primitive)을 사용할 것을 권장한다." + +#. Tag: title +#: persistent_classes.xml:96 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "final이 아닌 클래스들을 선호하라(옵션)" + +#. Tag: para +#: persistent_classes.xml:97 +#, no-c-format +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"Hibernate의 중심 특징인, 프락시(proxies)들은 final이 아" +"닌 영속 클래스들 또는 모두 public 메소드들로 선언된 인터페이스의 구현인 영속 " +"클래스들에 의존한다." + +#. Tag: para +#: persistent_classes.xml:102 +#, no-c-format +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"당신은 Hibernate로 인터페이스를 구현하지 않은 final 클래스" +"들을 영속화 시킬 수 있지만 당신은 lazy 연관 페칭(lazy association fetching)" +"에 대해 프락시들을 사용할 수 없을 것이다 -그것은 퍼포먼스 튜닝을 위한 당신의 " +"옵션들을 제한시킬 것이다." + +#. Tag: para +#: persistent_classes.xml:107 +#, no-c-format +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"당신은 또한 non-final 클래스들 상에 public final 메소드들" +"을 선언하는 것을 피해야 한다. 만일 당신이 public final 메" +"소드를 가진 클래스를 사용하고자 원할 경우, 당신은 lazy=\"false\"를 설정함으로써 명시적으로 프락싱을 사용 불가능하도록 해야 한다." + +#. Tag: title +#: persistent_classes.xml:115 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "영속 필드들을 위한 accessor들과 mutator들을 선언하라(옵션)" + +#. Tag: para +#: persistent_classes.xml:117 +#, no-c-format +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat은 그것의 모든 영속 필드들에 대해 accessor 메소드들을 " +"선언한다. 많은 다른 ORM 도구들은 인스턴스 변수들을 직접 영속화 시킨다. 우리" +"는 관계형 스키마와 클래스의 내부적인 데이터 구조들 사이에 간접적인 수단을 제" +"공하는 것이 더 좋다고 믿고 있다. 디폴트로 Hibernate는 자바빈즈 스타일 프로퍼" +"티들을 영속화 시키고, getFoo, isFoo와 " +"setFoo 형식의 메소드 이름들을 인지한다. 당신은 진정으로 특" +"정 프로퍼티에 대한 직접적인 필드 접근으로 전환할 수도 있다." + +#. Tag: para +#: persistent_classes.xml:127 +#, no-c-format +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"프로퍼티들은 public으로 선언될 필요가 없다 - Hibernate" +"는 디폴트로 protected get/set 쌍 또는 private get/set 쌍을 가진 프로퍼티를 영속화 시킬 수 있다." + +#. Tag: title +#: persistent_classes.xml:138 +#, no-c-format +msgid "Implementing inheritance" +msgstr "상속 구현하기" + +#. Tag: para +#: persistent_classes.xml:140 +#, no-c-format +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"서브클래스는 또한 첫 번째 규칙들과 두 번째 규칙들을 주시해야 한다. 그것은 슈" +"퍼클래스 Cat으로부터 그것의 identifier 프로퍼티를 상속받는" +"다." + +#. Tag: programlisting +#: persistent_classes.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:149 +#, no-c-format +msgid "" +"Implementing equals() and hashCode()" +msgstr "equals()hashCode() 구현하기" + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"만일 당신이 다음의 경우라면, 당신은 equals()와 " +"hashCode() 메소드들을 오버라이드 시켜야 한다." + +#. Tag: para +#: persistent_classes.xml:157 +#, no-c-format +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"하나의 Set 속에 영속 클래스들의 인스턴스들을 집어넣고자 의" +"도하고 (many-valued 연관들에 대해 권장되는 방법) 그리고" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "detached 인스턴스들의 reattachment(재첨부)를 사용하고자 의도하는" + +#. Tag: para +#: persistent_classes.xml:170 +#, no-c-format +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernate는 특정 session 범위 내에서만 persistent identity(데이터베이스 행)" +"과 Java identity의 같음을 보장한다. 따라서 우리가 다른 세션들에서 검색된 인스" +"턴스들을 혼합시키자마자, 우리가 Set들에 대해 유의미하게 만" +"들고자 원할 경우, 우리는 equals()hashCode()를 구현해야 한다." + +#. Tag: para +#: persistent_classes.xml:178 +#, no-c-format +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"가장 명백한 방법은 두 객체들의 identifier 값을 비교함으로써 equals()" +"/hashCode()를 구현하는 것이다. 만일 그 값이 동일" +"하다면, 둘다 동일한 데이터베이스 행이어야 하고, 그러므로 그것들은 같다(둘다 " +"하나의 Set에 추가되는 경우에, 우리는 Set 속에서 하나의 요소만을 갖게 될 것이다). 불행하게도, 우리는 생성되는 " +"식별자들을 갖는 그 접근법을 사용할 수 없다! Hibernate는 오직 식별자 값들을 영" +"속화 되는 객체들에 할당할 것이고, 새로이 생성된 인스턴스는 임의의 identifier " +"값을 갖지 않을 것이다! 만일 인스턴스가 저장되지 않고 현재 하나의 " +"Set 속에 있을 경우에, 그것을 저장하는것은 하나의 식별자 값" +"을 그 객체에게 할당할 것이다. 만일 equals()와 " +"hashCode()가 그 식별자 값에 기초할 경우, hash 코드는 " +"Set의 계약을 파기하여 변경될 것이다. 이 문제에 대한 전체 " +"논의에 대해서는 Hibernate 웹 사이트를 보라. 이것은 Hibernate 쟁점이 아닌, 객" +"체 identity와 equality에 관한 통상의 자바 의미론임을 노트하라." + +#. Tag: para +#: persistent_classes.xml:192 +#, no-c-format +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"우리는 Business key equality를 사용하여 equals" +"()hashCode()를 구현할 것 권장한다. Business " +"key equality는 equals() 메소드가 비지니스 키, 즉 실세계에" +"서 우리의 인스턴스를 식별하게 될 키(natural 후보 키)를 " +"형성하는 프로퍼티들만을 비교한다는 점을 의미한다 :" + +#. Tag: programlisting +#: persistent_classes.xml:200 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"하나의 비지니스 키는 데이터베이스 프라이머리 키 후보 만큼 견고하지 않아야 한" +"다(를 보라). 대개 변경할 수 " +"없는 프로퍼티 또는 유일한(unique) 프로퍼티는 대개 비지니스 키에 대한 좋은 후" +"보들이다." + +#. Tag: title +#: persistent_classes.xml:212 +#, no-c-format +msgid "Dynamic models" +msgstr "동적인 모형들" + +#. Tag: emphasis +#: persistent_classes.xml:215 +#, no-c-format +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "" +"다음 특징들은 현재 실험적으로 고려되고 있으며 장래에는 변경될 수 있음을 노트" +"하라." + +#. Tag: para +#: persistent_classes.xml:219 +#, no-c-format +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"영속 엔티티들은 반드시 실행시에 POJO 클래스들로 또는 자바빈즈 객체들로 표현되" +"어야할 필요는 없다. Hibernate는 또한 (실행 시에 Map들을 가" +"진 Map들을 사용하여) 동적인 모형들을 지원하고 DOM4J 트리들" +"로서 엔티티들에 대한 표현을 지원한다. 이 접근법으로, 당신은 영속 클래스들을 " +"작성하지 않고, 오직 매핑 파일들 만을 작성한다." + +#. Tag: para +#: persistent_classes.xml:227 +#, no-c-format +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"디폴트로, Hibernate는 통산의 POJO 모드로 동작한다. 당신은 " +"default_entity_mode 구성 옵션을 사용하여 특별한 " +"SessionFactory에 대해 디폴트 엔티티 표현 모드를 설정할 수 " +"있다 (을 보라)." + +#. Tag: para +#: persistent_classes.xml:234 +#, no-c-format +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"다음 예제들은Map들을 사용하는 표현을 설명한다. 먼저 매핑 " +"파일에서, entity-name은 클래스 이름 대신에(또는 클래스 이" +"름에 덧붙여) 선언되어야 한다:" + +#. Tag: programlisting +#: persistent_classes.xml:240 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:242 +#, no-c-format +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"심지어 비록 연관들이 대상(target) 클래스 이름들을 사용하여 선언될지라도, 연관" +"들의 대상(target) 타입은 또한 POJO가 아닌 동적인 엔티티일 수 있음을 노트하라." + +#. Tag: para +#: persistent_classes.xml:249 +#, no-c-format +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"SessionFactory에 대한 디폴트 엔티티 모드를 " +"dynamic-map으로 설정한 후에, 우리는 Map" +"들을 가진 Map들에 대해 실행 시에 작업할 수 있다:" + +#. Tag: programlisting +#: persistent_classes.xml:255 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:257 +#, no-c-format +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"dynamic 매핑의 장점들은 엔티티 클래스 구현에 대한 필요 없이도 프로토타이핑을 " +"위한 빠른 전환 시간이다. 하지만 당신은 컴파일 시 타입 체킹을 잃고 실행 시에 " +"많은 예외상황들을 다루게 될 것이다. Hibernate 매핑 덕분에, 나중에 고유한 도메" +"인 모형 구현을 상단에 추가하는 것이 허용되어서, 데이터베이스 스키마가 쉽게 정" +"규화 되고 소리가 울려 퍼질 수 있다." + +#. Tag: para +#: persistent_classes.xml:265 +#, no-c-format +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "" +"엔티티 표현 모드들은 또한 하나의 단위 Session 기준에 대해 " +"설정될 수 있다:" + +#. Tag: programlisting +#: persistent_classes.xml:270 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"EntityMode를 사용하는 getSession()에 대" +"한 호출은 SessionFactory가 아닌, Session API에 대한 것임을 노트하길 바란다. 그 방법으로, 새로운 " +"Session은 기본 JDBC 커넥션, 트랜잭션, 그리고 다른 컨텍스" +"트 정보를 공유한다. 이것은 당신이 두 번째 Session 상에서 " +"flush()close()를 호출하지 말아야 하" +"고, 또한 트랜잭션 및 커넥션 핸들링을 주된 작업 단위에게 맡긴다는 점을 의미한" +"다." + +#. Tag: para +#: persistent_classes.xml:283 +#, no-c-format +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "" +"XML 표현 가용성들에 대한 추가 정보는 에서 찾을 수 있" +"다." + +#. Tag: title +#: persistent_classes.xml:291 +#, no-c-format +msgid "Tuplizers" +msgstr "Tuplizer들" + +#. Tag: para +#: persistent_classes.xml:293 +#, no-c-format +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer, 그리고 그것의 서브-인터페이" +"스들은 데이터의 조각에 대한 특별한 표현의 org.hibernate.EntityMode가 주어지면 그 표현을 관리하는 책임이 있다. 만일 주어진 데이터 조각" +"이 하나의 데이터 구조로 간주될 경우, 그때 하나의 tuplizer는 그런 데이터 구조" +"를 생성시키는 방법과 그런 데이터 구조로부터 값들을 추출시키는 방법 그리고 그" +"런 데이터구조 속으로 값들을 삽입시키는 방법을 알고 있는 것이다. 예를 들어, " +"POJO 엔티티 모드의 경우, 대응하는 tuplizer는 그것의 생성자를 통해 POJO를 생성" +"시키는 방법, 그리고 정의된 프로퍼티 접근자들을 사용하여 POJO 프로퍼티들에 접" +"근하는 방법을 안다. org.hibernate.tuple.entity.EntityTuplizer 인터페이스와 org.hibernate.tuple.component." +"ComponentTuplizer 인터페이스에 의해 표현되는 두 가지 고급 유형의 " +"Tuplizer들이 존재한다. EntityTuplizer들은 엔티티들에 관해" +"서는 위에 언급된 계약들을 매핑할 책임이 있는 반면에, " +"ComponentTuplizer들은 컴포넌트들에 대해서도 동일한 것을 행" +"한다." + +#. Tag: para +#: persistent_classes.xml:308 +#, no-c-format +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"사용자들은 또한 그들 자신의 tuplizer들을 플러그 시킬 수 있다. 아마 당신은 " +"dynamic-map entity-mode 동안에 사용되는 java.util.HashMap " +"대신에 하나의 java.util.Map 구현을 필요로 한다; 또는 아마 " +"당신은 디폴트로 사용되는 방도 보다는 하나의 다른 다른 프릭시 산출 방도를 필요" +"로 한다. 둘다 하나의 맞춤형 tuplizer를 정의함으로써 성취될 것이다. Tuplizer" +"들 정의들은 그것들이 관리할 수단인 엔티티 매핑 또는 컴포넌트 매핑에 첨부된" +"다. 우리의 고객 엔티티에 대한 예제로 되돌아가면:" + +#. Tag: programlisting +#: persistent_classes.xml:317 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:322 +#, no-c-format +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "" +"TODO: property 패키지와 proxy 패키지 내에 user-extension 프레임웍을 문서화 " +"할 것." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/preface.po b/documentation/envers/src/main/docbook/ko-KR/content/preface.po new file mode 100644 index 0000000000..8b667fcc23 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/preface.po @@ -0,0 +1,195 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:21 +#, no-c-format +msgid "Preface" +msgstr "머리말" + +#. Tag: para +#: preface.xml:23 +#, no-c-format +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"객체 지향 소프트웨어와 관계형 데이터베이스로 작업하는 것은 오늘날의 엔터프라" +"이즈 환경들에서 성가시고 시간이 소비될 수 있다. Hibernate는 자바 환경들을 위" +"한 객체/관계형 매핑 도구이다. object/relational mapping(ORM) 용어는 객체 모형" +"으로부터 SQL-기반의 스키마를 가진 관계형 데이터 모형으로의 데이터 표상을 매핑" +"하는 기술을 언급한다." + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"Hibernate는 자바 클래스들로부터 데이터베이스로의 매핑(그리고 자바 데이터 타입" +"들로부터 SQL 데이터 타입들로의 매핑)을 처리할 뿐만 아니라, 또한 데이터 질의" +"와 검색 편의들을 제공하며, SQL과 JDBC로 수작업 데이터 핸들링에 소요되는 개발 " +"시간을 현저하게 단축시켜줄 수 있다." + +#. Tag: para +#: preface.xml:38 +#, no-c-format +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"Hibernate의 목적은 공통된 데이터 영속화 관련 프로그래밍 작업들의 95%를 덜어주" +"는 것이다. Hibernate는 데이터베이스에서 비지니스 로직을 구현하는데 내장 프로" +"시저들을 전용으로 사용하는 데이터 중심적 어플리케이션에 대한 최상의 솔루션이 " +"아닐 수도 있지만, 그것은 자바 기반 미들-티어에서 객체 지향 도메인 모형들과 비" +"지니스 로직에 가장 유용하다. 하지만 Hibernate는 벤더 지정적인 SQL 코드를 제거" +"하거나 캡슐화 시키는 당신을 확실히 도와줄 수 있고 테이블 형식의 표현으로부터 " +"객체들의 그래프로 결과 셋을 변환하는 공통된 태스크를 도와줄 것이다." + +#. Tag: para +#: preface.xml:48 +#, no-c-format +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"만일 당신이 Hibernate와 Object/Relational 매핑 또는 심지어 자바에 초심자라" +"면, 다음 단계들을 따르기 바란다:" + +#. Tag: para +#: preface.xml:55 +#, no-c-format +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +"더 많은 단계적인 사용 설명서들을 가진 더 긴 튜토리얼은 을 읽어라. 튜토리얼을 위한 소스 코드는 doc/reference/" +"tutorial/ 디렉토리에 포함되어 있다." + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "" +"Hibernate가 사용될 수 있는 환경을 이해려면 " +"를 읽어라." + +#. Tag: para +#: preface.xml:69 +#, no-c-format +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"Hibernate 배포본 내의 eg/ 디렉토리를 살펴 보라. 이 디렉토" +"리는 간단한 스탠드얼론 어플리케이션을 포함하고 있다. 당신의 JDBC 드라이버를 " +"lib/ 디렉토리에 복사하고 당신의 데이터베이스에 맞는 정확" +"한 값을 지정하여 etc/hibernate.properties 를 편집하라. 배" +"보본 디렉토리에서 명령 라인 프롬프트에서 (Ant를 사용하여) ant eg 를 타이핑 하거나 , Windows 하에서 build eg 를 타" +"이프 하라." + +#. Tag: para +#: preface.xml:80 +#, no-c-format +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "" +"당신의 주된 정보의 소스로서 이 참조 문서를 사용하라. 만일 어플리케이션 설계" +"에 대해 더 많은 도움을 필요로 하거나 당신이 단계적인 튜토리얼을 선호한다면 " +"Java Persistence with Hibernate (http://www.manning.com/" +"bauer2)을 읽는 것을 고려하라.또한 http://caveatemptor.hibernate.org에 방문하" +"여 Java Persistence with Hibernate용 예제 어플리케이션을 다운로드 하라." + +#. Tag: para +#: preface.xml:90 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "FAQ들은 Hibernate 웹 사이트 상에 답변되어 있다." + +#. Tag: para +#: preface.xml:95 +#, no-c-format +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "" +"제 3의 데모들, 예제들, 그리고 튜토리얼들은 Hibernate 웹 사이트 상에 링크되어 " +"있다." + +#. Tag: para +#: preface.xml:101 +#, no-c-format +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"Hibernate 웹사이트 상의 공동체 영역은 설계 패턴과 다양한 통합 솔루션들" +"(Tomcat, JBoss AS, Struts, EJB 등.)에 관한 좋은 리소스이다." + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"질문이 있다면, Hibernate 상에 링크되어 있는 사용자 포럼을 사용하라. 우리는 또" +"한 버그 보고와 특징 요청들을 위한 JIRA 쟁점 추적 시스템을 제공한다. 당신이 " +"Hibernate의 개발에 관심이 있다면, 개발자 메일링 리스트에 참여하라. 만일 당신" +"이 이 문서를 당신의 언어로 번역하는 것에 관심이 있다면, 개발자 메일링 리스트" +"에 접촉하라." + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"Hibernate를 위한 상용 개발 지원, 제품 지원, 그리고 교육은 JBoss Inc를 통해 이" +"용 가능하다 (http://www.hibernate.org/SupportTraining/를 보라). Hibernate는 " +"JBoss Professional Open Source product 프로젝트이고 제품들에 대한 JBoss " +"Enterprise Middleware System (JEMS) suite의 중대한 컴포넌트이다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/query_criteria.po b/documentation/envers/src/main/docbook/ko-KR/content/query_criteria.po new file mode 100644 index 0000000000..880c623069 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/query_criteria.po @@ -0,0 +1,776 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:5 +#, no-c-format +msgid "Criteria Queries" +msgstr "Criteria 질의들" + +#. Tag: para +#: query_criteria.xml:7 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "Hibernate는 직관적인, 확장 가능한 criteria query API를 특징 짓는다." + +#. Tag: title +#: query_criteria.xml:12 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "Criteria 인스턴스 생성하기" + +#. Tag: para +#: query_criteria.xml:14 +#, no-c-format +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"org.hibernate.Criteria인터페이스는 특정 영속 클래스에 대" +"한 질의를 표현한다. SessionCriteria " +"인스턴스들에 대한 팩토리이다." + +#. Tag: programlisting +#: query_criteria.xml:20 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:25 +#, no-c-format +msgid "Narrowing the result set" +msgstr "결과 셋 제한하기" + +#. Tag: para +#: query_criteria.xml:27 +#, no-c-format +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"개별적인 질의 기준은 org.hibernate.criterion.Criterion 인" +"터페이스의 인스턴스이다. org.hibernate.criterion.Restrictions 클래스는 어떤 미리 만들어진 Criterion 타입들을 얻" +"는 팩토리 메소드들을 정의한다." + +#. Tag: programlisting +#: query_criteria.xml:35 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:37 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "제한들은 논리적으로 그룹지워질 수도 있다." + +#. Tag: programlisting +#: query_criteria.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:43 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:45 +#, no-c-format +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"미리 만들어진 criterion 타입들(Restrictions 서브클래스들)" +"의 영역이 꽤 존재하지만, 특히 유용한 것은 당신으로 하여금 SQL을 직접 지정하도" +"록 해준다." + +#. Tag: programlisting +#: query_criteria.xml:50 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:52 +#, no-c-format +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "" +"질의된 엔티티의 행 alias에 의해 대체된 {alias} " +"placeholder." + +#. Tag: para +#: query_criteria.xml:57 +#, no-c-format +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"criterion을 얻는 대안적인 접근법은 Property 인스턴스로부" +"터 그것을 얻는 것이다. 당신은 Property.forName()을 호출하" +"여 Property를 생성시킬 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:63 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:68 +#, no-c-format +msgid "Ordering the results" +msgstr "결과들을 순서지우기(ordering)" + +#. Tag: para +#: query_criteria.xml:70 +#, no-c-format +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"당신은 org.hibernate.criterion.Order를 사용하여 결과들을 " +"순서(ordering)지울 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:76 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:81 +#, no-c-format +msgid "Associations" +msgstr "연관들" + +#. Tag: para +#: query_criteria.xml:83 +#, no-c-format +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"당신은 createCriteria()를 사용하여 연관들을 네비게이트함으" +"로써 관계된 엔티티들에 대한 컨스트레인트들을 쉽게 지정할 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:88 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:90 +#, no-c-format +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"두 번째 createCriteria()Criteria의 " +"새로운 인스턴스를 반환하며, 그것은 kittens 콜렉션의 요소들" +"을 참조한다는 점을 노트하라." + +#. Tag: para +#: query_criteria.xml:96 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "다음 대체 형식은 어떤 환경들에서 유용하다." + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:102 +#, no-c-format +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias()Criteria의 새로운 인스" +"턴스를 생성시키지 않는다.)" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"앞의 두 개의 질의들에 의해 반환된 Cat 인스턴스들에 의해 보" +"관된 kittens 콜렉션들은 criteria에 의해 사전-필터링되지 않는다는 점을 노트하라! 만일 당신이 criteria(기준)과 일치하는 고양이 새끼" +"들을 단지 검색하고자 원할 경우, 당신은 하나의 ResultTransformer를 사용해야 한다." + +#. Tag: programlisting +#: query_criteria.xml:114 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:119 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "동적인 연관 페칭" + +#. Tag: para +#: query_criteria.xml:121 +#, no-c-format +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"당신은 setFetchMode()를 사용하여 실행 시에 연관 페칭 의미" +"를 지정할 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:128 +#, no-c-format +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"이 질의는 outer 조인으로 matekittens 모두를 페치할 것이다. 추가 정보는 을 보라." + +#. Tag: title +#: query_criteria.xml:136 +#, no-c-format +msgid "Example queries" +msgstr "예제 질의들" + +#. Tag: para +#: query_criteria.xml:138 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"org.hibernate.criterion.Example 클래스는 주어진 인스턴스로" +"부터 질의 기준(criterion)을 구조화 시키는 것을 당신에게 허용해준다." + +#. Tag: programlisting +#: query_criteria.xml:143 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "" +"버전 프로퍼티들, 식별자들, 연관관계들이 무시된다. 디폴트로 null 값 프로퍼티들" +"이 제외된다." + +#. Tag: para +#: query_criteria.xml:150 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "당신은 Example이 적용되는 방법을 조정할 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:154 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:156 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "" +"당신은 연관된 객체들에 대한 criteria(기준)을 위치지우는데 examples를 사용할 " +"수 있다." + +#. Tag: programlisting +#: query_criteria.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:165 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "Projections, aggregation 그리고 grouping" + +#. Tag: para +#: query_criteria.xml:166 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"org.hibernate.criterion.Projections 클래스는 " +"Projection 인스턴스들에 대한 팩토리이다. 우리는 " +"setProjection()을 호출하여 하나의 질의에 projection(투사," +"투영)을 적용시킨다." + +#. Tag: programlisting +#: query_criteria.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:176 +#, no-c-format +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"criteria 질의 내에서는 명시적인 \"group by\"가 필수적이지 않다. 어떤 " +"projection 타입들은 grouping projections들이게끔 정의되" +"고, 그것은 또한 SQL group by 절 속에 나타난다." + +#. Tag: para +#: query_criteria.xml:182 +#, no-c-format +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"alias는 선택적으로 projection에 할당될 수 있어서, 투사된(projected) 값은 제한" +"(restriction)들 또는 ordering들 내에서 참조될 수 있다. 다음은 이것을 행하는 " +"두 개의 다른 방법들이다:" + +#. Tag: programlisting +#: query_criteria.xml:188 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:190 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:192 +#, no-c-format +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"alias() 메소드와 as() 메소드는 또 다른 " +"alias 된 Projection의 인스턴스 내에 하나의 projection 인스" +"턴스를 간단하게 포장한다. 지름길로서, 당신이 projection을 projection 리스트" +"에 추가할 때 당신은 alias를 할당할 수 있다:" + +#. Tag: programlisting +#: query_criteria.xml:199 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:203 +#, no-c-format +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "" +"당신은 또한 projection들을 표현하는데 Property.forName()" +"을 사용할 수 있다:" + +#. Tag: programlisting +#: query_criteria.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:209 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:214 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "Detached 질의들과 서브질의들" + +#. Tag: para +#: query_criteria.xml:215 +#, no-c-format +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"DetachedCriteria 클래스는 당신에게 세션 영역의 외부에서 질" +"의를 생성시키도록 하고, 그런 다음 나중에 어떤 임의의 Session을 사용하여 그것을 실행하도록 한다." + +#. Tag: programlisting +#: query_criteria.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:222 +#, no-c-format +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"DetachedCriteria는 또한 서브질의를 표현하는데 사용된다. 서" +"브질의들을 포함하는 Criterion 인스턴스들은 Subqueries 또" +"는 Property를 통해 얻어질 수 있다." + +#. Tag: programlisting +#: query_criteria.xml:228 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:230 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:232 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "심지어 상관관계 지워진 서브질의들이 가능하다:" + +#. Tag: programlisting +#: query_criteria.xml:236 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:245 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "natural 식별자에 의한 질의들" + +#. Tag: para +#: query_criteria.xml:247 +#, no-c-format +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"대부분의 질의들에서, criteria 질의들을 포함하여, 질의 캐시는 매우 효율적이지 " +"않다. 왜냐하면 질의 캐시 비유효성이 너무 자주 발생하기 때문이다. 하지만, 우리" +"가 캐시 비유효성 알고리즘을 최적화 시킬 수 있는 한 가지 특별한 종류의 질의가 " +"존재한다: 상수 natural 키에 의한 룩업. 몇몇 어플리케이션들에서, 이런 종류의 " +"질의가 자주 발생한다. criteria API는 이 쓰임새를 위한 특별한 설비를 제공한다." + +#. Tag: para +#: query_criteria.xml:255 +#, no-c-format +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"첫번째로 당신은 <natural-id>를 사용하여 당신의 엔티" +"티에 대한 natural 키를 매핑 시켜야 하고, second-level 캐시 사용을 가능하게 해" +"야 한다." + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:262 +#, no-c-format +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "" +"이 기능은 가변성 있는 natural 키들을 가진 엔티티들의 용" +"도로 고안되어 있지 않음을 노트하라." + +#. Tag: para +#: query_criteria.xml:267 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "다음으로 , Hibernate 질의 캐시를 사용 가능하도록 하라." + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"이제 Restrictions.naturalId()는 캐시 알고리즘을 보다 효율" +"적으로 사용할 수 있도록 우리에게 허용해준다." + +#. Tag: programlisting +#: query_criteria.xml:276 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/query_hql.po b/documentation/envers/src/main/docbook/ko-KR/content/query_hql.po new file mode 100644 index 0000000000..e699041b96 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/query_hql.po @@ -0,0 +1,2431 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:5 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: 하이버네이트 질의 언어(Hibernate Query Language)" + +#. Tag: para +#: query_hql.xml:7 +#, no-c-format +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"Hibernate는 (아주 의도적으로) SQL과 매우 흡사하게 보이는 극히 강력한 질의 언" +"어를 구비하고 있다. 그러나 그 구문에 의해 우롱당하지 말라; HQL은 상속, 다형" +"성 그리고 연관과 같은 개념들을 이해하여서, 전체적으로 객체 지향적이다." + +#. Tag: title +#: query_hql.xml:14 +#, no-c-format +msgid "Case Sensitivity" +msgstr "대소문자 구분" + +#. Tag: para +#: query_hql.xml:16 +#, no-c-format +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"질의들은 Java 클래스들과 프로퍼티들의 이름들을 제외하면 대소문자를 구분하지 " +"않는다. 따라서 SeLeCTSELECT와 같고 " +"SELECT와도 같지만 org.hibernate.eg.FOO" +"는 org.hibernate.eg.Foo과 같지 않고 foo.barSetfoo.BARSET과 같지 않다." + +#. Tag: para +#: query_hql.xml:27 +#, no-c-format +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"이 매뉴얼은 소문자 HQL 키워드를 사용한다. 몇몇 사용자들은 보다 나은 가독성을 " +"위해 대문자 키워드들을 가진 질의들을 찾지만, 우리는 자바 코드 속에 삽입될 때 " +"이 컨벤션이 추하다는 점을 발견한다." + +#. Tag: title +#: query_hql.xml:35 +#, no-c-format +msgid "The from clause" +msgstr "from 절" + +#. Tag: para +#: query_hql.xml:37 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "가장 간단한 가능한 Hibernate 질의는 다음 형식이다:" + +#. Tag: programlisting +#: query_hql.xml:41 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:43 +#, no-c-format +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"이것은 eg.Cat 클래스의 모든 인스턴스들을 간단하게 반환한" +"다. 우리는 대개 클래스 이름을 수식할 필요가 없다. 왜냐하면, auto-" +"import가 디폴트이기 때문이다. 따라서 우리는 대개 항상 단지 다음과 " +"같이 작성한다:" + +#. Tag: programlisting +#: query_hql.xml:49 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"대개 당신은 한 개의 alias를 할당할 필요가 있을 것이다. " +"왜냐하면 당신은 질의의 다른 부분들에서 Cat을 참조하고자 원" +"할 것이기 때문이다." + +#. Tag: programlisting +#: query_hql.xml:57 query_hql.xml:372 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:59 +#, no-c-format +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"이 질의는 alias catCat 인스턴스들에 " +"할당하여서, 우리는 나중에 질의 속에서 그 alias를 사용할 수 있을 것이다. " +"as 키워드는 옵션이다; 우리는 또한 다음과 같이 작성할 수 있" +"다:" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "" +"여러 개의 클래스들은 cartesian product(카티젼 곱) 또는 \"크로스\" 조인으로 귀" +"결되어 나타날 수도 있다." + +#. Tag: programlisting +#: query_hql.xml:71 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:72 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:74 +#, no-c-format +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"로컬 변수들에 대한 Java 네이밍 표준들과 일치되게, 첫 소문자를 사용하여 질의 " +"alias들을 명명하는 것은 좋은 습관으로 간주된다 (예를 들면 " +"domesticCat)." + +#. Tag: title +#: query_hql.xml:83 +#, no-c-format +msgid "Associations and joins" +msgstr "연관들과 조인들" + +#. Tag: para +#: query_hql.xml:85 +#, no-c-format +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"우리는 또한 join을 사용하여 , 연관된 엔티티들에 또는 값들" +"을 가진 콜렉션의 요소들에도 alias들을 할당할 수도 있다." + +#. Tag: programlisting +#: query_hql.xml:90 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:92 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:94 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:96 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "지원되는 join 타입들은 ANSI SQL로부터 빌려왔다" + +#. Tag: literal +#: query_hql.xml:103 +#, no-c-format +msgid "inner join" +msgstr "inner join" + +#. Tag: literal +#: query_hql.xml:108 +#, no-c-format +msgid "left outer join" +msgstr "left outer join" + +#. Tag: literal +#: query_hql.xml:113 +#, no-c-format +msgid "right outer join" +msgstr "right outer join" + +#. Tag: para +#: query_hql.xml:117 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "full join (대개 유용하지 않음)" + +#. Tag: para +#: query_hql.xml:123 +#, no-c-format +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"inner join, left outer join, 그리고 " +"right outer join 구조체들이 약칭될 수 있다." + +#. Tag: programlisting +#: query_hql.xml:128 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:130 +#, no-c-format +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "" +"당신은 HQL with 키워드를 사용하여 특별한 조인 조건들을 제" +"공할 수 있다." + +#. Tag: programlisting +#: query_hql.xml:135 +#, no-c-format +msgid "" +" 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:137 +#, no-c-format +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"게다가, \"fetch\" join은 값들을 가진 콜렉션들이나 연관관계들이 한 개의 select" +"를 사용하여, 그것들의 부모 객체들에 따라 초기화 되는 것을 허용해준다. 이것은 " +"콜렉션의 경우에 특히 유용하다. 그것은 연관관계들과 콜렉션들에 대한 매핑 파일" +"의 outer join과 lazy 선언들을 효율적으로 오버라이드 시킨다. 추가 정보는 " +"을 보라." + +#. Tag: programlisting +#: query_hql.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"fetch join은 대개 alias를 할당할 필요가 없다. 왜냐하면, 연관된 객체들이 " +"where 절(또는 어떤 다른 절) 속에 사용되지 않을 것이기 때문" +"이다. 또한 연관된 객체들은 질의 결과들 속에 직접 반환되지 않는다. 대신 그것들" +"은 부모 객체를 통해 접근될 수 있다. 우리가 alias를 필요로 할 수 있는 유일한 " +"이유는 더 많은 콜렉션들을 재귀적으로 조인 페칭시키는 경우이다:" + +#. Tag: programlisting +#: query_hql.xml:155 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:157 +#, no-c-format +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"(비록 scroll()이 사용될 수 있을지라도) fetch 구조체는 iterate()를 사용하여 호출되는 질의들 내" +"에 사용될 수 없음을 노트하라. 이들 오퍼레이션들이 결과 행들에 기초하고 있기 " +"때문에 fetchsetMaxResults() 또는 " +"setFirstResult()과 함께 사용되지 말아야 하며, 그것들(결과 " +"행들)은 대개 각각의 eager 콜렉션 페칭에 대해 중복들을 포함하므로 많은 행들이 " +"당신이 기대하는 것이 아니다. fetch는 특별한 용도의 " +"with 조건과도 함께 사용될 수 없다.한 개의 질의 내에 하나 " +"이상의 콜렉션을 조인 페칭시켜 카티젼 곱을 생성시키는 것이 가능한데, 이 경우" +"에 주의하라. 다중 콜렉션 role들을 조인 페칭시키는 것은 또한 때때로 bag 매핑들" +"에 대해 예기치 않은 결과들을 가져다주기 때문에, 당신이 이 경우에 당신의 질의" +"들을 처방하는 방법에 대해 주의하라. 마지막으로 full join fetchright join fetch는 의미가 없다." + +#. Tag: para +#: query_hql.xml:172 +#, no-c-format +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"만일 당신이 (바이트코드 방편으로) property-레벨 lazy 페칭을 사용할 경우, " +"Hibernate로 하여금 fetch all properties를 사용하여 (첫 번" +"째 질의에서) lazy 프로퍼티들을 즉시 페치하도록 강제시키는 것이 가능하다." + +#. Tag: programlisting +#: query_hql.xml:178 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:184 +#, no-c-format +msgid "Forms of join syntax" +msgstr "join 구문의 형식들" + +#. Tag: para +#: query_hql.xml:186 +#, no-c-format +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"HQL은 두 가지 형식의 연관 조인을 지원한다: 암묵적 그리고 " +"명시적." + +#. Tag: para +#: query_hql.xml:190 +#, no-c-format +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"앞의 절에서 보여진 질의들은 모두 join 키워드가 from 절 내에 명시적으로 사용되" +"는 명시적인 형식을 사용한다. 이것은 권장되는 형식이다." + +#. Tag: para +#: query_hql.xml:195 +#, no-c-format +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"함축적인 형식은 join 키워드를 사용하지 않는다. 대신에, 연" +"관들은 dot(.) 표기를 사용하여 \"dot-참조된다(dereferenced)\". 함축적" +"인 조인들은 임의의 HQL 절들내에 나타날 수 있다. 함축적인 join은 결과되는 SQL 문장에서 inner join으로 귀결된다." + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:206 +#, no-c-format +msgid "Refering to identifier property" +msgstr "식별자 속성 참조하기" + +#. Tag: para +#: query_hql.xml:208 +#, no-c-format +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"개략적으로 말하자면, 엔티티의 식별자 속성을 참조하는 2가지 방법들이 존재한다:" + +#. Tag: para +#: query_hql.xml:213 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"엔티티가 id로 명명된 비식별자 속성을 정의하지 않는다고 가정하면 특별한 속성(소문자) id가 엔티티의 식별자 속성을 " +"참조하는데 사용될 수 있다." + +#. Tag: para +#: query_hql.xml:220 +#, no-c-format +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"만일 그 엔티티가 명명된 식별자 속성을 정의하는 경우, 당신은 그 속성 이름을 사" +"용할 수도 있다." + +#. Tag: para +#: query_hql.xml:226 +#, no-c-format +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"composite 식별자 속성들에 대한 참조들은 동일한 네이밍 규칙들을 따른다. 만일 " +"그 엔티티가 id로 명명된 비식별자를 갖고 있을 경우, composite 속성은 오직 그것" +"의 정의된 명명에 의해 참조될 수 있다; 그밖의 경우 특별한 id 속성이 식별자 속성을 참조하는데 사용될 수 있다." + +#. Tag: para +#: query_hql.xml:233 +#, fuzzy, no-c-format +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"노트: 이것은 버전 3.2.2에서 시작될 때 현격하게 변경되었다. 이전 버전들에서, " +"id항상 그것의 실제 이름에 관계없" +"이 식별자 속성을 참조했다. 그 결정의 분기점은 id로 명명된 " +"비식별자 속성들이 Hibernate 질의들 내에서 결코 참조될 수 없었다는 점이었다." + +#. Tag: title +#: query_hql.xml:242 +#, no-c-format +msgid "The select clause" +msgstr "select 절" + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"select 절은 질의 결과 셋 속에 반환할 객체들과 프로퍼티들" +"이 어느 것인지를 골라 내도록 강제한다. 다음을 검토하자:" + +#. Tag: programlisting +#: query_hql.xml:249 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:251 +#, no-c-format +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"질의는 다른 Cat들의 mate들을 select 할 " +"것이다. 실제로 당신은 이 질의들을 다음과 같이 보다 축약형으로 표현할수도 있" +"다:" + +#. Tag: programlisting +#: query_hql.xml:256 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:258 +#, no-c-format +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"질의들은 컴포넌트 타입의 프로퍼티들을 포함하는 임의의 값 타입의 프로퍼티들을 " +"반환할 수도 있다:" + +#. Tag: programlisting +#: query_hql.xml:262 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:264 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:266 +#, no-c-format +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"Family 클래스가 적당한 생성자를 갖고 있음을 가정하면, 질의" +"들은 여러 객체들 그리고/또는 프로퍼티들을 Object[] 타입의 " +"배열로서," + +#. Tag: programlisting +#: query_hql.xml:271 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:273 +#, no-c-format +msgid "or as a List," +msgstr "또는 List로서," + +#. Tag: programlisting +#: query_hql.xml:277 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:279 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "또는 실제 typesafe 자바 객체로서," + +#. Tag: programlisting +#: query_hql.xml:283 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:285 +#, no-c-format +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "반환할 수도 있다." + +#. Tag: para +#: query_hql.xml:289 +#, no-c-format +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "" +"당신은 as를 사용하여 select되는 표현식들에 alias들을 할당" +"할 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:293 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:295 +#, no-c-format +msgid "" +"This is most useful when used together with select new map:" +msgstr "" +"다음은 select new map과 함께 사용될 때 가장 유용하다:" + +#. Tag: programlisting +#: query_hql.xml:299 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:301 +#, no-c-format +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "" +"이 질의는 select된 값들에 대한 alias로부터 한 개의 Map을 " +"반환한다." + +#. Tag: title +#: query_hql.xml:308 +#, no-c-format +msgid "Aggregate functions" +msgstr "집계 함수들" + +#. Tag: para +#: query_hql.xml:310 +#, no-c-format +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "" +"HQL 질의들은 프로퍼티들에 대한 집계(aggregate) 함수들의 결과들을 반환할수도 " +"있다:" + +#. Tag: programlisting +#: query_hql.xml:314 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "지원되는 집계 함수들은 다음과 같다" + +#. Tag: literal +#: query_hql.xml:332 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#. Tag: literal +#: query_hql.xml:337 +#, no-c-format +msgid "count(*)" +msgstr "count(*)" + +#. Tag: literal +#: query_hql.xml:342 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#. Tag: para +#: query_hql.xml:347 +#, no-c-format +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "" +"당신은 select 절 속에 산술 연산자들, 연결 연산자, 그리고 인지된 SQL 함수들을 " +"사용할 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:354 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:356 +#, no-c-format +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"distinct 키워드와 all all가 사용될 수 " +"있고 SQL의 경우와 동일한 의미를 갖는다." + +#. Tag: programlisting +#: query_hql.xml:361 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:366 +#, no-c-format +msgid "Polymorphic queries" +msgstr "Polymorphic(다형성) 질의들" + +#. Tag: para +#: query_hql.xml:368 +#, no-c-format +msgid "A query like:" +msgstr "다음과 같은 질의:" + +#. Tag: para +#: query_hql.xml:374 +#, no-c-format +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"은 Cat의 인스턴스들 뿐만 아니라, 또한 " +"DomesticCat과 같은 서브클래스들 또한 반환한다. Hibernate " +"질의들은 from 절 내에 임의의 자바 클" +"래스나 인터페이스를 명명할 수 있다. 질의는 그 클래스를 확장하거나 그 인터페이" +"스를 구현하는 모든 영속 클래스들의 인스턴스들을 반환할 것이다. 다음 질의는 모" +"든 영속 객체들을 반환할 것이다:" + +#. Tag: programlisting +#: query_hql.xml:382 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:384 +#, no-c-format +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "" +"인터페이스 Named는 여러 가지 영속 클래스들에 의해 구현될 " +"수도 있다:" + +#. Tag: programlisting +#: query_hql.xml:389 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:391 +#, no-c-format +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"이들 마지막 두 개의 질의들은 하나 이상의 SQL SELECT를 필요" +"로 할 것임을 노트하라. 이것은 order by 절이 정확하게 전체 " +"결과 셋을 순서지우지 않음을 의미한다.(그것은 또한 당신이 Query." +"scroll()을 사용하여 이들 질의들을 호출할 수 없음을 의미한다)." + +#. Tag: title +#: query_hql.xml:400 +#, no-c-format +msgid "The where clause" +msgstr "where 절" + +#. Tag: para +#: query_hql.xml:402 +#, no-c-format +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"where 절은 반환된 인스턴스들의 목록을 제한시키는 것을 당신" +"에게 허용해준다. 만일 alias가 존재하지 않을 경우, 당신은 이름에 의해 프로퍼티" +"들을 참조할 수도 있다:" + +#. Tag: programlisting +#: query_hql.xml:407 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:409 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "" +"만일 한 개의 alias가 존재할 경우, 하나의 수식어가 붙은 프로퍼티 이름을 사용하" +"라:" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "는 'Fritz'로 명명된 Cat의 인스턴스들을 반환한다." + +#. Tag: programlisting +#: query_hql.xml:419 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:421 +#, no-c-format +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"는 FoostartDate 프로퍼티와 동일한 " +"date 프로퍼티를 가진 bar의 인스턴스가 " +"존재하는 Foo의 모든 인스턴스를 반환할 것이다. 합성 경로 표" +"현식들은 where 절을 매우 강력하게 만들어준다. 다음을 검토" +"하자:" + +#. Tag: programlisting +#: query_hql.xml:430 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:432 +#, no-c-format +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"이 질의는 테이블 (inner) join을 가진 SQL 질의로 번역된다. 만일 당신이 다음과 " +"같은 어떤 것을 작성했다면" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "" +"당신은 SQL에서 네 개의 테이블 join들을 필요로 하는 하나의 질의로 끝낼 것이다." + +#. Tag: para +#: query_hql.xml:443 +#, no-c-format +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"= 연산자는 프로퍼티들 뿐만 아니라 또한 인스턴스들을 비교하" +"는데 사용될 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:448 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:450 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:452 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"특별한 프로퍼티(소문자) id는 객체의 유일 식별자를 참조하는" +"데 사용될 수 있다. 추가 정보는 를 보라." + +#. Tag: programlisting +#: query_hql.xml:458 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:460 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "두 번째 질의가 효율적이다. 테이블 join이 필요 없다!" + +#. Tag: para +#: query_hql.xml:464 +#, no-c-format +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"composite(합성) 식별자들의 프로퍼티들이 또한 사용될 수 있다. " +"Personcountry와 " +"medicareNumber로 구성된 composite 식별자를 갖는다고 가정하" +"자. 식별자 속성들을 참조하는 것과 관련된 추가 정보는 다시 를 보라." + +#. Tag: programlisting +#: query_hql.xml:471 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:473 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:475 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "다시 한번, 두 번째 질의는 테이블 join을 필요로 하지 않는다." + +#. Tag: para +#: query_hql.xml:479 +#, no-c-format +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"마찬가지로, 특별한 프로퍼티 class는 다형적인 영속성" +"(polymorphic persistence)의 경우에 인스턴스의 판별자(discriminator) 값에 액세" +"스한다. where 절 속에 삽입된 Java 클래스 이름은 그것의 판별자(discriminator) " +"값으로 변환될 것이다." + +#. Tag: programlisting +#: query_hql.xml:485 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:487 +#, no-c-format +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"당신은 또한 컴포넌트들 또는 composite 사용자 타입들, 또는 명명된 컴포넌트 타" +"입들의 속성들을 사용할 수도 있다. 상세한 것은 를 보라." + +#. Tag: para +#: query_hql.xml:492 +#, no-c-format +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"\"임의의\" 타입은 다음 방법으로 join을 표현하는 것을 우리에게 허용해주는, 특" +"별한 프로퍼티들 idclass를 갖는다(여" +"기서 AuditLog.item<any>로 매핑" +"된 프로퍼티이다)." + +#. Tag: programlisting +#: query_hql.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:500 +#, no-c-format +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"log.item.classpayment.class는 위의 " +"질의 내에서 완전히 다른 데이터베이스 컬럼들의 값들을 참조할 것임을 노트하라." + +#. Tag: title +#: query_hql.xml:508 +#, no-c-format +msgid "Expressions" +msgstr "표현식들" + +#. Tag: para +#: query_hql.xml:510 +#, no-c-format +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"where 절 속에 허용되는 표현식들은 당신이 SQL로 작성할 수 " +"있는 대부분의 종류의 것들을 포함한다:" + +#. Tag: para +#: query_hql.xml:517 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "산술 연산자들 +, -, *, /" + +#. Tag: para +#: query_hql.xml:522 +#, no-c-format +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "" +"바이너리 비교 연산자들 =, >=, <=, <>, !=, like" + +#. Tag: para +#: query_hql.xml:527 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "논리 연산들 and, or, not" + +#. Tag: para +#: query_hql.xml:532 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "그룹핑을 나타내는 괄호들 ( ), indicating grouping" + +#. Tag: para +#: query_hql.xml:537 +#, no-c-format +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" + +#. Tag: para +#: query_hql.xml:550 +#, no-c-format +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"\"간단한\" 경우, case ... when ... then ... else ... end, " +"그리고 \"검색인\" 경우, case when ... then ... else ... end" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"문자열 연결 ...||... or concat(...,...)" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#. Tag: para +#: query_hql.xml:567 +#, no-c-format +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"EJB-QL 3.0에 의해 정의된 임의의 함수 또는 오퍼레이터: substring(), " +"trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), " +"mod()" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "coalesce() 그리고 nullif()" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "" +"numeric 값들이나 temporal 값들을 가독성 있는 문자열로 변환시키는 str" +"()" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"cast(... as ...), 여기서 두번 째 아규먼트는 Hibernate 타입" +"의 이름이고, ANSI cast()extract()가 " +"기반 데이터베이스에 의해 지원될 경우에는 extract(... from ...)." + +#. Tag: para +#: query_hql.xml:599 +#, no-c-format +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "" +"조인된 인덱싱된 콜렉션의 alias들에 적용되는, HQL index() " +"함수" + +#. Tag: para +#: query_hql.xml:605 +#, no-c-format +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"콜렉션 값을 가진 경로 표현식들을 취하는 HQL 함수들 : some, all, " +"exists, any, in을 사용하여 정량화 될 수 있는 특별한 " +"elements()indices 함수들과 함께 " +"size(), minelement(), maxelement(), minindex(), maxindex()." + +#. Tag: para +#: query_hql.xml:613 +#, no-c-format +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"sign(), trunc(), rtrim(), sin()과 같이 임의의 데이터베이스 지원 SQL 스칼" +"라 함수" + +#. Tag: para +#: query_hql.xml:619 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "JDBC-스타일 위치 파라미터들 ?" + +#. Tag: para +#: query_hql.xml:624 +#, no-c-format +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"명명된 파라미터들 :name, :start_date, " +":x1" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"SQL 리터럴들 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" + +#. Tag: para +#: query_hql.xml:635 +#, no-c-format +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"Java public static final 상수들. eg.Color.TABBY" + +#. Tag: para +#: query_hql.xml:641 +#, no-c-format +msgid "" +"in and between may be used as follows:" +msgstr "" +"inbetween은 다음과 같이 사용될 수 " +"있다:" + +#. Tag: programlisting +#: query_hql.xml:645 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:647 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:649 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "그리고 부정형들은 다음과 같이 작성될 수 있다" + +#. Tag: programlisting +#: query_hql.xml:653 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:655 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:657 +#, no-c-format +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"마찬가지로, is nullis not null은 " +"null 값들을 테스트하는데 사용될 수 있다." + +#. Tag: para +#: query_hql.xml:662 +#, no-c-format +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"Boolean들은 Hibernate 구성 내에 HQL 질의 치환들을 선언함으로써 표현식들 내에 " +"쉽게 사용될 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:667 +#, no-c-format +msgid "" +"true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:669 +#, no-c-format +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"이것은 키워드 truefalse 키워드들을 " +"이 HQL로부터 번역된 SQL에서 리터럴 10으로 대체될 것이다:" + +#. Tag: programlisting +#: query_hql.xml:674 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:676 +#, no-c-format +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"당신은 특별한 프로퍼티 size로서 또는 특별한 size" +"() 함수로서 콜렉션의 사이즈를 테스트할 수 있다." + +#. Tag: programlisting +#: query_hql.xml:681 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:683 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:685 +#, no-c-format +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"인덱싱된 콜렉션들에 대해, 당신은minindex와 " +"maxindex 함수들을 사용하여 최소 인덱스과 최대 인덱스를 참" +"조할 수 있다. 유사하게 당신은 minelement와 " +"maxelement 함수를 사용하여 기본 타입을 가진 콜렉션의 최소 " +"요소 및 최대 요소를 참조할 수 있다." + +#. Tag: programlisting +#: query_hql.xml:693 +#, no-c-format +msgid "" +" current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:695 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:697 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:699 +#, no-c-format +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"SQL 함수들 any, some, all, exists, in은 콜렉션의 요소 또" +"는 인덱스 세트(elements 함수와 indices " +"함수), 또는 서브질의의 결과를 전달했을 때 지원된다(아래를 보라)." + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:709 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:711 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:713 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:715 +#, no-c-format +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"이들 구조체들-size, elements, " +"indices, minindex, maxindex, minelement, maxelement-는 " +"Hibernate3에서 where 절 내에서만 사용될 것임을 노트하라." + +#. Tag: para +#: query_hql.xml:722 +#, no-c-format +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"인덱싱 된 콜렉션들의 요소들(배열들, 리스트들, map들)은 인덱스에 의해 참조될 " +"수 있다(where 절 안에서만):" + +#. Tag: programlisting +#: query_hql.xml:727 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:735 +#, no-c-format +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "[] 내부의 표현식은 산술 표현실일 수 있다." + +#. Tag: programlisting +#: query_hql.xml:739 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:741 +#, no-c-format +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"HQL은 또한 one-to-many 연관 또는 값들을 가진 콜렉션의 요소들에 대해 미리 만들" +"어진 index() 함수를 제공한다." + +#. Tag: programlisting +#: query_hql.xml:746 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:748 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "기본 데이터베이스에 의해 제공되는 Scalar SQL 함수들이 사용될 수도 있다" + +#. Tag: programlisting +#: query_hql.xml:752 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:754 +#, no-c-format +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"당신이 아직 이 모든 것을 납득하지 못한다면, SQL 내에서 다음 질의가 가독성이 " +"얼마나 많고 적은지를 생각해보라:" + +#. Tag: programlisting +#: query_hql.xml:759 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:761 +#, no-c-format +msgid "Hint: something like" +msgstr "힌트 : 다음과 같은 어떤 것" + +#. Tag: programlisting +#: query_hql.xml:765 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:770 +#, no-c-format +msgid "The order by clause" +msgstr "order by 절" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"질의에 의해 반환된 리스트는 반환된 클래스 또는 컴포넌트들의 프로퍼티에 의해 " +"순서(ordering)지워질 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"asc 옵션 또는 desc 옵션은 각각 오름차" +"순 또는 내림차순 정렬을 나타낸다." + +#. Tag: title +#: query_hql.xml:785 +#, no-c-format +msgid "The group by clause" +msgstr "group by 절" + +#. Tag: para +#: query_hql.xml:787 +#, no-c-format +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"aggregate 값들을 반환하는 질의는 반환된 클래스나 컴포넌트들의 프로퍼티에 의" +"해 그룹지워질 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:791 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:793 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:795 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "또한 having 절이 허용된다." + +#. Tag: programlisting +#: query_hql.xml:799 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:801 +#, no-c-format +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"SQL 함수들과 집계 함수들이 기본 데이터베이스에 의해 지원될 경우(예를 들어 " +"MySQL은 지원되지 않는다) having 절과 order by 절 속에 허용된다." + +#. Tag: programlisting +#: query_hql.xml:807 +#, no-c-format +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:809 +#, no-c-format +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"group by 절도 order by 절 어느 것도 산" +"술 표현식들을 포함할 수 없다는 점을 노트하라. 또한 Hibernate는 현재 그룹지워" +"진 엔티티를 확장하지 않아서 만일 cat의 모든 속성들이 집계" +"되지 않을 경우에 당신이 group by cat을 쓸수 없음을 노트하" +"라. 당신은 명시적으로 모든 집계되지 않는 속성들을 리스트해야 한다." + +#. Tag: title +#: query_hql.xml:821 +#, no-c-format +msgid "Subqueries" +msgstr "서브질의들" + +#. Tag: para +#: query_hql.xml:823 +#, no-c-format +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"subselect들을 지원하는 데이터베이스들의 경우, Hibernate는 질의들 내에 서브질" +"의들을 지원한다. 서브질의는 괄호로 묶여져야 한다(자주 SQL 집계함수 호출에 의" +"해). 심지어 서로 상관된 서브질의들(외부 질의 내에서 alias를 참조하는 서브질의" +"들)이 허용된다." + +#. Tag: programlisting +#: query_hql.xml:829 +#, no-c-format +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:833 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:835 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:837 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:839 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" +"HQL 서브질의들이 select 절 또는 where 절 내에서만 일어날 수 있음을 노트하라." + +#. Tag: para +#: query_hql.xml:843 +#, no-c-format +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"서브질의들은 또한 row value constructor 구문을 활용할 수 " +"있다. 상세한 것은 를 보라." + +#. Tag: title +#: query_hql.xml:851 +#, no-c-format +msgid "HQL examples" +msgstr "HQL 예제들" + +#. Tag: para +#: query_hql.xml:853 +#, no-c-format +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"Hibernate 질의들은 매우 강력하고 복잡할 수 있다. 사실, 질의 언어의 힘은 " +"Hibernate의 주요 판매 포인트들 중 하나이다. 다음은 내가 최근의 프로젝트에서 " +"사용했던 질의들과 매우 유사한 몇몇 예제 질의들이다. 당신이 작성하게 될 대부분" +"의 질의들은 이것들보다 훨씬 간단하다는 점을 노트하라!" + +#. Tag: para +#: query_hql.xml:859 +#, no-c-format +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"다음 질의는 특정 고객에 대한 모든 지불되지 않은 주문들의 주문 id, 항목들의 개" +"수, 그리고 주문의 전체 합계값 그리고 주어진 최소 전체 합계를 전체 합계값에 따" +"라 결과들을 순서지워서 반환한다. 가격 결정에 있어, 그것은 현재의 카타록을 사" +"용한다. 귀결되는 SQL 질의는 ORDER, ORDER_LINE, PRODUCT, CATALOG, " +"PRICE 테이블들에 대한 네 개의 inner 조인들과 한 개의(상관" +"지워지지 않은) subselect를 갖고 있다." + +#. Tag: programlisting +#: query_hql.xml:868 +#, no-c-format +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:870 +#, no-c-format +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"괴물 같은 것! 실제로 실 생활에서, 나는 서브질의들을 매우 좋아하지 않아서, 나" +"의 질의는 실제로 다음과 같았다:" + +#. Tag: programlisting +#: query_hql.xml:875 +#, no-c-format +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"다음 질의는 현재 사용자에 의해 가장 최근의 상태 변경이 행해졌던 " +"AWAITING_APPROVAL 상태에 있는 모든 지불들을 제외한, 각각" +"의 상태에 있는 지불들의 개수를 카운트 한다. 그것은 PAYMENT, PAYMENT_STATUS, PAYMENT_STATUS_CHANGE 테이블들에 대한 두 개의 inner 조인들과 하나의 상관관계 지워진 " +"subselect를 가진 SQL 질의로 변환된다." + +#. Tag: programlisting +#: query_hql.xml:885 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:887 +#, no-c-format +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"만일 내가 statusChanges 콜렉션을 set가 아닌 list로 매핑했" +"다면, 그 질의는 작성하기가 훨씬 더 간단했을 것이다." + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"다음 질의는 현재의 사용자가 속해 있는 조직의 모든 계정들과 지불되지 않은 지불" +"들을 반환하는데 MS SQL Server isNull() 함수를 사용한다. 그" +"것은 ACCOUNT, PAYMENT, " +"PAYMENT_STATUS, ACCOUNT_TYPE, " +"ORGANIZATION, ORG_USER 테이블들에 대한 " +"세 개의 inner 조인들, 하나의 outer 조인, 그리고 하나의 subselect를 가진 한 개" +"의 SQL 질의로 번역된다." + +#. Tag: programlisting +#: query_hql.xml:903 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:905 +#, no-c-format +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "" +"몇몇 데이터베이스들의 경우, 우리는 (상관관계 지워진) subselect를 없앨 필요가 " +"있을 것이다." + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:914 +#, no-c-format +msgid "Bulk update and delete" +msgstr "대량 update와 delete" + +#. Tag: para +#: query_hql.xml:916 +#, no-c-format +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"HQL은 이제 update, delete 그리고 " +"insert ... select ... 문장들을 지원한다. 상세한 것은 " +"를 보라." + +#. Tag: title +#: query_hql.xml:924 +#, no-c-format +msgid "Tips & Tricks" +msgstr "팁들 & 트릭들" + +#. Tag: para +#: query_hql.xml:926 +#, no-c-format +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "" +"당신은 실제로 질의 결과들을 반환하지 않고서 그것들(질의 결과들)의 개수를 카운" +"트할 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:930 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:932 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" +"콜렉션의 크기에 따라 결과를 순서(ordering)지우려면, 다음 질의를 사용하라:" + +#. Tag: programlisting +#: query_hql.xml:936 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:938 +#, no-c-format +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"만일 당신의 데이터베이스가 subselect들을 지원할 경우, 당신은 당신의 질의의 " +"where 절 내에 selection 사이즈에 대한 조건을 위치지울 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:943 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:945 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "" +"만일 당신의 데이터베이스가 subselect를 지원하지 않을 경우, 다음 질의를 사용하" +"라:" + +#. Tag: programlisting +#: query_hql.xml:949 +#, no-c-format +msgid "" +"= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:951 +#, no-c-format +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"이 해결책이 inner 조인 때문에 0개의 메시지를 가진 User를 " +"반환할 수 없으므로, 다음 형식이 또한 유용하다:" + +#. Tag: programlisting +#: query_hql.xml:956 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:958 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" +"하나의 JavaBean의 프로퍼티들은 명명된 질의 파라미터들에 바인드될 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:962 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:964 +#, no-c-format +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"콜렉션들은 필터를 가진 Query 인터페이스를 사용하여 쪼매김" +"하는 것이 가능하다:" + +#. Tag: programlisting +#: query_hql.xml:968 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:970 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"콜렉션 요소들은 질의 필터를 사용하여 순서(ordering)지워지거나 그룹지워질 수 " +"도 있다:" + +#. Tag: programlisting +#: query_hql.xml:974 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:976 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "당신은 콜렉션을 초기화 하지 않고서 그것(콜렉션)의 크기를 찾을 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:985 +#, no-c-format +msgid "Components" +msgstr "컴포넌트들" + +#. Tag: para +#: query_hql.xml:987 +#, no-c-format +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" +"컴포넌트들은 단지 간단한 값 유형들이 HQL 질의들 내에 사용될 수 있는 모든 방법" +"으로 사용될 수 있다. 그것들은 select 절 내에 나타날 수 있" +"다." + +#. Tag: programlisting +#: query_hql.xml:992 query_hql.xml:1038 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:993 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:995 +#, no-c-format +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" +"여기서 Person의 name 속성은 컴포넌트이다. 컴포넌트들은 또한 where 절 내에 사용될 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:1000 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1001 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1003 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "컴포넌트들은 또한 order by 절 내에 사용될 수 있다:" + +#. Tag: programlisting +#: query_hql.xml:1007 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1008 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1010 +#, no-c-format +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" +"컴포넌트들에 대한 또 다른 공통적인 사용은 row value constructors에 있다." + +#. Tag: title +#: query_hql.xml:1016 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "Row value constructor 구문" + +#. Tag: para +#: query_hql.xml:1018 +#, no-c-format +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" +"HQL은 ANSI SQL row value constructor 구문(종종 " +"tuple 구문이라 명명된다)의 사용을 지원한다. 비록 데이터베" +"이스가 그 개념을 지원하지 않을지라도 그러하다. 여기서 우리는 전형적으로 컴포" +"넌트들과 연관되어 있는 다중-값 비교들을 일반적으로 언급하고 있다. name 컴포넌" +"트를 정의하는 Person 엔티티를 검토하자:" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" +"비록 약간 장황스럽지만 그것은 유효한 구문이다. 이것을 약간 더 간결하게 만들" +"고 row value constructor 구문을 사용하는 것이 좋다:" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" +"select절 내에 이것을 지정하는 것이 또한 유용할 수 있다:" + +#. Tag: para +#: query_hql.xml:1040 +#, no-c-format +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" +"row value constructor 구문을 사용하는 또 다른 경우는 다중 " +"값들에 대해 비교할 필요가 있는 서브 질의들을 사용할 때이다:" + +#. Tag: programlisting +#: query_hql.xml:1045 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1047 +#, no-c-format +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" +"만일 당신이 이 구문을 사용하고자 원할 경우에 고려해야 할 한 가지는 질의가 메" +"타데이터 내에 있는 컴포넌트 서브-속성들의 순서에 종속될 것이라는 점이다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/query_sql.po b/documentation/envers/src/main/docbook/ko-KR/content/query_sql.po new file mode 100644 index 0000000000..f5e0d19e1d --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/query_sql.po @@ -0,0 +1,1476 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:5 +#, no-c-format +msgid "Native SQL" +msgstr "Native SQL" + +#. Tag: para +#: query_sql.xml:7 +#, no-c-format +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"당신은 또한 당신의 데이터베이스의 native SQL dialect로 질의들을 표현할 수도 " +"있다. 당신이 오라클의 질의 힌트들 또는 CONNECT 키워드와 같" +"은 데이터베이스 지정적인 특징들을 활용하고자 원할 경우에 이것이 유용하다. 그" +"것은 또한 직접적인 SQL/JDBC 기반의 어플리케이션으로부터 Hibernate로의 보다 명" +"료한 이전 경로를 제공한다." + +#. Tag: para +#: query_sql.xml:13 +#, no-c-format +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3은 또한 모든 create, update, delete, load 오퍼레이션들에 대해 (내" +"장 프로시저들을 포함하여) 손으로 작성된 SQL을 지정하는 것을 당신에게 허용해준" +"다." + +#. Tag: title +#: query_sql.xml:17 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "SQLQuery 사용하기" + +#. Tag: para +#: query_sql.xml:19 +#, no-c-format +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"native SQL 질의들의 실행은 SQLQuery 인터페이스를 통해 제어" +"되며, 그것은 Session.createSQLQuery()을 호출하여 획득된" +"다. 다음은 이 API를 질의에 사용하는 방법을 설명한다." + +#. Tag: title +#: query_sql.xml:25 +#, no-c-format +msgid "Scalar queries" +msgstr "스칼라 질의들" + +#. Tag: para +#: query_sql.xml:27 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "가장 기본적인 SQL 질의는 스칼라들(값들)의 목록을 얻는 것이다." + +#. Tag: programlisting +#: query_sql.xml:30 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:32 +#, no-c-format +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"이것들은 둘다 CATS 테이블 내에 있는 각각의 컬럼에 대한 스칼라 값들을 가진 " +"Object 배열들의 List를 반환할 것이다. Hibernate는 반환되는 스칼라 값들의 실" +"제 순서와 타입들을 도출하는데 ResultSetMetadata를 사용할 것이다." + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"ResultSetMetadata 사용의 오버헤드를 피하거나 간단하게는 반" +"환되는 것을 보다 명시적이게끔 하기 위해 우리는 addScalar()" +"를 사용할 수 있다." + +#. Tag: programlisting +#: query_sql.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:43 query_sql.xml:89 query_sql.xml:170 query_sql.xml:321 +#, no-c-format +msgid "This query specified:" +msgstr "이 질의는 다음을 지정했다:" + +#. Tag: para +#: query_sql.xml:47 query_sql.xml:93 query_sql.xml:325 +#, no-c-format +msgid "the SQL query string" +msgstr "SQL 질의 문자열" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "the columns and types to return" +msgstr "반환할 컬럼들과 타입들" + +#. Tag: para +#: query_sql.xml:55 +#, no-c-format +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"이것은 여전히 Object 배열들을 반환할 것이지만, 이제 그것은 " +"ResultSetMetdata를 사용하지 않을 것이고 대신에 기반 결과셋" +"으로부터 ID, NAME 그리고 BIRTHDATE 컬럼을 각각 Long, String 그리고 Short 타입" +"으로 반환할 것이다. 심지어 그 질의가 *를 사용하고 세 개의 " +"열거된 컬럼들 보다 더 많은 것을 반환할 수 있을지라도, 이것은 또한 오직 이들 " +"세 개의 컬럼들 만이 반환될 것임을 의미한다." + +#. Tag: para +#: query_sql.xml:63 +#, no-c-format +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "스칼라들 중 몇몇 또는 전부에 대한 타입 정보를 남겨두는 것이 가능하다." + +#. Tag: programlisting +#: query_sql.xml:66 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:68 +#, no-c-format +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"이것은 본질적으로 앞의 것과 동일한 질의이지만, 이제 " +"ResultSetMetaData는 ID의 타입이 명시적으로 지정되어 있으므" +"로 NAME과 BIRTHDATE의 타입을 결정하는데 사용된다." + +#. Tag: para +#: query_sql.xml:72 +#, no-c-format +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"java.sql.Types returned from ResultSetMetaData이 Hibernate 타입들로 매핑되는 " +"방법은 Dialect에 의해 제어된다. 만일 특정 타입이 매핑되지 않거나 예상되는 타" +"입으로 귀결되지 않을 경우에 Dialect 내에 있는 " +"registerHibernateType에 대한 호출들을 통해 그것을 맞춤화 " +"시키는 것이 가능하다." + +#. Tag: title +#: query_sql.xml:80 +#, no-c-format +msgid "Entity queries" +msgstr "Entity 질의들" + +#. Tag: para +#: query_sql.xml:82 +#, no-c-format +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"위의 질의들은 스칼라 값들을 반환하는 것, 결과셋들로부터 \"원래의\" 값들을 기" +"본적으로 반환하는 것에 대한 전부였다. 다음은 addEntity()" +"를 통해 native sql 질의로부터 엔티티 객체들을 얻는 방법을 보여준다." + +#. Tag: programlisting +#: query_sql.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:97 +#, no-c-format +msgid "the entity returned by the query" +msgstr "그 질의에 의해 반환되는 엔티티" + +#. Tag: para +#: query_sql.xml:101 +#, no-c-format +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"Cat이 컬럼 ID, NAME 그리고 BIRTHDATE로서 매핑된다고 가정하면, 위의 질의들은 " +"둘다 각각의 요소가 하나의 Cat 엔티티인 하나의 List를 반환할 것이다." + +#. Tag: para +#: query_sql.xml:105 +#, no-c-format +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"만일 그 엔티티가 또 다른 엔티티에 대해 many-to-one로 매핑" +"되어 있다면 또한 native 질의를 실행할 때 이것을 반환하는 것이 필수적고, 그 밖" +"의 경우 데이터베이스 지정적인 \"컬럼이 발견되지 않았습니다\" 오류가 일어날 것" +"이다. 추가적인 컬럼은 * 표기를 사용할 자동적으로 반환될 것이지만, 우리는 다" +"음 Dog에 대한 many-to-one 예제에서처럼 " +"명시적인 것을 더 선호한다:" + +#. Tag: programlisting +#: query_sql.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:115 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "이것은 cat.getDog()이 고유하게 기능하는 것을 허용한다." + +#. Tag: title +#: query_sql.xml:119 +#, no-c-format +msgid "Handling associations and collections" +msgstr "연관들과 콜렉션들을 처리하기" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"프락시를 초기화 시킴에 있어 가능한 특별한 라운드트립을 피하기 위해서 " +"Dog에서 eagerly join시키는 것이 간으하다. 이것은 " +"addJoin() 메소드를 통해 행해지는데, 그것은 연관이나 콜렉" +"션 내에서 조인시키는 것을 당신에게 허용해준다." + +#. Tag: programlisting +#: query_sql.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:128 +#, no-c-format +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"이 예제에서 반환되는 Cat들은 데이터베이스에 대한 임의의 특" +"별한 라운드크립 없이 전체적으로 초기화된 그것들의 dog 프로" +"퍼티를 갖는다. 우리가 join의 대상 프로퍼티 경로를 지정하는 것을 가능하도록 하" +"기 위해 하나의 alias 이름(\"cat\")을 추가했음을 주지하라. 대신에 예를 들어 " +"CatDog에 대해 one-to-many를 가질 경" +"우, 콜렉션들에 대해 동일한 eager joining을 행하는 것이 가능하다." + +#. Tag: programlisting +#: query_sql.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:138 +#, no-c-format +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"이 단계에서 우리는 Hibernate에서 native 질의들을 사용가능하도록 만들기 위해 " +"sql 질의들을 강화시키지는 것을 시작하지 않고서도 native 질의들로서 가능한 것" +"의 한계에 도달하고 있다; 문제점들은 동일한 타입의 여러 엔티티들을 반환할 때 " +"또는 디폴트 alias/column 이름들이 충분하지 않을 때 발생하기 시작한다." + +#. Tag: title +#: query_sql.xml:146 +#, no-c-format +msgid "Returning multiple entities" +msgstr "여러 개의 엔티티들을 반환하기" + +#. Tag: para +#: query_sql.xml:148 +#, no-c-format +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"지금까지 결과 셋 컬럼 이름들은 매핑 문서 내에 지정된 컬럼 이름들과 동일하다" +"고 가정되어 있다. 동일한 컬럼이 하나 이상의 테이블 내에서 나타날 수 있기 때문" +"에, 이것은 여러 개의 테이블들을 조인시키는 SQL 질의들에 대해 문제가 될 수 있" +"다." + +#. Tag: para +#: query_sql.xml:153 +#, no-c-format +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "컬럼 alias 주입은 다음 질의(아마 실패할 것이다)에서 필요하다:" + +#. Tag: programlisting +#: query_sql.xml:156 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:158 +#, no-c-format +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"이 질의의 목적은 단위 행 당 두 개의 Cat 인스턴스들, 하나의 cat 그리고 그것의 " +"mother를 반환하는 것이다. 왜냐하면 그것들이 동일한 컬럼 이름들로 매핑되어 있" +"기 때문에 이것은 실패할 것이고 데이베이스 상에서 반환된 컬럼 alias들은 아마 " +"매핑들 내에 지정된 컬럼들(\"ID\" 와 \"NAME\")과 같지 않은 \"c.ID\", \"c.NAME" +"\" 등의 형식일 것이다." + +#. Tag: para +#: query_sql.xml:165 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "다음 형식은 컬럼 이름 중복 취약점을 갖지 않는다:" + +#. Tag: programlisting +#: query_sql.xml:168 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:174 +#, no-c-format +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "" +"컬럼 alias들을 주입하기 위한 Hibernate용 placeholder들을 가진 SQL 질의 문자열" + +#. Tag: para +#: query_sql.xml:179 +#, no-c-format +msgid "the entities returned by the query" +msgstr "그 질의에 의해 반환되는 엔티티들" + +#. Tag: para +#: query_sql.xml:183 +#, no-c-format +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." +msgstr "" +"위에 사용된 {cat.*} 과 {mother.*} 표기는 \"모든 프로퍼티들\"에 대한 생략이" +"다. 다른 방법으로 당신은 컬럼들을 명시적으로 열거할 수도 있지만, 이 경우에 우" +"리는 Hibernate로 하여금 SQL 컬럼 alias들을 각각의 컬럼에 주입시키도록 강제한" +"다. 컬럼 alias를 위한 placeholder는 단지 그 테이블 alias에 의해 수식된 프로퍼" +"티 이름이다. 다음 예제에서, 우리는 다른 테이블(cat_log)로부터 매핑 메타데이" +"터 내에 선언된 것으로의 Cat들과 그것들의 mother들을 검색한다. 우리는 우리가 " +"좋다면 심지어 where 절 내에 프로퍼티 alias를 사용할 수도 있음을 주지하라." + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:195 +#, no-c-format +msgid "Alias and property references" +msgstr "alias 참조와 프로퍼티 참조" + +#. Tag: para +#: query_sql.xml:197 +#, no-c-format +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"대부분의 경우에 위의 alias 주입이 필요하지만, composite 프로퍼티들, 상속 판별" +"자들 (inheritance discriminators), 콜렉션 등과 같은 보다 복잡한 매핑들과 관련" +"된 질의들의 경우에는 고유한 alias들을 주입시키는 것을 Hibernate에게 허용하는" +"데 사용될 몇몇 특별한 alias들이 존재한다." + +#. Tag: para +#: query_sql.xml:202 +#, no-c-format +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"다음 테이블은 alias 주입을 사용하는 다른 가능성들을 보여준다. 노트: 결과 내" +"에 있는 alias 이름들이 예제이며, 각각의 alias는 사용될 때 하나의 유일한 이름" +"과 아마 다른 이름을 가질 것이다." + +#. Tag: title +#: query_sql.xml:208 +#, no-c-format +msgid "Alias injection names" +msgstr "alias 주입 이름들" + +#. Tag: entry +#: query_sql.xml:219 +#, no-c-format +msgid "Description" +msgstr "설명" + +#. Tag: entry +#: query_sql.xml:221 +#, no-c-format +msgid "Syntax" +msgstr "구문" + +#. Tag: entry +#: query_sql.xml:223 +#, no-c-format +msgid "Example" +msgstr "예제" + +#. Tag: entry +#: query_sql.xml:229 +#, no-c-format +msgid "A simple property" +msgstr "간단한 프로퍼티" + +#. Tag: literal +#: query_sql.xml:231 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]" + +#. Tag: literal +#: query_sql.xml:233 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#. Tag: entry +#: query_sql.xml:237 +#, no-c-format +msgid "A composite property" +msgstr "composite 프로퍼티" + +#. Tag: literal +#: query_sql.xml:239 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:241 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#. Tag: entry +#: query_sql.xml:246 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "엔티티의 판별자(Discriminator)" + +#. Tag: literal +#: query_sql.xml:248 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#. Tag: literal +#: query_sql.xml:250 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#. Tag: entry +#: query_sql.xml:254 +#, no-c-format +msgid "All properties of an entity" +msgstr "엔티티의 모든 프로퍼티들" + +#. Tag: literal +#: query_sql.xml:256 query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#. Tag: literal +#: query_sql.xml:258 +#, no-c-format +msgid "{item.*}" +msgstr "{item.*}" + +#. Tag: entry +#: query_sql.xml:262 +#, no-c-format +msgid "A collection key" +msgstr "콜렉션 키" + +#. Tag: literal +#: query_sql.xml:264 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#. Tag: literal +#: query_sql.xml:266 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "The id of an collection" +msgstr "콜렉션의 id" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "The element of an collection" +msgstr "콜렉션의 요소" + +#. Tag: literal +#: query_sql.xml:280 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "콜렉션 내에 있는 요소의 프로퍼티" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "콜렉션 내에 있는 요소의 모든 프로퍼티들" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "All properties of the the collection" +msgstr "콜렉션의 모든 프로퍼티들" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "{coll.*}" +msgstr "{coll.*}" + +#. Tag: title +#: query_sql.xml:315 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "non-managed 엔티티들을 반환하기" + +#. Tag: para +#: query_sql.xml:317 +#, no-c-format +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"native sql 질의에 ResultTransformer를 적용하는 것이 가능하다. 예를 들어 non-" +"managed 엔티티들을 반환하기 위해 ResultTransformer를 허용하는 것." + +#. Tag: programlisting +#: query_sql.xml:319 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:329 +#, no-c-format +msgid "a result transformer" +msgstr "결과 변환자(transformer)" + +#. Tag: para +#: query_sql.xml:333 +#, no-c-format +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"위의 질의는 초기화되어 있고 NAME과 BIRTHNAME의 값들을 CatDTO의 대응하는 프로퍼티들과 필드들 속으로 주입시킨 CatDTO의 리스트를 반환할 것이다." + +#. Tag: title +#: query_sql.xml:340 +#, no-c-format +msgid "Handling inheritance" +msgstr "상속 처리하기" + +#. Tag: para +#: query_sql.xml:342 +#, no-c-format +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"상속의 부분으로서 매핑되는 엔티티들을 질의하는 native sql 질의들은 baseclass" +"의 모든 프로퍼티들을 포함해야 하고 그 모든 것이 서브클래스화 되어야 한다." + +#. Tag: title +#: query_sql.xml:348 +#, no-c-format +msgid "Parameters" +msgstr "파라미터들" + +#. Tag: para +#: query_sql.xml:350 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "" +"Native sql 질의들은 위치 파라미터들 뿐만 아니라 명명된 파라미터들을 지원한다:" + +#. Tag: programlisting +#: query_sql.xml:353 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:361 +#, no-c-format +msgid "Named SQL queries" +msgstr "명명된 SQL 질의들" + +#. Tag: para +#: query_sql.xml:363 +#, no-c-format +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"명명된 SQL 질의들은 HQL 질의와 동일한 방법으로 매핑 문서 속에 정의될 수 있고 " +"정확하게 호출될 수도 있다. 이 경우에, 우리는 addEntity() " +"호출을 필요로 하지 않는다." + +#. Tag: programlisting +#: query_sql.xml:368 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:370 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:372 +#, no-c-format +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"<return-join> 요소와 <load-" +"collection> 요소는 연관들을 조인시키고 콜렉션들을 각각 초기화 시" +"키는 질의들을 정의하는데 사용된다." + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:379 +#, no-c-format +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"명명된 SQL 질의는 스칼라 값을 반환할수도 있다. 당신은 <return-" +"scalar> 요소를 사용하여 컬럼 alias와 Hibernate 타입을 선언해야 " +"한다:" + +#. Tag: programlisting +#: query_sql.xml:383 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:385 +#, no-c-format +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"당신은 여러 개의 명명된 질의들을 가로질러 재사용하거나 " +"setResultSetMapping() API를 통해 결과셋 매핑정보들을 재사" +"용하기 위해 <resultset> 요소 속에 결과셋 매핑 정보들" +"을 구체화 시킬 수 있다." + +#. Tag: programlisting +#: query_sql.xml:390 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:392 +#, no-c-format +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "" +"다른방법으로 당신은 당신의 hbm 파일들 내에 직접 자바 코드로 된 결과셋 매핑 정" +"보를 사용할 수 있다." + +#. Tag: programlisting +#: query_sql.xml:395 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:398 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "명시적으로 column/alias 이름들을 지정하는데 return-property 사용하기" + +#. Tag: para +#: query_sql.xml:401 +#, no-c-format +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"Hibernate로 하여금 그것 자신의 alias들을 끼워넣도록 하기 위해 {}-구문을 사용하는 것 대신에, <return-property>로서 당신은 사용할 컬럼 alias들이 무엇인지를 Hibernate에게 명시적으" +"로 알려줄 수 있다." + +#. Tag: programlisting +#: query_sql.xml:406 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:408 +#, no-c-format +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property>는 또한 다중 컬럼들에 대해 동작한" +"다. 이것은 다중-컬럼 프로퍼티들에 대한 fine grained 제어를 허용할 수 없는 " +"{}-구문을 가진 제약을 해결해준다." + +#. Tag: programlisting +#: query_sql.xml:413 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:415 +#, no-c-format +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"이 예제에서 우리는 끼워넣기(injection)를 위해 {}-구문과 함" +"께 <return-property>를 사용했음을 주목하라. 사용자들" +"이 컬럼과 프로퍼티들을 참조하고자 원하는 방법을 선택하는 것을 사용자들에게 허" +"용해줌으로써." + +#. Tag: para +#: query_sql.xml:420 +#, no-c-format +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"만일 당신의 매핑이 한 개의 판별자(discriminator )를 가질 경우 당신은 판별자 " +"컬럼을 지정하는데 <return-discriminator>를 사용해야 " +"한다." + +#. Tag: title +#: query_sql.xml:426 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "질의를 위한 내장 프로시저 사용하기" + +#. Tag: para +#: query_sql.xml:428 +#, no-c-format +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernate 3은 내장 프로시저들과 함수들을 통한 질의 지원을 도입한다. 대부분의 " +"다음 문서는 양자 모두에 동일하게 적용된다. 내장 프로시저/함수는 Hibernate와 " +"동작하는 것이 가능하도록 첫 번째 out-파라미터로서 한 개의 결과셋을 반환해야 " +"한다. Oracle9 이상의 버전에서 그런 내장 프로시저에 대한 예제는 다음과 같다:" + +#. Tag: programlisting +#: query_sql.xml:434 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:436 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "" +"Hibernate에서 이 질의를 사용하기 위해 당신은 하나의 명명된 질의(a named " +"query)를 통해 그것을 매핑할 필요가 있다." + +#. Tag: programlisting +#: query_sql.xml:439 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:441 +#, no-c-format +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"내장 프로시저들은 현재 스칼라들과 엔티티들 만을 반환함을 주목하라. " +"<return-join><load-collection>은 지원되지 않는다." + +#. Tag: title +#: query_sql.xml:446 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "내장 프로시저들을 사용하는 규칙들/제약들" + +#. Tag: para +#: query_sql.xml:448 +#, no-c-format +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"Hibernate에서 내장 프로시저들을 사용하기 위해서 프로시저들/함수들은 다음 몇" +"몇 규칙들을 따라야 한다. 만일 그것들이 그들 규칙들을 따르지 않을 경우 그것들" +"은 Hibernate와 함께 사용 불가능하다. 만일 당신이 여전히 이들 프로시저들을 사" +"용하고자 원할 경우, 당신은 session.connection()을 통해 그" +"것들을 실행시켜야 한다. 데이터베이스 벤더들이 다른 내장 프로시저 의미론/구문" +"을 갖고 있기 때문에, 규칙들은 각각의 데이터베이스에 따라 차이가 난다." + +#. Tag: para +#: query_sql.xml:455 +#, no-c-format +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"내장 프로시저 질의들은 setFirstResult()/setMaxResults()로" +"서 쪽매김 될 수 없다." + +#. Tag: para +#: query_sql.xml:458 +#, no-c-format +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "" +"권장되는 호출 형식은 표준 SQL92이다: { ? = call functionName(<" +"parameters>) } 또는 { ? = call procedureName(<" +"parameters>}. Native 호출 구문은 지원되지 않는다." + +#. Tag: para +#: query_sql.xml:463 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "Oracle의 경우 다음 규칙들이 적용된다:" + +#. Tag: para +#: query_sql.xml:467 +#, no-c-format +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"하나의 함수는 하나의 결과 셋을 반환해야 한다. 프로시저의 첫 번째 파라미터는 " +"하나의 결과 셋을 반환하는 하나의 OUT이어야 한다. 이것은 " +"Oracle 9 또는 10에서 하나의 SYS_REFCURSOR를 사용하여 행해" +"진다. Oracle에서 당신은 REF CURSOR 타입을 정의할 필요가 있" +"는데, Oracle 보고서를 보라." + +#. Tag: para +#: query_sql.xml:476 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "Sybase 또는 MS SQL server의 경우 다음 규칙들이 적용된다:" + +#. Tag: para +#: query_sql.xml:480 +#, no-c-format +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"프로시저는 한 개의 결과 셋을 반환해야 한다. 이들 서버들이 여러 개의 결과셋들" +"과 업데이트 카운트들을 반환 할수 있다/할 것이이므로, Hibernate는 결과들을 반" +"복 순환할 것이고 그것의 반환 값으로서 하나의 결과 셋인 첫 번째 결과를 취할 것" +"이다. 그 밖의 모든 것은 폐기될 것이다." + +#. Tag: para +#: query_sql.xml:488 +#, no-c-format +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"만일 당신이 당신의 프로시저 내에 SET NOCOUNT ON을 이용 가" +"능하게 할 수 있다면 그것은 아마 보다 효율적이게 될 것이지만 이것은 필요 조건" +"이 아니다." + +#. Tag: title +#: query_sql.xml:498 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "create, update 그리고 delete를 위한 맞춤형 SQL" + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3는 create, update, delete 오퍼레이션들을 위한 맞춤형 문장들을 사용" +"할 수 있다. Hibernate에서 클래스와 콜렉션 영속자들은 구성 시에 생성된 문자열" +"들의 집합(insertsql, deletesql, updatesql 등)을 이미 포함하고 있다. " +"<sql-insert>, <sql-delete>, <sql-update> 매핑 태그들은 이들 문자열들" +"을 오버라이드 시킨다:" + +#. Tag: programlisting +#: query_sql.xml:508 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:510 +#, no-c-format +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"SQL이 당신의 데이터베이스 내에서 직접 실행되어서, 당신이 좋아하는 임의의 " +"dialect를 사용하는 것이 자유롭다. 만일 당신이 데이터베이스 지정적인 SQL을 사" +"용할 경우 이것은 물론 당신의 매핑의 이식성을 감소시킬 것이다." + +#. Tag: para +#: query_sql.xml:514 +#, no-c-format +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "" +"만일 callable 속성이 설정되면 내장 프로시저들이 지원된다:" + +#. Tag: programlisting +#: query_sql.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:519 +#, no-c-format +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "" +"위치 파라미터들은 Hibernate가 그것들을 기대하는 것과 같은 순서가 되어야 하므" +"로, 위치 파라미터들의 순서는 현재 절대적으로 중요하다." + +#. Tag: para +#: query_sql.xml:522 +#, no-c-format +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"당신은 org.hiberate.persister.entity 레벨로 디버그 로깅을 " +"사용 가능하게 함으로써 예상된 순서를 볼 수 있다. 이 레벨을 이용 가능하게 하" +"면 Hibernate는 엔티티들을 생성시키고, 업데이트하고, 삭제하는데 사용되는 정적" +"인 SQL을 출력할 것이다. (예상되는 결과를 보려면, Hibernate 생성된 정적인 sql" +"을 오버라이드 시키게 매핑 파일들 속에 당신의 맞춤형 SQL을 포함시키지 않도록 " +"염두에 두라.)" + +#. Tag: para +#: query_sql.xml:529 +#, no-c-format +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"Hibernate가 문장의 성공을 위해 몇몇 실행 시 체크들을 행하므로, 내장 프로시저" +"들은 대부분의 경우들(읽기:다른 경우들 보다 그것을 더 잘 행한다)에서 insert되" +"고/업데이트되고/삭제된 행들의 개수를 반환하는데 필요하다. Hibernate는 항상 " +"CUD 오퍼레이션들에 대한 숫자 출력 파라미터로서 첫 번째 문장 파라미터를 등록시" +"킨다:" + +#. Tag: programlisting +#: query_sql.xml:535 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:539 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "로딩을 위한 맞춤형 SQL" + +#. Tag: para +#: query_sql.xml:541 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" +"당신은 또한 엔티티 로딩을 위한 당신 자신의 SQL (또는 HQL)을 선언할 수도 있다:" + +#. Tag: programlisting +#: query_sql.xml:544 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "" +"이것은 앞서 논의했듯이 단지 명명된 질의 선언이다. 당신은 class 매핑 속에 이 " +"명명된 질의를 참조할 수 있다:" + +#. Tag: programlisting +#: query_sql.xml:549 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:551 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "이것은 심지어 내장 프로시저들에 동작한다." + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "당신은 콜렉션 로딩을 위한 한 개의 질의를 정의할 수도 있다:" + +#. Tag: programlisting +#: query_sql.xml:555 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:557 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:559 +#, no-c-format +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "" +"당신은 심지어 조인 페칭에 의해 하나의 콜렉션을 로드시키는 하나의 엔티티를 정" +"의할 수 있다:" + +#. Tag: programlisting +#: query_sql.xml:562 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/quickstart.po b/documentation/envers/src/main/docbook/ko-KR/content/quickstart.po new file mode 100644 index 0000000000..6597ca5045 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/quickstart.po @@ -0,0 +1,474 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:5 +msgid "appended paragraph 1" +msgstr "Tomcat으로 빠른 시작" + +#: index.docbook:8 +msgid "appended paragraph 2" +msgstr "Hibernate 시작하기" + +#: index.docbook:10 +msgid "appended paragraph 3" +msgstr "이 튜토리얼은 웹 기반의 어플리케이션 용 Apache Tomcat 서블릿 컨테이너에 대한 Hibernate 3.0 셋업을 설명한다(우리는 버전 4.1을 사용했다. 5.0에 대한 차이점들은 적을 것이다). Hibernate는 모든 주요 J2EE 어플리케이션 서버들의 관리되는 환경에서 잘 동작하고, 또는 심지어 스탠드얼론 어플리케이션들에서도 잘 동작 한다. 이 튜토리얼에 사용되는 데이터베이스 시스템은 PostgreSQL 7.4이고, 다른 데이터베이스에 대한 지원은 단지 Hibernate SQL dialect 구성과 커넥션 프로퍼티들을 변경시키는 것에만 관계된다." + +#: index.docbook:18 +msgid "appended paragraph 4" +msgstr "먼저 우리는 모든 필수적인 라이브러리들을 Tomcat 설치 장소에 복사해야 한다. 우리는 이 튜토리얼을 위해 별도의 웹 컨텍스트(webapps/quickstart)를 사용하며, 따라서 우리는 전역 라이브러리 검색 경로 (TOMCAT/common/lib)와 webapps/quickstart/WEB-INF/lib (JAR 파일들의 경우)와 webapps/quickstart/WEB-INF/classes 내 에 있는 컨텍스트 레벨에서 클래스로더 양자를 고려해야 한다. 우리는 두 개의 클래스로더 레벨들을 전역 classpath와 컨텍스트 classpath로서 언급한다." + +#: index.docbook:27 +msgid "appended paragraph 5" +msgstr "이제 라이브러리들을 두 개의 classpath들에 복사하라:" + +#: index.docbook:33 +msgid "appended paragraph 6" +msgstr "데이터베이스 용 JDBC 드라이버를 전역 classpath로 복사하라. 이것은 Tomcat에 번들로구성된 DBCP 커넥션 풀 소프트웨어에 필요하다. Hibernate는 데이터베이스 상에서 SQL을 실행시키는데 JDBC 커넥션들을 사용하므로, 당신은 풀링된 JDBC 커넥션들을 제공해야 하거나, 직접 지원되는 풀들(C3P0, Proxool) 중 하나를 사용하기 위해 Hibernate를 구성해야 한다. 이 튜토리얼을 위해, (PostgreSQL 7.4와 JDK 1.4용) pg74jdbc3.jar 라이브러리를 전역 classloaders 경로로 복사하라. 만일 당신이 다른 데이터베이스를 사용하고자 원할 경우, 간단하게 그것의 적절한 JDBC 드라이버를 복사하라." + +#: index.docbook:43 +msgid "appended paragraph 7" +msgstr "그 밖의 어떤 것을 Tomcat 내의 전역 클래스로더 경로에 복사하지 말라. 또는 당신은 Log4j, commons-logging 그리고 다른 것들을 포함하는 여러 가지 도구들에 관련된 문제점들을 얻게 될 것이다. 각각의 웹 어플리케이션에 대해 컨텍스트 classpath를 사용하라. 즉 라이브러리들을 WEB-INF/lib에 복사하고, 당신 자신의 클래스들과 구성 파일들/프로퍼티 파일들을 WEB-INF/classes에 복사하라. 두 디렉토리들 양자는 디폴트로 컨텍스트 classpath 내에 있다." + +#: index.docbook:52 +msgid "appended paragraph 8" +msgstr "Hibernate는 JAR 라이브러리로서 패키지화 되어 있다. hibernate3.jar 파일은 어플리케이션의 다른 클래스들과 함께 컨텍스트 classpath 속에 복사되어야 한다. Hibernate는 실행 시에 어떤 제 3의 라이브러리들을 필요로하고, 이것들은 lib/ 디렉토리 내의 Hibernate 배포본에 번들화되어 있다; 를 보라. 필요한 제3의 라이브러리들을 컨텍스트 classpath로 복사하라." + +#: index.docbook:62 +msgid "appended paragraph 9" +msgstr "Hibernate 제3의 라이브러리" + +#: index.docbook:70 +msgid "appended paragraph 10" +msgstr "라이브러리" + +#: index.docbook:73 +msgid "appended paragraph 11" +msgstr "설명" + +#: index.docbook:80 +msgid "appended paragraph 12" +msgstr "antlr (필수)" + +#: index.docbook:83 +msgid "appended paragraph 13" +msgstr "Hibernate는 질의 파서들을 산출하는데 ANTLR을 사용하고, 이 라이브러리는 또한 실행 시에 필요하다." + +#: index.docbook:89 +msgid "appended paragraph 14" +msgstr "dom4j (필수)" + +#: index.docbook:92 +msgid "appended paragraph 15" +msgstr "Hibernate는 XML 구성과 XML 매핑 메타데이터 파일들을 파싱하는데 dom4j를 사용 한다." + +#: index.docbook:98 +msgid "appended paragraph 16" +msgstr "CGLIB, asm (필수)" + +#: index.docbook:101 +msgid "appended paragraph 17" +msgstr "Hibernate는 (Java reflection과 결합하여) 런타임 시에 클래스들을 고양시키는데 코드 생성 라이브러리를 사용한다." + +#: index.docbook:107 +msgid "appended paragraph 18" +msgstr "Commons Collections, Commons Logging (필수)" + +#: index.docbook:110 +msgid "appended paragraph 19" +msgstr "Hibernate는 Apache Jakarta Commons 프로젝트로부터 다양한 유틸리티 라이브러리 들을 사용한다." + +#: index.docbook:116 +msgid "appended paragraph 20" +msgstr "EHCache (필수)" + +#: index.docbook:119 +msgid "appended paragraph 21" +msgstr "Hibernate는 second-level 캐시를 위한 다양한 캐시 프로바이더들을 사용할 수 있다. 만일 구성에서 변하지 않을 경우 EHCache가 디폴트 캐시 프로바이더이다." + +#: index.docbook:125 +msgid "appended paragraph 22" +msgstr "Log4j (옵션)" + +#: index.docbook:128 +msgid "appended paragraph 23" +msgstr "Hibernate는 기본 로깅 메커니즘으로서 Log4j를 사용할 수 있는, Commons Logging API를 사용한다. 만일 Log4j 라이브러리가 컨텍스트 라이브러리 디렉토리 속에서 이용 가능하다면, Commons Logging은 Log4j와 컨텍스트 classpath 내에 있는 log4j.properties 구성을 사용할 것이다. Log4j에 대한 예제 properties 파일은 Hibernate 배포본에 번들화 되어 있다. 따라서 당신이 이면에서 무엇이 진행되는 지을 보고자 원할 경우에 log4j.jar와 (src/에 있는) 구성 파일을 당신의 컨텍스트 classpath 속으로 복사하라." + +#: index.docbook:138 +msgid "appended paragraph 24" +msgstr "필수 여부?" + +#: index.docbook:141 +msgid "appended paragraph 25" +msgstr "Hibernate 배포본 내에 있는 lib/README.txt 파일을 살펴보라. 이것은 Hibernate에 배포된 제 3의 라이브러리들의 최신 목록이다. 당신은 그곳에 열거된 모든 필수 라이브러리들과 옵션 라이브러리들을 찾게 될 것이다(여기서 \"빌드 시 필요함\"은 당신의 어플리케이션이 아니라 Hibernate에 대한 의미임을 노트하라)." + +#: index.docbook:152 +msgid "appended paragraph 26" +msgstr "우리는 이제 Tomcat과 Hibernate 양자에서 데이터베이스 커넥션 풀링과 공유를 설정한다. 이것은 Tomcat이 (그것의 미리 빌드되어 있는 DBCP 풀링 특징을 사용하여) 풀링된 JDBC 커넥션들을 제공할 것이고, Hibernate가 JNDI를 통해 이들 커넥션들을 요청한다는 것을 의미한다. 달리 당신은 Hibernate로 하여금 커넥션 풀을 관리하도록 할 수 있다. Tomcat은 그것의 커넥션 풀을 JNDI에 바인드 시킨다; 우리는 리소스 선언을 Tomcat 메인 구성 파일인 TOMCAT/conf/server.xml에 추가한다:" + +#: index.docbook:160 +msgid "appended paragraph 27" +msgstr "" + "\n" + " \n" + " \n" + " \n" + " factory\n" + " org.apache.commons.dbcp.BasicDataSourceFactory\n" + " \n" + "\n" + " \n" + " \n" + " url\n" + " jdbc:postgresql://localhost/quickstart\n" + " \n" + " \n" + " driverClassNameorg.postgresql.Driver\n" + " \n" + " \n" + " username\n" + " quickstart\n" + " \n" + " \n" + " password\n" + " secret\n" + " \n" + "\n" + " \n" + " \n" + " maxWait\n" + " 3000\n" + " \n" + " \n" + " maxIdle\n" + " 100\n" + " \n" + " \n" + " maxActive\n" + " 10\n" + " \n" + " \n" + "]]>" + +#: index.docbook:162 +msgid "appended paragraph 28" +msgstr "우리가 이 예제에서 구성하는 컨텍스트는 quickstart로 명명되고, 그것의 베이스는 TOMCAT/webapp/quickstart 디렉토리이다. 임의의 서블릿들에 접근하기 위해, (물론 당신의 web.xml 속에 매핑된 서블릿의 이름을 추가하여) 당신의 브라우저에서 http://localhost:8080/quickstart 경로를 호출하라. 당신은 또한 계속 진행하고 이제 공백의 process() 메소드를 가진 간단한 서블릿을 생성시킬 수 있다." + +#: index.docbook:170 +msgid "appended paragraph 29" +msgstr "Tomcat은 이제 java:comp/env/jdbc/quickstart로 JNDI을 통해 커넥션들을 제공한다. 만일 당신이 실행 중인 커넥션 풀을 얻는 것에 문제가 있다면 Tomcat 문서를 참조하라. 당신이 JDBC 드라이버 예외상황 메시지를 얻을 경우, 먼저 Hibernate 없이 JDBC 커넥션 풀을 셋업하라. Tomcat & JDBC 튜토리얼들은 그 웹 서이트에서 이용 가능하다." + +#: index.docbook:177 +msgid "appended paragraph 30" +msgstr "당신의 다음 단계는 Hibernate를 구성하는 것이다. Hibernate는 그것이 JDBC 커넥션들을 얻는 방법을 알고 있어야 한다. 우리는 Hibernate의 XML 기반 구성을 사용한다. properties 파일을 사용하는 다른 접근법은 거의 동일하지만 XML 구문이 허용하는 몇몇 특징들을 누락하고 있다. XML 구성 파일은 hibernate.cfg.xml로서 컨텍스트 classpath (WEB-INF/classes) 내에 위치해 있다:" + +#: index.docbook:184 +msgid "appended paragraph 31" +msgstr "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " java:comp/env/jdbc/quickstart\n" + " false\n" + " org.hibernate.dialect.PostgreSQLDialect\n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + "]]>" + +#: index.docbook:186 +msgid "appended paragraph 32" +msgstr "우리는 SQL 명령들에 대한 로깅을 사용하지 않고 Hibernate에게 사용되는 데이터베이스 SQL direct가 무엇인지 그리고 (Tomcat 바인드된 풀의 JNDI 주소를 선언하여) JDBC 커넥션들을 얻는 곳을 알려준다. dialect는 필수적인 설정이고, 데이터베이스들은 SQL \"표준\"에 대한 그것들의 해석을 달리한다. Hibernate는 차이점들을 처리하고 모든 주요 상용 데이터베이스들 및 오픈 소스 데이터베이스들 용도의 direct들을 번들로 포함하고 있다." + +#: index.docbook:193 +msgid "appended paragraph 33" +msgstr "SessionFactory는 단일 데이터저장소에 관한 개념이고, 여러 데이터베이스들은 여러 개의 XML 구성 파일들을 생성시키고 당신의 어플리케이션 속에서 여러 개의 ConfigurationSessionFactory 객체들을 생성시켜서 사용될 수 있다." + +#: index.docbook:199 +msgid "appended paragraph 34" +msgstr "hibernate.cfg.xml의 마지막 요소는 영속 클래스 Cat에 대한 Hibernate XML 매핑 파일의 이름으로써 Cat.hbm.xml을 선언한다. 이 파일은 데이터베이스 테이블(또는 테이블들)로 POJO 클래스 Cat 을 매핑시키는 메타데이터를 포함한다. 우리는 곧 그 파일로 되돌아 갈 것이다. 먼저 POJO 클래스를 작성하고 그런 다음 그것을 위한 매핑 메타데이터를 선언하자." + +#: index.docbook:209 +msgid "appended paragraph 35" +msgstr "첫 번째 영속 클래스" + +#: index.docbook:211 +msgid "appended paragraph 36" +msgstr "Hibernate는 영속 클래스들에 대한 Plain Old Java Objects (POJOs, 종종 Plain Ordinary Java Objects로 명명된다) 프로그래밍 모형으로 가장 잘 동작한다. POJO는 공용으로 가시적인 인터페이스로부터 내부적인 표상을 은폐시켜, getter와 setter 메소드들을 통해 접근가능한 클래스들의 프로퍼티들을 가진 자바빈과 꽤 유사하다(필요하다면 Hibernate는 또한 필드들에 직접 접근할 수 있다):" + +#: index.docbook:218 +msgid "appended paragraph 37" +msgstr "" + "" + +#: index.docbook:220 +msgid "appended paragraph 38" +msgstr "Hibernate는 그것의 프로퍼티 타입들의 사용에 제약되지 않고, 자바 콜렉션 프레임웍에서의 클래스들을 포함하여, 모든 자바 JDK 타입들과 (String, charDate 같은) 원시타입들이 매핑될 수 있다. 당신은 그것을 값들로서, 값들을 가진 콜렉션들로서, 또는 다른 엔티티들에 대한 연관들로서 매핑시킬 수 있다. id는 그 클래스의 데이터베이스 식별자(프라이머리 키)를 표현하는 특별한 프로퍼티이고, 그것은 Cat과 같은 엔티티들에 대해 매우 권장된다. Hibernate는 내부적으로만 식별자들을 사용할 수 있지만, 우리는 우리의 어플리케이션 아키텍처에서 어떤 유연성을 상실하게 될 것이다." + +#: index.docbook:229 +msgid "appended paragraph 39" +msgstr "특정 인터페이스는 영속 클래스들에 대해 구현되지 말아야 하거나 특정 루트 영속 클래스로부터 서브 클래스로 만들지 말아야 한다. Hibernate는 또한 바이트 코드 처리와 같은, 어떤 빌드 시 처리를 필요로 하지 않고, 그것은 오직 자바 reflection과 (CGLIB를 통한) 런타임 클래스 고양에만 의존한다. 따라서 Hibernate에 대한 POJO 클래스의 어떤 의존성 없이도, 우리는 그것을 데이터베이스 테이블로 매핑할 수 있다." + +#: index.docbook:239 +msgid "appended paragraph 40" +msgstr "cat 매핑하기" + +#: index.docbook:241 +msgid "appended paragraph 41" +msgstr "Cat.hbm.xml 매핑파일은 객체/관계형 매핑에 필요한 메타데이터를 포함한다. 메타데이터는 영속 클래스들의 선언과 데이터베이스 테이블들에 대한 (컬럼들과 다른 엔티티들에 대한 foreign 키 관계들에 대한) 프로퍼티들의 매핑을 포함한다." + +#: index.docbook:247 +msgid "appended paragraph 42" +msgstr "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" + +#: index.docbook:249 +msgid "appended paragraph 43" +msgstr "모든 영속 클래스는 식별자 속성을 가져야 한다(실제로 value-타입의 클래스들에 의존하지 않는, 엔티티들을 표현하는 유일한 클래스들은 엔티티을 가진 컴포넌트들로 매핑된다). 이 프로퍼티는 영속 객체들을 구별짓는데 사용된다: 만일 catA.getId().equals(catB.getId())가 true일 경우, 두 개의 cat들은 같고, 이 개념은 database identity로 명명된다. Hibernate는 (데이터베이스 시퀀스, hi/lo 식별자 테이블들, 그리고 어플리케이션 할당 식별자들에 대한 native 생성기들을 포함하는) 다른 시나리오들에 대해 여러 가지 식별자 생성기들을 번들로 갖고 있다. 우리는 UUID 생성기(데이터이스에 의해 생성된 정수 대용 키들이 선호될 것이므로, 테스트용으로만 권장됨)를 사용하고 또한 Hibernate 생성된 식별자 값을 위한 CAT 테이블의 CAT_ID 컬럼을 (테이블의 프라이머리 키로서) 지정한다." + +#: index.docbook:260 +msgid "appended paragraph 44" +msgstr "Cat의 모든 다른 프로퍼티들은 동일한 테이블로 매핑된다. name 프로퍼티의 경우에, 우리는 그것을 명시적인 데이터베이스 컬럼 선언으로 매핑시켰다. 데이터베이스 스키마가 Hibernate의 SchemaExport 도구에 의해 매핑 선언으로부터 (SQL DDL 문장들로) 자동적으로 생성될 때 이것이 특별히 유용하다. 모든 다른 프로퍼티들은 Hibernate의 디폴트 설정들을 사용하여 매핑되고, 디폴트 설정들은 당신이 가장 많은 시간을 필요로 하는 것이다. 데이터베이스 내의 테이블 CAT은 다음과 같다:" + +#: index.docbook:268 +msgid "appended paragraph 45" +msgstr "" + "" + +#: index.docbook:270 +msgid "appended paragraph 46" +msgstr "당신은 이제 수작업으로 당신의 데이터베이스 내에 이 테이블을 생성시킬 것이고, 만일 당신이 hbm2ddl 도구로 이 단계를 자동화 시키고자 원할 경우 를 읽어라. 이 도구는 테이블 정의, 맞춤형 컬럼 타입 컨스트레인트들, 유일 컨스트레인트들과 인덱스들을 포함하는, 전체 SQL DDL을 생성시킬 수 있다." + +#: index.docbook:279 +msgid "appended paragraph 47" +msgstr "cat들에 작업하기" + +#: index.docbook:281 +msgid "appended paragraph 48" +msgstr "우리는 이제 Hibernate의 Session을 시작할 준비가 되어 있다. 그것은 persistence manager (영속 관리자)이고, 우리는 데이터베이스로 Cat들을 저장하고 데이터베이스로부터 Cat들을 검색하는데 그것을 사용한다. 그러나 먼저 우리는 SessionFactory로부터 Session(Hibernate의 작업 단위)를 얻어야 한다:" + +#: index.docbook:288 +msgid "appended paragraph 49" +msgstr "" + "" + +#: index.docbook:290 +msgid "appended paragraph 50" +msgstr "configure() 호출은 hibernate.cfg.xml 구성 파일을 로드시키고 Configuration 인스턴스를 초기화 시킨다. 당신이 SessionFactory(불변적임)를 빌드하기 이전에 당신은 Configuration에 접근함으로써 다른 프로퍼티들을 설정할 수 있다(그리고 심지어 매핑 메타데이터를 변경시킬 수 있다). 우리는 어디서 SessionFactory를 생성시키고 우리의 어플리케이션 속에서 어떻게 그것에 접근할 수 있나?" + +#: index.docbook:298 +msgid "appended paragraph 51" +msgstr "SessionFactory는 대개 오직 한번만, 예를 들어 대개 load-on-startup 서블릿으로 시작 시에 빌드된다. 이것은 또한 당신이 당신의 서블릿들 내에 있는 인스턴스 변수 속에 그것을 유지하지 않을 것이지만 어떤 다른 위치에 유지시킬 것임을 의미한다. 더구나 우리는 어떤 종류의 Singleton을 필요로 하며, 따라서 우리는 어플리케이션 코드로 쉽게 SessionFactory에 액세스 할 수 있다. 다음에 보여진 접근법은 두 문제 모두를 해결한다: 시작 구성과 SessionFactory에 대한 쉬운 접근." + +#: index.docbook:306 +msgid "appended paragraph 52" +msgstr "우리는 HibernateUtil helper 클래스를 구현한다:" + +#: index.docbook:310 +msgid "appended paragraph 53" +msgstr "" + "" + +#: index.docbook:312 +msgid "appended paragraph 54" +msgstr "이 클래스는 static 초기자를 가진 SessionFactory를 처리할 뿐만 아니라 또한 현재의 쓰레드를 위한 Session을 소유하는 ThreadLocal 변수를 갖는다. 이 helper를 사용하려고 시도하기 전에 thread-local 변수에 대한 자바 개념을 이해해야 한다. 보다 복잡하고 강력한 HibernateUtil 클래스는 http://caveatemptor.hibernate.org/의 CaveatEmptor에서 찾을 수 있다." + +#: index.docbook:319 +msgid "appended paragraph 55" +msgstr "SessionFactory는 threadsafe이고, 많은 쓰레드들이 동시에 그것에 접근할 수 있고 Session들을 요청할 수 있다. 하나의 Session은 데이터베이스에 대해 한 개의 단위 작업을 나타내는 non-threadsafe 객체이다. Session들은 SessionFactory 로부터 열려지고 모든 작업이 완료될 때 닫혀진다. 당신의 서블릿의 process() 메소드 내에 있는 예제는 다음과 같을 수 있다(예외상황 처리 없이):" + +#: index.docbook:327 +msgid "appended paragraph 56" +msgstr "" + "" + +#: index.docbook:329 +msgid "appended paragraph 57" +msgstr "하나의 Session 내에서 모든 데이터베이스 오퍼레이션은 데이터베이스 오퍼레이션들(심지어 읽기 전용 오퍼레이션들 조차도)을 격리시키는 하나의 트랜잭션 내부에서 발생한다. 우리는 기본 트랜잭션 방도(우리의 경우, JDBC 트랜잭션들)로부터 추상화시키는데 Hibernates Transaction API 를 사용한다. 이것은 우리의 코드가 임의의 변경들 없이도 (JTA를 사용하는) 컨테이너-관리되는 트랜잭션들에 배치되는 것을 허용해준다." + +#: index.docbook:336 +msgid "appended paragraph 58" +msgstr "당신이 원하는 만큼 당신이 HibernateUtil.getCurrentSession();을 호출할 수 있고, 당신은 이 쓰레드의 현재 Session을 항상 얻을 것임을 노트하라. 당신은 서블릿 코드 내에서든 또는 서블릿 필터 내에서든 HTTP response가 전송되기 전에, 당신의 단위 작업이 완료된 후에 Session이 확실히 닫혀지도록 해야 한다. 두 번째 옵션의 좋은 측면은 쉬운 lazy 초기화이다: 뷰가 렌더링 될 때 Session이 여전히 열려져 있어서, Hibernate는 당신이 현재 객체 그래프를 네비게이트 하는 동안 초기화 되지 않은 객체들을 로드시킬 수 있다." + +#: index.docbook:344 +msgid "appended paragraph 59" +msgstr "Hibernate는 데이터베이스로부터 객체들을 검색하는데 사용될 수 있는 다양한 메소드들을 갖고 있다. 가장 유연한 방법은 Hibernate Query Language (HQL)을 사용하는 것이다. Hibernate Query Language (HQL)은 배우기가 쉽고 SQL에 대한 강력한 객체 지향 확장이다:" + +#: index.docbook:350 +msgid "appended paragraph 60" +msgstr "" + "" + +#: index.docbook:352 +msgid "appended paragraph 61" +msgstr "Hibernate는 또한 type-safe 질의들을 공식화 시키는데 사용될 수 있는 객체-지향 query by criteria API을 제공한다. 물론 Hibernate는 데이터베이스와의 모든 SQL 통신을 위해 PreparedStatement들과 파라미터 바인딩을 사용한다. 당신은 또한 Hibernate 직접적인 SQL 질의 특징을 사용할 수도 있거나 드문 경우에 Session으로부터 plain JDBC 커넥션을 얻을 수도 있다." + +#: index.docbook:362 +msgid "appended paragraph 62" +msgstr "마지막으로" + +#: index.docbook:364 +msgid "appended paragraph 63" +msgstr "우리는 이 작은 튜토리얼 내에서 단지 Hibernate의 표면을 훑기만 했다. 우리는 우리의 예제들 속에 어떤 서블릿 지정적 코드를 포함하지 않음을 노트하라. 당신이 적합한지를 알려고 할 때 당신은 당신 자신의 서블릿을 생성시켜야 하고 Hibernate 코드를 삽입해야 한다." + +#: index.docbook:370 +msgid "appended paragraph 64" +msgstr "데이터 접근 계층으로서 Hibernate는 당신의 어플리케이션에 강하게 통합됨을 염두에 두라. 대개 모든 다른 레이어들은 영속 메커니즘에 의존했다. 당신은 이 설계의 함축을 확실히 이해하도록 하라." + +#: index.docbook:375 +msgid "appended paragraph 65" +msgstr "보다 복잡한 어플리케이션 예제는 http://caveatemptor.hibernate.org/ 를 보고 http://caveatemptor.hibernate.org/에 있는 다른 튜토리얼들을 살펴보라." + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/ko-KR/content/session_api.po b/documentation/envers/src/main/docbook/ko-KR/content/session_api.po new file mode 100644 index 0000000000..38848c6e01 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/session_api.po @@ -0,0 +1,2215 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:5 +#, no-c-format +msgid "Working with objects" +msgstr "객체들로 작업하기" + +#. Tag: para +#: session_api.xml:7 +#, no-c-format +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"Hibernate는 기본 데이터베이스 관리 시스템의 상세로부터 개발자들을 은폐시켜줄 " +"뿐만 아니라, 또한 객체들에 대한 상태 관리를 제공하는 하" +"나의 완전한 객체/관계형 매핑 솔루션이다. 이것은 공통적인 JDBC/SQL 영속 계층" +"들 내에서의 SQL 문장들에 대한 관리와는 반대로, 자바 어플리" +"케이션들에서 영속에 관한 매우 고유한 객체-지향적 관점이다." + +#. Tag: para +#: session_api.xml:16 +#, no-c-format +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"달리 말해, Hibernate 어플리케이션 개발자들은 그들의 객체들의 상태에 대해 항상 생각해야 하고, SQL 문장들의 실행에 대해서는 필수적이지 " +"않다. 이 부분은 Hibernate에 의해 처리되고 시스템의 퍼포먼스를 튜닝할 때 어플" +"리케이션 개발자와 유일하게 관련된다." + +#. Tag: title +#: session_api.xml:24 +#, no-c-format +msgid "Hibernate object states" +msgstr "Hibernate 객체 상태들" + +#. Tag: para +#: session_api.xml:26 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "Hibernate 다음 객체 상태들을 정의하고 지원한다:" + +#. Tag: para +#: session_api.xml:32 +#, no-c-format +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +"Transient - 만일 객체가 new 연산자를 " +"사용하여 방금 초기화 되었다면 객체는 transient이고, 그것은 Hibernate " +"Session과 연관되어 있지 않다. 그것은 데이터베이스 내에서 " +"영속 표상을 갖지 않고 식별자 값이 할당되지 않았다. 만일 어플리케이션이 더 이" +"상 참조를 소유하지 않을 경우 transient 인스턴스들은 쓰레기 수집기에 의해 파괴" +"될 것이다. 객체를 영속화 시키는데 (그리고 이 전이(transition)에 대해 실행될 " +"필요가 있는 SQL 문장들을 Hibernate로 하여금 처리하도록 하는데) Hibernate " +"Session을 사용하라." + +#. Tag: para +#: session_api.xml:44 +#, no-c-format +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"Persistent - 하나의 영속 인스턴스는 데이터베이스 내에서 " +"하나의 표상을 갖고 하나의 식별자 값을 갖는다. 그것은 방금 저장되었거나 로드되" +"었을 수 있지만, 정의상 그것은 Session의 범위 내에 있다. " +"Hibernate는 영속 상태에서 객체에 대해 행해진 임의의 변경들을 검출해낼 것이고 " +"단위 작업이 완료될 때 그 상태를 데이터베이스와 동기화 시킬 것이다. 개발자들" +"은 하나의 객체가 transient로 되어야 할 때 UPDATE 문장들이" +"나 DELETE 문장들을 수작업으로 실행하지 않는다." + +#. Tag: para +#: session_api.xml:55 +#, no-c-format +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"Detached - 하나의 detached 인스턴스는 영속화 되었지만, " +"그것의 Session이 닫혀진 객체이다. 물론 그 객체에 대한 참조" +"는 여전히 유효하고, 그 detached 인스턴스는 이 상태에서도 변경될 수도 있다. 하" +"나의 detached 인스턴스는 나중에 그것(과 모두 변경들)을 다시 영속화 시켜서 새" +"로운 Session에 다시 첨부될 수 있다. 이 특징은 사용자가 생" +"각할 시간을 필요로 하는 장 기간 실행되는 작업 단위를 위한 프로그래밍 모형을 " +"가능하게 해준다. 우리는 그것들을 어플리케이션 트랜잭션들, 즉 사용자의 관점의 작업 단위라고 부른다." + +#. Tag: para +#: session_api.xml:69 +#, no-c-format +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"이제 우리는 상태들과 상태 전이(transition)들(그리고 전이를 트리거 시키는 " +"Hibernate 메소드들)을 상세하게 논의할 것이다." + +#. Tag: title +#: session_api.xml:77 +#, no-c-format +msgid "Making objects persistent" +msgstr "객체들을 영속화 시키기" + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"하나의 영속 클래스의 새로이 초기화 된 인스턴스들은 Hibernate에 의해 " +"transient로 간주된다. 우리는 그것을 세션과 연관지어서 " +"transient 인스턴스를 영속화 시킬 수 있다:" + +#. Tag: programlisting +#: session_api.xml:86 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:88 +#, no-c-format +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"만일 Cat이 생성된 식별자를 가질 경우, save()가 호출될 때 그 식별자가 생성되고 cat에 할당된다. " +"만일 Cat이 하나의 assigned 식별자나 하" +"나의 composite key를 가질 경우, save()를 호출하기 전에 그 " +"식별자가cat 인스턴스에 할당될 것이다. 당신은 또한 EJB3 초" +"기 드래프트에서 정의된 의미로 save() 대신 persist" +"()를 사용할 수도 있다." + +#. Tag: para +#: session_api.xml:100 +#, no-c-format +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"UNTRANSLATED! persist() makes a transient instance " +"persistent. However, it doesn't guarantee that the identifier value will be " +"assigned to the persistent instance immediately, the assignment might happen " +"at flush time. persist() also guarantees that it will not " +"execute an INSERT statement if it is called outside of " +"transaction boundaries. This is useful in long-running conversations with an " +"extended Session/persistence context." + +#. Tag: para +#: session_api.xml:111 +#, no-c-format +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#. Tag: para +#: session_api.xml:121 +#, no-c-format +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "" +"다른 방법으로, 당신은 save()의 오버로드된 버전을 사용하여 " +"식별자를 할당할 수 있다." + +#. Tag: programlisting +#: session_api.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:128 +#, no-c-format +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"만일 당신이 영속화 시키는 객체가 연관된 객체들(예를 들면. 앞의 예제에 있는 " +"kittens 콜렉션)을 갖고 있다면, 당신이 하나의 foreign 키 컬" +"럼에 대해 하나의 NOT NULL 컨스트레인트를 갖지 않는 한, 이" +"들 객체들은 당신이 좋아하는 임의의 순서로 영속화 되었을 수도 있다. foreign " +"키 컨스트레인트들을 위배하는 위험성이 결코 존재하지 않는다. 하지만 당신이 잘" +"못된 순서로 그 객체들을 save() 시킬 경우 당신은 " +"NOT NULL 컨스트레인트를 위배할 수도 있다." + +#. Tag: para +#: session_api.xml:138 +#, no-c-format +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"당신이 연관된 객체들을 자동적으로 저장시키는데 Hibernate의 " +"transitive persistence(전이 영속) 특징을 사용하는 것을 " +"매우 좋아할 것이므로 대개 당신은 이 상세를 내버려둔다. 그때 NOT " +"NULL 컨스트레인트 위배들이 발생되지 않을지라도 - Hibernate는 모든 " +"것을 처리할 것이다. Transitive persistence(전이 영속)은 이 장에서 후반부에서 " +"논의된다." + +#. Tag: title +#: session_api.xml:149 +#, no-c-format +msgid "Loading an object" +msgstr "객체를 로드시키기" + +#. Tag: para +#: session_api.xml:151 +#, no-c-format +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"Sessionload() 메소드들은 만일 당신" +"이 그것(영속 인스턴스)의 식별자들을 이미 알고 있을 경우에 영속 인스턴스를 검" +"색하는 방법을 당신에게 제공한다. load()는 하나의 클래스 객" +"체를 취하고 그 상태를 영속(persistent) 상태로 그 클래스의 새로이 초기화 된 인" +"스턴스 속으로 로드시킬 것이다." + +#. Tag: programlisting +#: session_api.xml:158 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "다른 방법으로 당신은 주어진 인스턴스 속으로 상태를 로드시킬 수 있다:" + +#. Tag: programlisting +#: session_api.xml:166 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:168 +#, no-c-format +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"만일 일치하는 데이터베이스 행이 존재하지 않을 경우에 load()가 unrecoverable(복구 불가능한) 예외상황을 던질 것임을 노트하라. 만" +"일 클래스가 프락시를 갖도록 매핑된 경우, load()는 초기화 " +"되지 않은 프락시를 단지 반환하고 당신이 그 프락시의 메소드를 호출하기 전까지" +"는 실제로 데이터베이스에 접속하지 않는다. 당신이 데이터베이스로부터 객체에 대" +"한 연관을 실제로 로드시키지 않고서 객체에 대한 연관을 생성시키고자 원할 경우" +"에 이 특징이 매우 유용하다. 만일 batch-size가 class 매핑" +"에 정의되는 경우 그것은 또한 다중 인스턴스들이 하나의 배치로서 로드되는 것을 " +"허용해준다." + +#. Tag: para +#: session_api.xml:179 +#, no-c-format +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"만일 당신이 하나의 일치하는 행이 존재하는지를 확신할 수 없을 경우, 당신은 " +"get() 메소드를 사용해야 한다. 그것(get() 메소드)는 데이터베이스에 즉시 접속하고 만일 일치하는 행이 없을 경우 " +"null을 반환한다." + +#. Tag: programlisting +#: session_api.xml:185 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:187 +#, no-c-format +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"당신은 하나의 LockMode를 사용하는, SELECT ... " +"FOR UPDATE를 사용하여 하나의 객체를 로드시킬 수도 있다. 추가 정보" +"는 API 문서를 보라." + +#. Tag: programlisting +#: session_api.xml:192 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:194 +#, no-c-format +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"어떤 연관된 인스턴스들이나 포함된 콜렉션들은 당신이 그 연관에 대한 케스케이" +"드 스타일로서 lock 또는 all을 지정하도" +"록 결정하지 않는 한, FOR UPDATE로 선택되지 않음을 노트하" +"라." + +#. Tag: para +#: session_api.xml:201 +#, no-c-format +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"refresh() 메소드를 사용하여, 아무때나 하나의 객체와 모든 " +"그것의 콜렉션들을 다시 로드시키는 것이 가능하다. 데이터베이스 트리거들이 그 " +"객체의 프로퍼티들 중 어떤 것을 초기화 시키는데 사용될 때 이것이 유용하다." + +#. Tag: programlisting +#: session_api.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:209 +#, no-c-format +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"중요한 질문이 대개 이 지점에서 나타난다: Hibernate는 데이터베이로부터 그것을 " +"얼마나 많이 로드시키고 그리고 얼마나 많은 SQL SELECT들이 " +"그것을 사용할 것인가? 이것은 페칭 방도에 의존하고 에 설명되어 있다." + +#. Tag: title +#: session_api.xml:219 +#, no-c-format +msgid "Querying" +msgstr "질의하기" + +#. Tag: para +#: session_api.xml:221 +#, no-c-format +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"만일 당신이 당신이 찾고 있는 객체들에 대한 식별자들을 모를 경우, 당신은 하나" +"의 질의를 필요로 한다. Hibernate는 사용이 쉽지만 강력한 객체 지향 질의 언어" +"(HQL)를 지원한다. 프로그램 상의 질의 생성을 위해, Hibernate는 정교한 " +"Criteria 및 Example 질의 특징(QBC와 QBE)를 지원한다. 당신은 또한 객체들로의 " +"결과 셋 변환을 위한 선택적인 Hibernate의 지원으로, 당신의 데이터베이스의 " +"native SQL 속에 당신의 질의를 표현할 수도 있다." + +#. Tag: title +#: session_api.xml:231 +#, no-c-format +msgid "Executing queries" +msgstr "질의들을 실행하기" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"HQL 질의와 native SQL 질의는 org.hibernate.Query의 인스턴" +"스로 표현된다. 이 인터페이스는 파라미터 바인딩, 결과셋 핸들링을 위한, 그리고 " +"실제 질의의 실행을 위한 메소드들을 제공한다. 당신은 항상 현재 " +"Session을 사용하여 하나의 Query를 얻는" +"다:" + +#. Tag: programlisting +#: session_api.xml:240 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:242 +#, no-c-format +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"하나의 질의는 대개 list()를 호출하여 실행되고, 질의의 결과" +"는 메모리 내에서 하나의 콜렉션 속으로 전체적으로 로드될 것이다. 하나의 질의" +"에 의해 검색된 엔티티 인스턴스들은 영속(persistent) 상태에 있다. 당신의 질의" +"가 하나의 객체를 오직 반환할 것임을 당신이 알고 있을 경우에 " +"uniqueResult() 메소드는 단축을 제공한다. 콜렉션들에 대해 " +"eager 페칭을 사용하는 질의들은 대개 (그것들의 초기화된 콜렉션들을 가진) 루트 " +"객체들에 대한 중복들을 대개 반환한다. 당신은 Set을 통해 이" +"들 중복들을 간단하게 필터링할 수 있다." + +#. Tag: title +#: session_api.xml:254 +#, no-c-format +msgid "Iterating results" +msgstr "결과들을 반복하기" + +#. Tag: para +#: session_api.xml:256 +#, no-c-format +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"종종, 당신은 iterate() 메소드를 사용하여 질의를 실행함으로" +"써 더 나은 퍼포먼스를 성취하는 것이 가능할 수 있다. 이것은 오직 대개 질의에 " +"의해 반환되는 실제 엔티티 인스턴스들이 이미 세션 내에 있거나 second-level 캐" +"시 내에 있을 것임을 당신이 예상하는 경우일 것이다. 만일 그것들이 이미 캐시되" +"지 않았다면, iterate()list() 보다 " +"더 느릴 것이고 간단한 질의에 대해 많은 데이터베이스 접속들을, 대개 오직 식별" +"자들을 반환하는 초기 select에 대해 1번의 접속과 실제 인" +"스턴스들을 초기화 시키는 추가적인 select들에 대해 n 번" +"의 접속을 필요로 할 수 있다." + +#. Tag: programlisting +#: session_api.xml:268 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:272 +#, no-c-format +msgid "Queries that return tuples" +msgstr "튜플들을 반환하는 질의들" + +#. Tag: para +#: session_api.xml:274 +#, no-c-format +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"Hibernate 질의들은 때때로 객체들의 튜플들을 반환하고, 그 경우에 각각의 튜플" +"은 배열로서 반환된다:" + +#. Tag: programlisting +#: session_api.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:284 +#, no-c-format +msgid "Scalar results" +msgstr "스칼라 결과들" + +#. Tag: para +#: session_api.xml:286 +#, no-c-format +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"질의들은 select 절 내에 하나의 클래스에 대한 하나의 프로퍼" +"티를 지정할 수 있다. 그것들은 심지어 SQL 집계 함수들을 호출할 수도 있다. 프로" +"퍼티들이나 aggregate들은 \"스칼라\" 결과들(그리고 영속 상태에 있는 엔티티들" +"이 아닌 것으)로 간주된다." + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:297 +#, no-c-format +msgid "Bind parameters" +msgstr "바인드 프라미터들" + +#. Tag: para +#: session_api.xml:299 +#, no-c-format +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"Query 상의 메소드들은 명명된 파라미터들 또는 JDBC-스타일" +"의 ? 파라미터들에 바인딩 값들을 제공한다. JDBC와" +"는 대조적으로, Hibernate 숫자 파라미터들은 0에서 시작된다. 명명된 " +"파라미터들은 질의 문자열 속에서 :name 형식의 식별자들이" +"다. 명명된 파라미터들의 장점들은 다음과 같다:" + +#. Tag: para +#: session_api.xml:309 +#, no-c-format +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "명명된 파라미터들은 그것들이 질의 문자열 내에 발생하는 순서에 관계없다" + +#. Tag: para +#: session_api.xml:315 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "그것들은 동일한 질의 내에서 여러 번 발생할 수 있다" + +#. Tag: para +#: session_api.xml:320 +#, no-c-format +msgid "they are self-documenting" +msgstr "그것은 자기-설명적이다" + +#. Tag: programlisting +#: session_api.xml:326 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:328 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:330 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:335 +#, no-c-format +msgid "Pagination" +msgstr "쪽매김" + +#. Tag: para +#: session_api.xml:337 +#, no-c-format +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"만일 당신이 당신의 결과 셋에 경계(당신이 검색하고자 원하는 최대 개수 그리고/" +"또는 당신이 검색하고자 원하는 첫 번째 행)을 지정할 필요가 있다면 당신은 " +"Query 인터페이스의 메소드들을 사용해야 한다:" + +#. Tag: programlisting +#: session_api.xml:343 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:345 +#, no-c-format +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"Hibernate는 이 limit 질의를 당신의 DBMS의 native SQL로 번역하는 방법을 알고 " +"있다." + +#. Tag: title +#: session_api.xml:353 +#, no-c-format +msgid "Scrollable iteration" +msgstr "스크롤 가능한 iteration" + +#. Tag: para +#: session_api.xml:355 +#, no-c-format +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"당신의 JDBC 드라이버가 스크롤 가능한 ResultSet들을 지원할 " +"경우, Query 인터페이스는 ScrollableResults 객체를 얻는데 사용될 수 있고, 그것은 질의 결과들에 대한 유연한 네비" +"게이션을 허용해준다." + +#. Tag: programlisting +#: session_api.xml:362 +#, no-c-format +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:364 +#, no-c-format +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"열려진 데이터베이스 커넥션(과 커서)가 이 기능에 필요함을 노트하고, 만일 당신" +"이 쪽매김 기능을 작동시킬 필요가 있다면 setMaxResult()/" +"setFirstResult()를 사용하라." + +#. Tag: title +#: session_api.xml:373 +#, no-c-format +msgid "Externalizing named queries" +msgstr "명명된 질의들을 구체화 시키기" + +#. Tag: para +#: session_api.xml:375 +#, no-c-format +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"당신은 또한 매핑 문서 속에 명명된 질의들을 정의할 수 있다.(만일 당신의 질의" +"가 마크업으로서 해석될 수 있는 문자들을 포함할 경우에 CDATA 섹션을 사용하는 것을 기억하라))" + +#. Tag: programlisting +#: session_api.xml:381 +#, no-c-format +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:383 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "파라미터 바인딩과 실행은 프로그램 상으로 행해진다:" + +#. Tag: programlisting +#: session_api.xml:387 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:389 +#, no-c-format +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"실제 프로그램 코드는 사용되는 질의 언어에 독립적이고, 당신은 또한 메타데이터" +"로 native SQL 질의들을 정의할 수도 있거나 그것들을 매핑 파일들 속에 기존 질의" +"들을 위치지움으로써 기존 질의들을 Hibernate로 이전시킬 수도 있음을 노트하라." + +#. Tag: para +#: session_api.xml:395 +#, no-c-format +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"또한 <hibernate-mapping> 요소 내에서 하나의 질의 선" +"언은 그 질의에 대한 전역 유일 이름을 필요로 하고, 반면에 <" +"class> 요소 내에서의 질의 선언은 클래스 이름으로 수직된이름을 첨" +"가하여 자동적으로 유일하게 만들어진다. 예를 들어 eg.Cat." +"ByNameAndMaximumWeight." + +#. Tag: title +#: session_api.xml:408 +#, no-c-format +msgid "Filtering collections" +msgstr "콜렉션들을 필터링 하기" + +#. Tag: para +#: session_api.xml:409 +#, no-c-format +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"콜렉션 필터는 영속 콜렉션 또는 배열에 적용될 수 있는 질" +"의의 특별한 타입이다. 질의 문자열은 현재의 콜렉션 요소를 의미하는 " +"this를 참조할 수 있다." + +#. Tag: programlisting +#: session_api.xml:415 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:417 +#, no-c-format +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"반환되는 콜렉션은 하나의 bag으로 간주되고, 그것은 주어진 콜렉션에 대한 사본이" +"다. 원래의 콜렉션은 변경되지 않는다 (이것은 이름 \"filter\"의 의미와는 정반대" +"이지만, 예상되는 행위와 일치된다)." + +#. Tag: para +#: session_api.xml:423 +#, no-c-format +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"필터들은 from 절을 필요로 하지 않음을 관찰하라(필요할 경우" +"에 필터들이 한 개의 from 절을 가질 수 있을지라도). 필터들은 콜렉션 요소들 자" +"체들을 반환하는 것으로 한정되지 않는다." + +#. Tag: programlisting +#: session_api.xml:428 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:430 +#, no-c-format +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"심지어 하나의 공백의 필터 질의도 예를 들어 거대한 콜렉션 내에 있는 요소들의 " +"부분집합들을 로드시키는데 유용하다:" + +#. Tag: programlisting +#: session_api.xml:435 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:440 +#, no-c-format +msgid "Criteria queries" +msgstr "Criteria 질의들" + +#. Tag: para +#: session_api.xml:442 +#, no-c-format +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQL은 극히 강력하지만 몇몇 개발자들은 질의 문자열들을 빌드하기 보다, 객체 지" +"향 API를 사용하여 동적으로 질의들을 빌드시키는 것을 선호한다. Hibernate는 이" +"들 경우들을 위한 직관적인 Criteria query API를 제공한다:" + +#. Tag: programlisting +#: session_api.xml:448 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:450 +#, no-c-format +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"Criteria와 연관된 Example API 는 에서 상세하게 논의된다." + +#. Tag: title +#: session_api.xml:458 +#, no-c-format +msgid "Queries in native SQL" +msgstr "native SQL에서 질의들" + +#. Tag: para +#: session_api.xml:460 +#, no-c-format +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"당신은 createSQLQuery()를 사용하여 SQL 속에 하나의 질의를 " +"표현할 수 있고, Hibernate로 하여금 결과 셋들로부터 객체들로의 매핑을 처리하도" +"록 할수도 있다. 당신은 아무때나 session.connection()을 호" +"출할 수 있고 직접 JDBC Connection을 사용할 수 있음을 노트" +"하라. 만일 당신이 Hibernate API를 사용하고자 선택한 경우에 , 당신은 SQL alias" +"들을 중괄호들 속에 포함시켜야 한다:" + +#. Tag: programlisting +#: session_api.xml:468 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:470 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:472 +#, no-c-format +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"SQL 질의들은 Hibernate 질의들처럼 명명된 파라미터들과 위치 파라미터들을 포함" +"할 수도 있다. SQL 질의들에 대한 추가 정보는 에서 " +"찾을 수 있다." + +#. Tag: title +#: session_api.xml:483 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "영속 객체들을 변경하기" + +#. Tag: para +#: session_api.xml:485 +#, no-c-format +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"트랜잭션 상의 영속 인스턴스들 (예를들면. " +"Session에 의해 로드되고, 저장되고, 생성되거나 질의된 객체" +"들)은 어플리케이션에 의해 처리될 수 있고 영속 상태에 대한 임의의 변경들은 " +"Sessionflush될 때 영속화 될 것이다" +"(이 장의 뒷 부분에서 논의됨). 당신의 변경들을 영속화 시키기 위해 (다른 용도" +"를 가진 update()와 같은) 특별한 메소드를 호출할 필요가 없" +"다. 따라서 객체의 상태를 업데이트 시키는 가장 간단한 방법은 " +"Session이 열려 있는 동안, 그것을 load()" +"시키고 나서, 그것을 직접 처리하는 것이다:" + +#. Tag: programlisting +#: session_api.xml:496 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:498 +#, no-c-format +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"때때로 이 프로그래밍 모형은 불충분하다. 왜냐하면 그것은 동일한 세션 내에서 " +"(객체를 로드시키는) SQL SELECT와 (그것의 업데이트된 상태" +"를 영속화 시키는) SQL UPDATE 양자를 필요로 할 것이기 때문" +"이다. 그러므로 Hibernate는 detached 인스턴스들을 사용하는 대안적인 접근법을 " +"제공한다." + +#. Tag: emphasis +#: session_api.xml:506 +#, fuzzy, no-c-format +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"Hibernate는 문장 또는 문장의 직접적인 실행" +"을 위한 그것 자신의 API를 제공하지 않음을 노트하라. Hibernate는 하나의 " +" 서비스이고, 당신은 그것을 사용할 을 생각하" +"지 말아야 한다. JDBC는 SQL 문장들을 실행시키는 완전한 API이고, 당신은 " +"을 호출하여 아무때나 한 개의 JDBC 을 얻을 수 " +"있다. 게다가 대량 오퍼레이션의 개념은 온라인 트랜잭션 처리-지향적인 어플리케" +"이션들을 위한 객체/관계형 매핑과 충돌한다. 하지만 Hibernate의 장래 버전들은 " +"특별한 대용량의 오퍼레이션 기능들을 제공할 수도 있다. 몇몇 가능한 배치 오퍼레" +"이션 트릭들에 대해서는 을 보라." + +#. Tag: title +#: session_api.xml:521 +#, no-c-format +msgid "Modifying detached objects" +msgstr "detached 객체들을 변경시키기" + +#. Tag: para +#: session_api.xml:523 +#, no-c-format +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"많은 어플리케이션들은 하나의 트랜잭션 내에서 하나의 객체를 검색하고, 처리를 " +"위한 UI 계층으로 그것을 전송하고, 그런 다음 새로운 트랜잭션 내에서 변경들을 " +"저장할 필요가 있다. 고도의-동시성 환경에서 이런 종류의 접근법을 사용하는 어플" +"리케이션들은 대개 작업의 \"긴\" 단위를 확실히 격리시키기 위해 버전화 된 데이" +"터를 사용한다." + +#. Tag: para +#: session_api.xml:530 +#, no-c-format +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernate는 Session.update() 메소드 또는 Session." +"merge() 메소드를 사용하여 detached 인스턴스들의 재첨부를 제공함으로" +"써 이 모형을 지원한다:" + +#. Tag: programlisting +#: session_api.xml:536 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:538 +#, no-c-format +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"만일 catId 식별자를 가진 Cat이 " +"secondSession에 의해 이미 로드되었을 경우에 어플리케이션" +"이 그것을 다시 재첨부하려고 시도할 때, 예외상황이 던져졌을 것이다." + +#. Tag: para +#: session_api.xml:544 +#, no-c-format +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"만일 그 세션이 동일한 식별자를 가진 영속 인스턴스를 이미 포함하지 않음을 당신" +"이 확신하는 경우에는 update()를 사용하고, 만일 당신이 세션" +"의 상태를 고려하지 않은채로 아무때나 당신의 변경을 병합시키고자 원할 경우에" +"는 merge()를 사용하라. 달리 말해, 당신의 detached 인스턴스" +"들에 대한 재첨부가 실행되는 첫 번째 오퍼레이션임을 확실히 함으로써, " +"update()는 대개 갓 만들어진 세션에서 당신이 호출하게 될 " +"첫 번째 메소드이다." + +#. Tag: para +#: session_api.xml:553 +#, no-c-format +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"어플리케이션은 만일 그것이 detached 인스턴스들의 상태가 또한 업데이트 되는 것" +"을 원할 경우에 주어진 detached 인스턴스로부터 도달 가" +"능한 detached 인스턴스들을 개별적으로update() 시킬 것이" +"다. 이것은 물론 transitive persistence(전이 영속)을 사용" +"하여 자동화 될 수 있고, 를 보라." + +#. Tag: para +#: session_api.xml:560 +#, no-c-format +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"lock() 메소드는 또한 하나의 객체를 새로운 세션에 대해 다" +"시 연관시키는것을 어플리케이션에게 허용해준다. 하지만 detached 인스턴스는 변" +"경되지 않아야 한다!" + +#. Tag: programlisting +#: session_api.xml:565 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:567 +#, no-c-format +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"lock()이 여러가지 LockMode들에 사용될 " +"수 있음을 노트하고, 상세한 것은 API 문서와 트랜잭션 처리에 관한 장을 보라. 재" +"첨부는 lock()에 대한 유일한 쓰임새는 아니다." + +#. Tag: para +#: session_api.xml:574 +#, no-c-format +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"긴 작업 단위에 대한 다른 모형들은 " +"에서 논의된다." + +#. Tag: title +#: session_api.xml:581 +#, no-c-format +msgid "Automatic state detection" +msgstr "자동적인 상태 검출" + +#. Tag: para +#: session_api.xml:583 +#, no-c-format +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Hibernate 사용자들은 새로운 식별자를 생성시켜서 transient 인스턴스를 저장하거" +"나 그것의 현재 식별자와 연관된 detached 인스턴스들을 업데이트/재첨부 시키는 " +"일반적인 용도의 메소드를 요청했다. saveOrUpdate() 메소드" +"는 이 기능을 구현한다." + +#. Tag: programlisting +#: session_api.xml:590 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:592 +#, no-c-format +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"saveOrUpdate()의 사용 예제와 의미는 초심자들에게는 혼동스" +"러워 보인다. 먼저, 하나의 세션에서 온 인스턴스를 또 다른 새로운 세션 내에서 " +"사용하려고 시도하지 않는 한, 당신은 update(), " +"saveOrUpdate(), 또는 merge()를 사용할 " +"필요는 없을 것이다. 몇몇 전체 어플리케이션들은 이들 메소드들 중 어느 것도 결" +"코 사용하지 않을 것이다." + +#. Tag: para +#: session_api.xml:600 +#, no-c-format +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"대개 update() 또는 saveOrUpdate()는 다" +"음 시나리오에서 사용된다:" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "어플리케이션이 첫 번째 세션 내에 객체를 로드시킨다" + +#. Tag: para +#: session_api.xml:612 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "객체가 UI 티어로 전달된다" + +#. Tag: para +#: session_api.xml:617 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "몇몇 변경들이 그 객체에 행해진다" + +#. Tag: para +#: session_api.xml:622 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "객체가 비지니스 로직 티어로 전달된다" + +#. Tag: para +#: session_api.xml:627 +#, no-c-format +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "" +"어플리케이션은 두 번째 세션에서 update()를 호출함으로써 이" +"들 변경들을 영속화 시킨다" + +#. Tag: para +#: session_api.xml:634 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate()는 다음을 행한다:" + +#. Tag: para +#: session_api.xml:640 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "" +"만일 객체가 이 세션 내에서 이미 영속화 되어 있을 경우, 아무것도 행하지 않는다" + +#. Tag: para +#: session_api.xml:645 +#, no-c-format +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"만일 그 세션과 연관된 또 다른 객체가 동일한 식별자를 가질 경우, 예외상황을 던" +"진다" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "" +"만일 그 객체가 식별자 프로퍼티를 갖지 않을 경우, 그것을 save() 시킨다" + +#. Tag: para +#: session_api.xml:656 +#, no-c-format +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"만일 객체의 식별자가 새로이 초기화 된 객체에 할당된 값을 가질 경우, 그것을 " +"save() 시킨다" + +#. Tag: para +#: session_api.xml:662 +#, no-c-format +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"만일 객체가 (<version> 또는 <" +"timestamp>에 의해) 버전화 되고, version 프로퍼티 값이 새로이 초" +"기화 된 객체에 할당된 것과 동일한 값일 경우, 그것을 save() 시킨다" + +#. Tag: para +#: session_api.xml:670 +#, no-c-format +msgid "otherwise update() the object" +msgstr "그 밖의 경우 그 객체를 update() 시킨다" + +#. Tag: para +#: session_api.xml:676 +#, no-c-format +msgid "and merge() is very different:" +msgstr "그리고 merge()는 매우 다르다:" + +#. Tag: para +#: session_api.xml:682 +#, no-c-format +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"만일 세션과 현재 연관된 동일한 식별자를 가진 영속 인스턴스가 존재할 경우, 주" +"어진 객체의 상태를 영속 인스턴스 상으로 복사한다" + +#. Tag: para +#: session_api.xml:689 +#, no-c-format +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"만일 세션과 현재 연관된 영속 인스턴스가 존재하지 않을 경우, 데이터베이스로부" +"터 그것을 로드시키려고 시도하거나 새로운 영속 인스턴스를 생성시키려고 시도한" +"다" + +#. Tag: para +#: session_api.xml:695 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "영속 인스턴스가 반환된다" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "" +"주어진 인스턴스는 세션과 연관되지 않고, 그것은 detached 상태에 머무른다" + +#. Tag: title +#: session_api.xml:710 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "영속 객체들을 삭제하기" + +#. Tag: para +#: session_api.xml:712 +#, no-c-format +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"Session.delete()는 데이터베이스로부터 객체의 상태를 제거" +"할 것이다. 물론 당신의 어플리케이션은 여전히 detached 객체에 대한 참조를 소유" +"할 것이다. 영속 인스턴스를 transient로 만들 때 delete()를 " +"생각하는 것이 최상이다." + +#. Tag: programlisting +#: session_api.xml:719 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:721 +#, no-c-format +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"당신은 foreign 키 컨스트레인트 위배들에 대한 위험성 없이 당신이 좋아하는 어" +"떤 순서로 객체들을 삭제할 수도 있다. 잘못된 순서로 객체들을 삭제함으로써 " +"foreign 키 컬럼에 대한 NOT NULL 컨스트레인트를 위배할 가능" +"성이 여전히 존재한다. 예를 들어, 당신이 부모를 삭제하지만, 그 자식들을 삭제하" +"는 것을 잊은 경우." + +#. Tag: title +#: session_api.xml:732 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "두 개의 다른 데이터저장소들 사이에 객체들을 복제하기" + +#. Tag: para +#: session_api.xml:734 +#, no-c-format +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"영속 인스턴스들의 그래프를 취하고 식별자 값들을 다시 생성시키지 않고서 그것들" +"을 다른 저장소 속에 영속화 시키는 것을 가능하도록 만드는 것이 종종 유용하다." + +#. Tag: programlisting +#: session_api.xml:740 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:742 +#, no-c-format +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"ReplicationModereplicate()가 데이터" +"베이스 내에 있는 기존의 행들과의 충돌을 처리하게될 방법을 결정한다." + +#. Tag: para +#: session_api.xml:749 +#, no-c-format +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "" +"ReplicationMode.IGNORE - 동일한 식별자를 가진 기존 데이터" +"베이스 행이 존재할 경우에 그 객체를 무시한다" + +#. Tag: para +#: session_api.xml:755 +#, no-c-format +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "" +"ReplicationMode.OVERWRITE - 동일한 식별자를 가진 어떤 기존" +"의 데이터베이스 행을 덮어 쓴다" + +#. Tag: para +#: session_api.xml:761 +#, no-c-format +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "" +"ReplicationMode.EXCEPTION - 만일 동일한 식별자를 가진 기" +"존 데이터베이스 행이 존재할 경우에 예외상황을 던진다" + +#. Tag: para +#: session_api.xml:767 +#, no-c-format +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - 행의 버전 번호가 객체의 " +"버전 번호 보다 이전의 것이면 덮어쓰고, 그 밖의 경우에 그 객체를 무시한다" + +#. Tag: para +#: session_api.xml:775 +#, no-c-format +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"이 특징의 쓰임새들은 다른 데이터베이스 인스턴스들 속으로 입력된 데이터 일치시" +"키기, 제품 업그레이드 동안에 시스템 구성 정보 업데이트 하기, non-ACID 트랜잭" +"션들 동안에 행해진 변경들을 롤백시키기 등을 포함한다." + +#. Tag: title +#: session_api.xml:784 +#, no-c-format +msgid "Flushing the Session" +msgstr "Session을 flush 시키기" + +#. Tag: para +#: session_api.xml:786 +#, no-c-format +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"시간이 지남에 따라 Session은 JDBC 커넥션의 상태와 메모리 " +"내에 보관된 객체들의 상태를 동기화 시키는데 필요한 SQL 문장들을 실행시킬 것이" +"다. 이 프로세스 flush는 다음 시점들에서 디폴트로 발생한" +"다" + +#. Tag: para +#: session_api.xml:795 +#, no-c-format +msgid "before some query executions" +msgstr "몇몇 질의들이 실행되기 전에" + +#. Tag: para +#: session_api.xml:800 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "org.hibernate.Transaction.commit() 시점에서" + +#. Tag: para +#: session_api.xml:805 +#, no-c-format +msgid "from Session.flush()" +msgstr "Session.flush() 시점에서" + +#. Tag: para +#: session_api.xml:811 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "SQL 문장들이 다음 순서로 실행 명령이 내려진다" + +#. Tag: para +#: session_api.xml:817 +#, no-c-format +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"대응하는 객체들이 Session.save()를 사용하여 저장되었던 것" +"과 같은 순서로, 모든 엔티티 삽입들" + +#. Tag: para +#: session_api.xml:823 +#, no-c-format +msgid "all entity updates" +msgstr "모든 엔티티 업데이트들" + +#. Tag: para +#: session_api.xml:828 +#, no-c-format +msgid "all collection deletions" +msgstr "모든 콜렉션 삭제들" + +#. Tag: para +#: session_api.xml:833 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "모든 콜렉션 요소 삭제들, 업데이트들 그리고 삽입들" + +#. Tag: para +#: session_api.xml:838 +#, no-c-format +msgid "all collection insertions" +msgstr "모든 콜렉션 삽입들" + +#. Tag: para +#: session_api.xml:843 +#, no-c-format +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"대응하는 객체들이 Session.delete()를 사용하여 삭제되었던 " +"것과 같은 순서로 모든 엔티티 삭제들." + +#. Tag: para +#: session_api.xml:850 +#, no-c-format +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(한가지 예외는 객체들이 저장될 때 native ID 생성을 사용하" +"는 객체들이 insert 되는 점이다.)" + +#. Tag: para +#: session_api.xml:855 +#, no-c-format +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"당신이 명시적으로 flush() 시킬 때를 제외하면, " +"Session이 JDBC 호출들을 실행시키는 시점, 그것들이 실행되는 순서만을 절대적으로 보장하" +"지는 않는다. 하지만 Hibernate는 Query.list(..)가 실효성이 " +"없는 데이터를 결코 반환하지 않을 것임을 보장하거나; 그것들이 잘못된 데이터도 " +"반환하지 않을 것임을 보장한다." + +#. Tag: para +#: session_api.xml:863 +#, no-c-format +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"flush가 너무 자주 발생하지 않도록 디폴트 행위를 변경하는 것이 가능하다. " +"FlushMode 클래스는 세 개의 다른 모드들을 정의한다: 오직 커" +"밋 시(그리고 Hibernate Transaction API가 사용될 때에만) " +"flush 모드, 설명된 루틴을 사용하는 자동적인 flush 모드, 또는 flush()" +"가 명시적으로 호출되지 않는 한 flush 시키지 않는 모드. 마지막 모드" +"는 오래 동안 실행되는 작업 단위에 대해 유용하고, 여기서 Session은 열려진채로 유지되고 오랜 시간 동안 연결이 해제된 채로 유지된다. " +"(를 보라)." + +#. Tag: programlisting +#: session_api.xml:873 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:875 +#, no-c-format +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"flush 동안에, 하나의 예외상황이 발생할 수도 있다(예를 들면. 만일 DML 오퍼레이" +"션이 컨스트레인트를 위반할 경우). 예외상황들을 처리하는 것은 Hibernatem의 트" +"랜잭션 특징에 관한 어떤 이해를 수반하며, 우리는 에서 그것을 논의한다." + +#. Tag: title +#: session_api.xml:884 +#, no-c-format +msgid "Transitive persistence" +msgstr "Transitive persistence(전이 영속)" + +#. Tag: para +#: session_api.xml:886 +#, no-c-format +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"특히 당신이 연관된 객체들의 그래프를 다룰 경우에, 특히 개별 객체들을 저장하" +"고, 삭제하거나, 재첨부시키는 것이 꽤 번거롭다. 공통된 경우는 하나의 부모/자" +"식 관계이다. 다음 예제를 검토하자:" + +#. Tag: para +#: session_api.xml:892 +#, no-c-format +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"만일 부모/자식 관계에서 자식들이 값(value) 타입(예를 들면. 주소들 또는 문자열" +"들을 가진 하나의 콜렉션)일 경우, 그것들의 생명주기는 부모에 의존할 것이고 상" +"태 변경들에 대해 편리한 \"케스케이딩\"에 더 이상의 액션이 필요하지 않을 것이" +"다. 만일 부모가 저장될 때, 값(value)-타입의 자식 객체들도 마찬가지로 저장되" +"고, 부모가 삭제될 때, 자식들이 삭제될 것이다. 이것은 심지어 콜렉션으로부터 하" +"나의 자식을 제거하는 그런 오퍼레이션들에 대해서도 동작한다; Hibernate는 이것" +"을 검출하고, 값(value)-타입의 객체들은 참조를 공유할 수 없으므로, 데이터베이" +"스로부터 그 자식을 삭제시킨다." + +#. Tag: para +#: session_api.xml:903 +#, no-c-format +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"이제 값(value) 타입이 아닌, 엔티티들인 부모와 자식 객체들을 가진 동일한 시나" +"리오를 검토하자(예를 들면. 카테고리들과 아이템들, 또는 부모 고양이나 자식 고" +"양이). 엔티티들은 그것들 자신의 생명주기를 갖고, 공유된 참조들을 지원하고 (따" +"라서 콜렉션으로부터 하나의 엔티티를 제거하는 것은 그것이 삭제될 수 있음을 의" +"미하지 않는다), 그리고 디폴트로 하나의 엔티티로부터 어떤 다른 연관된 엔티티들" +"로의 상태의 케스케이딩은 존재하지 않는다. Hibernate는 디폴트로 도달" +"가능성에 의한 영속성(persistence by reachability)을 구현하지 않는" +"다." + +#. Tag: para +#: session_api.xml:912 +#, no-c-format +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"- persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate()를 포함하는- Hibernate 세션에 대한 각각의 기본 " +"오퍼레이션에 대해서 하나의 대응하는 케스케이딩 스타일이 존재한다. 케스케이드 " +"스타일들 각각은 create, merge, save-update, delete, lock, refresh, " +"evict, replicate로 명명된다. 만일 당신이 하나의 오퍼레이션이 하나" +"의 연관에 따라 케스케이딩되는 것을 원할 경우, 당신은 매핑 문서 내에 그것을 지" +"시해야 한다. 예를 들면:" + +#. Tag: programlisting +#: session_api.xml:921 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:923 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "케스케이딩 스타일들이 결합될 수도 있다:" + +#. Tag: programlisting +#: session_api.xml:927 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:929 +#, no-c-format +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"당신은 모든 오퍼레이션들이 그 연관에 따라 케스케이드 되" +"어야 함을 지정하는데 cascade=\"all\"을 사용할 수도 있다. " +"디폴트cascade=\"none\"은 오퍼레이션들이 케스케이드 되지 않" +"을 것임을 지정한다." + +#. Tag: para +#: session_api.xml:935 +#, no-c-format +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"특정한 케스케이드 스타일인, delete-orphan은 오직 one-to-" +"many 연관들에만 적용되고, delete() 오퍼레이션이 그 연관으" +"로부터 제거되는 임의의 자식 객체에 적용되어야 함을 나타낸다." + +#. Tag: para +#: session_api.xml:942 +#, no-c-format +msgid "Recommendations:" +msgstr "권장사항들 :" + +#. Tag: para +#: session_api.xml:948 +#, no-c-format +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"하나의 <many-to-one> 또는 <many-to-" +"many> 연관에 대해 케스케이드를 가능하게 하는 것은 대개 의미가 없" +"다. 케스케이드는 <one-to-one> 연관과 <" +"one-to-many> 연관에 대해 종종 유용하다." + +#. Tag: para +#: session_api.xml:956 +#, no-c-format +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"만일 자식 객체의 수명이 그 부모 객체의 수명에 묶여져 있을 경우, " +"cascade=\"all,delete-orphan\"을 지정함으로써 그것을 " +"생명 주기 객체로 만들어라." + +#. Tag: para +#: session_api.xml:963 +#, no-c-format +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +"그 밖의 경우, 당신은 케스케이드를 전혀 필요로 하지 않을 수 있다. 그러나 만일 " +"당신이 동일한 트랜잭션 내에서 부모와 자식에 대해 자주 함께 작업하게 될 것이" +"라 생각되고, 당신 스스로 타이핑 하는 것을 절약하고자 원할 경우, " +"cascade=\"persist,merge,save-update\"를 사용하는 것을 고려" +"하라." + +#. Tag: para +#: session_api.xml:971 +#, no-c-format +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"cascade=\"all\"을 가진 (단일 값 연관이든 하나의 콜렉션이" +"든) 하나의 연관을 매핑시키는 것은 그 연관을 부모의 저장/업데이트/삭제가 자식 " +"또는 자식들의 저장/업데이트/삭제로 귀결되는 부모/자식 스" +"타일의 관계로 마크한다." + +#. Tag: para +#: session_api.xml:977 +#, no-c-format +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"게다가, 하나의 영속 부모로부터 하나의 자식에 대한 단순한 참조는 자식의 저장/" +"업데이트로 귀결될 것이다. 하지만 이 메타포는 불완전하다. 그것의 부모에 의해 " +"참조 해제되는 자식은 cascade=\"delete-orphan\"으로 매핑된 " +"하나의 <one-to-many> 연관의 경우를 제외하면, 자동적" +"으로 삭제되지 않는다. 하나의 부모/자식 관계에 대한 케스" +"케이딩 오퍼레이션의 정확한 의미는 다음과 같다:" + +#. Tag: para +#: session_api.xml:988 +#, no-c-format +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"만일 부모가 persist()에 전달될 경우, 모든 자식들이 " +"persist()에 전달된다" + +#. Tag: para +#: session_api.xml:994 +#, no-c-format +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"만일 부모가 merge()에 전달될 경우, 모든 자식들이 " +"merge()에 전달된다" + +#. Tag: para +#: session_api.xml:1000 +#, no-c-format +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"만일 부모가 save(), update() 또는 " +"saveOrUpdate()에 전달될 경우, 모든 자식들이 " +"saveOrUpdate()에 전달된다" + +#. Tag: para +#: session_api.xml:1006 +#, no-c-format +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"만일 transient 또는 detached 자식이 영속 부모에 의해 참조될 경우, 그것은 " +"saveOrUpdate()에 전달된다" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "" +"만일 부모가 삭제될 경우, 모든 자식들이 delete()에 전달된다" + +#. Tag: para +#: session_api.xml:1017 +#, no-c-format +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"만일 자식이 영속 부모에 의해 참조 해제 될 경우, cascade=\"delete-" +"orphan\"이 아닌 한, 특별한 어떤 것도 발생하지 않는다 - 어플리케이션은 필요한 경우에 자식을 명시적으로 삭제해야 한다 -, " +"cascade=\"delete-orphan\"인 경우에 \"orphaned(고아)\"인 경" +"우 자식이 삭제된다." + +#. Tag: para +#: session_api.xml:1026 +#, no-c-format +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"마지막으로 오퍼레이션들의 케스케이딩이 호출 시점에서 또" +"는 flush 시점에서 객체 그래프에 적용될 수 있음을 노트하" +"라. 이용 가능할 경우에 모든 오퍼레이션들은 그 오퍼레이션이 실행될 때 도달 가" +"능한 연관된 엔티티들에 대해 케스케이드 된다. 하지만 save-upatedelete-orphanSession의 " +"flush 동안에 도달 가능한 모든 연관된 엔티티들에 대해 이행적(transitive)이다." + +#. Tag: title +#: session_api.xml:1038 +#, no-c-format +msgid "Using metadata" +msgstr "메타데이터 사용하기" + +#. Tag: para +#: session_api.xml:1040 +#, no-c-format +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"Hibernate는 모든 엔티티와 값(value) 타입들을 가진 매우 풍부한 메타-레벨 모형" +"을 필요로 한다. 시간이 지남에 따라, 이 모형은 어플리케이션 그 자체에 매우 유" +"용하다. 예를 들어, 어플리케이션은 어느 객체들이 복사되어야 하는지(예를 들면 " +"가변적인 값(value) 타입들) 그리고 어느 것이 복사되지 말아야 하는지(예를 들" +"면, 불변의 value 타입들과 가능한 연관된 엔티티들)를 인지하는 \"스마트\" deep-" +"copy 알고리즘을 구현하는데 Hibernate의 메타데이터를 사용할 수도 있다." + +#. Tag: para +#: session_api.xml:1047 +#, no-c-format +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"Hibernate는 ClassMetadata 인터페이스와 " +"CollectionMetadata 인터페이스 그리고 Type 계층구조를 통해 메타데이터를 노출시킨다. 메타데이터 인터페이스들의 " +"인스턴스들은 SessionFactory로부터 얻어질 수도 있다." + +#. Tag: programlisting +#: session_api.xml:1054 +#, no-c-format +msgid "" +"" +msgstr "" + +#~ msgid "UPDATE" +#~ msgstr "UPDATE" + +#~ msgid "DELETE" +#~ msgstr "DELETE" + +#~ msgid "state management" +#~ msgstr "상태 관리" + +#~ msgid "statements" +#~ msgstr "문장들" + +#~ msgid "Connection" +#~ msgstr "session.connection()" + +#~ msgid "session.connection()" +#~ msgstr "Connection" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/toolset_guide.po b/documentation/envers/src/main/docbook/ko-KR/content/toolset_guide.po new file mode 100644 index 0000000000..a0e9a68e79 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/toolset_guide.po @@ -0,0 +1,1195 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:5 +#, no-c-format +msgid "Toolset Guide" +msgstr "도구셋 안내" + +#. Tag: para +#: toolset_guide.xml:7 +#, no-c-format +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"Hibernate에 대한 라운드트립 엔지니어링은 Eclipse 플러그인 세트, 명령라인 도구" +"들, 뿐만 아니라 Ant 태스크들을 사용하여 가능하다." + +#. Tag: para +#: toolset_guide.xml:12 +#, no-c-format +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"Hibernate 도구들은 현재 기존 데이터베이스들에 대한 리버" +"스 엔지니어링을 위해 Ant 태스크들 뿐만 아니라 Eclipse IDE용 플러그인들을 포함" +"하고 있다:" + +#. Tag: para +#: toolset_guide.xml:18 +#, no-c-format +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"매핑 편집기: 자동 완성 기능과 구문 강조를 지원하는 " +"Hibernate XML 매핑 파일들에 대한 편집기. 그것은 또한 통상의 XML 편집기 보다 " +"훨씬 더 융통성 있게 만들어서 클래스 이름들과 프로퍼티/필드 이름들에 대한 의미" +"론적 자동 완성 기능을 지원한다." + +#. Tag: para +#: toolset_guide.xml:23 +#, no-c-format +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"콘솔: 콘솔은 Eclipse에서 새로운 뷰이다. 당신의 콘솔 구성" +"들에 대한 tree overview에 덧붙여, 당신은 또한 당신의 영속 클래스들과 그것들" +"의 관계들에 대한 상호작용 뷰를 얻는다. 콘솔은 당신의 데이터베이스에 대해 HQL " +"질의들을 실행하고 그 결과를 Eclipse 내에서 직접 브라우징 하도록 당신에게 허용" +"해준다." + +#. Tag: para +#: toolset_guide.xml:30 +#, no-c-format +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"개발 마법사들: 몇몇 마법사들이 Hibernate Eclipse 도구들" +"에 제공된다; 당신은 Hibernate 구성 (cfg.xml) 파일들을 빠르게 생성시키는데 마" +"법사를 사용하거나, 심지어 당신은 기존 데이터베이스 스키마를 POJO 소스 파일들" +"과 Hibernate 매핑 파일들로 완전하게 리버스 엔지니어링할 수도 있다. 리버스 엔" +"지니어링 마법사는 맞춤 가능한 템플릿들을 제공한다." + +#. Tag: emphasis +#: toolset_guide.xml:38 +#, no-c-format +msgid "Ant Tasks:" +msgstr "Ant 태스크들:" + +#. Tag: para +#: toolset_guide.xml:43 +#, no-c-format +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"추가 정보는 Hibernate Tools 패키지와 그것의 문서를 참조" +"하길 바란다." + +#. Tag: para +#: toolset_guide.xml:48 +#, no-c-format +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"하지만 Hibernate 메인 패키지는 통합 도구에 번들화 되어 있다(그것은 심지어 플" +"라이 상에서 Hibernate \"내에서\" 사용될 수 있다): SchemaExport 별칭은 hbm2ddl." + +#. Tag: title +#: toolset_guide.xml:55 +#, no-c-format +msgid "Automatic schema generation" +msgstr "자동적인 스키마 생성" + +#. Tag: para +#: toolset_guide.xml:57 +#, no-c-format +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"DDL은 Hibernate 유틸리티에 의해 당신의 매핑 파일들로부터 생성될 수 있다. 생성" +"된 스키마는 엔티티 테이블과 콜렉션 테이블에 대한 참조 무결성 컨스트레인트들" +"(프라이머리 키와 foreign 키들)을 포함한다. 테이블들과 시퀀스들은 또한 페칭된 " +"식별자 생성기들에 대해 생성된다." + +#. Tag: para +#: toolset_guide.xml:64 +#, no-c-format +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"DDL이 매우 벤더에 특정하므로, 이 도구를 사용할 때 당신은 hibernate." +"dialect 프로퍼티를 통해 한 개의 SQL Dialect를 지" +"정해야 한다." + +#. Tag: para +#: toolset_guide.xml:70 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "" +"먼저 생성된 스키마를 개선시키기 위해 당신의 매핑 파일들을 맞춤화 시켜라." + +#. Tag: title +#: toolset_guide.xml:75 +#, no-c-format +msgid "Customizing the schema" +msgstr "스키마 맞춤화 시키기" + +#. Tag: para +#: toolset_guide.xml:77 +#, no-c-format +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"많은 Hibernate 매핑 요소들은 length로 명명된 옵션 속성을 " +"정의한다. 당신은 이 속성으로 컬럼의 길이를 설정할 수 있다.(또는 numeric/" +"decimal 데이터 타입들, 배정도에 대해 ). 많은 Hibernate 매칭 요소들은 " +"length, precision 그리고 " +"scale로 명명된 옵션 속성들을 정의하고 있다. 당신은 이 속성" +"으로서 컬럼이 길이, 정밀도, 크기를 설정할 수 있다." + +#. Tag: programlisting +#: toolset_guide.xml:84 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:85 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:87 +#, no-c-format +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"몇몇 태그들은 또한 (테이블 컬럼들에 대한 NOT NULL 컨스트레" +"인트를 생성시키는) not-null 속성과 (테이블 컬럼들에 대한 " +"UNIQUE 컨스트레인트를 생성시키는) unique 속성을 수용한다." + +#. Tag: programlisting +#: toolset_guide.xml:93 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:95 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:97 +#, no-c-format +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"unique-key 속성은 하나의 유일 키 컨스트레인트로 컬럼들을 " +"그룹지우는데 사용될 수도 있다. 현재 unique-key 속성의 지정" +"된 값은 산출된 DDL내에서 컨스트레인트를 명명하는데 사용되지 않고, 오직 매핑 파일 내에서 컬럼들을 그룹 지우는데 사용된다." + +#. Tag: programlisting +#: toolset_guide.xml:105 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:107 +#, no-c-format +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"index 속성은 매핑된 컬럼 또는 컬럼들을 사용하여 생성될 인" +"덱스의 이름을 지정한다. 간단하게 동일한 인덱스 이름을 지정함으로써 여러 컬럼" +"들이 동일한 인덱스 내로 그룹지워질 수도 있다." + +#. Tag: programlisting +#: toolset_guide.xml:113 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:115 +#, no-c-format +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"foreign-key 속성은 임의의 산출된 foreign 키 컨스트레인트" +"의 이름을 오버라이드 시키는데 사용될 수 도 있다." + +#. Tag: programlisting +#: toolset_guide.xml:120 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:122 +#, no-c-format +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"많은 매핑 요소들은 또한 하나의 자식 <column> 요소를 " +"허용한다. 이것은 특히 다중 컬럼 타입들을 매핑하는데 유용하다:" + +#. Tag: programlisting +#: toolset_guide.xml:127 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:129 +#, no-c-format +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"다른 방법으로, 이들 요소들은 또한 자식 <column> 요소" +"를 수용한다. 이것은 다중 컬럼 타입들에 특히 유용하다: default 속성은 당신으로 하여금 하나의 컬럼에 대한 디폴트 값을 설정하도록 한" +"다(당신은 매핑된 클래스의 새로운 인스턴스를 저장하기 전에 매핑된 프로퍼티에 " +"동일한 값을 할당하게 될 것이다)." + +#. Tag: programlisting +#: toolset_guide.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"sql-type 속성은 SQL 데이터타입에 대한 Hibernate 타입의 디" +"폴트 매핑을 오버라이드 시키는 것을 사용자에게 허용해준다." + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "" +"check 속성은 check 컨스트레인트를 지정하는 것을 당신에게 " +"허용해준다." + +#. Tag: programlisting +#: toolset_guide.xml:150 +#, no-c-format +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:152 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:156 +#, no-c-format +msgid "Summary" +msgstr "요약" + +#. Tag: entry +#: toolset_guide.xml:163 +#, no-c-format +msgid "Attribute" +msgstr "속성" + +#. Tag: entry +#: toolset_guide.xml:164 +#, no-c-format +msgid "Values" +msgstr "값들" + +#. Tag: entry +#: toolset_guide.xml:165 +#, no-c-format +msgid "Interpretation" +msgstr "해석" + +#. Tag: literal +#: toolset_guide.xml:170 +#, no-c-format +msgid "length" +msgstr "length" + +#. Tag: entry +#: toolset_guide.xml:171 toolset_guide.xml:176 toolset_guide.xml:181 +#, no-c-format +msgid "number" +msgstr "number" + +#. Tag: entry +#: toolset_guide.xml:172 +#, no-c-format +msgid "column length" +msgstr "컬럼 길이" + +#. Tag: literal +#: toolset_guide.xml:175 +#, no-c-format +msgid "precision" +msgstr "precision" + +#. Tag: entry +#: toolset_guide.xml:177 +#, no-c-format +msgid "column decimal precision" +msgstr "컬럼 decimal 정밀도" + +#. Tag: literal +#: toolset_guide.xml:180 +#, no-c-format +msgid "scale" +msgstr "scale" + +#. Tag: entry +#: toolset_guide.xml:182 +#, no-c-format +msgid "column decimal scale" +msgstr "컬럼 decimal 크기" + +#. Tag: literal +#: toolset_guide.xml:185 +#, no-c-format +msgid "not-null" +msgstr "not-null" + +#. Tag: literal +#: toolset_guide.xml:186 toolset_guide.xml:191 +#, no-c-format +msgid "true|false" +msgstr "true|false" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "컬럼이 null이 아니어야 함을 지정한다" + +#. Tag: literal +#: toolset_guide.xml:190 +#, no-c-format +msgid "unique" +msgstr "unique" + +#. Tag: entry +#: toolset_guide.xml:192 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "컬럼이 하나의 유일 컨스트레인트를 가져야함을 지정한다" + +#. Tag: literal +#: toolset_guide.xml:195 +#, no-c-format +msgid "index" +msgstr "index" + +#. Tag: literal +#: toolset_guide.xml:196 +#, no-c-format +msgid "index_name" +msgstr "index_name" + +#. Tag: entry +#: toolset_guide.xml:197 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "(다중-컬럼) 인덱스의 이름을 지정한다" + +#. Tag: literal +#: toolset_guide.xml:200 +#, no-c-format +msgid "unique-key" +msgstr "unique-key" + +#. Tag: literal +#: toolset_guide.xml:201 +#, no-c-format +msgid "unique_key_name" +msgstr "unique_key_name" + +#. Tag: entry +#: toolset_guide.xml:202 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "다중-컬럼 유일 컨스트레인트의 이름을 지정한다" + +#. Tag: literal +#: toolset_guide.xml:205 +#, no-c-format +msgid "foreign-key" +msgstr "foreign-key" + +#. Tag: literal +#: toolset_guide.xml:206 +#, no-c-format +msgid "foreign_key_name" +msgstr "foreign_key_name" + +#. Tag: entry +#: toolset_guide.xml:207 +#, fuzzy, no-c-format +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"하나의 연관에 대해, , , , 또" +"는 매핑 요소에 대해 foreign key 컨스트레인트의 이름을 지정한" +"다. 측들은 에 의해 고려되지 않을 것임을 노트" +"하라." + +#. Tag: literal +#: toolset_guide.xml:217 +#, no-c-format +msgid "sql-type" +msgstr "sql-type" + +#. Tag: literal +#: toolset_guide.xml:218 +#, no-c-format +msgid "SQL column type" +msgstr "SQL column type" + +#. Tag: entry +#: toolset_guide.xml:219 +#, fuzzy, no-c-format +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "" +"디폴트 컬럼 타입을 오버라이드 시킨다 ( 요소의 속성에만)" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "default" +msgstr "default" + +#. Tag: entry +#: toolset_guide.xml:226 toolset_guide.xml:233 +#, no-c-format +msgid "SQL expression" +msgstr "SQL expression" + +#. Tag: entry +#: toolset_guide.xml:227 +#, no-c-format +msgid "specify a default value for the column" +msgstr "컬럼에 대한 디폴트 값을 지정한다" + +#. Tag: literal +#: toolset_guide.xml:232 +#, no-c-format +msgid "check" +msgstr "check" + +#. Tag: entry +#: toolset_guide.xml:234 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "컬럼 또는 테이블에 대한 SQL check 컨스트레인트를 생성시킨다" + +#. Tag: para +#: toolset_guide.xml:242 +#, no-c-format +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"<comment> 요소는 생성된 스키마에 대한 주석들을 지정" +"하는 것을 당신에게 허용해준다." + +#. Tag: programlisting +#: toolset_guide.xml:247 +#, no-c-format +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:249 +#, no-c-format +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:251 +#, no-c-format +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"이것은 (지원되는 경우) 생성된 DDL에서 comment on table 또" +"는 comment on column 문장으로 귀결된다." + +#. Tag: title +#: toolset_guide.xml:260 +#, no-c-format +msgid "Running the tool" +msgstr "도구 실행하기" + +#. Tag: para +#: toolset_guide.xml:262 +#, no-c-format +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"SchemaExport 도구는 DDL 스크립트를 표준 출력으로 기록 하" +"고/하거나 DDL 문장들을 실행시킨다." + +#. Tag: para +#: toolset_guide.xml:267 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:273 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "SchemaExport 명령 라인 옵션들" + +#. Tag: entry +#: toolset_guide.xml:279 toolset_guide.xml:429 toolset_guide.xml:498 +#, no-c-format +msgid "Option" +msgstr "옵션" + +#. Tag: entry +#: toolset_guide.xml:280 toolset_guide.xml:367 toolset_guide.xml:430 +#: toolset_guide.xml:499 +#, no-c-format +msgid "Description" +msgstr "설명" + +#. Tag: literal +#: toolset_guide.xml:285 toolset_guide.xml:435 +#, no-c-format +msgid "--quiet" +msgstr "--quiet" + +#. Tag: entry +#: toolset_guide.xml:286 toolset_guide.xml:436 +#, no-c-format +msgid "don't output the script to stdout" +msgstr "스크립트를 표준출력으로 출력하지 않는다" + +#. Tag: literal +#: toolset_guide.xml:289 +#, no-c-format +msgid "--drop" +msgstr "--drop" + +#. Tag: entry +#: toolset_guide.xml:290 +#, no-c-format +msgid "only drop the tables" +msgstr "오직 테이블들을 드롭시킨다" + +#. Tag: literal +#: toolset_guide.xml:293 +#, no-c-format +msgid "--create" +msgstr "--create" + +#. Tag: entry +#: toolset_guide.xml:294 +#, no-c-format +msgid "only create the tables" +msgstr "오직 테이블들을 생성시킨다" + +#. Tag: literal +#: toolset_guide.xml:297 toolset_guide.xml:439 +#, no-c-format +msgid "--text" +msgstr "--text" + +#. Tag: entry +#: toolset_guide.xml:298 +#, no-c-format +msgid "don't export to the database" +msgstr "데이터베이스로 내보내기 하지 않는다" + +#. Tag: literal +#: toolset_guide.xml:301 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#. Tag: entry +#: toolset_guide.xml:302 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "ddl 스크립트를 파일로 출력한다" + +#. Tag: literal +#: toolset_guide.xml:305 toolset_guide.xml:443 toolset_guide.xml:504 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#. Tag: entry +#: toolset_guide.xml:306 toolset_guide.xml:444 toolset_guide.xml:505 +#, fuzzy, no-c-format +msgid "select a NamingStrategy" +msgstr "hibernate.properties 내에서" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:451 toolset_guide.xml:512 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#. Tag: entry +#: toolset_guide.xml:310 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "XML 파일로부터 Hibernate 구성을 읽어들인다" + +#. Tag: literal +#: toolset_guide.xml:313 toolset_guide.xml:447 toolset_guide.xml:508 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#. Tag: entry +#: toolset_guide.xml:314 toolset_guide.xml:448 toolset_guide.xml:509 +#, fuzzy, no-c-format +msgid "read database properties from a file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"파일로부터 데이터베이스 프로퍼티들을 읽어들인다\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"파일로부터 데이터베이스 프로퍼티들을 읽어 들인다\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"파일로부터 데이터베이스 프로퍼티들을 읽어들인다" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--format" +msgstr "--format" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "생성된 SQL을 스크립트 내에 좋게 형식지운다" + +#. Tag: literal +#: toolset_guide.xml:321 +#, no-c-format +msgid "--delimiter=;" +msgstr "--delimiter=;" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "스크립트를 위한 라인 경계의 끝을 설정한다" + +#. Tag: para +#: toolset_guide.xml:328 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "" +"당신은 당신의 어플리케이션 내에 SchemaExport를 삽입시킬 수" +"도 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:332 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:337 +#, no-c-format +msgid "Properties" +msgstr "프로퍼티들" + +#. Tag: para +#: toolset_guide.xml:339 +#, no-c-format +msgid "Database properties may be specified" +msgstr "데이터베이스 프로퍼티들은 다음과 같이 지정될 수 있다" + +#. Tag: para +#: toolset_guide.xml:345 +#, no-c-format +msgid "" +"as system properties with -D<property>" +msgstr "" +"-D<property>를 가진 시스템 프로" +"퍼티로서" + +#. Tag: para +#: toolset_guide.xml:348 +#, no-c-format +msgid "in hibernate.properties" +msgstr "hibernate.properties 내에서" + +#. Tag: para +#: toolset_guide.xml:351 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "--properties를 가진 명명된 프로퍼티들 내에서" + +#. Tag: para +#: toolset_guide.xml:355 +#, no-c-format +msgid "The needed properties are:" +msgstr "필요한 프로퍼티들은 다음과 같다:" + +#. Tag: title +#: toolset_guide.xml:360 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "SchemaExport 커넥션 프로퍼티들" + +#. Tag: entry +#: toolset_guide.xml:366 +#, no-c-format +msgid "Property Name" +msgstr "프로퍼티 이름" + +#. Tag: literal +#: toolset_guide.xml:372 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: entry +#: toolset_guide.xml:373 +#, no-c-format +msgid "jdbc driver class" +msgstr "jdbc 드라이버 클래스" + +#. Tag: literal +#: toolset_guide.xml:376 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: entry +#: toolset_guide.xml:377 +#, no-c-format +msgid "jdbc url" +msgstr "jdbc url" + +#. Tag: literal +#: toolset_guide.xml:380 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: entry +#: toolset_guide.xml:381 +#, no-c-format +msgid "database user" +msgstr "데이터베이스 사용자" + +#. Tag: literal +#: toolset_guide.xml:384 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: entry +#: toolset_guide.xml:385 +#, no-c-format +msgid "user password" +msgstr "사용자 패스워드" + +#. Tag: literal +#: toolset_guide.xml:388 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: toolset_guide.xml:389 +#, no-c-format +msgid "dialect" +msgstr "dialect" + +#. Tag: title +#: toolset_guide.xml:398 +#, no-c-format +msgid "Using Ant" +msgstr "Ant 사용하기" + +#. Tag: para +#: toolset_guide.xml:400 +#, no-c-format +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "" +"당신은 당신의 Ant 빌드 스크립트에서 SchemaExport를 호출할 " +"수 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:404 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:409 +#, no-c-format +msgid "Incremental schema updates" +msgstr "점증하는 스키마 업데이트들" + +#. Tag: para +#: toolset_guide.xml:411 +#, no-c-format +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"SchemaUpdate 도구는 \"점증하는\" 변경들을 가진 기존 스키마" +"를 변경시킬 것이다. SchemaUpdate는 JDBC 메타데이터 API에 " +"무겁게 의존하여서, 그것은 모든 JDBC 드라이버들에 동작하지 않을 것임을 주목하" +"라." + +#. Tag: para +#: toolset_guide.xml:417 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:423 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "SchemaUpdate 명령 라인 옵션들" + +#. Tag: entry +#: toolset_guide.xml:440 +#, no-c-format +msgid "don't export the script to the database" +msgstr "스크립트를 데이터베이스로 내보내기 하지 않는다" + +#. Tag: entry +#: toolset_guide.xml:452 toolset_guide.xml:513 +#, fuzzy, no-c-format +msgid "specify a .cfg.xml file" +msgstr " 파일을 지정한다" + +#. Tag: para +#: toolset_guide.xml:458 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "" +"당신은 당신의 어플리케이션 내에 SchemaUpdate를 삽입시킬 " +"수 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:467 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "점증하는 스키마 업데이트들에 Ant 사용하기" + +#. Tag: para +#: toolset_guide.xml:469 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "" +"당신은 Ant 스크립트에서SchemaUpdate를 호출할 수 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:473 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:478 +#, no-c-format +msgid "Schema validation" +msgstr "스키마 유효성 검사" + +#. Tag: para +#: toolset_guide.xml:480 +#, no-c-format +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"SchemaValidator 도구는 기존의 데이터베이스 스키마가 당신" +"의 매핑 문서들과 \"일치하는지\"를 유효성 검사할 것이다. " +"SchemaValidator가 JDBC 메타데이터 API에 무겁게 의존하므로 " +"그것은 모든 JDBC 드라이버들에 대해 동작하지 않을 것이다. 이 도구는 테스팅에 " +"극히 유용하다." + +#. Tag: para +#: toolset_guide.xml:486 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:492 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator 명령 라인 옵션들" + +#. Tag: para +#: toolset_guide.xml:519 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "" +"당신은 당신의 어플리케이션 내에 SchemaValidator을 삽입시" +"킬 수 도 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:523 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:528 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "스키마 유효성 검사를 위해 Ant 사용하기" + +#. Tag: para +#: toolset_guide.xml:530 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "" +"당신은 Ant 스크립트에서 SchemaValidator를 호출할 수 있다:" + +#. Tag: programlisting +#: toolset_guide.xml:534 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "<one-to-one>" +#~ msgstr "<one-to-one>" + +#~ msgid "<many-to-one>" +#~ msgstr "<many-to-one>" + +#~ msgid "<key>" +#~ msgstr "<key>" + +#~ msgid "<many-to-many>" +#~ msgstr "<many-to-many>" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid "SchemaExport" +#~ msgstr "SchemaExport" + +#~ msgid "<column>" +#~ msgstr "<column>" + +#~ msgid "java -cp" +#~ msgstr "java -cp" + +#~ msgid "hibernate_classpaths" +#~ msgstr "hibernate_classpaths" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport" + +#~ msgid "options mapping_files" +#~ msgstr "options mapping_files" + +#~ msgid "NamingStrategy" +#~ msgstr "NamingStrategy" + +#~ msgid "select a " +#~ msgstr "하나의 를 선택한다" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate" + +#~ msgid ".cfg.xml" +#~ msgstr ".cfg.xml" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator" diff --git a/documentation/envers/src/main/docbook/ko-KR/content/transactions.po b/documentation/envers/src/main/docbook/ko-KR/content/transactions.po new file mode 100644 index 0000000000..8ae8f2a4bc --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/transactions.po @@ -0,0 +1,2068 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:29 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "트랜잭션들과 동시성" + +#. Tag: para +#: transactions.xml:31 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"Hibernate와 동시성 제어에 대한 가장 중요한 점은 이해하기가 매우 쉽다는 점이" +"다. Hibernate는 어떤 추가적인 잠금 행위 없이 JDBC 커넥션들과 JTA 리소스들을 " +"직접 사용한다. 우리는 당신의 데이터베이스 관리 시스템의 JDBC, ANSI, 그리고 트" +"랜잭션 격리 명세에 약간의 시간을 할애할 것을 매우 권장한다." + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"Hibernate는 메모리 내에서 객체들을 잠그지 않는다. 당신의 어플리케이션은 격리 " +"레벨에 의해 정의된 대로 행위를 기대할 수 있다. 또한 transaction-영역의 캐시" +"인 Session 덕분에, Hibernate는 (스칼라 값들을 반환하는 질" +"의들을 보고하지 않는) 식별자와 엔티티 질의들에 의한 룩업을 위해 반복 가능한 " +"읽기를 제공한다." + +#. Tag: para +#: transactions.xml:46 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"자동적인 optimistic 동시성 제어를 위한 버전화에 덧붙여, Hibernate는 또한 " +"SELECT FOR UPDATE 구문을 사용하여 행들에 대한 pessimistic " +"잠금을 위한 하나의 (마이너)API를 제공한다. optimistic 동시성 제어와 이 API는 " +"이 장의 뒷부분에서 논의된다." + +#. Tag: para +#: transactions.xml:53 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"우리는 Configuration, SessionFactory, " +"Session, 알갱이를 가진 Hibernate에서의 동시성 제어 뿐만 아" +"니라 데이터베이스 트랜잭션과 장기간에 걸친 (컴퓨터와의)대화들에 대한 논의를 " +"시작한다." + +#. Tag: title +#: transactions.xml:60 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "세션 영역과 트랜잭션 영역" + +#. Tag: para +#: transactions.xml:62 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"SessionFactory는 모든 어플리케이션 쓰레드들에 의해 공유되" +"도록 고안된 생성에 비용이 드는, 쓰레드안전(threadsafe) 객체이다. 그것은 대개 " +"어플리케이션 시작 시에 Configuration 인스턴스로부터 한번 " +"생성된다." + +#. Tag: para +#: transactions.xml:68 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Session은 하나의 요청, 하나의 대화 , 하나의 작업 단위를 위" +"해 한번만 사용되고 나서 폐기될 예정인, 비용이 들지 않는, 쓰레드 안전하지 않" +"은 객체이다. Session은 커넥션이 필요하지 않으면 하나의 " +"JDBC Connection(또는 Datasource)를 얻" +"지 않을 것이므로, 사용될 때까지 리소스들을 소비하지 않는다." + +#. Tag: para +#: transactions.xml:76 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"이 그림을 완성하기 위해 당신은 또한 데이터베이스 트랜재션들에 대해 생각해야 " +"한다. 데이터베이스 트랜잭션은 데이터베이스에서 잠금 다툼을 줄이기 위해 가능" +"한 짧아야 한다. 긴 데이터베이스 트랜잭션들은 당신의 어플리케이션이 고도의 동" +"시성 로드로의 가용성을 높이는 것을 방해할 것이다. 그러므로 사용자가 생각하는 " +"시간 동안 단위 작업이 완료될 때까지 데이터베이스 트랜잭션을 열려진채로 소유하" +"는 것은 대개 결코 좋은 설계는 아니다." + +#. Tag: para +#: transactions.xml:85 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"하나의 작업 단위의 영역은 무엇인가? 하나의 Hibernate Session은 몇몇 데이터베이스 트랜잭션들에 걸칠 수 있는가 또는 이것은 영역들" +"의 one-to-one 관계인가? 당신은 언제 Session을 열고 닫는가 " +"그리고 당신은 데이터베이스 트랜잭션 경계들을 어떻게 한정하는가?" + +#. Tag: title +#: transactions.xml:93 +#, no-c-format +msgid "Unit of work" +msgstr "작업 단위" + +#. Tag: para +#: transactions.xml:95 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"첫번째로, session-per-operation anti-패턴을 사용하지 말" +"라. 즉, 단일 쓰레드 내에서 모든 간단한 데이터베이스 호출에 대해 " +"Session을 열고 닫지 말라! 물론 같은 것이 데이터베이스 트랜" +"잭션들에 대해서도 참이다. 어플리케이션 내의 데이터베이스 호출들은 계획된 순서" +"를사용하여 행해지며, 그것들은 원자 작업 단위 속으로 그룹지워진다. (이것은 또" +"한 모든 하나의 SQL 문장 뒤의 auto-commit(자동-커밋)이 어플리케이션 내에서 무" +"용지물임을 의미하고, 이 모드가 SQL 콘솔 작업을 돕도록 고안되었음을 노트하라. " +"Hibernate는 의미하고, 이 모드는 Hibernate는 즉시 자동-커밋 모드를 사용 불가능" +"하게 하거나, 어플리케이션 서버가 그렇게 행하고, 즉시 자동-커밋시키는 것을 사" +"용불가능하게 하거나 ,그렇게 행하는 것을 기대한다.) 데이터베이스 트랜잭션들은 " +"결코 옵션이 아니며, 하나의 데이터베이스와의 모든 통신은 당신이 데이터를 읽든 " +"쓰단간에 상관없이 하나의 트랜잭션 내에서 발생해야 한다. 설명하였듯이, 데이터 " +"읽기를 위한 auto-commit 특징을 피해야 할 것이며, 많은 작은 트랜잭션들은 하나" +"의 명료하게 정의된 작업 단위보다 더 좋게 수행될 것 같지 않다. 후자가 또한 훨" +"씬 더 유지가능하고 확장적이다." + +#. Tag: para +#: transactions.xml:111 +#, fuzzy, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is sent to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"다중 사용자 클라이언트/서버 어플리케이션에서 가장 공통된 패턴은 " +"session-per-request이다. 이 모형에서, 클라이언트로부터" +"의 요청은 (Hibernate 영속 계층이 실행되는) 서버로 전송되고, 새로운 Hibernate " +"Session이 열려지고, 모든 데이터베이스 오퍼레이션들이 이 작" +"업 단위 내에서 실행된다. 일단 그 작업이 완료되었다면(그리고 클라이언트에 대" +"한 응답이 준비되었다면), 그 세션은 flush 되고 닫혀진다. 당신은 또한 당신이 " +"Session을 열고 닫을 때 그것을 시작하고 커밋시켜서 클라이언" +"트 요청에 서비스하는데 한 개의 데이터베이스 트랜잭션을 사용하게 될 것이다. " +"둘 사이의 관계는 일대일 대응이고 이 모형은 많은 어플리케이션들에서 완전하게 " +"적합하다." + +#. Tag: para +#: transactions.xml:123 +#, fuzzy, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is sent to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"난제는 구현에 놓여있다: Hibernate는 이 패턴을 단순화 시키기 위해 \"현재 세션" +"\"에 관한 미리 빌드된 관리를 제공한다. 당신이 행해야할 모든 것은 서버 요청이 " +"처리되어야 할 때 트랜잭션을 시작하고, 그 응답이 클라이언트로 전송되기 전에 트" +"랜잭션을 끝내는 것이다. 당신은 당신이 좋아하는 임의의 방법으로 이것을 행할 " +"수 있으며, 공통된 해결책들은 서비스 메소드들 상의 첨단, 또는 하나의 프락시/인" +"터셉션 컨테이너를 가진 APO 인터셉터인, ServletFilter이다. " +"하나의 EJB 컨테이너는 CMT의 경우에 선언적으로 EJB session beans 상에 트랜잭" +"션 경계구분과 같은 동시 대조 측면들을 구현하는 표준 방법이다. 만일 당신이 프" +"로그램 상의 트랜잭션 경계구분을 사용하고자 결정한다면, 사용의 용이성과 코드 " +"이식성을 위해 이 장의 뒷 부분에서 보여진 Hibernate Transaction을 선호하라." + +#. Tag: para +#: transactions.xml:136 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"당신의 어플리케이션 코드는 어디서든 필요할 때 종종 sessionFactory." +"getCurrentSession()을 간단히 호출함으로써 요청을 처리할 \"현재 세션" +"\"에 접근할 수 있다. 당신은 현재 데이터베이스 트랜잭션으로 영역화된 하나의 " +"Session을 항상 얻게 될 것이다. 이것은 resource-local 환경 " +"또는 JTA 환경에 대해 구성되어야 하며, 을 보라." + +#. Tag: para +#: transactions.xml:144 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"때때로 \"뷰가 렌더링될 때까지\" 하나의 Session 과 데이터베" +"이스 트랜잭션의 영역을 확장시키는 것이 편리하다. 이것은 요청이 처리된 후에 하" +"나의 별도의 렌더링 단계를 활용하는 서블릿 어플리케이션들에서 특히 유용하다. " +"뷰 렌더링이 완료될 때까지 데이터베이스 트랜잭션을 확장하는 것은 당신이 당신 " +"자신의 인터셉터를 구현하는 경우에 행하기가 쉽다. 하지만 만일 당신이 컨테이너" +"에 의해 관리되는 트랜잭션들을 가진 EJB들에 의존할 경우에, 하나의 EJB 메소드" +"가 반환될 때 임의의 뷰 렌더링이 시작될 수 있기 전에 하나의 트랜잭션이 완료되" +"기 때문에, 행하는 것이 쉽지 않다. 이 Open Session in View 패턴을 둘러싼 팁들과 예제들은 Hibernate 웹 사이트와 포럼을 보라." + +#. Tag: title +#: transactions.xml:159 +#, no-c-format +msgid "Long conversations" +msgstr "장기간의 대화" + +#. Tag: para +#: transactions.xml:161 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"session-per-request 패턴은 당신이 작업 단위들을 설계하는데 사용할 수 있는 유" +"일한 유용한 개념이 아니다. 많은 비지니스 프로세스들은 데이터베이스 접근들을 " +"중재하는 사용자 사이의 전체 일련의 상호작용들을 필요로 한다. 웹과 엔터프라이" +"즈 어플리케이션에서 사용자 상호작용에 걸치는 것은 데이터베이스 트랜잭션에 허" +"용되지 않는다. 다음 예제를 검토하자:" + +#. Tag: para +#: transactions.xml:171 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"대화상자의 첫 번째 화면이 열리고, 사용자에게 보여진 데이터는 특정 " +"Session과 데이터베이스 트랜잭션 속에 로드되었다. 사용자가 " +"객체들을 변경시키는 것이 자유롭다." + +#. Tag: para +#: transactions.xml:178 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"사용자는 5분 후에 \"저장\"을 클릭하고 그의 변경들이 영속화 되기를 기대한다; " +"그는 또한 그가 이 정보를 편집하는 유일한 개인이고 변경 충돌이 발생하지 않기" +"를 기대한다." + +#. Tag: para +#: transactions.xml:186 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"우리는 사용자의 관점에서, 이것을 작업 단위, 장기간 실행되는 대화 (또는 어플리케이션 트랜잭션)이라고 명명한다. " +"당신이 당신의 어플리케이션에서 이것을 어떻게 구현할 수 있는 많은 방법들이 존" +"재한다." + +#. Tag: para +#: transactions.xml:192 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"첫 번째 naive 구현은 동시성 변경을 방지하고, 격리와 atomicity(원자 단위성)을 " +"보장하기 위해 데이터베이스에 의해 소유된 잠금으로 사용자가 생각하는동안 " +"Session과 데이터베이스 트랜잭션을 유지할 수도 있다. 이것" +"은 물론 anti-패턴이다. 왜냐하면 잠금 다툼은 어플리케이션이 동시 사용자들의 가" +"용 숫자를 높이는 것을 허용하지 않을 것이기 때문이다." + +#. Tag: para +#: transactions.xml:200 +#, fuzzy, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"conversation. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"명료하게, 우리는 대화(어플리케이션 트랜잭션)를 구현하는" +"데 몇몇 데이터베이스 트랜잭션들을 사용해야 한다. 이 경우에, 비지니스 프로세스" +"들의 격리를 유지하는 것은 어플리케이션 티어의 부분적인 책임이 된다. 단일 대화" +"는 대개 여러 개의 데이터베이스 트랜잭션들에 걸친다. 그것은 이들 데이터베이스 " +"트랜잭션들 중 오직 한 개(마지막 트랜잭션)가 업데이트된 데이터를 저장하고, 모" +"든 다른 트랜잭션들이 단순히 데이터를 읽는 (예를 들면, 몇몇 요청/응답 주기에 " +"걸치는 마법사 스타일의 대화 상자에서) 경우에만 원자단위가 될 것이다. 특히 당" +"신이 Hibernate의 특징들을 사용할 경우에 , 이것은 들리는 것보다 구현하기가 더 " +"쉽다:" + +#. Tag: para +#: transactions.xml:213 +#, fuzzy, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occurred during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"자동적인 버전화 - Hibernate는 당신을 위해 자동적인 " +"optimistic 동시성 제어를 행할 수 있고, 그것은 사용자가 생각하는 시간 동안 동" +"시적인 변경이 발생했는지를 자동적으로 검출할 수 있다. 대개 우리는 오직 대화" +"의 끝에서 체크한다." + +#. Tag: para +#: transactions.xml:221 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"Detached 객체들 - 만일 당신이 이미 논의된 " +"session-per-request 패턴을 사용하고자 결정하는 경우, 모" +"든 로드된 인스턴스들은 사용자가 생각하는 시간 동안 detached 상태에 있을 것이" +"다. Hibernate는 그 객체들을 재첨부시키고 변경들을 영속화 시키는 것을 허용해주" +"며, 그 패턴은 session-per-request-with-detached-objects(detached-객" +"체들을 가진 요청 당 세션)으로 명명된다. 자동적인 버전화는 동시성 " +"변경들을 격리시키는데 사용된다." + +#. Tag: para +#: transactions.xml:231 +#, fuzzy, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitly." +msgstr "" +"확장된 (또는 Long) Session - Hibernate " +"Session은 데이터베이스 트랜잭션이 커밋된 후에 기본 JDBC " +"커넥션이 연결 해제될 수도 있고, 새로운 클라이언트 요청이 발생할 때 다시 연결" +"될 수 있다. 이 패턴은 session-per-conversation(대화 당 세션)으로 알려져 있고 재첨부를 불필요하게 만든다. 자동적인 버전화는 동시" +"성 변경들을 격리시키는데 사용되고 Session은 자동적으로 " +"flush되는 것이 허용되지 않지만 명시적으로 flush되는 것은 허용된다." + +#. Tag: para +#: transactions.xml:244 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"session-per-request-with-detached-objects과 " +"session-per-conversation 양자는 장점들과 단점들을 갖는" +"데, 우리는 이 장의 뒷 부분에서 optimistic 동시성 제어 단락에서 그것들을 논의" +"한다." + +#. Tag: title +#: transactions.xml:253 +#, no-c-format +msgid "Considering object identity" +msgstr "객체 identity 고려하기" + +#. Tag: para +#: transactions.xml:255 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"어플리케이션은 두 개의 다른 Session들 내에 있는 동일한 영" +"속 상태에 동시에 접근할 수도 있다. 하지만 영속 클래스의 인스턴스는 두 개의 " +"Session 인스턴스들 사이에 결코 공유되지 않는다. 그러므로 " +"identity에 대한 두 개의 다른 개념들이 존재한다:" + +#. Tag: term +#: transactions.xml:264 +#, no-c-format +msgid "Database Identity" +msgstr "데이터베이스 Identity" + +#. Tag: literal +#: transactions.xml:267 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:272 +#, no-c-format +msgid "JVM Identity" +msgstr "JVM Identity" + +#. Tag: literal +#: transactions.xml:275 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:281 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"그때 (예를 들어 Session 영역에서) 특정Session에 첨부된 객체들의 경우 두 개의 개념들은 " +"동등한 것이고, 데이터베이스 identity에 대한 JVM identity가 Hibernate에 의해 " +"보장된다. 하지만, 어플리케이션이 두 개의 다른 세션들에서 \"동일한\" (영속 " +"identity) 비지니스 객체에 동시에 접근하는 동안, 두 개의 인스턴스들은 실제로 " +"\"다르다\"(JVM identity). 충돌들은 flush/커밋 시에 (자동적인 버전화)를 사용하" +"여, optimistic 접근법을 사용하여 해결된다." + +#. Tag: para +#: transactions.xml:290 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"이 접근법은 Hibernate와 데이터베이스가 동시성에 대해 걱정하지 않도록 해준다; " +"그것은 또한 최상의 scalability를 제공한다. 왜냐하면 단일 쓰레드-작업 단위 내" +"에서 identity 보장은 단지 비용이 드는 잠금이나 다른 동기화 수단들을 필요로 하" +"지 않기 때문이다. 어플리케이션은 그것이 Session 당 단일 쓰" +"레드를 강제하는 한, 어떤 비지니스 객체에 대해 결코 동기화 시킬 필요가 없다. " +"하나의 Session 내에서 어플리케이션은 객체들을 비교하는데 " +"==를 안전하게 사용할 수가 있다." + +#. Tag: para +#: transactions.xml:299 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"하지만, 하나의 Session 외부에서 ==를 사" +"용하는 어플리케이션은 예기치 않은 결과들을 보게 될 수도 있다. 이것은 어떤 예" +"기치 않은 장소들에서, 예를 들어 당신이 두 개의 detached 인스턴스들을 동일한 " +"Set 내에 집어넣을 경우에 발생할 수도 있다. 둘 다 동일한 데" +"이터베이스 identity를 가질 수 있지만 (예를 들어 그것들은 동일한 행을 표현한" +"다), JVM identity는 정의 상 detached 상태에 있는 인스턴스들을 보장하지 않는" +"다. 개발자는 영속 클래스들내에 equals() 메소드와 " +"hashCode() 메소드를 오버라이드 시켜야 하고 객체 equality" +"에 대한 그 자신의 개념을 구현해야 한다. 하나의 경고가 존재한다: equality를 구" +"현하는데 데이터베이스 identifier를 결코 사용하지 말고, 하나의 비지니스 키, 유" +"일한, 대개 불변인 속성들의 조합을 사용하라. 데이터베이스 식별자는 만일 " +"transient 객체가 영속화되는 경우에 변경될 것이다. 만일 transient 인스턴스가" +"(대개 detached 인스턴스들과 함께) Set 내에 보관되는 경우" +"에, hashcode 변경은 Set의 계약을 파기시킨다. 비지니스 키들" +"에 대한 속성들은 데이터베이스 프라이머리 키들 만큼 안정적이어서는 안되며, 당" +"신은 오직 객체들이 동일한 Set 내에 있는 한에서 안정성을 보" +"장해야만 한다. 이 쟁점에 관한 논의에 대한 더 많은 것을 Hibernate 웹 사이트를 " +"보라. 또한 이것이 Hibernate 쟁점이 아니며, 단지 자바 객체 identity와 equality" +"가 구현되어야 하는 방법임을 노트하라." + +#. Tag: title +#: transactions.xml:320 +#, no-c-format +msgid "Common issues" +msgstr "공통된 쟁점들" + +#. Tag: para +#: transactions.xml:322 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"안티-패턴들 session-per-user-session 또는 " +"session-per-application을 결코 사용하지 말라(물론 이 규" +"칙에 대한 드문 예외상황들이 존재한다). 다음 쟁점들 중 몇몇이 또한 권장되는 패" +"턴들로 나타날 수 있음을 노트하고, 당신이 설계 결정을 내리기 전에 내포된 의미" +"들을 확실히 이해하라:" + +#. Tag: para +#: transactions.xml:331 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"Session은 쓰레드-안전하지 않다. HTTP 요청들, 세션 빈즈, 또" +"는 Swing worker들처럼 동시에 작업하는 것으로 가정되는 것들은 하나의 " +"Session 인스턴스가 공유될 경우에 경쟁 조건들을 발생시킬 것" +"이다. 만일 당신이 당신의 HttpSession 내에 Hibernate " +"Session을 유지시키는 경우(나중에 논의됨), 당신은 당신의 " +"Http 세션에 대한 접근을 동기화 시키는 것을 고려해야 한다. 그 밖의 경우, 충분" +"히 빠르게 reload를 클릭하는 사용자는 두 개의 동시적으로 실행되는 쓰레드들 내" +"에서 동일한 Session을 사용할 수도 있다." + +#. Tag: para +#: transactions.xml:342 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"Hibernate에 의해 던져진 예외상황은 당신이 당신의 데이터베이스 트랜잭션을 롤" +"백 시키고 즉시 Session을 닫아야 함을 의미한다(나중에 상세" +"히 논의됨). 만일 당신의 Session이 어플리케이션에 바인드 되" +"어 있는 경우, 당신은 어플리케이션을 중지시켜야 한다. 데이터베이스 트랜잭션 롤" +"백은 당신의 비지니스 객체들을 그것들이 트랜잭션의 시작 시에 머물렀던 상태로 " +"되돌리지는 않는다. 이것은 데이터베이스 상태와 비지니스 객체들이 동기화를 벗어" +"남을 의미한다. 대개 이것은 문제가 아니다. 왜냐하면 예외상황들은 회복가능한 것" +"이 아니고 당신이 어떻게든 롤백 후에 시작해야 하기 때문이다." + +#. Tag: para +#: transactions.xml:354 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"Session은 (Hibernate에 의해 dirty 상태로 관찰되었거나 체크" +"된) 영속 상태에 있는 모든 객체를 캐시 시킨다. 이것은 당신이 오랜 시간 동안 " +"Session을 열어둔 채로 유지하거나 단순하게 너무 많은 데이터" +"를 로드시킬 경우에, 당신이 OutOfMemoryException을 얻기 전까지, 그것이 끝없이 " +"성장한다는 점을 의미한다. 이것에 대한 하나의 해결책은 Session 캐시를 관리하기 위해 clear()evict()를 호출하는 것이지만, 당신이 대용량 데이터 오퍼레이션들을 필요로 하" +"는 경우에 당신은 대개 내장 프로시저를 고려해야 할 것이다. 몇몇 해결책들이 " +"에 보여져 있다. 사용자 세션 동안에 " +"Session을 열려진 채로 유지하는 것은 또한 실효성이 떨어진 " +"데이터에 대한 높은 확률을 의미한다." + +#. Tag: title +#: transactions.xml:372 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "데이터베이스 트랜잭션 경계 설정" + +#. Tag: para +#: transactions.xml:374 +#, fuzzy, no-c-format +msgid "" +"Database (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"데이터베이스 (또는 시스템) 트랜잭션 경계들은 항상 필수적이다. 데이터베이스와" +"의 통신은 데이터베이스 트랜잭션의 외부에서 발생할 수 없다(이것은 자동-커밋 모" +"드로 사용되는 많은 개발자들에게는 혼동스러워 보인다). 항상 심지어 읽기 전용 " +"오퍼레이션들에 대해서도 명료한 트랜잭션 경계들을 사용하라. 당신의 격리 레벨" +"과 데이터베이스 가용성들에 따라, 이것은 필요하지 않을 수 있지만, 만일 당신이 " +"항상 트랜잭션들을 명시적으로 경계 설정할 경우에는 하강하는 결점들이 존재하지 " +"않는다. 확실히, 하나의 데이터베이스 트랜잭션은 심지어 데이터 읽기조차도 많은 " +"작은 트랜잭션들의 경우보다는 더 좋게 수행될 것이다." + +#. Tag: para +#: transactions.xml:384 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"Hibernate 어플리케이션은 관리되지 않는 환경(예를 들면. 스탠드얼론, 간단히 웹 " +"어플리케이션들 또는 Swing 어플리케이션들)과 관리되는 J2EE 환경에서 실행될 수 " +"있다. 관리되지 않는 환경에서, Hibernate는 대개 그것 자신의 데이터베이스 커넥" +"션 풀에 대한 책임이 있다. 어플리케이션 개발자는 트랜잭션 경계들을 손수 설정해" +"야 한다. 달리 말해, 개발자 스스로 데이터베이스 트랜잭션들을 시작하고, 커밋시" +"키거나 롤백시켜야 한다. 관리되는 환경은 대개 예를 들어 EJB 세션 빈즈의 배치 " +"디스크립터 속에 선언적으로 정의된 트랜잭션 어셈블리를 가진, 컨테이너에 의해-" +"관리되는 트랜잭션들(CMT)을 제공한다. 그때 프로그램 상의 트랜잭션 경계 설정은 " +"더 이상 필요하지 않다." + +#. Tag: para +#: transactions.xml:394 +#, fuzzy, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demarcation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"하지만, CMT 대신 BMT를 사용하는 JTA에 의존할 수 있는 시스템들, 그리고 관리되" +"지 않는 resource-local 환경들 사이에서 당신의 영속 계층에 이식성을 유지시키" +"는 것이 자주 희망된다. 두 경우들에서 당신은 프로그램 상의 트랜잭션 경계설정" +"을 사용할 것이다. Hibernate는 당신의 배치 환경의 고유한 트랜잭션 시스템 속으" +"로 변환되는 Transaction이라 명명되는 wrapper API 를 제공한" +"다. 이 API는 실제로 옵션이지만 우리는 당신이 CMT session bean 속에 있지 않는 " +"한 그것의 사용을 강력하게 권장한다." + +#. Tag: para +#: transactions.xml:403 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "" +"대개 Session 종료는 네 개의 구분되는 단계들을 수반한다:" + +#. Tag: para +#: transactions.xml:409 +#, no-c-format +msgid "flush the session" +msgstr "세션을 flush 시킨다" + +#. Tag: para +#: transactions.xml:414 +#, no-c-format +msgid "commit the transaction" +msgstr "트랜잭션을 커밋 시킨다" + +#. Tag: para +#: transactions.xml:419 +#, no-c-format +msgid "close the session" +msgstr "세션을 닫는다" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "handle exceptions" +msgstr "예외상황들을 처리한다" + +#. Tag: para +#: transactions.xml:430 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"세션을 flush 시키는 것은 앞서 논의되었고, 우리는 이제 관리되는 환경과 관리되" +"지 않는 환경 양자에서 트랜잭션 경계 설정과 예외상황을 더 자세히 살펴볼 것이" +"다." + +#. Tag: title +#: transactions.xml:437 +#, no-c-format +msgid "Non-managed environment" +msgstr "관리되지 않는 환경" + +#. Tag: para +#: transactions.xml:439 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"만일 Hibernate 영속 계층이 관리되지 않는(non-managed) 환경에서 실행될 경우, " +"데이터베이스 커넥션들은 대개 Hibernate가 필요로할 때 커넥션들을 획득하는 간단" +"한 (예를 들면 DataSource가 아닌) 커넥션 풀(pool)들로부터 처리된다. session/" +"transaction 처리 관용구는 다음과 같다:" + +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:448 +#, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"당신은 Session을 명시적으로 flush() 하" +"지 말아야 한다 - commit()에 대한 호출은 (그 세션에 대한 " +"FlushMode에 따라)자동적으로 동" +"기화를 트리거시킨다. close()에 대한 호출은 세션의 끝을 마" +"크한다. close()의 주된 구현은 JDBC 커넥션이 그 세션에 의" +"해 포기될 것이라는 점이다. 이 Java 코드는 관리되지 않는 환경과 JTA 환경 양자" +"에서 이식성이 있고 실행된다." + +#. Tag: para +#: transactions.xml:457 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"보다 더 유연한 해결책은 앞서 설명했듯이 Hibernate의 미리 빌드되어 있는 \"현" +"재 세션\" 컨텍스트 관리이다:" + +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"당신은 통상의 어플리케이션에서 비지니스 코드 속에 이 관용구를 결코 보지 않을 " +"것이다; 치명적인(시스템) 예외상황들은 항상 \"상단\"에서 잡혀야 한다. 달리 말" +"해, (영속 계층에서) Hibernate 호출들을 실행시키는 코드와 " +"RuntimeException을 처리하(고 대개 오직 제거하고 빠져나갈 " +"수 있는) 코드는 다른 계층들 속에 있다. Hibernate에 의한 현재 컨텍스트 관리는 " +"이 설계를 현격하게 단순화시켜서, 당신이 필요로 하는 모든 것은 " +"SessionFactory에 대한 접근이다.예외상황 처리는 이 장의 뒷" +"부분에서 논의된다." + +#. Tag: para +#: transactions.xml:474 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"당신은 (디폴트인) org.hibernate.transaction.JDBCTransactionFactory를 선택해야 하고, 두번째 예제의 경우 당신의 hibernate." +"current_session_context_class를 선택해야 함을 노트하라." + +#. Tag: title +#: transactions.xml:483 +#, no-c-format +msgid "Using JTA" +msgstr "JTA 사용하기" + +#. Tag: para +#: transactions.xml:485 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"만일 당신의 영속 계층이 어플리케이션 서버에서(예를 들어, EJB 세션 빈즈 이면에" +"서) 실행될 경우, Hibernate에 의해 획득된 모든 데이터소스 커넥션은 자동적으로 " +"전역 JTA 트랜잭션의 부분일 것이다. 당신은 또한 스탠드얼론 JTA 구현을 설치할 " +"수 있고 EJB 없이 그것을 사용할 수 있다. Hibernate는 JTA 통합을 위한 두 개의 " +"방도들을 제공한다." + +#. Tag: para +#: transactions.xml:492 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"만일 당신이 bean-managed transactions(BMT)를 사용할 경우 Hibernate는 당신이 " +"Transaction API를 사용할 경우에 BMT 트랜잭션을 시작하고 종" +"료하도록 어플리케이션 서버에게 알려줄 것이다. 따라서 트랜잭션 관리 코드는 " +"non-managed 환경과 동일하다." + +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "" +"만일 당신이 트랜잭션에 묶인 Session, 즉 쉬운 컨텍스트 보급" +"을 위한 getCurrentSession() 기능을 사용하고자 원할 경우, " +"당신은 JTA UserTransaction API를 직접 사용해야 할 것이다:" + +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:508 +#, fuzzy, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" +"CMT의 경우, 트랜잭션 관할[경계 설정]은 프로그램 상이 아닌, session bean 배치 " +"디스크립터들 속에서 행해진다. 그러므로 코드는 다음으로 감소된다:" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"왜냐하면 하나의 세션 빈 메소드에 의해 던져진 처리되지 않은 " +"RuntimeException이 글로벌 트랜잭션을 rollback으로 설정하도" +"록 컨테이너에게 알려주기 때문에, CMT/EJB에서조차 롤백은 자동적으로 발생된다. " +"이것은 당신이 BMT 이든 CMT이든 모두에서 Hibernate " +"Transaction API를 사용할 필요가 없으며, 당신은 그 트랜잭션" +"에 묶인 \"현재\" Session의 자동적인 보급(propagation)을 얻게 됨을 의미한다." + +#. Tag: para +#: transactions.xml:523 +#, fuzzy, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatibility), or set to \"jta\"." +msgstr "" +"당신이 Hibernate의 트랜잭션 팩토리를 구성할 때, 당신이 JTA를 직접 사용할 경우" +"(BMT) 당신은 org.hibernate.transaction.JTATransactionFactory를 선택해야하고, CMT session bean에서는 org.hibernate." +"transaction.CMTTransactionFactory를 선택해야 함을 노트하라. 또한 " +"org.hibernate.transaction.manager_lookup_class를 설정하는 " +"것을 염두에 두라. 게다가 반드시 당신의 hibernate." +"current_session_context_class이 설정되지 않도록 하거나(역호환성), " +"또는 \"jta\"로 설정되도록 하라." + +#. Tag: para +#: transactions.xml:532 +#, fuzzy, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicitly " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"getCurrentSession() 오퍼레이션들은 JTA 환경에서 한 가지 단" +"점을 갖고 있다. 디폴트로 사용되는, after_statement 커넥션 " +"해제 모드 사용에 대한 하나의 보류 통보가 존재한다. JTA 명세서의 어리석은 제한" +"으로 인해, Hibernate가 scroll() 또는 iterate()에 의해 반환되는 임의의 닫혀지지 않은 ScrollableResults 또는 Iterator 인스턴스들을 자동적으로 제거하는 것" +"이 불가능하다. 당신은 finally 블록 내에서 명시적으로 " +"ScrollableResults.close() 또는 Hibernate.close" +"(Iterator)를 호출하여 기본 데이터베이스 커서를 해제시켜" +"야 한다.(물론 대부분의 어플리케이션들은 JTA 또는 CMT 코드에서 " +"scroll()이나 iterate()를 사용하는 것을 " +"쉽게 피할 수 있다.)" + +#. Tag: title +#: transactions.xml:548 +#, no-c-format +msgid "Exception handling" +msgstr "예외상황 처리" + +#. Tag: para +#: transactions.xml:550 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"만일Session이 (어떤 SQLException을 포함" +"하는) 예외상황을 던질 경우, 당신은 데이터베이스 트랜잭션을 즉시 롤백시키고, " +"Session.close()를 호출하고 Session 인스" +"턴스를 폐기시켜야한다. Session의 어떤 메소드들은 그 세션" +"을 일관된 상태로 남겨두지 않을 것이다. Hibernate에 의해 " +"던져진 예외상황은 복구가능한 것으로 취급될 수 없다. 그 Sessionfinally 블록 내에서 close()" +"를 호출하여 닫혀지도록 확실히 하라." + +#. Tag: para +#: transactions.xml:561 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"Hibernate 영속 계층에서 발생할 수 있는 대부분의 오류들을 포장하는, " +"HibernateException은 체크되지 않은 예외상황이다(그것은 " +"Hibernate의 이전 버전에는 없었다). 우리의 의견으로, 우리는 낮은 계층에서 복구" +"불가능한 예외상황을 붙잡도록 어플리케이션 개발자에게 강제하지 않을 것이다. 대" +"부분의 시스템들에서, 체크되지 않은 치명적인 예외상황들은 (예를 들어, 더 높은 " +"계층에서) 메소드 호출 스택의 첫 번째 프레임들 중 하나 속에서 처리되고, 한 개" +"의 오류 메시지가 어플리케이션 사용자에게 표시된다(또는 어떤 다른 적절한 액션" +"이 취해진다). Hibernate는 또한 HibernateException이 아닌, " +"다른 체크되지 않은 예외상황들을 던질 수도 있음을 노트하라. 다시 이것들은 복구" +"가능하지 않고 적절한 액션이 취해져야 한다." + +#. Tag: para +#: transactions.xml:573 +#, fuzzy, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the exception into a more meaningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"Hibernate는 데이터베이스와 상호작용하는 동안에 던져진 SQLException들을 하나의 JDBCException 속에 포장한다. 사실, " +"Hibernate는 그 예외상황을 JDBCException의 보다 의미있는 서" +"브클래스로 변환하려고 시도할 것이다. 기본 SQLException은 " +"JDBCException.getCause()를 통해 항상 이용 가능하다. " +"Hibernate는SessionFactory에 첨부된 " +"SQLExceptionConverter를 사용하여 SQLException을 적당한 하나의 JDBCException 서브클래스로 변환시" +"킨다. 디폴트로 SQLExceptionConverter는 구성된 dialect에 의" +"해 정의된다; 하지만 맞춤 구현 속에 플러그인 시키는 것이 또한 가능하다(상세한 " +"것은 SQLExceptionConverterFactory 클래스에 관한 javadocs" +"를 보라). 표준 JDBCException 서브타입은 다음과 같다:" + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - 기본 JDBC 통신에 대한 오류를 나" +"타낸다." + +#. Tag: para +#: transactions.xml:595 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - 생겨난 SQL에 대한 문법 또는 구문 문" +"제점을 나타낸다." + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - 무결성 제약 위반에 관한 어" +"떤 형식을 나타낸다." + +#. Tag: para +#: transactions.xml:607 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - 요청된 오퍼레이션을 실행하는데 " +"필수적인 잠금 레벨을 획득하는 오류를 나타낸다." + +#. Tag: para +#: transactions.xml:613 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "" +"GenericJDBCException - 다른 카테고리들 중 어떤 것으로 분류" +"되지 않았던 일반적인 예외상황." + +#. Tag: title +#: transactions.xml:623 +#, no-c-format +msgid "Transaction timeout" +msgstr "트랜잭션 타임아웃" + +#. Tag: para +#: transactions.xml:625 +#, fuzzy, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functionality is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"관리되지 않는 코드에 대해서는 결코 제공되지 않는 EJB와 같이 관리되는 환경에 " +"의해 제공되는 한 가지 극히 중요한 특징은 트랜잭션 타임아웃이다. 트랜잭션 타임" +"아웃은 사용자에게 응답을 반환하지 않는 동안에 무례한 행동을 행하는 트랜잭션" +"이 자원들을 무한정 묶어둘 수 없음을 보증해준다. 관리되는 (JTA) 환경 외부에" +"서, Hibernate는 이 기능을 온전하게 제공할 수 없다. 하지만 Hibernate는 데이터" +"베이스 레벨 데드락들과 거대한 결과 셋들을 가진 질의들이 정의된 타임아웃에 의" +"해 제약되는 것을 보장함으로써 최소한 데이터 접근 오퍼레이션들을 제어할 수 있" +"다. 관리되는 환경에서, Hibernate는 트랜잭션 타임아웃을 JTA에게 위임시킬 수 있" +"다. 이 기능은 Hibernate Transaction 객체에 의해 추상화 된" +"다." + +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"setTimeout()은 CMT bean 내에서 호출도리 수 없음을 노트하" +"라. 여기서 트랜잭션 타임아웃들은 선언적으로 정의되어야 한다." + +#. Tag: title +#: transactions.xml:650 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "Optimistic 동시성 제어" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"고도의 동시성과 고도의 가용성을 일치시키는 유일한 접근법은 버전화를 가진 " +"optimistic동시성 제어이다. 버전 체킹은 업데이트 충돌을 검출하기 위해(그리고 " +"업데이트 손실을 방지하기 위해) 버전 번호들 또는 timestamp들을 사용한다. " +"Hibernate는 optimistic 동시성을 사용하는 어플리케이션 코드 작성에 세 가지 가" +"능한 접근법들을 제공한다. 우리가 보여주는 쓰임새들은 장시간의 대화의 상황 속" +"에 있지만, 버전 체킹 또한 단일 데이터베이스 트랜잭션들에서 업데이트 손실을 방" +"지하는 이점을 갖고 있다." + +#. Tag: title +#: transactions.xml:663 +#, no-c-format +msgid "Application version checking" +msgstr "어플리케이션 버전 체킹" + +#. Tag: para +#: transactions.xml:665 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"하나의 구현에서 Hibernate로부터 많은 도움이 없이, 데이터베이스에 대한 각각의 " +"상호작용은 새로운 Session 내에서 일어나고, 개발자는 영속 " +"인스턴스들을 처리하기 전에 데이터베이스로부터 모든 영속 인스턴스들을 다시 로" +"드시킬 책임이 있다. 이 접근법은 대화 트랜잭션을 확실히 격리시키기 위해 그것 " +"자신의 버전 체킹을 수행하도록 어플리케이션에게 강제시킨다." + +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"version 프로퍼티는 <version>을 사용하여 매핑되고, " +"Hibernate는 만일 엔티티가 dirty일 경우 flush 동안에 그것을 자동적으로 증가시" +"킬 것이다." + +#. Tag: para +#: transactions.xml:682 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"물론, 당신이 낮은 데이터 동시성 환경에서 작업하고 있고 버전 체킹을 필요로 하" +"지 않을 경우에, 당신은 이 접근법을 사용할 수 도 있고 단지 버전 체크를 생략할 " +"수도 있다. 그 경우에, 마지막의 커밋 성공은 당신의 장시간" +"의 대화에 대한 디폴트 방도가 될 것이다. 이것이 어플리케이션의 사용자들을 혼동" +"시킬 수 있음을 염두에 두라. 왜냐하면 사용자들은 오류 메시지들 또는 충돌 변경" +"들을 병합시킬 기회 없이 업데이트들 손실을 겪을 수도 있기 때문이다." + +#. Tag: para +#: transactions.xml:691 +#, fuzzy, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified objects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"명료하게 수작업 버전 체킹은 매우 사소한 환경들에서도 공포적이고 대부분의 어플" +"리케이션들에 대해 실제적이지 않다. 흔히 단일 인스턴스 뿐만 아니라 변경된 객체" +"들의 전체 그래프들이 체크되어야 한다. Hibernate는 설계 패러다임으로서 하나의 " +"확장된 Session 또는 detached 인스턴스들에 대해 자동적인 버" +"전 체킹을 제공한다." + +#. Tag: title +#: transactions.xml:702 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "확장된 세션과 자동적인 버전화" + +#. Tag: para +#: transactions.xml:704 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"하나의 Session 인스턴스와 그것의 영속 인스턴스들은 전체 어" +"플리케이션 트랜잭션에 사용된다. Hibernate는 flush 할 때 인스턴스 버전들을 체" +"크하고 만일 동시성 변경이 검출될 경우에 예외상황을 던진다. 이 예외상황을 잡아" +"내고 처리하는 것을 개발자의 몫이다(공통된 옵션들은 변경들을 병합시키거나 또" +"는 쓸모가 없지 않은 데이터로 비지니스 프로세스를 다시 시작하는 기회를 사용자" +"에게 주는 것이다). 하나의 Session 인스턴스와 그것의 영속 " +"인스턴스들은 session-per-conversation로 알려진 전체 대화" +"에 사용된다. Hibernate는 flush 시점에서 인스턴스 버전들을 체크하며, 만일 동시" +"적인 변경이 검출될 경우에 하나의 예외상황을 던진다. 이 예외상황을 포착하고 처" +"리하는 것은 개발자의 몫이다(공통된 옵션들은 사용자가 변경들을 병합하거나 손실" +"되지 않은 데이터를 가지고 비지니스 대화를 재시작하는 기회이다)." + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"Session은 사용자 상호작용을 기다릴 때 어떤 기본 JDBC 커넥" +"션으로부터 연결해제된다. 이 접근법은 데이터베이스 접근의 관점에서 보면 가장 " +"효율적이다. 어플리케이션은 버전 체킹 또는 detached 인스턴스들을 재첨부하는 것" +"에 그 자체 관계할 필요가 없거나 그것은 모든 데이터베이스 트랜잭션에서 인스턴" +"스들을 다시 로드시킬 필요가 없다." + +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"foo 객체는 그것이 로드되었던 Session이 " +"어느 것인지를 여전히 알고 있다. 이전 세션 상에서 하나의 새로운 데이터베이스 " +"트랜잭션을 시작하는 것은 하나의 새로운 커넥션을 획득하고 그 세션을 소비한다. " +"데이터베이스 트랜잭션을 커밋(확약)시키는 것은 그 JDBC 커넥션으로부터 하나의 " +"세션을 연결해제시키고 그 커넥션을 풀(pool)로 반환시킬 것이다. 재연결 후에, 당" +"신이 업데이트하고 있지 않은 데이터에 대한 버전 체크를 강제시키기 위해서, 당신" +"은 또 다른 트랜잭션에 의해 업데이트되었을 수도 있는 임의의 객체들에 대해 " +"LockMode.READ로서 Session.lock()을 호출" +"할 수도 있다. 당신은 당신이 업데이트 중인 임의의 데이터를 잠금할 필요가 없" +"다. 대개 당신은 마지막 데이터베이스 트랜잭션 주기만이 이 대화 내에서 행해진 " +"모든 변경들을 실제로 영속화시키는 것이 허용되도록 하기 위해, 하나의 확장된 " +"Session에 대해 FlushMode.MANUAL를 설정" +"할 것이다. 그러므로 오직 이 마지막 데이터베이스 트랜잭션 만이 flush" +"() 오퍼레이션을 포함할 것이고, 또한 대화를 종료시키기 위해 세션을 " +"close()할 것이다." + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"만일 사용자가 생각하는시간 동안 Session이 저장되기에 너무 " +"큰 경우 이 패턴은 문제성이 있다. 예를 들어 HttpSession은 " +"가능한 작은 것으로 유지되어야 한다. 또한 Session은 (필수" +"의) 첫 번째 레벨 캐시이고 모든 로드된 객체들을 포함하기 때문에, 우리는 아마 " +"적은 요청/응답 주기들에 대해서만 이 방도를 사용할 수 있다. 당신은 하나의 대화" +"에 대해서만 하나의 Session을 사용해야 한다. 왜냐하면 그것" +"은 또한 곧 실없는 데이터가 될 것이기 때문이다." + +#. Tag: para +#: transactions.xml:747 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"(초기의 Hibernate 버전들은 Session에 대한 명시적인 연결해" +"제와 재연결을 필요로 했음을 노트하라. 트랜잭션을 시작하고 끝내는 것이 동일한 " +"효과를 가지므로, 이들 방법들은 진부하게 되었다.)" + +#. Tag: para +#: transactions.xml:753 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"또한 당신은 영속 계층에 대해 연결해제된 Session을 닫혀진채" +"로 유지해야함을 노트하라. 달 리말해, 하나의 3-tier 환경에서 " +"Session을 소유하는데 EJB stateful session bean을 사용하" +"고, HttpSession 내에 그것을 저장하기 위해 그것을 웹 계층" +"에 전송하지 말라 (또는 그것을 별도의 티어에 직렬화 시키지도 말라)." + +#. Tag: para +#: transactions.xml:761 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"확장된 세션 패턴, 또는 session-per-conversation은 자동적" +"인 현재 세션 컨텍스트 관리에 대해 구현하기가 더 어렵다. 당신은 이를 위해 당" +"신 자신의 CurrentSessionContext 구현을 공급할 필요가 있으" +"며, 예제들은 Hibernate Wiki를 보라." + +#. Tag: title +#: transactions.xml:771 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "Detached 객체들과 자동적인 버전화" + +#. Tag: para +#: transactions.xml:773 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"영속 저장소에 대한 각각의 상호작용은 새로운 Session에서 일" +"어난다. 하지만 동일한 영속 인스턴스들은 데이터베이스와의 각각의 상호작용에 재" +"사용된다. 어플리케이션은 원래 로드되었던 detached 인스턴스들의 상태를 또 다" +"른 Session 내에서 처리하고 나서 Session.update()" +", Session.saveOrUpdate(), Session.merge" +"()를 사용하여 그것들을 다시 첨부시킨다." + +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:783 +#, fuzzy, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occurred." +msgstr "" +"다시, Hibernate는 flush 동안에 인스턴스 버전들을 체크할 것이고 업데이트 충돌" +"이 발생할 경우에 예외상황을 던질 것이다." + +#. Tag: para +#: transactions.xml:788 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"당신은 또한 update()대신에 lock()을 호" +"출할 수도 있고 만일 그 객체가 변경되지 않았음을 당신이 확신하는 경우에 (버전 " +"체킹을 수행하고 모든 캐시들을 무시하는) LockMode.READ를 사" +"용할 수 있다." + +#. Tag: title +#: transactions.xml:797 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "자동적인 버전화를 맞춤화 시키기" + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"당신은 optimistic-lock 매핑 속성을 false로 설정함으로써 특정 프로퍼티들과 콜렉션들에 대한 Hibernate의 자동적" +"인 버전 증가를 불가능하도록 할 수도 있다. 그때 Hibernate는 그 프로퍼티가 " +"dirty 일 경우에 더 이상 버전을 증가시키지 않을 것이다." + +#. Tag: para +#: transactions.xml:806 +#, fuzzy, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this conceptually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"리거시 데이터베이스 스키마들은 자주 static이고 변경될 수 없다. 또는 다른 어플" +"리케이션들은 또한 동일한 데이터베이스에 접근하고 버전 번호들 또는 심지어 " +"timestamp들을 처리하는 방법을 모를 수도 있다. 두 경우들에서, 버전화는 테이블 " +"내의 특정 컬럼에 의지할 수 없다. version 또는 timestamp 프로퍼티 매핑 없이 " +"행 내의 모든 필드들에 대한 상태를 비교하여 버전 체크를 강제시키기 위해서, " +"<class> 매핑 속에 optimistic-lock=\"all\"을 표시하라. 만일 Hibernate가 이전 상태와 새로운 상태를 비교할 수 있" +"을 경우에, 예를 들면 당신이 하나의 긴 Session을 사용하고 " +"session-per-request-with-detached-objects을 사용하지 않을 경우 이것은 개념적" +"으로만 동작함을 노트하라." + +#. Tag: para +#: transactions.xml:817 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"때때로 행해졌던 변경들이 중첩되지 않는 한 동시적인 변경이 허용될 수 있다. 만" +"일 <class>를 매핑할 때 당신이 optimistic-" +"lock=\"dirty\"를 설정하면, Hibernate는 flush 동안에 dirty 필드들을 " +"비교만 할 것이다." + +#. Tag: para +#: transactions.xml:823 +#, fuzzy, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute unnecessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"두 경우들에서, 전용 version/timestamp 컬럼의 경우 또는 full/dirty 필드 비교" +"의 경우, Hibernate는 법전 체크를 실행하고 정보를 업데이트하는데 엔티티 당 (적" +"절한 WHERE 절을 가진) 한 개의UPDATE 문" +"장을 사용한다. 만일 당신이 연관된 엔티티들에 대한 재첨부를 케스케이드 하는데 " +"transitive 영속을 사용할 경우, Hibernate는 불필요하게 업데이트들을 실행할 수" +"도 있다. 이것은 대개 문제가 아니지만, 심지어 변경들이 detached 인스턴스들에 " +"대해 행해지지 않았을 때에도 데이터베이스 내에서 on update 트리거들이 실행될 수도 있다. 그 행을 업데이트하기 전에 변경들이 실" +"제로 일어났음을 확인하기 위해 인스턴스를 SELECT하는 것을 " +"Hibernate에게 강제시키는, <class> 매핑 속에 " +"select-before-update=\"true\"를 설정함으로써 당신은 이 특" +"징을 맞춤화 시킬 수 있다." + +#. Tag: title +#: transactions.xml:841 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "Pessimistic 잠금" + +#. Tag: para +#: transactions.xml:843 +#, fuzzy, no-c-format +msgid "" +"It is not intended that users spend much time worrying about locking " +"strategies. It's usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"사용자들은 잠금 방도에 대해 걱정하는데 많은 시간을 할애하하려고 생각하지 않는" +"다. 대개 JDBC 커넥션들에 대한 격리 레벨을 지정하는 것으로 충분하고 그런 다음 " +"단순히 데이터베이스로 하여금 모든 작업을 행하도록 한다. 하지만 진일보한 사용" +"자들은 때때로 배타적인 pessimistic 잠금들을 얻거나 또는 새로운 트랜잭션의 시" +"작 시에 잠금들을 다시 얻고자 원할 수도 있다." + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "" +"Hibernate는 결코 메모리 내에 있는 객체들이 아닌, 데이터베이스의 잠금 메커니즘" +"을 항상 사용할 것이다!" + +#. Tag: para +#: transactions.xml:855 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"LockMode 클래스는 Hibernate에 의해 획득될 수 있는 다른 잠" +"금 레벨들을 정의한다. 잠금은 다음 메커니즘들에 의해 얻어진다:" + +#. Tag: para +#: transactions.xml:862 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"LockMode.WRITE는 Hibernate가 한 행을 업데이트 하거나 " +"insert 할 때 자동적으로 획득된다." + +#. Tag: para +#: transactions.xml:868 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"LockMode.UPGRADESELECT ... FOR UPDATE 구문을 지원하는 데이터베이스 상에서 SELECT ... FOR UPDATE를 사용하여 명시적인 사용자 요청 상에서 얻어질 수 있다." + +#. Tag: para +#: transactions.xml:874 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"LockMode.UPGRADE_NOWAIT는 오라클에서 SELECT ... " +"FOR UPDATE NOWAIT를 사용하여 명시적인 사용자 요청 상에서 얻어질 수" +"도 있다." + +#. Tag: para +#: transactions.xml:880 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"LockMode.READ는 Hibernate가 반복 가능한 읽기(Repeatable " +"Read) 또는 Serialization 격리 레벨에서 데이터를 읽어들일 때 자동적으로 얻어" +"질 수도 있다. 명시적인 사용자 요청에 의해 다시 얻어질 수도 있다." + +#. Tag: para +#: transactions.xml:887 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE은 잠금이 없음을 나타낸다. 모든 객체들은 " +"Transaction의 끝에서 이 잠금 모드로 전환된다. " +"update() 또는 saveOrUpdate()에 대한 호" +"출을 통해 세션과 연관된 객체들이 또한 이 잠금 모드로 시작된다." + +#. Tag: para +#: transactions.xml:896 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "\"명시적인 사용자 요청\"은 다음 방법들 중 하나로 표현된다:" + +#. Tag: para +#: transactions.xml:902 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"LockMode를 지정한 Session.load()에 대" +"한 호출." + +#. Tag: para +#: transactions.xml:907 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "Session.lock()에 대한 호출." + +#. Tag: para +#: transactions.xml:912 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "Query.setLockMode()에 대한 호출." + +#. Tag: para +#: transactions.xml:918 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"만일 Session.load()UPGRADE 또는 " +"UPGRADE_NOWAIT 모드로 호출되고 ,요청된 객체가 아직 이 세션" +"에 의해 로드되지 않았다면, 그 객체는 SELECT ... FOR UPDATE" +"를 사용하여 로드된다. 만일 요청된 것이 아닌 다소 제한적인 잠금으로 이미 로드" +"되어 있는 객체에 대해 load()가 호출될 경우, Hibernate는 " +"그 객체에 대해 lock()을 호출한다." + +#. Tag: para +#: transactions.xml:927 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"만일 지정된 잠금 모드가 READ, UPGRADE " +"또는 UPGRADE_NOWAIT 일 경우에 Session.lock()은 버전 번호 체크를 수행한다. (UPGRADE 또는 " +"UPGRADE_NOWAIT 인 경우에, SELECT ... FOR UPDATE가 사용된다.)" + +#. Tag: para +#: transactions.xml:934 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"만일 데이터베이스가 요청된 잠금 모드를 지원하지 않을 경우, (예외상황을 던지" +"는 대신에) Hibernate는 적절한 대체 모드를 사용할 것이다. 이것은 어플리케이션" +"이 이식 가능할 것임을 확실히 해준다." + +#. Tag: title +#: transactions.xml:943 +#, no-c-format +msgid "Connection Release Modes" +msgstr "연결 해제 모드들" + +#. Tag: para +#: transactions.xml:945 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" +"JDBC 커넥션 관리에 관한 Hibernate의 리거시(2.x) 특징은 그것이 처음으로 필요" +"로 했을 때 하나의 Session이 하나의 커넥션을 획득할 것이" +"고, 그런 다음 그 커넥션은 그 세션이 닫혀질때까지 보관된다는 것이었다. " +"Hibernate 3.x는 세션에게 그것의 JDBC 커넥션들을 처리하는 방법을 알려주기 위" +"해 연결 해제 모드들에 관한 개념을 도입했다. 다음 논의는 구성된 " +"ConnectionProvider를 통해 제공되는 커넥션들에 대해서만 적" +"절하다는 점을 노트하라; 사용자가 제공하는 커넥션들은 org.hibernate." +"ConnectionReleaseMode의 열거된 값들에 의해 식별된다:" + +#. Tag: para +#: transactions.xml:959 +#, fuzzy, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obtains a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" +"ON_CLOSE - 는 본질적으로 위에 설명된 리거시 특징이다. " +"Hibernate 세션은 그것이 어떤 JDBC 접근을 수행하고 세션이 닫혀질 때까지 그 커" +"넥션을 보관할 필요가 있을 때 하나의 커넥션을 획득한다." + +#. Tag: para +#: transactions.xml:966 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" +"AFTER_TRANSACTION - 은 하나의 org.hibernate." +"Transaction이 완료된 후에 연결들을 해제하라고 말한다." + +#. Tag: para +#: transactions.xml:972 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" +"AFTER_STATEMENT (또한 적극적인 해제라고 언급됨) - 는 각각" +"의 모든 문장 실행 후에 커넥션들을 해제하라고 말한다. 이 적극적인 해제는 그 문" +"장이 주어진 세션과 연관된 리소스들을 열려진채로 남겨둘 경우에는 건너뛰게" +"(skip) 된다; 현재 이것이 일어나는 유일한 상황은 org.hibernate." +"ScrollableResults의 사용을 통해서이다." + +#. Tag: para +#: transactions.xml:982 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" +"사용할 해제 모드를 지정하기 위해 구성 파라미터 hibernate.connection." +"release_mode가 사용된다. 가능한 값들은 다음과 같다:" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" +"auto (디폴트) - 이 선택은 org.hibernate." +"transaction.TransactionFactory.getDefaultReleaseMode() 메소드에 의" +"해 반환된 해제 모드로 위임시킨다. JTATransactionFactory인 경우, 이것은 " +"ConnectionReleaseMode.AFTER_STATEMENT를 반환한다; JDBCTransactionFactory인 경" +"우, 이것은 ConnectionReleaseMode.AFTER_TRANSACTION을 반환한다. 이 설정의 값" +"이 사용자 코드 내의 버그들 그리고/또는 유효하지 않은 가정들을 가리키는 경향" +"이 있음으로 인해 이 디폴트 특징을 실패로 변경하는 것은 거의 좋은 생각이 아니" +"다." + +#. Tag: para +#: transactions.xml:999 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" +"on_close - 는 ConnectionReleaseMode.ON_CLOSE를 사용하라고 " +"말한다. 이 설정은 역호환성을 위해 남겨졌지만, 그것의 사용은 매우 권장되지 않" +"는다." + +#. Tag: para +#: transactions.xml:1005 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" +"after_transaction - 은 ConnectionReleaseMode." +"AFTER_TRANSACTION을 사용하라고 말한다. 이 설정은 JTA 환경들에서 사용되지 않" +"을 것이다. 또한 ConnectionReleaseMode.AFTER_TRANSACTION인 경우에 만일 세션이 " +"auto-commit 모드에 있도록 고려될 경우, 커넥션들은 마치 해제 모드가 " +"AFTER_STATEMENT인 것처럼 해제될 것임을 또한 노트하라." + +#. Tag: para +#: transactions.xml:1013 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" +"after_statement - 는 ConnectionReleaseMode.AFTER_STATEMENT" +"를 사용하라고 말한다. 추가적으로 구성된 ConnectionProvider" +"는 그것이 이 설정 (supportsAggressiveRelease())을 지원하는" +"지 여부를 알기 위해 참고된다. 만일 지원하지 않을 경우, 해제 모드는 " +"ConnectionReleaseMode.AFTER_TRANSACTION으로 재설정된다. 이 설정은 우리가 " +"ConnectionProvider.getConnection()을 호출할 때마다 우리가 " +"동일한 기본 JDBC 커넥션을 다시 필요로 할 수 있는 환경들에서 또는 우리가 동일" +"한 커넥션을 얻는 것에 상관없는 auto-commit 환경에서 오직 안전하다." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/tutorial.po b/documentation/envers/src/main/docbook/ko-KR/content/tutorial.po new file mode 100644 index 0000000000..8f76844b9b --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/tutorial.po @@ -0,0 +1,2792 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:7 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "Hibernate 개요" + +#. Tag: title +#: tutorial.xml:10 +#, no-c-format +msgid "Preface" +msgstr "머리말" + +#. Tag: para +#: tutorial.xml:12 +#, no-c-format +msgid "" +"This chapter is an introductory tutorial for new users of Hibernate. We " +"start with a simple command line application using an in-memory database and " +"develop it in easy to understand steps." +msgstr "" +"이 장은 Hibernate 초심자를 위한 개론적인 튜토리얼이다. 우리는 메모리-내 데이" +"터베이스를 사용하는 간단한 명령 라인 어플리케이션으로 시작하고 단계들을 이해" +"하도록 쉽게 그것을 개발한다." + +#. Tag: para +#: tutorial.xml:18 +#, no-c-format +msgid "" +"This tutorial is intended for new users of Hibernate but requires Java and " +"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party " +"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3." +msgstr "" +"이 튜토리얼은 Hibernate 신규 사용자들을 의도하고 있지만 Java와 SQL 지식을 필" +"요로 한다. 그것은 Michael Gloegl이 작성한 튜토리얼에 기초하며, 우리가 명명하" +"는 제 3의 라이브러리들은 JDK 1.4와 5.0 버전용이다. 당신은 JDK1.3에 대해 다른 " +"라이브러리들을 필요로 할 수도 있다." + +#. Tag: para +#: tutorial.xml:24 +#, no-c-format +msgid "" +"The source code for the tutorial is included in the distribution in the " +"doc/reference/tutorial/ directory." +msgstr "" +"튜토리얼용 소스는 doc/reference/tutorial/ 디렉토리 내에 있" +"는 배포본 내에 포함되어 있다." + +#. Tag: title +#: tutorial.xml:32 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "파트 1 - 첫 번째 Hibernate 어플리케이션" + +#. Tag: para +#: tutorial.xml:34 +#, no-c-format +msgid "" +"First, we'll create a simple console-based Hibernate application. We use an " +"Java database (HSQL DB), so we do not have to install any database server." +msgstr "" +"먼저, 우리는 한 개의 간단한 콘솔-기반 Hibernate 어플리케이션을 생성시킬 것이" +"다. 우리는 메모리-내 데이터베이스(HSQL DB)를 사용하므로, 우리는 어떤 데이터베" +"이스 서버를 설치하지 않아도 된다." + +#. Tag: para +#: tutorial.xml:39 +#, no-c-format +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the hosts of these events." +msgstr "" +"우리가 우리가 수반하고자 원하는 이벤트들을 저장할 수 있는 작은 데이터베이스 " +"어플리케이션과 이들 이벤트들의 호스트들에 대한 정보를 필요로 한다고 가정하자." + +#. Tag: para +#: tutorial.xml:44 +#, no-c-format +msgid "" +"The first thing we do, is set up our development directory and put all the " +"Java libraries we need into it. Download the Hibernate distribution from the " +"Hibernate website. Extract the package and place all required libraries " +"found in /lib into into the /lib " +"directory of your new development working directory. It should look like " +"this:" +msgstr "" +"우리가 행할 첫 번째 것은 우리의 개발 디렉토리를 설정하고, 우리가 필요로 하는 " +"모든 Java 라이브러리들을 그것 속에 집어 넣는 것이다. Hibernate 웹 사이트로부" +"터 Hibernate 배포본을 내려 받아라. 패키지를 추출해내고 /lib 속에서 발견되는 모든 필요한 라이브러리들을 당신의 새로운 개발 작업 " +"디렉토리의 /lib 디렉토리 속에 위치지워라. 그것은 다음과 같" +"을 것이다:" + +#. Tag: programlisting +#: tutorial.xml:52 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:54 +#, no-c-format +msgid "" +"This is the minimum set of required libraries (note that we also copied " +"hibernate3.jar, the main archive) for Hibernate at the time of " +"writing. The Hibernate release you are using might require more " +"or less libraries. See the README.txt file in the " +"lib/ directory of the Hibernate distribution for more " +"information about required and optional third-party libraries. (Actually, " +"Log4j is not required but preferred by many developers.)" +msgstr "" +"이것은 글의 작성 시점에서 Hibernate에 필수적인 최소한의 " +"세트이다(우리는 또한 메인 아카이브인 hibernate3.jar를 복사했음을 노트하라). " +"당신이 사용 중인 Hibernate 배포본이 더 많거나 보다 적은 라이브러리들을 필요" +"로 할 수도 있다. 필수 라이브러리들과 선택적인 제3의 라이브러리들에 대한 추가 " +"정보는 Hibernate 배포본의 lib/ 디렉토리 내에 있는 " +"README.txt 파일을 보라. (실제로, Log4j는 필수는 아니지만 " +"많은 개발자들에 의해 선호된다.)" + +#. Tag: para +#: tutorial.xml:63 +#, no-c-format +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "" +"다음으로 우리는 우리가 데이터베이스 속에 저장시키고자 원하는 이벤트를 표현하" +"는 한 개의 클래스를 생성시킨다." + +#. Tag: title +#: tutorial.xml:68 +#, no-c-format +msgid "The first class" +msgstr "첫 번째 클래스" + +#. Tag: para +#: tutorial.xml:70 +#, no-c-format +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "" +"우리의 첫 번째 영속 클래스는 몇몇 프로퍼티들을 가진 간단한 자바빈즈 클래스이" +"다:" + +#. Tag: programlisting +#: tutorial.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:76 +#, no-c-format +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"당신은 이 클래스가 프로퍼티 getter와 setter 메소드들에 대한 표준 자바빈즈 명" +"명법들 뿐만 아니라 필드들에 대한 private 가시성을 사용하고 있음을 알 수 있" +"다. 이것은 권장되는 설계이지만, 필수적이지는 않다. Hibernate는 또한 필드들에 " +"직접 접근할 수 있으며, accessor 메소드들의 이점은 강건한 리팩토링이다. 아규먼" +"트 없는 생성자는 reflection을 통해 이 클래스의 객체를 초기화 시킬 필요가 있" +"다." + +#. Tag: para +#: tutorial.xml:84 +#, no-c-format +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"id 프로퍼티는 특별한 이벤트를 위한 유일 식별자를 소유한" +"다. 모든 영속 엔티티 클래스들 (보다 덜 중요한 종속 클래스들도 존재한다)은 우" +"리가 Hibernate의 전체 특징 집합을 사용하고자 원할 경우에 그런 식별자 프로퍼티" +"를 필요로 할 것이다. 사실 대부분의 어플리케이션들(특히 웹 어플리케이션들)은 " +"식별자에 의해 객체들을 구분지을 필요가 있어서, 당신은 이것을 어떤 제약점이라" +"기 보다는 하나의 특징으로 간주할 것이다. 하지만 우리는 대개 객체의 항등" +"(identity)를 처리하지 않으므로, setter 메소드는 private이어야 한다. 객체가 저" +"장될 때, Hibernate는 단지 식별자들을 할당할 것이다. 당신은 Hibernate가 " +"public, private, protected 접근자 메소드들 뿐만 아니라 (public, private, " +"protected) 필드들에도 직접 접근할 수 있음을 알 수 있다. 선택은 당신에게 달려 " +"있으며, 당신은 당신의 어플리케이션 설계에 적합하도록 그것을 부합시킬 수 있다." + +#. Tag: para +#: tutorial.xml:96 +#, no-c-format +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"아규먼트 없는 생성자는 모든 영속 클래스들에 대한 필요조건이다; Hibernate는 당" +"신을 위해 Java Reflection을 사용하여 객체들을 생성시켜야 한다. 하지만 생성자" +"는 private 일 수 있고, 패키지 가시성은 런타임 프락시 생성과 바이트코드 방편 " +"없는 효율적인 데이터 검색에 필요하다." + +#. Tag: para +#: tutorial.xml:103 +#, no-c-format +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"이 Java 소스 파일을 개발 폴더 내의 src로 명명된 디렉토리 " +"속에 있는 위치지워라. 이제 그 디렉토리는 다음과 같을 것이다:" + +#. Tag: programlisting +#: tutorial.xml:108 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:110 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "다음 단계에서, 우리는 Hiberante에게 이 영속 클래스에 대해 알려 준다." + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The mapping file" +msgstr "The mapping file" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"Hibernate는 영속 크래스들에 대한 객체들을 로드시키고 저장시키는 방법을 알 필" +"요가 있다. 이곳은 Hibernate 매핑 파일이 역할을 행하는 곳이다. 매핑 파일은 " +"Hibernate가 접근해야 하는 데이터베이스 내의 테이블이 무엇인지, 그리고 그것이 " +"사용해야 하는 그 테이블 내의 컬럼들이 무엇인지를 Hibernate에게 알려준다." + +#. Tag: para +#: tutorial.xml:126 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "매핑 파일의 기본 구조는 다음과 같다:" + +#. Tag: programlisting +#: tutorial.xml:130 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:132 +#, no-c-format +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"Hibernate DTD는 매우 정교하다. 당신은 당신의 편집기 또는 IDE 내에서 XML 매핑 " +"요소들과 속성들에 대한 자동 완성 기능을 위해 그것을 사용할 수 있다. 당신은 또" +"한 당신의 텍스트 편집기 내에 DTD 파일을 열 수 있을 것이다 - 그것은 모든 요소" +"들과 속성들에 대한 전체상을 얻고 디폴트들 뿐만 아니라 몇몇 주석들을 보는 가" +"장 손쉬운 방법이다. Hibernate는 웹으로부터 DTD 파일을 로드시키지 않지만, 먼" +"저 어플리케이션의 classpath 경로로부터 그것을 먼저 룩업할 것임을 노트하라. " +"DTD 파일은 hibernate3.jar 속에 포함되어 있을 뿐만 아니라 " +"Hibernate 배포본의 src/ 디렉토리 속에 포함되어 있다." + +#. Tag: para +#: tutorial.xml:143 +#, no-c-format +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"우리는 코드를 간략화 시키기 위해 장래의 예제에서 DTD 선언을 생략할 것이다. 그" +"것은 물론 옵션이 아니다." + +#. Tag: para +#: tutorial.xml:148 +#, no-c-format +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"두 개의 hibernate-mapping 태그들 사이에 class 요소를 포함시켜라. 모든 영속 엔티티 클래스들(다시금 종속 클래스들일 " +"수 있고, 그것은 첫번째-급의 엔티티들이 아니다)은 SQL 데이터베이스 내의 테이블" +"에 대한 그런 매핑을 필요로 한다:" + +#. Tag: programlisting +#: tutorial.xml:155 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:157 +#, no-c-format +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"지금까지 우리는 그 테이블 내에 있는 한 행에 의해 표현된 각각의 인스턴스인, 클" +"래스의 객체를 영속화 시키고 로드시키는 방법을 Hibernate에게 알려주었다. 이제 " +"우린느 테이블 프라이머리 키에 대한 유일 식별자 프로퍼티 매핑을 계속 행한다. " +"게다가 우리는 이 식별자를 처리하는 것에 주의를 기울이고자 원하지 않으므로, 우" +"리는 대용 키 프라이머리 키 컬럼에 대한 Hibernate의 식별자 생성 방도를 구성한" +"다:" + +#. Tag: programlisting +#: tutorial.xml:165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:167 +#, no-c-format +msgid "" +"The id element is the declaration of the identifer " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"id 요소는 식별자 프로퍼티의 선언이고, name=\"id" +"\"는 Java 프로퍼티의 이름을 선언한다 - Hibernate는 그 프로퍼티에 접" +"근하는데 getter 및 setter 메소드들을 사용할 것이다. column 속성은 우리가 " +"EVENTS 테이블의 어느 컬럼을 이 프라이머리 키로 사용하는지" +"를 Hibernate에게 알려준다. 내포된 generator 요소는 식별자 " +"생성 방도를 지정하며, 이 경우에 우리는 increment를 사용했" +"고, 그것은 대개 테스팅(과 튜토리얼들)에 유용한 매우 간단한 메모리-내 숫자 증" +"가 방법이다. Hibernate는 또한 전역적으로 유일한 데이터베이스에 의해 생성된 식" +"별자 뿐만 아니라 어플리케이션에 의해 할당된 식별자(또는 당신이 확장으로 작성" +"한 어떤 방도)를 지원한다." + +#. Tag: para +#: tutorial.xml:180 +#, no-c-format +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"마지막으로 우리는 매핑 파일 속에서 클래스의 영속 프로퍼티들에 대한 선언들을 " +"포함한다. 디폴트로, 클래스의 프로퍼티들은 영속적인 것으로 간주되지 않는다:" + +#. Tag: programlisting +#: tutorial.xml:186 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:188 +#, no-c-format +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"id 요소의 경우처럼, property 요소의 " +"name 속성은 사용할 getter 및 setter 메소드들이 어느 것인지" +"를 Hibernate에게 알려준다. 따라서 이 경우에 Hibernate는 getDate()/" +"setDate() 뿐만 아니라 getTitle()/setTitle()을 찾" +"게 될 것이다." + +#. Tag: para +#: tutorial.xml:195 +#, no-c-format +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"date 프로퍼티 매핑은 column 속성을 포함" +"하는데, 왜 titlecolumn 속성을 포함하" +"지 않는가? column 속성이 없을 경우 Hibernate는 디폴트로 컬" +"럼 이름으로서 프로퍼티 이름을 사용한다. 이것은 에 대해 잘 동작한다. 하지만 " +"date는 대부분의 데이터베이스에서 예약된 키워드이어서, 우리" +"는 그것을 다른 이름으로 더 좋게 매핑 시킨다." + +#. Tag: para +#: tutorial.xml:204 +#, no-c-format +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"다음 흥미로운 점은 title 매핑 또한 type 속성을 갖지 않는다. 우리가 매핑파일들 속에서 선언하고 사용하는 타입" +"들은 당신이 예상하는 Java 데이터 타입들이 아니다. 그것들은 또한 SQL 데이터베" +"이스 타입들도 아니다. 이들 타입들은 이른바 Hibernate 매핑 타입들, 즉 Java 타입들로부터 SQL 타입들로 변환될 수 있고 반대로 SQL 타입들" +"로부터 Java 타입들로 매핑될 수 있는 컨버터들이다. 다시말해, type 속성이 매핑 속에 존재하지 않을 경우 Hibernate는 정확환 변환 및 매핑 " +"타입 그 자체를 결정하려고 시도할 것이다. 몇몇 경우들에서 (Java 클래스에 대한 " +"Reflection을 사용하는) 이 자동적인 검출은 당신이 예상하거나 필요로 하는 디폴" +"트를 갖지 않을 수도 있다. 이것은 date 프로퍼티를 가진 경우" +"이다. Hibernate는 그 프로퍼티가 SQL date 컬럼, " +"timestamp 컬럼 또는 time 컬럼 중 어느 " +"것으로 매핑되어야 하는지를 알 수가 없다. 우리는 timestamp " +"컨버터를 가진 프로퍼티를 매핑함으로써 전체 날짜와 시간 정보를 보존하고 싶다" +"고 선언한다." + +#. Tag: para +#: tutorial.xml:220 +#, no-c-format +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"다음 매핑 파일은 Event Java 클래스 소스 파일과 같은 디렉토" +"리 속에 Event.hbm.xml로서 저장될 것이다. 매핑 파일들에 대" +"한 네이밍은 임의적일 수 있지만, 접미사 hbm.xml은 " +"Hibernate 개발자 공동체 내에서 컨벤션이 되었다. 디렉토리 구조는 이제 다음과 " +"같을 것이다:" + +#. Tag: programlisting +#: tutorial.xml:228 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:230 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "우리는 Hibernate의 메인 구성을 계속 행한다." + +#. Tag: title +#: tutorial.xml:237 +#, no-c-format +msgid "Hibernate configuration" +msgstr "Hibernate 구성" + +#. Tag: para +#: tutorial.xml:239 +#, no-c-format +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"우리는 이제 적절한 곳에 한 개의 영속 클래스와 그것의 매핑 파일을 갖고 있다. " +"Hibernate를 구성할 차례이다. 우리가 이것을 행하기 전에, 우리는 데이터베이스" +"를 필요로 할 것이다. 자바 기반의 메모리-내 SQL DBMS인 HSQL DB는 HSQL DB 웹 사" +"이트에서 내려받을 수 있다. 실제로, 당신은 이 다운로드에서 오직 " +"hsqldb.jar 만을 필요로 한다. 개발 폴더의 lib/ 디렉토리 속에 이 파일을 위치지워라." + +#. Tag: para +#: tutorial.xml:247 +#, no-c-format +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"개발 디렉토리의 루트에 data로 명명된 디렉토리를 생성시켜" +"라 - 이 디렉토리는 HSQL DB가 그것의 데이터 파일들을 저장하게 될 장소이다. 이" +"제 이 데이터 디렉토리에서 java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server를 실행시켜서 데이터베이스를 시작시켜라. 당신은 그것" +"이 시작되고 이것은 우리의 어플리케이션이 나중에 연결하게 될 장소인, 하나의 " +"TCP/IP 소켓에 바인드 되는 것을 볼 수 있다. 만일 이 튜토리얼 동안에 당신이 새 " +"데이터베이스로 시작하고자 원할 경우, HSQL DB를 셧다운시키고(왼도우에서 " +"CTRL + C를 눌러라), data/ 디렉토리 내" +"에 있는 모든 파일들을 삭제하고 다시 HSQL DB를 시작하라." + +#. Tag: para +#: tutorial.xml:257 +#, no-c-format +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"Hibernate는 당신의 어플리케이션 내에서 이 데이터베이스에 연결하는 계층이고, " +"따라서 그것은 커넥션 정보를 필요로 한다. 커넥션들은 마찬가지로 구성되어야 하" +"는 하나의 JDBC 커넥션 풀을 통해 행해진다. Hibernate 배포본은 몇몇 오픈 소스 " +"JDBC 커넥션 풀링 도구들을 포함하고 있지만, 이 튜토리얼에서는 Hibernate에 의" +"해 미리 빌드된 커넥션 풀링을 사용할 것이다. 당신이 필수 라이브러리를 당신의 " +"classpath 속에 복사해야 하고 만일 당신이 제품-특징의 제3의 JDBC 풀링 소프트웨" +"어를 사용하고자 원할 경우에는 다른 커넥션 풀링 설정들을 사용해야 함을 노트하" +"라." + +#. Tag: para +#: tutorial.xml:267 +#, no-c-format +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"Hibernate의 구성을 위해, 우리는 한 개의 간단한 hibernate." +"properties 파일, 한 개의 약간 더 세련된 hibernate.cfg." +"xml 파일, 또는 심지어 완전한 프로그램 상의 설정을 사용할 수 있다. " +"대부분의 사용자들은 XMl 구성 파일을 선호한다:" + +#. Tag: programlisting +#: tutorial.xml:273 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:275 +#, no-c-format +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"이 XML 구성이 다른 DTD를 사용함을 노트하라. 우리는 Hibernate의 " +"SessionFactory -특정 데이터베이스에 대해 책임이 있는 전역 " +"팩토리-를 구성한다. 만일 당신이 여러 데이터베이스들을 갖고 있다면, (보다 쉬" +"운 시작을 위해) 몇 개의 구성 파일들 속에 여러 개의 <session-" +"factory> 구성들을 사용하라." + +#. Tag: para +#: tutorial.xml:283 +#, no-c-format +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"처음 네 개의 property 요소들은 JDBC 커넥션을 위한 필수 구" +"성을 포함한다. dialect property 요소는 Hibernate가 발생시" +"키는 특별한 SQL 이형(異形)을 지정한다. hbm2ddl.auto 옵션" +"은 -직접 데이터베이스 속으로- 데이터베이스 스키마의 자동적인 생성을 활성화 시" +"킨다. 물론 이것은 (config 옵션을 제거함으로써) 비활성화 시킬 수 있거나 " +"SchemaExport Ant 태스크의 도움으로 파일로 리다이렉트 될 " +"수 있다. 마지막으로 우리는 영속 클래스들을 위한 매핑 파일(들)을 추가시킨다." + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"이 파일을 소스 디렉토리 속으로 복사하고, 따라서 그것은 classpath의 루트에서 " +"끝날 것이다. Hibernate는 시작 시에 classpath의 루트에서 hibernate." +"cfg.xml로 명명된 파일을 자동적으로 찾는다." + +#. Tag: title +#: tutorial.xml:305 +#, no-c-format +msgid "Building with Ant" +msgstr "Ant로 빌드하기" + +#. Tag: para +#: tutorial.xml:307 +#, no-c-format +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"우리는 이제 Ant로 튜토리얼을 빌드할 것이다. 당신은 Ant를 설치할 필요가 있을 " +"것이다 - Ant 내려받기 페" +"이지에서 Ant를 얻어라. Ant를 설치하는 방법은 여기서 다루지 않을 것이" +"다. Ant 매뉴얼" +"을 참조하길 바란다. 당신이 Ant를 설치한 후에, 우리는 빌드파일 생성을 시작할 " +"수 있다. 그것은 build.xml로 명명되고 개발 디렉토리 속에 직" +"접 위치될 것이다." + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "기본 빌드 파일은 다음과 같다:" + +#. Tag: programlisting +#: tutorial.xml:320 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:322 +#, no-c-format +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" +"이것은 .jar로 끝나는 lib 디렉토리 내에 있는 모든 파일들을 " +"컴파일에 사용되는 classpath에 추가하도록 Ant에게 알려줄 것이다. 그것은 또한 " +"모든 비-Java 소스 파일들을 대상 디렉토리로 복사할 것이다. 예를 들면, 구성 및 " +"Hibernate 매핑 파일들. 만일 당신이 Ant를 이제 실행할 경우, 당신은 다음 출력" +"을 얻게 될 것이다:" + +#. Tag: programlisting +#: tutorial.xml:329 +#, no-c-format +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:334 +#, no-c-format +msgid "Startup and helpers" +msgstr "시작과 helper들" + +#. Tag: para +#: tutorial.xml:336 +#, no-c-format +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"몇몇 Event 객체들을 로드시키고 저장할 차례이지만, 먼저 우" +"리는 어떤 인프라스트럭처 코드로 설정을 완료해야 한다. 우리는 Hibernate를 시작" +"해야 한다. 이 시작은 전역 SessionFactory 객체를 빌드하고 " +"어플리케이션 내에서 용이한 접근을 위해 그것을 어떤 곳에 저장하는 것을 포함한" +"다. SessionFactory는 새로운 Session들" +"을 열 수 있다. Session은 작업의 단일-쓰레드 단위를 표현하" +"며, SessionFactory는 한번 초기화 되는 하나의 thread-safe " +"전역 객체이다." + +#. Tag: para +#: tutorial.xml:346 +#, no-c-format +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "" +"우리는 시작을 처리하고 Session 처리를 편리하게 해주는 " +"HibernateUtil helper 클래스를 생성시킬 것이다. 이른바 " +"ThreadLocal Session 패턴이 여기서 유용하며, 우리는 현재" +"의 작업 단위를 현재의 쓰레드와 연관지워 유지한다. 구현을 살펴보자:" + +#. Tag: programlisting +#: tutorial.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:354 +#, no-c-format +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"이 클래스는 (클래스가 로드될 때 JVM에 의해 한번 호출되는) 그것의 static 초기" +"자 내에 전역 SessionFactory를 산출할 뿐만 아니라 또한 현" +"재 쓰레드에 대한 Session을 소유하는 ThreadLocal 변수를 갖는다. 당신이 HibernateUtil.getCurrentSession()을 호출하는 시점에는 문제가 없으며, 그것은 항상 동일 쓰레드 내에 동일" +"한 Hibernate 작업 단위를 반환할 것이다. HibernateUtil.closeSession()" +"에 대한 호출은 쓰레드와 현재 연관되어 있는 작업 단위를 종료시킨다." + +#. Tag: para +#: tutorial.xml:361 +#, no-c-format +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"당신이 이 helper를 사용하기 전에 thread-local 변수들에 대한 Java 개념을 확실" +"히 이해하도록 하라. 보다 강력한 HibernateUtil helper는 " +"http://caveatemptor.hibernate.org/에 있는 CaveatEmptor 뿐" +"만 아니라 \"Java Persistence with Hibernate\" 책에서 찾을 수 있다. 당신이 " +"J2EE 어플리케이션 서버 내에 Hibernate를 배치할 경우에 이 클래스는 필수적이지 " +"않다: 하나의 Session은 현재의 JTA 트랜잭션에 자동적으로 바" +"인드 될 것이고 당신은 JNDI를 통해 SessionFactory를 룩업할 " +"수 있다. 만일 당신이 JBoss AS를 사용할 경우, Hibernate는 관리되는 시스템 서비" +"스로서 배치될 수 있고 SessionFactory를 JNDI 이름에 자동적" +"으로 바인드시킬 수 있을 것이다." + +#. Tag: para +#: tutorial.xml:370 +#, no-c-format +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"개발 소스 디렉토리 속에 HibernateUtil.java 를 위치지우고, " +"다음으로 Event.java를 위치지워라:" + +#. Tag: programlisting +#: tutorial.xml:375 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:377 +#, no-c-format +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"이것은 문제 없이 다시 컴파일 될 것이다. 우리는 마지막으로 로깅 시스템을 구성" +"할 필요가 있다 - Hibernate는 commons logging를 사용하고 Log4j와 JDK 1.4 사이" +"의 선택은 당신의 몫으로 남겨둔다. 대부분의 개발자들은 Log4j를 선호한다: " +"Hibernate 배포본에 있는 log4j.properties(이것은 디렉토리 " +"etc/ 내에 있다)를 src 디렉토리로 복사하" +"고, 다음으로 hibernate.cfg.xml을 복사하라. 예제 구성을 살" +"펴보고 당신이 더 많은 verbose 출력을 원할 경우에 설정들을 변경하라. 디폴트로 " +"Hibernate 시작 메시지는 stdout 상에 보여진다." + +#. Tag: para +#: tutorial.xml:387 +#, no-c-format +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "" +"튜토리얼 인프라스트럭처는 완전하다 - 그리고 우리는 Hibernate로 어떤 실제 작업" +"을 행할 준비가 되어 있다." + +#. Tag: title +#: tutorial.xml:395 +#, no-c-format +msgid "Loading and storing objects" +msgstr "객체 로딩과 객체 저장" + +#. Tag: para +#: tutorial.xml:397 +#, no-c-format +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"마지막으로 우리는 객체들을 로드시키고 저장하는데 Hibernate를 사용할 수 있다. " +"우리는 한 개의 main() 메소드를 가진 한 개의 " +"EventManager 클래스를 작성한다:" + +#. Tag: programlisting +#: tutorial.xml:402 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:404 +#, no-c-format +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"우리는 한 개의 새로운 Event 객체를 생성시키고, 그것을 " +"Hibernate에게 건네준다. Hibernate는 이제 SQL을 처리하고 데이터베이스 상에서 " +"INSERT들을 실행시킨다. -우리가 이것을 실행하기 전에 코드" +"를 처리하는- SessionTransaction을 살" +"펴보자." + +#. Tag: para +#: tutorial.xml:411 +#, no-c-format +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"Session은 한 개의 작업 단위이다. 지금부터 우리는 단숨함을 " +"유지할 것이고 Hibernate Session과 데이터베이스 트랜잭션 사" +"이의 일-대-일 과립형(granularity)을 가정할 것이다. 실제 기반 트랜잭션 시스템" +"으로부터 우리의 소스를 은폐시키기 위해(이 경우 통상의 JDBC이지만, 그것은 또" +"한 JTA에도 실행된다) 우리는 Hibernate Session 상에서 이용 " +"가능한 Transaction API를 사용한다." + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"sessionFactory.getCurrentSession()은 무엇을 행하는가? 먼" +"저 당신은 당신이 (HibernateUtil 덕분에 쉽게) " +"SessionFactory을 당신이 소유하고 있다면, 원하는 만큼 어디" +"서든 여러번 그것을 호출할 수 있다. getCurrentSession() 메" +"소드는 항상 \"현재의\" 작업 단위를 반환한다. 우리가 hibernate.cfg." +"xml 내에서 이 매커니즘에 대한 구성 옵션을 \"thread\"로 전환시켰음" +"을 기억하는가? 그러므로 작업의 현재 단위는 우리의 어플리케이션을 실행시키는 " +"현재 자바 쓰레드에 묶여 있다. 하지만 이것은 전체 그림이 아니며, 당신은 또한 " +"scope(영역), 작업 단위가 시작될 때와 작업 단위가 종료될 때를 고려해야 한다." + +#. Tag: para +#: tutorial.xml:430 +#, no-c-format +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"Session은 그것이 처음으로 필요로 되고 " +"getCurrentSession()에 대한 첫 번째 호출이 이루어질 때 시작" +"된다. 그때 그것은 Hibernate에 의해 현재의 쓰레드에 바인드 된다. 커밋되든 롤백" +"되든 간에 트랜잭션이 종료되고, Hibernate가 자동적으로 그 쓰레드로부터 " +"Session을 바인드 해제시키고 당신을 위해 세션을 닫는다. 만" +"일 당신이 getCurrentSession()을 다시 호출한다면, 당신은 새" +"로운 Session을 얻고 새로운 작업단위를 시작할 수 있다. 이 " +"thread-bound 프로그래밍 모형은 Hibernate를 사용하는 가" +"장 대중적인 방법이다. 왜냐하면 그것은 당신의 코드를 유연하게 계층화시키는 것" +"을 허용해주기 때문이다(트랜잭션 경계 분할 코드는 데이트 접근 코드와 구별지워" +"질 수 있는데, 우리는 이 튜토리얼의 뒷부분에서 이것을 다룰 것이다.)." + +#. Tag: para +#: tutorial.xml:441 +#, no-c-format +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"작업 영역의 단위와 관련하여, Hibernate Session은 하나 또" +"는 여러 개의 데이터베이스 오퍼레이션들을 실행시키는데 사용될 수 있는가? 위의 " +"예제는 하나의 오퍼레이션에 한 개의 Session을 사용하고 있" +"다. 이것은 순진한 일치이며, 예제는 어떤 다른 접근법을 보여주기에는 충분히 복" +"잡하지 않다. Hibernate Session의 scope(영역)은 유연하지만 " +"당신은 결코 모든 데이터베이스 오퍼레이션 각각에 대해 새" +"로운 Hibernate Session을 사용하도록 당신의 어플리케이션을 " +"설계할 수 없다. 따라서 심지어 당신이 다음의 (매우 사소한) 예제들에서 여러 번 " +"그것을 볼 수 있을지라도 session-per-operation을 하나의 " +"안티-패턴으로 간주하라. 실제 (웹) 어플리케이션은 이 튜토리얼의 뒷부분에 보여" +"진다." + +#. Tag: para +#: tutorial.xml:452 +#, no-c-format +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"트랜잭션 핸들링과 경계구분에 대한 추가 정보는 을 살펴보라. 우리는 또한 앞의 예제에서 임의의 오류 처리와 롤백을 생략했다." + +#. Tag: para +#: tutorial.xml:458 +#, no-c-format +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"이 첫 번째 루틴을 실행하기 위해서 우리는 호출 가능한 대상을 Ant 빌드 파일에 " +"추가해야 한다:" + +#. Tag: programlisting +#: tutorial.xml:462 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:464 +#, no-c-format +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"action 아규먼트의 값은 대상을 호출할 때 명령 라인 상에서 " +"설정된다:" + +#. Tag: programlisting +#: tutorial.xml:469 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:471 +#, no-c-format +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "" +"컴파일, 구성에 따른 Hibernate 시작 후에, 당신은 많은 로그 출력을 보게 될 것이" +"다. 끝에서 당신은 다음 라인을 발견할 것이다:" + +#. Tag: programlisting +#: tutorial.xml:476 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:478 +#, no-c-format +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"이것은 Hibernate에 의해 실행된 INSERT이고, 물음표 기호는 " +"JDBC 바인드 파라미터들을 나타낸다. 아규먼트로서 바인드 된 값들을 보거나 장황" +"한 로그를 줄이려면 당신의 log4j.properties를 체크하라." + +#. Tag: para +#: tutorial.xml:484 +#, no-c-format +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"이제 우리는 마찬가지로 저장된 이벤트들을 열거하고자 원하며, 우리는 main 메소" +"드에 한 개의 옵션을 추가한다:" + +#. Tag: programlisting +#: tutorial.xml:488 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "" +"우리는 또한 새로운 listEvents() method 메소드를 추가 시킨" +"다:" + +#. Tag: programlisting +#: tutorial.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:496 +#, no-c-format +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"여기서 우리가 행할 것은 데이터베이스로부터 모든 존재하는 Event 객체들을 로드시키기 위해 HQL (Hibernate Query Language) 질의를 사용" +"하는 것이다. Hibernate는 적절한 SQL을 생성시킬 것이고, 그것을 데이터베이스로 " +"전송하고 데이터를 Event 객체들에 거주시킬 것이다. 당신은 " +"물론 HQL로서 보다 복잡한 질의들을 생성시킬 수 있다." + +#. Tag: para +#: tutorial.xml:503 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "이제 이 모든 것을 실행하고 테스트하기 위해, 다음 단계들을 따르라:" + +#. Tag: para +#: tutorial.xml:509 +#, no-c-format +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "" +"데이터베이스 속으로 어떤 것을 저장하고 물론 앞서 hbm2ddl을 통해 데이터베이스 " +"스키마를 산출시키기 위해 ant run -Daction=store를 실행하" +"라." + +#. Tag: para +#: tutorial.xml:515 +#, no-c-format +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"이제 당신의 hibernate.cfg.xml 파일 속에서 그 프로퍼티를 주" +"석처리함으로써 hbm2ddl을 사용불가능하게 하라. 대개 당신은 지속되는 단위 테스" +"팅에서는 그것을 사용 가능하게 내버려두어도 되지만, 또 다른 hbm2ddl의 실행은 " +"당신이 저장했던 모든 것을 drop시킬 것이다 - " +"create 구성 설정은 실제로 \"스키마로부터 모든 테이블들을 " +"드롭시키고 나서, SessionFactory가 빌드될 때 모든 테이블들을 다시 생성시키는 " +"것\"으로 변환된다." + +#. Tag: para +#: tutorial.xml:525 +#, no-c-format +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"만일 당신이 지금 -Daction=list로 Ant를 호출할 경우, 당신" +"은 당신이 지금까지 저장했던 이벤트들을 보게 될 것이다. 물론 당신은 또한 여러 " +"번 store 액션을 호출할 수 있다." + +#. Tag: para +#: tutorial.xml:531 +#, no-c-format +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"노트 : 대부분의 Hibernate 사용자들은 이 지점에서 실패하고 우리는 정기적으로 " +"Table not found 오류 메시지들에 관한 질문을 받는다. 하지" +"만 만일 당신이 위에 조명된 단게들을 따를 경우 당신은 이 문제를 겪지 않을 것이" +"고, hbm2ddl이 처음 실행 시에 데이터베이스 스키마를 생성시키므로, 차후의 어플" +"리케이션 재시작은 이 스키마를 사용할 것이다. 만일 당신이 매핑 그리고/또는 데" +"이터베이스 스키마를 변경할 경우에, 당신은 다시 한번 더 hbm2ddl을 이용 가능하" +"도록 해야 한다." + +#. Tag: title +#: tutorial.xml:544 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "파트 2 - 연관들을 매핑하기" + +#. Tag: para +#: tutorial.xml:546 +#, no-c-format +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "" +"우리는 한 개의 영속 엔티티 클래스를 한 개의 테이블로 매핑했다. 이것 위에서 빌" +"드하고 몇몇 클래스 연관들을 추가시키자. 먼저 우리는 우리의 어플리케이션에 사" +"람들을 추가하고 그들이 참여하는 이벤트들의 목록을 저장할 것이다." + +#. Tag: title +#: tutorial.xml:552 +#, no-c-format +msgid "Mapping the Person class" +msgstr "Person 클래스 매핑하기" + +#. Tag: para +#: tutorial.xml:554 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "클래스의 첫 번째 장면은 간단하다:" + +#. Tag: programlisting +#: tutorial.xml:558 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:560 +#, no-c-format +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"Person.hbm.xml로 명명되는 새로운 매핑 파일을 생성시켜라 " +"(맨위에 DTD 참조를 잊지말라):" + +#. Tag: programlisting +#: tutorial.xml:565 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:567 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "마지막으로 새로운 매핑을 Hibernate의 구성에 추가하라:" + +#. Tag: programlisting +#: tutorial.xml:571 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:573 +#, no-c-format +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"이제 우리는 이들 두 개의 엔티티들 사이에 한 개의 연관을 생성시킬 것이다. 명백" +"하게, 개인들은 이벤트들에 참여할 수 있고, 이벤트들은 참여자들을 갖는다. 우리" +"가 다루어야 하는 설계 질문들은 다음과 같다 : 방향성(directionality), 다중성" +"(multiplicity), 그리고 콜렉션 특징." + +#. Tag: title +#: tutorial.xml:583 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "단방향 Set-기반의 연관" + +#. Tag: para +#: tutorial.xml:585 +#, no-c-format +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "" +"우리는 Person 클래스에 이벤트들을 가진 한 개의 콜렉션을 추" +"가할 것이다. 그 방법으로 우리는 명시적인 질의-aPerson.getEvents()를 호출함으로써-를 실행시키지 않고서 특정 개인에 대한 이벤트들을 쉽" +"게 네비게이트할 수 있다. 우리는 하나의 Java 콜렉션, 하나의 Set를 사용한다. 왜냐하면 그 콜렉션은 중복 요소들을 포함하기 않을 것이고 " +"그 순서가 우리와 관련되어 있지 않기 때문이다." + +#. Tag: para +#: tutorial.xml:592 +#, no-c-format +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "" +"우리는 하나의 Set으로 구현된, 하나의 단방향, 다중값 연관들" +"을 필요로 한다. Java 클래스들 내에 이를 위한 코드를 작성하고 그런 다음 그것" +"을 매핑시키자:" + +#. Tag: programlisting +#: tutorial.xml:597 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:599 +#, no-c-format +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"우리가 이 연관을 매핑하기 전에, 다른 측에 대해 생각하라. 명백하게 우리는 이것" +"을 단지 단방향으로 유지시킬 수 있다. 또는 우리가 그것을 양방향으로 네비게이트" +"하는 것-예를 들어 anEvent.getParticipants()-이 가능하도록 " +"원할 경우에, Event측 상에 또 다른 콜렉션을 생성시킬 수 있" +"다. 이것은 당신에게 남겨진 설계 선택이지만, 이 논의에서 명료한 점은 연관의 다" +"중성이다: 양 측 상에서 \"다중\" 값을 갖는 경우, 우리는 이것을 many-" +"to-many 연관이라고 명명한다. 그러므로 우리는 Hibernate의 many-to-" +"many 매핑을 사용한다:" + +#. Tag: programlisting +#: tutorial.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:612 +#, no-c-format +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"Hibernate는 모든 종류의 콜렉션 매핑들, 가장 공통적인 <set>을 지원한다. many-to-many 연관 (또는 n:m 엔티티 " +"관계)의 경우, 한 개의 연관 테이블이 필요하다. 이 테이블 내에 있는 각각의 행" +"은 한 명의 개인과 한 개의 이벤트 사이의 링크를 표현한다. 테이블 이름은 " +"set 요소의 table 속성으로 구성된다. 연" +"관 내의 식별자 컬럼 이름은 개인 측에 대해 <key> 요소" +"로 정의되고 이벤트 측에 대한 컬럼 이름은 <many-to-many>column 속성으로 정의된다. 당신은 또한 당신의 콜" +"렉션 내에 있는 객체들의 클래스(정확하게 : 참조들을 가진 콜렉션의 다른 측 상" +"에 있는 클래스)를 Hibernate에게 알려주어야 한다." + +#. Tag: para +#: tutorial.xml:624 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "따라서 이 매핑을 위한 데이터베이스 스키마는 다음과 같다:" + +#. Tag: programlisting +#: tutorial.xml:628 +#, no-c-format +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:633 +#, no-c-format +msgid "Working the association" +msgstr "연관들에 작업하기" + +#. Tag: para +#: tutorial.xml:635 +#, no-c-format +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "" +"EventManager 속에 있는 한 개의 새로운 메소드 내에 몇몇 사" +"람들과 이벤트들을 함께 가져오자:" + +#. Tag: programlisting +#: tutorial.xml:639 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"PersonEvent를 로드시킨 후에, 정규 콜" +"렉션 메소드들을 사용하여 콜렉션을 간단하게 변경하라. 당신이 알 수 있듯이, " +"update() 또는 save()에 대한 명시적인 호" +"출이 존재하지 않고, 변경되었고 저장할 필요가 있는 콜렉션을 Hibernate가 자동적" +"으로 검출해낸다. 이것은 자동적인 dirty 체킹이라 불려지" +"며, 당신은 또한 당신의 임의의 객체들에 대한 name 또는 date 프로퍼티를 변경함" +"으로써 그것을 시도할 수 있다. 그것들이 영속(persistent) " +"상태에 있는 동안, 즉 특정 Hibernate Session에 바인드되어 " +"있는 동안(예를 들면. 그것들은 작업 단위 속에 방금 로드되었거나 저장되었다), " +"Hibernate는 임의의 변경들을 모니터링하고 쓰기 이면의 형태로 SQL을 실행시킨" +"다. 메모리 상태를 데이터베이스와 동기화 시키는 과정은 대개 오직 작업 단위의 " +"끝에서이고, flushing이라 명명된다. 우리의 코드에서, 작" +"업 단위는 CurrentSessionContext 클래스에 대한 " +"thread 구성 옵션에 의해 정의된 대로 - 데이터베이스 트랜잭" +"션의 커밋(또는 롤백)으로 끝이난다." + +#. Tag: para +#: tutorial.xml:656 +#, no-c-format +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"물론 당신은 다른 작업 단위 속에 개인과 이벤트를 로드시킬 수 도 있다. 또는 당" +"신은 하나의 객체그 영속 상태에 있지 않을 때 Session의 외부" +"에서 객체를 변경시킬 수도 있다(만일 객체가 이전에 영속화 되었다면, 우리는 이 " +"상태를 detached라고 부른다). (매우 사실적이지 않은) 코" +"드 내에서 이것은 다음과 같을 수 있다:" + +#. Tag: programlisting +#: tutorial.xml:663 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:665 +#, no-c-format +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"update에 대한 호출은 한 개의 detached 객체를 다시 영속화 " +"시키고, 당신은 그것이 새로운 작업 단위에 바인드된다고 말할 수 있고, 따라서 " +"detached 동안에 당신이 그것에 대해 행한 임의의 변경들이 데이터베이스에 저장" +"될 수 있다. 이것은 당신이 그 엔티티 객체의 콜렉션에 대해 행했던 임의의 변경들" +"(추가/삭제)를 포함한다." + +#. Tag: para +#: tutorial.xml:672 +#, no-c-format +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"물론, 우리의 현재 상황에서 이것은 많이 사용되지 않지만, 그것은 당신이 당신 자" +"신의 어플리케이션 내로 설계할 수 있는 중요한 개념이다. 지금 " +"EventManager의 main 메소드에 한 개의 새로운 액션을 추가하" +"고 명령 라인에서 그것을 호출하여 이 연습을 완료하라. 만일 당신이 한명의 개인" +"과 한 개의 이벤트에 대한 식별자들을 필요로 할 경우 - save() 메소드가 그것을 반환시킨다(당신은 그 식별자를 반환시키는 앞의 메소드" +"들 중 몇몇을 변경시켜야 할 것이다):" + +#. Tag: programlisting +#: tutorial.xml:680 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:682 +#, no-c-format +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"이것은 두 개의 동등하게 중요한 클래스들, 두 개의 엔티티들 사이에서 한 개의 연" +"관에 관한 예제였다. 앞서 언급했듯이, 전형적인 모형 내에는 다른 클래스들과 타" +"이들이 존재하는데, 대개 \"덜 중요하다\". 당신은 이미 int " +"또는 String과 같은 어떤 것을 이미 보았다. 우리는 이들 클래" +"스들을 값 타입들(value types)이라 명명하고, 그들 인스턴" +"스들은 특정 엔티티에 의존한다(depend). 이들 타입들을 가" +"진 인스턴스들은 그것들 자신의 식별성(identity)를 갖지 않거나, 그것들은 엔티티" +"들 사이에서 공유되지도 않는다(두개의 person들은 심지어 그것들이 같은 첫 번째 " +"이름을 갖는 경우에도 동일한 firstname을 참조하지 않는" +"다 ). 물론 값 타입들은 JDK 내에서 발견될 뿐만 아니라(사실, Hibernate 어플리케" +"이션에서 모든 JDK 클래스들은 값 타입들로 간주된다), 당신은 또한 당신 스스로 " +"종속 클래스들, 예를 들면 Address 또는 " +"MonetaryAmount을 작성할 수 있다." + +#. Tag: para +#: tutorial.xml:695 +#, no-c-format +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"당신은 또한 값 타입들을 설계할 수 있다. 이것은 다른 엔티티들에 대한 참조들을 " +"가진 콜렉션과는 개념적으로 매우 다르지만, Java에서는 대개 동일한 것으로 보여" +"진다." + +#. Tag: title +#: tutorial.xml:703 +#, no-c-format +msgid "Collection of values" +msgstr "값들을 가진 콜렉션" + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"우리는 값 타입의 객체들을 가진 한 개의 콜렉션을 Person 엔" +"티티에 추가시킨다. 우리는 email 주소를 저장하고자 원하므로, 우리가 사용하는 " +"타입은 String이고, 그 콜렉션은 다시 한 개의 Set이다:" + +#. Tag: programlisting +#: tutorial.xml:710 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:712 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "이 Set에 대한 매핑은 다음과 같다:" + +#. Tag: programlisting +#: tutorial.xml:716 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:718 +#, no-c-format +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"앞의 매핑과 비교한 차이점은 element 부분인데, 그것은 그 콜" +"렉션이 또 다른 엔티티에 대한 참조들을 포함하지 않을 것이지만 " +"String(소문자 이름은 그것이 Hibernate 매핑 타입/변환자임" +"을 당신에게 말해준다) 타입의 요소들을 가진 한 개의 콜렉션을 포함할 것임을 " +"Hibernate에게 알려준다. 일단 다시 set 요소의 " +"table 속성은 그 콜렉션에 대한 테이블 이름을 결정한다. " +"key 요소는 콜렉션 테이블 내에서 foreign-key 컬럼 이름을 정" +"의한다. element 요소 내에 있는 column " +"속성은 String 값들이 실제로 저장될 컬럼 이름을 정의한다." + +#. Tag: para +#: tutorial.xml:728 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "업데이트된 스키마를 살펴보라:" + +#. Tag: programlisting +#: tutorial.xml:732 +#, no-c-format +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:734 +#, no-c-format +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"당신은 콜렉션 테이블의 프라이머리 키가 사실은 두 컬럼들을 사용하는 한 개의 합" +"성 키(composite key)임을 알 수 있다. 이것은 또한 개인에 대해 email 주소가 중" +"복될 수 없음을 의미하며, 그것은 정확하게 우리가 Java에서 set을 필요로 하는 의" +"미론이다." + +#. Tag: para +#: tutorial.xml:740 +#, no-c-format +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"마치 개인들과 이벤트들을 링크시켜서 이전에 우리가 행했던 것처럼 이제 당신은 " +"요소들을 시도하고 이 콜렉션에 추가할 수 있다. 그것은 Java에서 동일한 코드이" +"다." + +#. Tag: programlisting +#: tutorial.xml:745 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:747 +#, no-c-format +msgid "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"지금 우리는 콜렉션을 초기화 시키는데 fetch 질의를 사용하" +"지 않았다. 그러므로 콜렉션의 getter 메소드에 대한 호출은 콜렉션을 초기화 시키" +"기 위해 추가적인 select를 트리거 시킬 것이어서, 우리는 그것에 요소를 추가시" +"킬 수 있다. SQL 로그를 관찰하고 이것을 eager fetch로 최적화 시키려고 시도하" +"라." + +#. Tag: title +#: tutorial.xml:757 +#, no-c-format +msgid "Bi-directional associations" +msgstr "Bi-directional associations" + +#. Tag: para +#: tutorial.xml:759 +#, no-c-format +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"다음으로 우리는 양방향 연관을 매핑시킬 예정이다-개인과 이벤트 사이에 연관을 " +"만드는 것은 Java에서 양 측들에서 동작한다. 물론 데이터베이스 스키마는 변경되" +"지 않고, 우리는 여전히 many-to-many 다중성을 갖는다. 관계형 데이터베이스는 네" +"트웍 프로그래밍 언어 보다 훨씬 더 유연하여서, 그것은 네비게이션 방향과 같은 " +"어떤 것을 필요로 하지 않는다 - 데이터는 어떤 가능한 바업ㅂ으로 보여질 수 있" +"고 검색될 수 있다." + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "" +"먼저, 참여자들을 가진 한 개의 콜렉션을 Event Event 클래스" +"에 추가시켜라:" + +#. Tag: programlisting +#: tutorial.xml:771 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:773 +#, no-c-format +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "이제 Event.hbm.xml 내에 연관의 이 쪽도 매핑하라." + +#. Tag: programlisting +#: tutorial.xml:777 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:779 +#, no-c-format +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"당신이 볼 수 있듯이, 이것들은 두 매핑 문서들 내에서 정규 set 매핑들이다. keymany-to-many" +"에서 컬럼 이름들은 두 매핑 문서들에서 바뀌어진다. 여기서 가장 중요한 부가물" +"은 Event의 콜렉션 매핑에 관한 set 요소 " +"내에 있는 inverse=\"true\" 속성이다." + +#. Tag: para +#: tutorial.xml:787 +#, no-c-format +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"이것이 의미하는 바는 Hibernate가 둘 사이의 링크에 대한 정보를 알 필요가 있을 " +"때 다른 측-Person 클래스-를 취할 것이라는 점이다. 일단 당" +"신이 우리의 두 엔티티들 사이에 양방향 링크가 생성되는 방법을 안다면 이것은 이" +"해하기가 훨씬 더 쉬울 것이다." + +#. Tag: title +#: tutorial.xml:796 +#, no-c-format +msgid "Working bi-directional links" +msgstr "양방향 링크들에 작업하기" + +#. Tag: para +#: tutorial.xml:798 +#, no-c-format +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"첫 번째로 Hibernate가 정규 Java 의미론에 영향을 주지 않음을 염두에 두라. 우리" +"는 단방향 예제에서 PersonEvent 사이" +"에 어떻게 한 개의 링크를 생성시켰는가? 우리는 Event 타입" +"의 인스턴스를 Person 타입의 이벤트 참조들을 가진 콜렉션에 " +"추가시켰다. 따라서 명백하게 우리가 이 링크를 양방향으로 동작하도록 만들고자 " +"원한다면, 우리는 다른 측 상에서 -하나의 Person 참조를 하나" +"의 Event 내에 있는 콜렉션에 추가시킴으로써- 동일한 것을 행" +"해야 한다. 이 \"양 측 상에 링크 설정하기\"는 절대적으로 필수적이고 당신은 그" +"것을 행하는 것을 결코 잊지 말아야 한다." + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "" +"Many developers program defensive and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"많은 개발자들은 방비책을 프로그램하고 양 측들을 정확하게 설정하기 위한 하나" +"의 링크 관리 메소드들을 생성시킨다. 예를 들면 Person에서 :" + +#. Tag: programlisting +#: tutorial.xml:813 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:815 +#, no-c-format +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"콜렉션에 대한 get 및 set 메소드드은 이제 protected임을 인지하라 - 이것은 동일" +"한 패키지 내에 있는 클래스들과 서브클래스들이 그 메소드들에 접근하는 것을 허" +"용해주지만, 그 밖의 모든 것들이 그 콜렉션들을 (물론, 대개) 직접 만지는 것을 " +"금지시킨다. 당신은 다른 측 상에 있는 콜렉션에 대해 동일한 것을 행할 것이다." + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"inverse 매핑 속성은 무엇인가? 당신의 경우, 그리고 Java의 " +"경우, 한 개의 양방향 링크는 단순히 양 측들에 대한 참조들을 정확하게 설정하는 " +"문제이다. 하지만 Hibernate는 (컨스트레인트 위배를 피하기 위해서) SQL " +"INSERT 문장과 UPDATE 문장을 정확하게 마" +"련하기에 충분한 정보를 갖고 있지 않으며, 양방향 연관들을 올바르게 처리하기 위" +"해 어떤 도움을 필요로 한다. 연관의 한 측을 inverse로 만드" +"는 것은 기본적으로 그것을 무시하고 그것을 다른 측의 거울(mirror)로 간주하도록 Hibernate에게 알려준다. 그것은 Hibernate가 하나의 방향" +"성 네비게이션 모형을 한 개의 SQL 스키마로 변환시킬 때 모든 쟁점들을 잘 해결하" +"는데 필수적인 모든 것이다. 당신이 염두에 두어야 하는 규칙들은 간단하다 : 모" +"든 양방향 연관들은 한 쪽이 inverse일 필요가 있다. one-to-" +"many 연관에서 그것은 many-측이어야 하고, many-to-many 연관에서 당신은 어느 측" +"이든 선택할 수 있으며 차이점은 없다." + +#. Tag: para +#: tutorial.xml:837 +#, no-c-format +msgid "Let's turn this into a small web application." +msgstr "Let's turn this into a small web application." + +#. Tag: title +#: tutorial.xml:844 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "파트 3 - EventManager 웹 어플리케이션" + +#. Tag: para +#: tutorial.xml:846 +#, no-c-format +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"Hibernate 웹 어플리케이션은 대부분의 스탠드얼론 어플리케이션과 같이 " +"SessionTransaction을 사용한다. 하지" +"만 몇몇 공통 패턴들이 유용하다. 우리는 이제 EventManagerServlet를 작성한다. 이 서블릿은 데이터베이스 내에 저장된 모든 이벤트들을 나" +"열할 수 있고, 그것은 새로운 이벤트들을 입력하기 위한 HTML form을 제공한다." + +#. Tag: title +#: tutorial.xml:854 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "기본 서블릿 작성하기" + +#. Tag: para +#: tutorial.xml:856 +#, no-c-format +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "" +"다음 장에서 우리는 Hibernate를 Tomcat 및 WebWork와 통합시킨다. " +"EventManager는 우리의 성장하는 어플리케이션을 더이상 감당" +"하지 못한다. 당신의 소스 디렉토리에서 events 패키지 내에 " +"새로운 클래스를 생성시켜라:" + +#. Tag: programlisting +#: tutorial.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:863 +#, no-c-format +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"서블릿은 HTTP GET 요청들 만을 처리하므로, 우리가 구현하는 " +"메소드는 doGet()이다:" + +#. Tag: programlisting +#: tutorial.xml:868 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:870 +#, fuzzy, no-c-format +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"우리가 여기서 적용하는 패턴은 session-per-request이다. " +"하나의 요청이 서블릿에 도달할 때, 하나의 새로운 Hibernate SessionSessionFactory 상의 getCurrentSession" +"()에 대한 첫번째 호출을 통해 열린다. 그때 하나의 데이터베이스 트랜" +"잭션이 시작되고, 모든 데이터 접근이 하나의 트랜잭션 내에서 발생하는 한, 데이" +"터가 읽혀지거나 기록되는데 문제가 없다(우리는 어플리케이션들 내에서 auto-" +"commit 모드를 사용하지 않는다)." + +#. Tag: para +#: tutorial.xml:879 +#, no-c-format +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"모든 데이터베이스 오퍼레이션 각각에 대해 새로운 Hibernate Session을 사용하지 말라. 전체 요청에 대해 영역지워진 " +"한 개의 Hibernate Session을 사용하라. 그것이 자동적으로 현" +"재의 자바 쓰레드에 바인드되도록 getCurrentSession()을 사용" +"하라." + +#. Tag: para +#: tutorial.xml:886 +#, no-c-format +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"다음으로, 요청의 가능한 액션들이 처리되고 응답 HTML이 렌더링된다. 우리는 곧" +"장 그부분으로 갈 것이다." + +#. Tag: para +#: tutorial.xml:891 +#, fuzzy, no-c-format +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"마지막으로, 프로세싱과 렌더링이 완료될 때 작업 단위가 종료된다. 만일 어떤 문" +"제가 프로세싱과 렌더링 동안에 발생될 경우, 하나의 예외상황이 던져질 것이고 데" +"이터베이스 트랜잭션은 롤백될 것이다. 이것은 session-per-request을 완료시킨다. 모든 서블릿 내에 있는 트랜잭션 구획 코드 대신에 당신" +"은 또한 서블릿 필터를 사용할 수 있다. Open Session in View로 명명되는 이 패턴에 대한 추가 정보는 Hibernate 웹 사이트와 위키를 " +"보라. 당신은 서블릿 내에서가 아닌 JSP 내에 당신의 뷰를 렌더링하는 것을 고려" +"할 때 그것을 필요로 할 것이다." + +#. Tag: title +#: tutorial.xml:905 +#, no-c-format +msgid "Processing and rendering" +msgstr "프로세싱과 렌더링" + +#. Tag: para +#: tutorial.xml:907 +#, no-c-format +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "요청의 처리와 페이지의 렌더링을 구현하자." + +#. Tag: programlisting +#: tutorial.xml:911 +#, no-c-format +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:913 +#, fuzzy, no-c-format +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "" +"Java와 HTML이 혼합된 이 코딩이 보다 복잡한 어플리케이션에서 기준이 될 수 없" +"다 할지라도, 우리는 단지 이 튜토리얼 내에서 기본 Hibernate 개념들을 설명하고 " +"있음을 염두에 두라. 코드는 하나의 HTML 헤더와 하나의 footer를 프린트한다. 이 " +"페이지 내에 이벤트 엔트리를 위한 하나의 HTML form과 데이터베이스 내에 있는 모" +"든 이벤트들의 목록이 프린트된다. 첫 번째 메소드는 시행적이고 오직 HTML을 출력" +"한다:" + +#. Tag: programlisting +#: tutorial.xml:922 +#, no-c-format +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:924 +#, no-c-format +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"listEvents() 메소드는 하나의 질의를 실행하기 위해서 현재" +"의 쓰레드에 결합된 Hibernate Session을 사용한다:" + +#. Tag: programlisting +#: tutorial.xml:930 +#, no-c-format +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:932 +#, no-c-format +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"마지막으로, store 액션은 createAndStoreEvent() 메소드로 디스패치된다. 그것은 현재 쓰레드의 Session을 사용한다:" + +#. Tag: programlisting +#: tutorial.xml:938 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:940 +#, no-c-format +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"즉 서블릿이 완성된다. 서블릿에 대한 요청은 하나의 단일 SessionTransaction 내에서 처리될 것이다. 이전처럼 스탠" +"드얼론 어플리케이션에서, Hibernate는 이들 객체들을 실행 중인 현재 쓰레드에 자" +"동적으로 바인드시킬 수 있다. 이것은 당신의 코드를 계층화 시키고 당신이 좋아하" +"는 임의의 방법으로 SessionFactory에 접근하는 자유를 당신에" +"게 부여한다. 대개 당신은 보다 세련된 설계를 사용할 것이고 데이터 접근 코드를 " +"데이터 접근 객체들 내로 이동시킬 것이다(DAO 패턴). 추가 예제들은 Hibernate 위" +"키를 보라." + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Deploying and testing" +msgstr "배치하기 그리고 테스트하기" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"이 어플리케이션을 배치하기 위해서 당신은 하나의 웹 아카이브, WAR를 생성시켜" +"야 한다. 다음 Ant target을 당신의 build.xml 내에 추가하라:" + +#. Tag: programlisting +#: tutorial.xml:961 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:963 +#, no-c-format +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"이 target은 당신의 프로젝트 디렉토리 내에 hibernate-tutorial.war로 명명된 하나의 파일을 생성시킨다. 그것은 당신의 프로젝트의 기본 디" +"렉토리 내에 기대되는 모든 라이브러리들과 web.xml 디스크립" +"터를 패키징한다:" + +#. Tag: programlisting +#: tutorial.xml:969 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:971 +#, no-c-format +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." +msgstr "" +"당신이 웹 어플리케이션을 컴파일하고 배치하기 전에, 하나의 부가적인 라이브러리" +"가 필요함을 노트하라: jsdk.jar. 당신이 이미 이 라이브러리" +"를 갖고 있지 않을 경우, 이것은 Java servlet development kit이며, Sun 웹 사이" +"트로부터 그것을 얻어서 그것을 당신의 라이브러리 디렉토리에 복사하라. 하지만 " +"그것은 오직 컴파일 시에만 사용될 것이고 WAR 패키지에서는 제외된다." + +#. Tag: para +#: tutorial.xml:979 +#, no-c-format +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"빌드하고 배치하기 위해 당신의 프로젝트 디렉토리 내에서 ant war를 호출하고 hibernate-tutorial.war 파일을 당신의 " +"Tomcat webapp 디렉토리로 복사하라. 만일 당신이 Tomcat을 설" +"치하지 않았다면, 그것을 내려받아 설치 지침들을 따르라. 당신은 이 어플리케이션" +"을 배치하기 위해 임의의 Tomcat 구성을 변경하지 않아야 한다." + +#. Tag: para +#: tutorial.xml:987 +#, no-c-format +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"일단 배치했고 Tomcat이 실행중이면, http://localhost:8080/hibernate-" +"tutorial/eventmanager로 어플리케이션에 접근하라. 첫 번째 요청이 당" +"신의 서블릿에 도달할 때 Hibernate가 초기화(HibernateUtil " +"내에 있는 static initializer가 호출된다) 되는 것을 보기 위해 그리고 만일 어" +"떤 예외상황들이 발생할 경우 상세한 출력을 얻기 위해서 Tomcat 로그를 지켜보도" +"록 하라." + +#. Tag: title +#: tutorial.xml:1000 +#, no-c-format +msgid "Summary" +msgstr "요약" + +#. Tag: para +#: tutorial.xml:1002 +#, no-c-format +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"이 튜토리얼은 간단한 스탠드얼론 Hibernate 어플리케이션과 하나의 작은 웹 어플" +"리케이션을 작성하는 기초를 다루었다." + +#. Tag: para +#: tutorial.xml:1007 +#, no-c-format +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"만일 당신이 이미 Hibernate에 자신이 있다고 느낀다면, 당신이 흥미를 찾는 주제" +"들에 대한 참조 문서 목차를 계속 브라우징하라 - 가장 많이 요청되는 것은 트랜잭" +"션 처리(), 페치 퍼포먼스(), 또는 API 사용법(), 그리고 " +"질의 특징들()이다." + +#. Tag: para +#: tutorial.xml:1015 +#, no-c-format +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" +"더 많은(특화된) 튜토리얼들에 대해서는 Hibernate 웹 사이트를 체크하는 것을 잊" +"지 말라." diff --git a/documentation/envers/src/main/docbook/ko-KR/content/xml.po b/documentation/envers/src/main/docbook/ko-KR/content/xml.po new file mode 100644 index 0000000000..aadfbd5b3d --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/content/xml.po @@ -0,0 +1,446 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:5 +#, no-c-format +msgid "XML Mapping" +msgstr "XML 매핑" + +#. Tag: emphasis +#: xml.xml:7 +#, no-c-format +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "" +"이것은 Hibernate3.0에서 실험적인 특징이고 매우 활동적으로 개발 중에 있음을 노" +"트하라." + +#. Tag: title +#: xml.xml:13 +#, no-c-format +msgid "Working with XML data" +msgstr "XML 데이터로 작업하기" + +#. Tag: para +#: xml.xml:15 +#, no-c-format +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"Hibernate는 당신이 영속 POJO들로 작업하는 것과 아주 동일한 방법으로 영속 XML " +"데이터에 작업하도록 해준다. 파싱된 XML 트리는 단지 객체 레벨에서 관계형 데이" +"터를 나타내는 또 다른 방법으로 간주될 수 있다. 하나의 파싱된 XML 트리는 POJO" +"들 대신, 객체 레벨에서 관계형 데이터를 표현하는 단지 또 다른 방법으로 간주될 " +"수 있다." + +#. Tag: para +#: xml.xml:22 +#, no-c-format +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"Hibernate는 XML 트리들을 처리하는 API로서 dom4j를 지원한다. 당신은 데이터베이" +"스로부터 dom4j 트리들을 검색하고 당신이 그 트리를 데이터베이스와 자동적으로 " +"동기화시키기 위해 어떤 변경을 행하도록 하는 질의들을 작성할 수 있다. 당신은 " +"심지어 XML 문서를 취하고, dom4j를 사용하여 그것을 파싱하고, Hibernate의 다음 " +"기본적인 오퍼레이션들 중 어떤 것으로서 그것을 데이터베이스에 저장시킬 수 있" +"다: persist(), saveOrUpdate(), merge(), delete(), replicate()(merging(병합)은 아직 지원되지 않는다)." + +#. Tag: para +#: xml.xml:32 +#, no-c-format +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"이 특징은 데이터 가져오기/내보내기,JMS 또는 SOAP 그리고 XSLT-기반의 레포팅을 " +"통한 엔티티 데이터의 구체화를 포함하는 많은 어플리케이션들을 갖는다." + +#. Tag: para +#: xml.xml:37 +#, no-c-format +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"하나의 매핑은 클래스들의 프로퍼티들과 XML 문서의 노드들을 데이터베이스로 동시" +"에 매핑시키는데 사용될 수 있거나, 만일 매핑할 클래스가 존재하지 않을 경우, 그" +"것은 단지 XML을 매핑시키는데 사용될 수도 있다." + +#. Tag: title +#: xml.xml:44 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "XML과 클래스 매핑을 함께 지정하기" + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "다음은 POJO와 XML을 동시에 매핑시키는 예제이다 :" + +#. Tag: programlisting +#: xml.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:54 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "XML 매핑만을 지정하기" + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "다음은 POJO 클래스가 존재하지 않는 예제이다:" + +#. Tag: programlisting +#: xml.xml:60 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:62 +#, no-c-format +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"이 매핑은 dom4j 트리로서 또는 프로퍼티 name/value 쌍들(java Map들)의 그래프로서 데이터에 접근하는 것을 당신에게 허용해준다. 프로퍼" +"티 이름들은 HQL 질의들 내에서 참조될 수도 있는 순수하게 논리적인 구조체들이" +"다." + +#. Tag: title +#: xml.xml:73 +#, no-c-format +msgid "XML mapping metadata" +msgstr "XML 매핑 메타데이터" + +#. Tag: para +#: xml.xml:75 +#, no-c-format +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"많은 Hibernate 매핑 요소들은 node 속성을 수용한다. 이것은 " +"당신이 프로퍼티 또는 엔티티 데이터를 소유하는 XML 속성이나 요소의 이름을 지정" +"하도록 한다. node 속성의 포맷은 다음 중 하나이어야 한다:" + +#. Tag: para +#: xml.xml:84 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "\"element-name\" - 명명된 XML 요소로 매핑시킨다" + +#. Tag: para +#: xml.xml:87 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" +"\"@attribute-name\" - 명명된 XML 속성으로 매핑시킨다" + +#. Tag: para +#: xml.xml:90 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "\".\" - 부모 요소로 매핑 시킨다" + +#. Tag: para +#: xml.xml:93 +#, no-c-format +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - 명명된 요소의 명명된 속" +"성으로 매핑시킨다" + +#. Tag: para +#: xml.xml:100 +#, no-c-format +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"콜렉션들과 단일 값 콜렉션들의 경우, 추가적인 embed-xml 속" +"성이 존재한다. 만일 embed-xml=\"true\" 일 경우, 연관된 엔" +"티티(또는 value 타입을 가진 콜렉션)에 대한 디폴트 XML 트리는 그 연관을 소유하" +"는 엔티티에 대한 XML 트리 속에 직접 삽입될 것이다. 그 밖의 경우 " +"embed-xml=\"false\" 일 경우, 참조된 식별자 값 만이 단일 포" +"인트 연관들에 대해 나타날 것이고 콜렉션들은 단순히 전혀 나타나지 않을 것이다." + +#. Tag: para +#: xml.xml:110 +#, no-c-format +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"당신은 너무 많은 연관들에 대해 embed-xml=\"true\"로 남겨두" +"지 말도록 주의해야 한다. 왜냐하면 XML이 순환적으로 잘 처리하지 못하기 때문이" +"다!" + +#. Tag: programlisting +#: xml.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"이 경우에, 우리는 실제 account 데이터가 아닌, account id들을 가진 콜렉션을 삽" +"입시키기로 결정했다. 다음 HQL 질의:" + +#. Tag: programlisting +#: xml.xml:122 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "는 다음과 같은 데이터셋들을 반환할 것이다:" + +#. Tag: programlisting +#: xml.xml:128 +#, no-c-format +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:130 +#, no-c-format +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"만일 당신이 <one-to-many> 매핑에 대해 " +"embed-xml=\"true\"를 설정할 경우, 데이터는 다음과 같이 보" +"일 수도 있다:" + +#. Tag: programlisting +#: xml.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:141 +#, no-c-format +msgid "Manipulating XML data" +msgstr "XML 데이터 처리하기" + +#. Tag: para +#: xml.xml:143 +#, no-c-format +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"우리의 어플리케이션 내에서 XML 문서들을 다시 읽어들이고 업데이트 시키자. 우리" +"는 dom4j 세션을 얻어서 이것을 행한다:" + +#. Tag: programlisting +#: xml.xml:148 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: xml.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:152 +#, no-c-format +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"XML 기반의 데이터 가져오기/내보내기를 구현하는데 이 특징과 Hibernate의 " +"replicate() 오퍼레이션을 결합시키는 것이 매우 유용하다." diff --git a/documentation/envers/src/main/docbook/ko-KR/legal_notice.po b/documentation/envers/src/main/docbook/ko-KR/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/ko-KR/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/Hibernate_Reference.pot b/documentation/envers/src/main/docbook/pot/Hibernate_Reference.pot new file mode 100644 index 0000000000..e69de29bb2 diff --git a/documentation/envers/src/main/docbook/pot/content/architecture.pot b/documentation/envers/src/main/docbook/pot/content/architecture.pot new file mode 100644 index 0000000000..cc0b3605be --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/architecture.pot @@ -0,0 +1,322 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:30 +#, no-c-format +msgid "Architecture" +msgstr "" + +#. Tag: title +#: architecture.xml:33 +#, no-c-format +msgid "Overview" +msgstr "" + +#. Tag: para +#: architecture.xml:35 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "" + +#. Tag: para +#: architecture.xml:48 +#, no-c-format +msgid "This diagram shows Hibernate using the database and configuration data to provide persistence services (and persistent objects) to the application." +msgstr "" + +#. Tag: para +#: architecture.xml:53 +#, no-c-format +msgid "We would like to show a more detailed view of the runtime architecture. Unfortunately, Hibernate is flexible and supports several approaches. We will show the two extremes. The \"lite\" architecture has the application provide its own JDBC connections and manage its own transactions. This approach uses a minimal subset of Hibernate's APIs:" +msgstr "" + +#. Tag: para +#: architecture.xml:70 +#, no-c-format +msgid "The \"full cream\" architecture abstracts the application away from the underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" + +#. Tag: para +#: architecture.xml:84 +#, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "" + +#. Tag: term +#: architecture.xml:89 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "" + +#. Tag: para +#: architecture.xml:91 +#, no-c-format +msgid "A threadsafe (immutable) cache of compiled mappings for a single database. A factory for Session and a client of ConnectionProvider. Might hold an optional (second-level) cache of data that is reusable between transactions, at a process- or cluster-level." +msgstr "" + +#. Tag: term +#: architecture.xml:101 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "" + +#. Tag: para +#: architecture.xml:103 +#, no-c-format +msgid "A single-threaded, short-lived object representing a conversation between the application and the persistent store. Wraps a JDBC connection. Factory for Transaction. Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier." +msgstr "" + +#. Tag: term +#: architecture.xml:113 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "" + +#. Tag: para +#: architecture.xml:115 +#, no-c-format +msgid "Short-lived, single threaded objects containing persistent state and business function. These might be ordinary JavaBeans/POJOs, the only special thing about them is that they are currently associated with (exactly one) Session. As soon as the Session is closed, they will be detached and free to use in any application layer (e.g. directly as data transfer objects to and from presentation)." +msgstr "" + +#. Tag: term +#: architecture.xml:126 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "" + +#. Tag: para +#: architecture.xml:128 +#, no-c-format +msgid "Instances of persistent classes that are not currently associated with a Session. They may have been instantiated by the application and not (yet) persisted or they may have been instantiated by a closed Session." +msgstr "" + +#. Tag: term +#: architecture.xml:137 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "" + +#. Tag: para +#: architecture.xml:139 +#, no-c-format +msgid "(Optional) A single-threaded, short-lived object used by the application to specify atomic units of work. Abstracts application from underlying JDBC, JTA or CORBA transaction. A Session might span several Transactions in some cases. However, transaction demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" + +#. Tag: term +#: architecture.xml:150 +#, no-c-format +msgid "ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" + +#. Tag: para +#: architecture.xml:152 +#, no-c-format +msgid "(Optional) A factory for (and pool of) JDBC connections. Abstracts application from underlying Datasource or DriverManager. Not exposed to application, but can be extended/implemented by the developer." +msgstr "" + +#. Tag: term +#: architecture.xml:160 +#, no-c-format +msgid "TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "(Optional) A factory for Transaction instances. Not exposed to the application, but can be extended/implemented by the developer." +msgstr "" + +#. Tag: emphasis +#: architecture.xml:169 +#, no-c-format +msgid "Extension Interfaces" +msgstr "" + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "Hibernate offers many optional extension interfaces you can implement to customize the behavior of your persistence layer. See the API documentation for details." +msgstr "" + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "Given a \"lite\" architecture, the application bypasses the Transaction/TransactionFactory and/or ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" + +#. Tag: title +#: architecture.xml:188 +#, no-c-format +msgid "Instance states" +msgstr "" + +#. Tag: para +#: architecture.xml:189 +#, no-c-format +msgid "An instance of a persistent classes may be in one of three different states, which are defined with respect to a persistence context. The Hibernate Session object is the persistence context:" +msgstr "" + +#. Tag: term +#: architecture.xml:197 +#, no-c-format +msgid "transient" +msgstr "" + +#. Tag: para +#: architecture.xml:199 +#, no-c-format +msgid "The instance is not, and has never been associated with any persistence context. It has no persistent identity (primary key value)." +msgstr "" + +#. Tag: term +#: architecture.xml:207 +#, no-c-format +msgid "persistent" +msgstr "" + +#. Tag: para +#: architecture.xml:209 +#, no-c-format +msgid "The instance is currently associated with a persistence context. It has a persistent identity (primary key value) and, perhaps, a corresponding row in the database. For a particular persistence context, Hibernate guarantees that persistent identity is equivalent to Java identity (in-memory location of the object)." +msgstr "" + +#. Tag: term +#: architecture.xml:221 +#, no-c-format +msgid "detached" +msgstr "" + +#. Tag: para +#: architecture.xml:223 +#, no-c-format +msgid "The instance was once associated with a persistence context, but that context was closed, or the instance was serialized to another process. It has a persistent identity and, perhaps, a corresponding row in the database. For detached instances, Hibernate makes no guarantees about the relationship between persistent identity and Java identity." +msgstr "" + +#. Tag: title +#: architecture.xml:238 +#, no-c-format +msgid "JMX Integration" +msgstr "" + +#. Tag: para +#: architecture.xml:240 +#, no-c-format +msgid "JMX is the J2EE standard for management of Java components. Hibernate may be managed via a JMX standard service. We provide an MBean implementation in the distribution, org.hibernate.jmx.HibernateService." +msgstr "" + +#. Tag: para +#: architecture.xml:246 +#, no-c-format +msgid "For an example how to deploy Hibernate as a JMX service on the JBoss Application Server, please see the JBoss User Guide. On JBoss AS, you also get these benefits if you deploy using JMX:" +msgstr "" + +#. Tag: para +#: architecture.xml:254 +#, no-c-format +msgid "Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA transaction. This means you no longer have to manually open and close the Session, this becomes the job of a JBoss EJB interceptor. You also don't have to worry about transaction demarcation in your code anymore (unless you'd like to write a portable persistence layer of course, use the optional Hibernate Transaction API for this). You call the HibernateContext to access a Session." +msgstr "" + +#. Tag: para +#: architecture.xml:266 +#, no-c-format +msgid "HAR deployment: Usually you deploy the Hibernate JMX service using a JBoss service deployment descriptor (in an EAR and/or SAR file), it supports all the usual configuration options of a Hibernate SessionFactory. However, you still have to name all your mapping files in the deployment descriptor. If you decide to use the optional HAR deployment, JBoss will automatically detect all mapping files in your HAR file." +msgstr "" + +#. Tag: para +#: architecture.xml:277 +#, no-c-format +msgid "Consult the JBoss AS user guide for more information about these options." +msgstr "" + +#. Tag: para +#: architecture.xml:281 +#, no-c-format +msgid "Another feature available as a JMX service are runtime Hibernate statistics. See ." +msgstr "" + +#. Tag: title +#: architecture.xml:288 +#, no-c-format +msgid "JCA Support" +msgstr "" + +#. Tag: para +#: architecture.xml:289 +#, no-c-format +msgid "Hibernate may also be configured as a JCA connector. Please see the website for more details. Please note that Hibernate JCA support is still considered experimental." +msgstr "" + +#. Tag: title +#: architecture.xml:296 +#, no-c-format +msgid "Contextual Sessions" +msgstr "" + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "Most applications using Hibernate need some form of \"contextual\" sessions, where a given session is in effect throughout the scope of a given context. However, across applications the definition of what constitutes a context is typically different; and different contexts define different scopes to the notion of current. Applications using Hibernate prior to version 3.0 tended to utilize either home-grown ThreadLocal-based contextual sessions, helper classes such as HibernateUtil, or utilized third-party frameworks (such as Spring or Pico) which provided proxy/interception-based contextual sessions." +msgstr "" + +#. Tag: para +#: architecture.xml:306 +#, no-c-format +msgid "Starting with version 3.0.1, Hibernate added the SessionFactory.getCurrentSession() method. Initially, this assumed usage of JTA transactions, where the JTA transaction defined both the scope and context of a current session. The Hibernate team maintains that, given the maturity of the numerous stand-alone JTA TransactionManager implementations out there, most (if not all) applications should be using JTA transaction management whether or not they are deployed into a J2EE container. Based on that, the JTA-based contextual sessions is all you should ever need to use." +msgstr "" + +#. Tag: para +#: architecture.xml:316 +#, no-c-format +msgid "However, as of version 3.1, the processing behind SessionFactory.getCurrentSession() is now pluggable. To that end, a new extension interface (org.hibernate.context.CurrentSessionContext) and a new configuration parameter (hibernate.current_session_context_class) have been added to allow pluggability of the scope and context of defining current sessions." +msgstr "" + +#. Tag: para +#: architecture.xml:323 +#, no-c-format +msgid "See the Javadocs for the org.hibernate.context.CurrentSessionContext interface for a detailed discussion of its contract. It defines a single method, currentSession(), by which the implementation is responsible for tracking the current contextual session. Out-of-the-box, Hibernate comes with three implementations of this interface." +msgstr "" + +#. Tag: para +#: architecture.xml:333 +#, no-c-format +msgid "org.hibernate.context.JTASessionContext - current sessions are tracked and scoped by a JTA transaction. The processing here is exactly the same as in the older JTA-only approach. See the Javadocs for details." +msgstr "" + +#. Tag: para +#: architecture.xml:341 +#, no-c-format +msgid "org.hibernate.context.ThreadLocalSessionContext - current sessions are tracked by thread of execution. Again, see the Javadocs for details." +msgstr "" + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "org.hibernate.context.ManagedSessionContext - current sessions are tracked by thread of execution. However, you are responsible to bind and unbind a Session instance with static methods on this class, it does never open, flush, or close a Session." +msgstr "" + +#. Tag: para +#: architecture.xml:356 +#, no-c-format +msgid "The first two implementations provide a \"one session - one database transaction\" programming model, also known and used as session-per-request. The beginning and end of a Hibernate session is defined by the duration of a database transaction. If you use programmatic transaction demarcation in plain JSE without JTA, you are advised to use the Hibernate Transaction API to hide the underlying transaction system from your code. If you use JTA, use the JTA interfaces to demarcate transactions. If you execute in an EJB container that supports CMT, transaction boundaries are defined declaratively and you don't need any transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" + +#. Tag: para +#: architecture.xml:368 +#, no-c-format +msgid "The hibernate.current_session_context_class configuration parameter defines which org.hibernate.context.CurrentSessionContext implementation should be used. Note that for backwards compatibility, if this config param is not set but a org.hibernate.transaction.TransactionManagerLookup is configured, Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the implementation class to use; for the three out-of-the-box implementations, however, there are three corresponding short names, \"jta\", \"thread\", and \"managed\"." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/association_mapping.pot b/documentation/envers/src/main/docbook/pot/content/association_mapping.pot new file mode 100644 index 0000000000..036efc1466 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/association_mapping.pot @@ -0,0 +1,738 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:30 +#, no-c-format +msgid "Association Mappings" +msgstr "" + +#. Tag: title +#: association_mapping.xml:33 +#, no-c-format +msgid "Introduction" +msgstr "" + +#. Tag: para +#: association_mapping.xml:35 +#, no-c-format +msgid "Association mappings are the often most difficult thing to get right. In this section we'll go through the canonical cases one by one, starting with unidirectional mappings, and then considering the bidirectional cases. We'll use Person and Address in all the examples." +msgstr "" + +#. Tag: para +#: association_mapping.xml:43 +#, no-c-format +msgid "We'll classify associations by whether or not they map to an intervening join table, and by multiplicity." +msgstr "" + +#. Tag: para +#: association_mapping.xml:48 +#, no-c-format +msgid "Nullable foreign keys are not considered good practice in traditional data modelling, so all our examples use not null foreign keys. This is not a requirement of Hibernate, and the mappings will all work if you drop the nullability constraints." +msgstr "" + +#. Tag: title +#: association_mapping.xml:58 +#, no-c-format +msgid "Unidirectional associations" +msgstr "" + +#. Tag: title +#: association_mapping.xml:61 association_mapping.xml:132 +#, no-c-format +msgid "many to one" +msgstr "" + +#. Tag: para +#: association_mapping.xml:63 +#, no-c-format +msgid "A unidirectional many-to-one association is the most common kind of unidirectional association." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:68 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:69 association_mapping.xml:185 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:74 association_mapping.xml:145 association_mapping.xml:209 association_mapping.xml:249 +#, no-c-format +msgid "one to one" +msgstr "" + +#. Tag: para +#: association_mapping.xml:76 +#, no-c-format +msgid "A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique constraint." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:81 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:82 association_mapping.xml:217 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:84 +#, no-c-format +msgid "A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed the direction of the association in this example.)" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:90 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " person\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:91 association_mapping.xml:225 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:96 association_mapping.xml:118 +#, no-c-format +msgid "one to many" +msgstr "" + +#. Tag: para +#: association_mapping.xml:98 +#, no-c-format +msgid "A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:104 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:106 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "" + +#. Tag: title +#: association_mapping.xml:115 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "" + +#. Tag: para +#: association_mapping.xml:120 +#, no-c-format +msgid "A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true\", we have changed the multiplicity from many-to-many to one-to-many." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:126 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:127 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:134 +#, no-c-format +msgid "A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:139 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:147 +#, no-c-format +msgid "A unidirectional one-to-one association on a join table is extremely unusual, but possible." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:152 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:153 association_mapping.xml:257 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:158 association_mapping.xml:262 +#, no-c-format +msgid "many to many" +msgstr "" + +#. Tag: para +#: association_mapping.xml:160 +#, no-c-format +msgid "Finally, we have a unidirectional many-to-many association." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:164 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:165 association_mapping.xml:270 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: association_mapping.xml:172 +#, no-c-format +msgid "Bidirectional associations" +msgstr "" + +#. Tag: title +#: association_mapping.xml:175 association_mapping.xml:235 +#, no-c-format +msgid "one to many / many to one" +msgstr "" + +#. Tag: para +#: association_mapping.xml:177 +#, no-c-format +msgid "A bidirectional many-to-one association is the most common kind of association. (This is the standard parent/child relationship.)" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:183 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "If you use a List (or other indexed collection) you need to set the key column of the foreign key to not null, and let Hibernate manage the association from the collections side to maintain the index of each element (making the other side virtually inverse by setting update=\"false\" and insert=\"false\"):" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:195 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:197 +#, no-c-format +msgid "It is important that you define not-null=\"true\" on the <key> element of the collection mapping if the underlying foreign key column is NOT NULL. Don't only declare not-null=\"true\" on a possible nested <column> element, but on the <key> element." +msgstr "" + +#. Tag: para +#: association_mapping.xml:211 +#, no-c-format +msgid "A bidirectional one-to-one association on a foreign key is quite common." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:216 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:219 +#, no-c-format +msgid "A bidirectional one-to-one association on a primary key uses the special id generator." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:224 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " person\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:232 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "" + +#. Tag: para +#: association_mapping.xml:237 +#, no-c-format +msgid "A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on either end of the association, on the collection, or on the join." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:243 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: association_mapping.xml:251 +#, no-c-format +msgid "A bidirectional one-to-one association on a join table is extremely unusual, but possible." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:256 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:264 +#, no-c-format +msgid "Finally, we have a bidirectional many-to-many association." +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:268 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:277 +#, no-c-format +msgid "More complex association mappings" +msgstr "" + +#. Tag: para +#: association_mapping.xml:279 +#, no-c-format +msgid "More complex association joins are extremely rare. Hibernate makes it possible to handle more complex situations using SQL fragments embedded in the mapping document. For example, if a table with historical account information data defines accountNumber, effectiveEndDate and effectiveStartDatecolumns, mapped as follows:" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:288 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " case when effectiveEndDate is null then 1 else 0 end\n" + " \n" + "\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:290 +#, no-c-format +msgid "Then we can map an association to the current instance (the one with null effectiveEndDate) using:" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:295 +#, no-c-format +msgid "" + "\n" + " \n" + " '1'\n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:297 +#, no-c-format +msgid "In a more complex example, imagine that the association between Employee and Organization is maintained in an Employment table full of historical employment data. Then an association to the employee's most recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:305 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " select employeeId, orgId \n" + " from Employments \n" + " group by orgId \n" + " having startDate = max(startDate)\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:307 +#, no-c-format +msgid "You can get quite creative with this functionality, but it is usually more practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/basic_mapping.pot b/documentation/envers/src/main/docbook/pot/content/basic_mapping.pot new file mode 100644 index 0000000000..b6a4b526b3 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/basic_mapping.pot @@ -0,0 +1,3347 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:29 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:32 +#, no-c-format +msgid "Mapping declaration" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:34 +#, no-c-format +msgid "Object/relational mappings are usually defined in an XML document. The mapping document is designed to be readable and hand-editable. The mapping language is Java-centric, meaning that mappings are constructed around persistent class declarations, not table declarations." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:41 +#, no-c-format +msgid "Note that, even though many Hibernate users choose to write the XML by hand, a number of tools exist to generate the mapping document, including XDoclet, Middlegen and AndroMDA." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:47 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:51 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "We will now discuss the content of the mapping document. We will only describe the document elements and attributes that are used by Hibernate at runtime. The mapping document also contains some extra optional attributes and elements that affect the database schemas exported by the schema export tool. (For example the not-null attribute.)" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:64 +#, no-c-format +msgid "Doctype" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:66 +#, no-c-format +msgid "All XML mappings should declare the doctype shown. The actual DTD may be found at the URL above, in the directory hibernate-x.x.x/src/org/hibernate or in hibernate3.jar. Hibernate will always look for the DTD in its classpath first. If you experience lookups of the DTD using an Internet connection, check your DTD declaration against the contents of your claspath." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:76 +#, no-c-format +msgid "EntityResolver" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:77 +#, no-c-format +msgid "As mentioned previously, Hibernate will first attempt to resolve DTDs in its classpath. The manner in which it does this is by registering a custom org.xml.sax.EntityResolver implementation with the SAXReader it uses to read in the xml files. This custom EntityResolver recognizes two different systemId namespaces." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:85 +#, no-c-format +msgid "a hibernate namespace is recognized whenever the resolver encounteres a systemId starting with http://hibernate.sourceforge.net/; the resolver attempts to resolve these entities via the classlaoder which loaded the Hibernate classes." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:94 +#, no-c-format +msgid "a user namespace is recognized whenever the resolver encounteres a systemId using a classpath:// URL protocol; the resolver will attempt to resolve these entities via (1) the current thread context classloader and (2) the classloader which loaded the Hibernate classes." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:103 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:106 +#, no-c-format +msgid "" + "\n" + "\n" + "]>\n" + "\n" + "\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " &types;\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:107 +#, no-c-format +msgid "Where types.xml is a resource in the your.domain package and contains a custom typedef." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:115 +#, no-c-format +msgid "hibernate-mapping" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "This element has several optional attributes. The schema and catalog attributes specify that tables referred to in this mapping belong to the named schema and/or catalog. If specified, tablenames will be qualified by the given schema and catalog names. If missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for properties and collections which do not specify a cascade attribute. The auto-import attribute lets us use unqualified class names in the query language, by default." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:138 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:141 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:146 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:151 +#, no-c-format +msgid "default-cascade (optional - defaults to none): A default cascade style." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:157 +#, no-c-format +msgid "default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. Can be a custom implementation of PropertyAccessor." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:164 +#, no-c-format +msgid "default-lazy (optional - defaults to true): The default value for unspecifed lazy attributes of class and collection mappings." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:171 +#, no-c-format +msgid "auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes in this mapping) in the query language." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:178 +#, no-c-format +msgid "package (optional): Specifies a package prefix to assume for unqualified class names in the mapping document." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:186 +#, no-c-format +msgid "If you have two persistent classes with the same (unqualified) name, you should set auto-import=\"false\". Hibernate will throw an exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:192 +#, no-c-format +msgid "Note that the hibernate-mapping element allows you to nest several persistent <class> mappings, as shown above. It is however good practice (and expected by some tools) to map only a single persistent class (or a single class hierarchy) in one mapping file and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, Animal.hbm.xml." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:205 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:207 +#, no-c-format +msgid "You may declare a persistent class using the class element:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:235 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:238 +#, no-c-format +msgid "name (optional): The fully qualified Java class name of the persistent class (or interface). If this attribute is missing, it is assumed that the mapping is for a non-POJO entity." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:245 +#, no-c-format +msgid "table (optional - defaults to the unqualified class name): The name of its database table." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:251 +#, no-c-format +msgid "discriminator-value (optional - defaults to the class name): A value that distiguishes individual subclasses, used for polymorphic behaviour. Acceptable values include null and not null." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "mutable (optional, defaults to true): Specifies that instances of the class are (not) mutable." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:264 basic_mapping.xml:2228 +#, no-c-format +msgid "schema (optional): Override the schema name specified by the root <hibernate-mapping> element." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:270 basic_mapping.xml:2234 +#, no-c-format +msgid "catalog (optional): Override the catalog name specified by the root <hibernate-mapping> element." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:276 +#, no-c-format +msgid "proxy (optional): Specifies an interface to use for lazy initializing proxies. You may specify the name of the class itself." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated at runtime and contain only those columns whose values have changed." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:289 +#, no-c-format +msgid "dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:296 +#, no-c-format +msgid "select-before-update (optional, defaults to false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. In certain cases (actually, only when a transient object has been associated with a new session using update()), this means that Hibernate will perform an extra SQL SELECT to determine if an UPDATE is actually required." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:306 +#, no-c-format +msgid "polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:312 +#, no-c-format +msgid "where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:318 +#, no-c-format +msgid "persister (optional): Specifies a custom ClassPersister." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:323 +#, no-c-format +msgid "batch-size (optional, defaults to 1) specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:329 +#, no-c-format +msgid "optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:335 +#, no-c-format +msgid "lazy (optional): Lazy fetching may be completely disabled by setting lazy=\"false\"." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "entity-name (optional, defaults to the class name): Hibernate3 allows a class to be mapped multiple times (to different tables, potentially), and allows entity mappings that are represented by Maps or XML at the Java level. In these cases, you should provide an explicit arbitrary name for the entity. See and for more information." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:351 +#, no-c-format +msgid "check (optional): A SQL expression used to generate a multi-row check constraint for automatic schema generation." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:357 +#, no-c-format +msgid "rowid (optional): Hibernate can use so called ROWIDs on databases which support. E.g. on Oracle, Hibernate can use the rowid extra column for fast updates if you set this option to rowid. A ROWID is an implementation detail and represents the physical location of a stored tuple." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:365 +#, no-c-format +msgid "subselect (optional): Maps an immutable and read-only entity to a database subselect. Useful if you want to have a view instead of a base table, but don't. See below for more information." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:372 +#, no-c-format +msgid "abstract (optional): Used to mark abstract superclasses in <union-subclass> hierarchies." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:380 +#, no-c-format +msgid "It is perfectly acceptable for the named persistent class to be an interface. You would then declare implementing classes of that interface using the <subclass> element. You may persist any static inner class. You should specify the class name using the standard form ie. eg.Foo$Bar." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "Immutable classes, mutable=\"false\", may not be updated or deleted by the application. This allows Hibernate to make some minor performance optimizations." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:392 +#, no-c-format +msgid "The optional proxy attribute enables lazy initialization of persistent instances of the class. Hibernate will initially return CGLIB proxies which implement the named interface. The actual persistent object will be loaded when a method of the proxy is invoked. See \"Initializing collections and proxies\" below." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:399 +#, no-c-format +msgid "Implicit polymorphism means that instances of the class will be returned by a query that names any superclass or implemented interface or the class and that instances of any subclass of the class will be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by queries that explicitly name that class and that queries that name the class will return only instances of subclasses mapped inside this <class> declaration as a <subclass> or <joined-subclass>. For most purposes the default, polymorphism=\"implicit\", is appropriate. Explicit polymorphism is useful when two different classes are mapped to the same table (this allows a \"lightweight\" class that contains a subset of the table columns)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:411 +#, no-c-format +msgid "The persister attribute lets you customize the persistence strategy used for the class. You may, for example, specify your own subclass of org.hibernate.persister.EntityPersister or you might even provide a completely new implementation of the interface org.hibernate.persister.ClassPersister that implements persistence via, for example, stored procedure calls, serialization to flat files or LDAP. See org.hibernate.test.CustomPersister for a simple example (of \"persistence\" to a Hashtable)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:422 +#, no-c-format +msgid "Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be specified on the <subclass> or <joined-subclass> elements. These settings may increase performance in some cases, but might actually decrease performance in others. Use judiciously." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:430 +#, no-c-format +msgid "Use of select-before-update will usually decrease performance. It is very useful to prevent a database update trigger being called unnecessarily if you reattach a graph of detached instances to a Session." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:436 +#, no-c-format +msgid "If you enable dynamic-update, you will have a choice of optimistic locking strategies:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:442 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:447 +#, no-c-format +msgid "all check all columns" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:452 +#, no-c-format +msgid "dirty check the changed columns, allowing some concurrent updates" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:457 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:462 +#, no-c-format +msgid "We very strongly recommend that you use version/timestamp columns for optimistic locking with Hibernate. This is the optimal strategy with respect to performance and is the only strategy that correctly handles modifications made to detached instances (ie. when Session.merge() is used)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:469 +#, no-c-format +msgid "There is no difference between a view and a base table for a Hibernate mapping, as expected this is transparent at the database level (note that some DBMS don't support views properly, especially with updates). Sometimes you want to use a view, but can't create one in the database (ie. with a legacy schema). In this case, you can map an immutable and read-only entity to a given SQL subselect expression:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:477 +#, no-c-format +msgid "" + "\n" + " \n" + " select item.name, max(bid.amount), count(*)\n" + " from item\n" + " join bid on bid.item_id = item.id\n" + " group by item.name\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:479 +#, no-c-format +msgid "Declare the tables to synchronize this entity with, ensuring that auto-flush happens correctly, and that queries against the derived entity do not return stale data. The <subselect> is available as both as an attribute and a nested mapping element." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:489 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:491 +#, no-c-format +msgid "Mapped classes must declare the primary key column of the database table. Most classes will also have a JavaBeans-style property holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key column." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:506 +#, no-c-format +msgid "" + "\n" + " node=\"element-name|@attribute-name|element/@attribute|.\"\n" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:509 +#, no-c-format +msgid "name (optional): The name of the identifier property." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:514 +#, no-c-format +msgid "type (optional): A name that indicates the Hibernate type." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:519 +#, no-c-format +msgid "column (optional - defaults to the property name): The name of the primary key column." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:525 +#, no-c-format +msgid "unsaved-value (optional - defaults to a \"sensible\" value): An identifier property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:533 basic_mapping.xml:1041 basic_mapping.xml:1180 basic_mapping.xml:1262 basic_mapping.xml:1369 basic_mapping.xml:1558 basic_mapping.xml:1732 basic_mapping.xml:1902 basic_mapping.xml:2481 +#, no-c-format +msgid "access (optional - defaults to property): The strategy Hibernate should use for accessing the property value." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:541 +#, no-c-format +msgid "If the name attribute is missing, it is assumed that the class has no identifier property." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:546 +#, no-c-format +msgid "The unsaved-value attribute is almost never needed in Hibernate3." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:550 +#, no-c-format +msgid "There is an alternative <composite-id> declaration to allow access to legacy data with composite keys. We strongly discourage its use for anything else." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:556 +#, no-c-format +msgid "Generator" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:558 +#, no-c-format +msgid "The optional <generator> child element names a Java class used to generate unique identifiers for instances of the persistent class. If any parameters are required to configure or initialize the generator instance, they are passed using the <param> element." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:565 +#, no-c-format +msgid "" + "\n" + " \n" + " uid_table\n" + " next_hi_value_column\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:567 +#, no-c-format +msgid "All generators implement the interface org.hibernate.id.IdentifierGenerator. This is a very simple interface; some applications may choose to provide their own specialized implementations. However, Hibernate provides a range of built-in implementations. There are shortcut names for the built-in generators:" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:575 +#, no-c-format +msgid "increment" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:577 +#, no-c-format +msgid "generates identifiers of type long, short or int that are unique only when no other process is inserting data into the same table. Do not use in a cluster." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:586 +#, no-c-format +msgid "identity" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:588 +#, no-c-format +msgid "supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type long, short or int." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:596 +#, no-c-format +msgid "sequence" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:598 +#, no-c-format +msgid "uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type long, short or int" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:606 +#, no-c-format +msgid "hilo" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:608 +#, no-c-format +msgid "uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:618 +#, no-c-format +msgid "seqhilo" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:620 +#, no-c-format +msgid "uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a named database sequence." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:628 +#, no-c-format +msgid "uuid" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:630 +#, no-c-format +msgid "uses a 128-bit UUID algorithm to generate identifiers of type string, unique within a network (the IP address is used). The UUID is encoded as a string of hexadecimal digits of length 32." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:638 +#, no-c-format +msgid "guid" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:640 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:646 +#, no-c-format +msgid "native" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:648 +#, no-c-format +msgid "picks identity, sequence or hilo depending upon the capabilities of the underlying database." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:656 +#, no-c-format +msgid "assigned" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:658 +#, no-c-format +msgid "lets the application to assign an identifier to the object before save() is called. This is the default strategy if no <generator> element is specified." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:666 +#, no-c-format +msgid "select" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:668 +#, no-c-format +msgid "retrieves a primary key assigned by a database trigger by selecting the row by some unique key and retrieving the primary key value." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:675 +#, no-c-format +msgid "foreign" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:677 +#, no-c-format +msgid "uses the identifier of another associated object. Usually used in conjunction with a <one-to-one> primary key association." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:684 +#, no-c-format +msgid "sequence-identity" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:686 +#, no-c-format +msgid "a specialized sequence generation strategy which utilizes a database sequence for the actual value generation, but combines this with JDBC3 getGeneratedKeys to actually return the generated identifier value as part of the insert statement execution. This strategy is only known to be supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:703 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:704 +#, no-c-format +msgid "The hilo and seqhilo generators provide two alternate implementations of the hi/lo algorithm, a favorite approach to identifier generation. The first implementation requires a \"special\" database table to hold the next available \"hi\" value. The second uses an Oracle-style sequence (where supported)." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:711 +#, no-c-format +msgid "" + "\n" + " \n" + " hi_value\n" + " next_value\n" + " 100\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:713 +#, no-c-format +msgid "" + "\n" + " \n" + " hi_value\n" + " 100\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:715 +#, no-c-format +msgid "Unfortunately, you can't use hilo when supplying your own Connection to Hibernate. When Hibernate is using an application server datasource to obtain connections enlisted with JTA, you must properly configure the hibernate.transaction.manager_lookup_class." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:724 +#, no-c-format +msgid "UUID algorithm" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:725 +#, no-c-format +msgid "The UUID contains: IP address, startup time of the JVM (accurate to a quarter second), system time and a counter value (unique within the JVM). It's not possible to obtain a MAC address or memory address from Java code, so this is the best we can do without using JNI." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:734 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:735 +#, no-c-format +msgid "For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), you may use identity key generation. For databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you may use sequence style key generation. Both these strategies require two SQL queries to insert a new object." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:743 +#, no-c-format +msgid "" + "\n" + " \n" + " person_id_sequence\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:745 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:747 +#, no-c-format +msgid "For cross-platform development, the native strategy will choose from the identity, sequence and hilo strategies, dependant upon the capabilities of the underlying database." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:756 +#, no-c-format +msgid "Assigned identifiers" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:757 +#, no-c-format +msgid "If you want the application to assign identifiers (as opposed to having Hibernate generate them), you may use the assigned generator. This special generator will use the identifier value already assigned to the object's identifier property. This generator is used when the primary key is a natural key instead of a surrogate key. This is the default behavior if you do no specify a <generator> element." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:766 +#, no-c-format +msgid "Choosing the assigned generator makes Hibernate use unsaved-value=\"undefined\", forcing Hibernate to go to the database to determine if an instance is transient or detached, unless there is a version or timestamp property, or you define Interceptor.isUnsaved()." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:776 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:777 +#, no-c-format +msgid "For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:781 +#, no-c-format +msgid "" + "\n" + " \n" + " socialSecurityNumber\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:783 +#, no-c-format +msgid "In the above example, there is a unique valued property named socialSecurityNumber defined by the class, as a natural key, and a surrogate key named person_id whose value is generated by a trigger." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:795 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:797 +#, no-c-format +msgid "Starting with release 3.2.3, there are 2 new generators which represent a re-thinking of 2 different aspects of identifier generation. The first aspect is database portability; the second is optimization (not having to query the database for every request for a new identifier value). These two new generators are intended to take the place of some of the named generators described above (starting in 3.3.x); however, they are included in the current releases and can be referenced by FQN." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:805 +#, no-c-format +msgid "The first of these new generators is org.hibernate.id.enhanced.SequenceStyleGenerator which is intended firstly as a replacement for the sequence generator and secondly as a better portability generator than native (because native (generally) chooses between identity and sequence which have largely different semantics which can cause subtle isssues in applications eyeing portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses between using a table or a sequence in the database to store its incrementing values depending on the capabilities of the dialect being used. The difference between this and native is that table-based and sequence-based storage have the same exact semantic (in fact sequences are exactly what Hibernate tries to emmulate with its table-based generators). This generator has a number of configuration parameters:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:819 +#, no-c-format +msgid "sequence_name (optional, defaults to hibernate_sequence): The name of the sequence (or table) to be used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:825 +#, no-c-format +msgid "initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In sequence creation terms, this is analogous to the clause typical named \"STARTS WITH\"." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:832 +#, no-c-format +msgid "increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should differ. In sequence creation terms, this is analogous to the clause typical named \"INCREMENT BY\"." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:839 +#, no-c-format +msgid "force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even though the dialect might support sequence?" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the table which is used to hold the value." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:853 +#, no-c-format +msgid "optimizer (optional, defaults to none): See" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:860 +#, no-c-format +msgid "The second of these new generators is org.hibernate.id.enhanced.TableGenerator which is intended firstly as a replacement for the table generator (although it actually functions much more like org.hibernate.id.MultipleHiLoPerTableGenerator) and secondly as a re-implementation of org.hibernate.id.MultipleHiLoPerTableGenerator utilizing the notion of pluggable optimiziers. Essentially this generator defines a table capable of holding a number of different increment values simultaneously by using multiple distinctly keyed rows. This generator has a number of configuration parameters:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:870 +#, no-c-format +msgid "table_name (optional, defaults to hibernate_sequences): The name of the table to be used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:876 +#, no-c-format +msgid "value_column_name (optional, defaults to next_val): The name of the column on the table which is used to hold the value." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:882 +#, no-c-format +msgid "segment_column_name (optional, defaults to sequence_name): The name of the column on the table which is used to hold the \"segement key\". This is the value which distinctly identifies which increment value to use." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:889 +#, no-c-format +msgid "segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to pull increment values for this generator." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:896 +#, no-c-format +msgid "segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this segment key column." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:902 +#, no-c-format +msgid "initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:908 +#, no-c-format +msgid "increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:914 +#, no-c-format +msgid "optimizer (optional, defaults to ): See" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:924 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:925 +#, no-c-format +msgid "For identifier generators which store values in the database, it is inefficient for them to hit the database on each and every call to generate a new identifier value. Instead, you'd ideally want to group a bunch of them in memory and only hit the database when you have exhausted your in-memory value group. This is the role of the pluggable optimizers. Currently only the two enhanced generators ( support this notion." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:933 +#, no-c-format +msgid "none (generally this is the default if no optimizer was specified): This says to not perform any optimizations, and hit the database each and every request." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:939 +#, no-c-format +msgid "hilo: applies a hi/lo algorithm around the database retrieved values. The values from the database for this optimizer are expected to be sequential. The values retrieved from the database structure for this optimizer indicates the \"group number\"; the increment_size is multiplied by that value in memory to define a group \"hi value\"." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:948 +#, no-c-format +msgid "pooled: like was discussed for hilo, this optimizers attempts to minimize the number of hits to the database. Here, however, we simply store the starting value for the \"next group\" into the database structure rather than a sequential value in combination with an in-memory grouping algorithm. increment_size here refers to the values coming from the database." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:961 +#, no-c-format +msgid "composite-id" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:963 +#, no-c-format +msgid "" + "\n" + " node=\"element-name|.\"\n" + "\n" + " \n" + " \n" + " ......\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "For a table with a composite key, you may map multiple properties of the class as identifier properties. The <composite-id> element accepts <key-property> property mappings and <key-many-to-one> mappings as child elements." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:972 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:974 +#, no-c-format +msgid "Your persistent class must override equals() and hashCode() to implement composite identifier equality. It must also implements Serializable." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:980 +#, no-c-format +msgid "Unfortunately, this approach to composite identifiers means that a persistent object is its own identifier. There is no convenient \"handle\" other than the object itself. You must instantiate an instance of the persistent class itself and populate its identifier properties before you can load() the persistent state associated with a composite key. We call this approach an embedded composite identifier, and discourage it for serious applications." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:989 +#, no-c-format +msgid "A second approach is what we call a mapped composite identifier, where the identifier properties named inside the <composite-id> element are duplicated on both the persistent class and a separate identifier class." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:995 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:997 +#, no-c-format +msgid "In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named medicareNumber and dependent. The identifier class must override equals() and hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code duplication." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1006 +#, no-c-format +msgid "The following attributes are used to specify a mapped composite identifier:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1012 +#, no-c-format +msgid "mapped (optional, defaults to false): indicates that a mapped composite identifier is used, and that the contained property mappings refer to both the entity class and the composite identifier class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1020 +#, no-c-format +msgid "class (optional, but required for a mapped composite identifier): The class used as a composite identifier." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1027 +#, no-c-format +msgid "We will describe a third, even more convenient approach where the composite identifier is implemented as a component class in . The attributes described below apply only to this alternative approach:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1035 +#, no-c-format +msgid "name (optional, required for this approach): A property of component type that holds the composite identifier (see chapter 9)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1047 +#, no-c-format +msgid "class (optional - defaults to the property type determined by reflection): The component class used as a composite identifier (see next section)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1054 +#, no-c-format +msgid "This third approach, an identifier component is the one we recommend for almost all applications." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1062 +#, no-c-format +msgid "discriminator" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1064 +#, no-c-format +msgid "The <discriminator> element is required for polymorphic persistence using the table-per-class-hierarchy mapping strategy and declares a discriminator column of the table. The discriminator column contains marker values that tell the persistence layer what subclass to instantiate for a particular row. A restricted set of types may be used: string, character, integer, byte, short, boolean, yes_no, true_false." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1082 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1085 +#, no-c-format +msgid "column (optional - defaults to class) the name of the discriminator column." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1091 +#, no-c-format +msgid "type (optional - defaults to string) a name that indicates the Hibernate type" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1097 +#, no-c-format +msgid "force (optional - defaults to false) \"force\" Hibernate to specify allowed discriminator values even when retrieving all instances of the root class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1104 +#, no-c-format +msgid "insert (optional - defaults to true) set this to false if your discriminator column is also part of a mapped composite identifier. (Tells Hibernate to not include the column in SQL INSERTs.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1112 +#, no-c-format +msgid "formula (optional) an arbitrary SQL expression that is executed when a type has to be evaluated. Allows content-based discrimination." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "Actual values of the discriminator column are specified by the discriminator-value attribute of the <class> and <subclass> elements." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1126 +#, no-c-format +msgid "The force attribute is (only) useful if the table contains rows with \"extra\" discriminator values that are not mapped to a persistent class. This will not usually be the case." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1132 +#, no-c-format +msgid "Using the formula attribute you can declare an arbitrary SQL expression that will be used to evaluate the type of a row:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1137 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1142 +#, no-c-format +msgid "version (optional)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1144 +#, no-c-format +msgid "The <version> element is optional and indicates that the table contains versioned data. This is particularly useful if you plan to use long transactions (see below)." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1160 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1163 +#, no-c-format +msgid "column (optional - defaults to the property name): The name of the column holding the version number." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1169 +#, no-c-format +msgid "name: The name of a property of the persistent class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1174 +#, no-c-format +msgid "type (optional - defaults to integer): The type of the version number." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1186 +#, no-c-format +msgid "unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session. (undefined specifies that the identifier property value should be used.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1195 +#, no-c-format +msgid "generated (optional - defaults to never): Specifies that this version property value is actually generated by the database. See the discussion of generated properties." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1202 +#, no-c-format +msgid "insert (optional - defaults to true): Specifies whether the version column should be included in SQL insert statements. May be set to false if and only if the database column is defined with a default value of 0." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1212 +#, no-c-format +msgid "Version numbers may be of Hibernate type long, integer, short, timestamp or calendar." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1217 +#, no-c-format +msgid "A version or timestamp property should never be null for a detached instance, so Hibernate will detect any instance with a null version or timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or timestamp property is an easy way to avoid any problems with transitive reattachment in Hibernate, especially useful for people using assigned identifiers or composite keys!" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1228 +#, no-c-format +msgid "timestamp (optional)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1230 +#, no-c-format +msgid "The optional <timestamp> element indicates that the table contains timestamped data. This is intended as an alternative to versioning. Timestamps are by nature a less safe implementation of optimistic locking. However, sometimes the application might use the timestamps in other ways." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1246 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1249 +#, no-c-format +msgid "column (optional - defaults to the property name): The name of a column holding the timestamp." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1255 +#, no-c-format +msgid "name: The name of a JavaBeans style property of Java type Date or Timestamp of the persistent class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1268 +#, no-c-format +msgid "unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session. (undefined specifies that the identifier property value should be used.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1277 +#, no-c-format +msgid "source (optional - defaults to vm): From where should Hibernate retrieve the timestamp value? From the database, or from the current JVM? Database-based timestamps incur an overhead because Hibernate must hit the database in order to determine the \"next value\", but will be safer for use in clustered environments. Note also, that not all Dialects are known to support retrieving of the database's current timestamp, while others might be unsafe for usage in locking due to lack of precision (Oracle 8 for example)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1289 +#, no-c-format +msgid "generated (optional - defaults to never): Specifies that this timestamp property value is actually generated by the database. See the discussion of generated properties." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1298 +#, no-c-format +msgid "Note that <timestamp> is equivalent to <version type=\"timestamp\">. And <timestamp source=\"db\"> is equivalent to <version type=\"dbtimestamp\">" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1308 +#, no-c-format +msgid "property" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1310 +#, no-c-format +msgid "The <property> element declares a persistent, JavaBean style property of the class." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1332 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1335 +#, no-c-format +msgid "name: the name of the property, with an initial lowercase letter." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1341 +#, no-c-format +msgid "column (optional - defaults to the property name): the name of the mapped database table column. This may also be specified by nested <column> element(s)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1348 +#, no-c-format +msgid "type (optional): a name that indicates the Hibernate type." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1353 +#, no-c-format +msgid "update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" property whose value is initialized from some other property that maps to the same colum(s) or by a trigger or other application." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1362 +#, no-c-format +msgid "formula (optional): an SQL expression that defines the value for a computed property. Computed properties do not have a column mapping of their own." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1375 +#, no-c-format +msgid "lazy (optional - defaults to false): Specifies that this property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1382 +#, no-c-format +msgid "unique (optional): Enable the DDL generation of a unique constraint for the columns. Also, allow this to be the target of a property-ref." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1389 +#, no-c-format +msgid "not-null (optional): Enable the DDL generation of a nullability constraint for the columns." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1395 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when this property is dirty." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1403 +#, no-c-format +msgid "generated (optional - defaults to never): Specifies that this property value is actually generated by the database. See the discussion of generated properties." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1412 +#, no-c-format +msgid "typename could be:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1418 +#, no-c-format +msgid "The name of a Hibernate basic type (eg. integer, string, character, date, timestamp, float, binary, serializable, object, blob)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1424 +#, no-c-format +msgid "The name of a Java class with a default basic type (eg. int, float, char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1430 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1435 +#, no-c-format +msgid "The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1441 +#, no-c-format +msgid "If you do not specify a type, Hibernate will use reflection upon the named property to take a guess at the correct Hibernate type. Hibernate will try to interpret the name of the return class of the property getter using rules 2, 3, 4 in that order. However, this is not always enough. In certain cases you will still need the type attribute. (For example, to distinguish between Hibernate.DATE and Hibernate.TIMESTAMP, or to specify a custom type.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1451 +#, no-c-format +msgid "The access attribute lets you control how Hibernate will access the property at runtime. By default, Hibernate will call the property get/set pair. If you specify access=\"field\", Hibernate will bypass the get/set pair and access the field directly, using reflection. You may specify your own strategy for property access by naming a class that implements the interface org.hibernate.property.PropertyAccessor." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1460 +#, no-c-format +msgid "An especially powerful feature are derived properties. These properties are by definition read-only, the property value is computed at load time. You declare the computation as a SQL expression, this translates to a SELECT clause subquery in the SQL query that loads an instance:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1467 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1469 +#, no-c-format +msgid "Note that you can reference the entities own table by not declaring an alias on a particular column (customerId in the given example). Also note that you can use the nested <formula> mapping element if you don't like to use the attribute." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1479 +#, no-c-format +msgid "many-to-one" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1481 +#, no-c-format +msgid "An ordinary association to another persistent class is declared using a many-to-one element. The relational model is a many-to-one association: a foreign key in one table is referencing the primary key column(s) of the target table." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1509 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1693 basic_mapping.xml:1879 +#, no-c-format +msgid "name: The name of the property." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1517 basic_mapping.xml:2308 +#, no-c-format +msgid "column (optional): The name of the foreign key column. This may also be specified by nested <column> element(s)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1524 basic_mapping.xml:1698 +#, no-c-format +msgid "class (optional - defaults to the property type determined by reflection): The name of the associated class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1530 +#, no-c-format +msgid "cascade (optional): Specifies which operations should be cascaded from the parent object to the associated object." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1536 basic_mapping.xml:1719 +#, no-c-format +msgid "fetch (optional - defaults to select): Chooses between outer-join fetching or sequential select fetching." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1542 +#, no-c-format +msgid "update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL UPDATE and/or INSERT statements. Setting both to false allows a pure \"derived\" association whose value is initialized from some other property that maps to the same colum(s) or by a trigger or other application." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1551 +#, no-c-format +msgid "property-ref: (optional) The name of a property of the associated class that is joined to this foreign key. If not specified, the primary key of the associated class is used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1564 +#, no-c-format +msgid "unique (optional): Enable the DDL generation of a unique constraint for the foreign-key column. Also, allow this to be the target of a property-ref. This makes the association multiplicity effectively one to one." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "not-null (optional): Enable the DDL generation of a nullability constraint for the foreign key columns." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1578 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, dertermines if a version increment should occur when this property is dirty." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1586 +#, no-c-format +msgid "lazy (optional - defaults to proxy): By default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation). lazy=\"false\" specifies that the association will always be eagerly fetched." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1596 +#, no-c-format +msgid "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be handled: ignore will treat a missing row as a null association." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1603 basic_mapping.xml:1757 +#, no-c-format +msgid "entity-name (optional): The entity name of the associated class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1608 +#, no-c-format +msgid "formula (optional): an SQL expression that defines the value for a computed foreign key." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1616 +#, no-c-format +msgid "Setting a value of the cascade attribute to any meaningful value other than none will propagate certain operations to the associated object. The meaningful values are the names of Hibernate's basic operations, persist, merge, delete, save-update, evict, replicate, lock, refresh, as well as the special values delete-orphan and all and comma-separated combinations of operation names, for example, cascade=\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full explanation. Note that single valued associations (many-to-one and one-to-one associations) do not support orphan delete." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1629 +#, no-c-format +msgid "A typical many-to-one declaration looks as simple as this:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1633 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1635 +#, no-c-format +msgid "The property-ref attribute should only be used for mapping legacy data where a foreign key refers to a unique key of the associated table other than the primary key. This is an ugly relational model. For example, suppose the Product class had a unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport tool.)" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1644 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1646 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1650 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1652 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1656 +#, no-c-format +msgid "If the referenced unique key comprises multiple properties of the associated entity, you should map the referenced properties inside a named <properties> element." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1661 +#, no-c-format +msgid "If the referenced unique key is the property of a component, you may specify a property path:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1665 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1670 +#, no-c-format +msgid "one-to-one" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1672 +#, no-c-format +msgid "A one-to-one association to another persistent class is declared using a one-to-one element." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1690 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1704 +#, no-c-format +msgid "cascade (optional) specifies which operations should be cascaded from the parent object to the associated object." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1710 +#, no-c-format +msgid "constrained (optional) specifies that a foreign key constraint on the primary key of the mapped table references the table of the associated class. This option affects the order in which save() and delete() are cascaded, and determines whether the association may be proxied (it is also used by the schema export tool)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1725 +#, no-c-format +msgid "property-ref: (optional) The name of a property of the associated class that is joined to the primary key of this class. If not specified, the primary key of the associated class is used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1738 +#, no-c-format +msgid "formula (optional): Almost all one to one associations map to the primary key of the owning entity. In the rare case that this is not the case, you may specify a some other column, columns or expression to join on using an SQL formula. (See org.hibernate.test.onetooneformula for an example.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1746 +#, no-c-format +msgid "lazy (optional - defaults to proxy): By default, single point associations are proxied. lazy=\"no-proxy\" specifies that the property should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation). lazy=\"false\" specifies that the association will always be eagerly fetched. Note that if constrained=\"false\", proxying is impossible and Hibernate will eager fetch the association!" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1764 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1768 +#, no-c-format +msgid "primary key associations" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1771 +#, no-c-format +msgid "unique foreign key associations" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1776 +#, no-c-format +msgid "Primary key associations don't need an extra table column; if two rows are related by the association then the two table rows share the same primary key value. So if you want two objects to be related by a primary key association, you must make sure that they are assigned the same identifier value!" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1783 +#, no-c-format +msgid "For a primary key association, add the following mappings to Employee and Person, respectively." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1788 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1789 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1791 +#, no-c-format +msgid "Now we must ensure that the primary keys of related rows in the PERSON and EMPLOYEE tables are equal. We use a special Hibernate identifier generation strategy called foreign:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1797 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " employee\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1799 +#, no-c-format +msgid "A newly saved instance of Person is then assigned the same primary key value as the Employee instance refered with the employee property of that Person." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1805 +#, no-c-format +msgid "Alternatively, a foreign key with a unique constraint, from Employee to Person, may be expressed as:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1810 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1812 +#, no-c-format +msgid "And this association may be made bidirectional by adding the following to the Person mapping:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1817 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1822 +#, no-c-format +msgid "natural-id" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1824 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " ......\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1826 +#, no-c-format +msgid "Even though we recommend the use of surrogate keys as primary keys, you should still try to identify natural keys for all entities. A natural key is a property or combination of properties that is unique and non-null. If it is also immutable, even better. Map the properties of the natural key inside the <natural-id> element. Hibernate will generate the necessary unique key and nullability constraints, and your mapping will be more self-documenting." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1835 +#, no-c-format +msgid "We strongly recommend that you implement equals() and hashCode() to compare the natural key properties of the entity." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1840 +#, no-c-format +msgid "This mapping is not intended for use with entities with natural primary keys." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1846 +#, no-c-format +msgid "mutable (optional, defaults to false): By default, natural identifier properties as assumed to be immutable (constant)." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1856 +#, no-c-format +msgid "component, dynamic-component" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1858 +#, no-c-format +msgid "The <component> element maps properties of a child object to columns of the table of a parent class. Components may, in turn, declare their own properties, components or collections. See \"Components\" below." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1876 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " ........\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "class (optional - defaults to the property type determined by reflection): The name of the component (child) class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1890 basic_mapping.xml:1979 +#, no-c-format +msgid "insert: Do the mapped columns appear in SQL INSERTs?" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1896 basic_mapping.xml:1985 +#, no-c-format +msgid "update: Do the mapped columns appear in SQL UPDATEs?" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "lazy (optional - defaults to false): Specifies that this component should be fetched lazily when the instance variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1915 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when this property is dirty." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1923 basic_mapping.xml:1999 +#, no-c-format +msgid "unique (optional - defaults to false): Specifies that a unique constraint exists upon all mapped columns of the component." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1932 +#, no-c-format +msgid "The child <property> tags map properties of the child class to table columns." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1937 +#, no-c-format +msgid "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1943 +#, no-c-format +msgid "The <dynamic-component> element allows a Map to be mapped as a component, where the property names refer to keys of the map, see ." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1952 +#, no-c-format +msgid "properties" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1954 +#, no-c-format +msgid "The <properties> element allows the definition of a named, logical grouping of properties of a class. The most important use of the construct is that it allows a combination of properties to be the target of a property-ref. It is also a convenient way to define a multi-column unique constraint." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1970 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " ........\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1973 +#, no-c-format +msgid "name: The logical name of the grouping - not an actual property name." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1991 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require acquisition of the optimistic lock. In other words, determines if a version increment should occur when these properties are dirty." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2008 +#, no-c-format +msgid "For example, if we have the following <properties> mapping:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2012 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2014 +#, no-c-format +msgid "Then we might have some legacy data association which refers to this unique key of the Person table, instead of to the primary key:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2019 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2021 +#, no-c-format +msgid "We don't recommend the use of this kind of thing outside the context of mapping legacy data." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2029 +#, no-c-format +msgid "subclass" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2031 +#, no-c-format +msgid "Finally, polymorphic persistence requires the declaration of each subclass of the root persistent class. For the table-per-class-hierarchy mapping strategy, the <subclass> declaration is used." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2044 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " .....\n" + "
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2047 basic_mapping.xml:2105 basic_mapping.xml:2168 +#, no-c-format +msgid "name: The fully qualified class name of the subclass." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2052 +#, no-c-format +msgid "discriminator-value (optional - defaults to the class name): A value that distiguishes individual subclasses." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2058 basic_mapping.xml:2115 basic_mapping.xml:2178 +#, no-c-format +msgid "proxy (optional): Specifies a class or interface to use for lazy initializing proxies." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2064 basic_mapping.xml:2121 basic_mapping.xml:2184 +#, no-c-format +msgid "lazy (optional, defaults to true): Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2072 +#, no-c-format +msgid "Each subclass should declare its own persistent properties and subclasses. <version> and <id> properties are assumed to be inherited from the root class. Each subclass in a heirarchy must define a unique discriminator-value. If none is specified, the fully qualified Java class name is used." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2080 basic_mapping.xml:2138 basic_mapping.xml:2196 +#, no-c-format +msgid "For information about inheritance mappings, see ." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2087 +#, no-c-format +msgid "joined-subclass" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2089 +#, no-c-format +msgid "Alternatively, each subclass may be mapped to its own table (table-per-subclass mapping strategy). Inherited state is retrieved by joining with the table of the superclass. We use the <joined-subclass> element." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2102 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2110 basic_mapping.xml:2173 +#, no-c-format +msgid "table: The name of the subclass table." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2129 +#, no-c-format +msgid "No discriminator column is required for this mapping strategy. Each subclass must, however, declare a table column holding the object identifier using the <key> element. The mapping at the start of the chapter would be re-written as:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2136 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2145 +#, no-c-format +msgid "union-subclass" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2147 +#, no-c-format +msgid "A third option is to map only the concrete classes of an inheritance hierarchy to tables, (the table-per-concrete-class strategy) where each table defines all persistent state of the class, including inherited state. In Hibernate, it is not absolutely necessary to explicitly map such inheritance hierarchies. You can simply map each class with a separate <class> declaration. However, if you wish use polymorphic associations (e.g. an association to the superclass of your hierarchy), you need to use the <union-subclass> mapping." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2165 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2192 +#, no-c-format +msgid "No discriminator column or key column is required for this mapping strategy." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2203 +#, no-c-format +msgid "join" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2205 +#, no-c-format +msgid "Using the <join> element, it is possible to map properties of one class to several tables, when there's a 1-to-1 relationship between the tables." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2219 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2223 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2240 +#, no-c-format +msgid "fetch (optional - defaults to join): If set to join, the default, Hibernate will use an inner join to retrieve a <join> defined by a class or its superclasses and an outer join for a <join> defined by a subclass. If set to select then Hibernate will use a sequential select for a <join> defined on a subclass, which will be issued only if a row turns out to represent an instance of the subclass. Inner joins will still be used to retrieve a <join> defined by the class and its superclasses." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2253 +#, no-c-format +msgid "inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the properties defined by this join." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2260 +#, no-c-format +msgid "optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties defined by this join are non-null and will always use an outer join to retrieve the properties." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2269 +#, no-c-format +msgid "For example, the address information for a person can be mapped to a separate table (while preserving value type semantics for all properties):" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2274 +#, no-c-format +msgid "" + "\n" + "\n" + " ...\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2276 +#, no-c-format +msgid "This feature is often only useful for legacy data models, we recommend fewer tables than classes and a fine-grained domain model. However, it is useful for switching between inheritance mapping strategies in a single hierarchy, as explained later." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2286 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2288 +#, no-c-format +msgid "We've seen the <key> element crop up a few times now. It appears anywhere the parent mapping element defines a join to a new table, and defines the foreign key in the joined table, that references the primary key of the original table." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2304 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2315 +#, no-c-format +msgid "on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level cascade delete enabled." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2322 +#, no-c-format +msgid "property-ref (optional): Specifies that the foreign key refers to columns that are not the primary key of the orginal table. (Provided for legacy data.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2329 +#, no-c-format +msgid "not-null (optional): Specifies that the foreign key columns are not nullable (this is implied whenever the foreign key is also part of the primary key)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2336 +#, no-c-format +msgid "update (optional): Specifies that the foreign key should never be updated (this is implied whenever the foreign key is also part of the primary key)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2343 +#, no-c-format +msgid "unique (optional): Specifies that the foreign key should have a unique constraint (this is implied whenever the foreign key is also the primary key)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2351 +#, no-c-format +msgid "We recommend that for systems where delete performance is important, all keys should be defined on-delete=\"cascade\", and Hibernate will use a database-level ON CASCADE DELETE constraint, instead of many individual DELETE statements. Be aware that this feature bypasses Hibernate's usual optimistic locking strategy for versioned data." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2359 +#, no-c-format +msgid "The not-null and update attributes are useful when mapping a unidirectional one to many association. If you map a unidirectional one to many to a non-nullable foreign key, you must declare the key column using <key not-null=\"true\">." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2369 +#, no-c-format +msgid "column and formula elements" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2370 +#, no-c-format +msgid "Any mapping element which accepts a column attribute will alternatively accept a <column> subelement. Likewise, <formula> is an alternative to the formula attribute." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2378 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2380 +#, no-c-format +msgid "column and formula attributes may even be combined within the same property or association mapping to express, for example, exotic join conditions." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" + "\n" + " \n" + " 'MAILING'\n" + "
]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2391 +#, no-c-format +msgid "import" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2393 +#, no-c-format +msgid "Suppose your application has two persistent classes with the same name, and you don't want to specify the fully qualified (package) name in Hibernate queries. Classes may be \"imported\" explicitly, rather than relying upon auto-import=\"true\". You may even import classes and interfaces that are not explicitly mapped." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2400 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2407 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2410 +#, no-c-format +msgid "class: The fully qualified class name of of any Java class." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2415 +#, no-c-format +msgid "rename (optional - defaults to the unqualified class name): A name that may be used in the query language." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2426 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2428 +#, no-c-format +msgid "There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from multiple tables. This type of mapping always requires more than one column. The first column holds the type of the associated entity. The remaining columns hold the identifier. It is impossible to specify a foreign key constraint for this kind of association, so this is most certainly not meant as the usual way of mapping (polymorphic) associations. You should use this only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2438 +#, no-c-format +msgid "The meta-type attribute lets the application specify a custom type that maps database column values to persistent classes which have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class names." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2456 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " .....\n" + " \n" + " \n" + " .....\n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2459 +#, no-c-format +msgid "name: the property name." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2464 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2469 +#, no-c-format +msgid "meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2475 +#, no-c-format +msgid "cascade (optional- defaults to none): the cascade style." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2487 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require acquisition of the optimistic lock. In other words, define if a version increment should occur if this property is dirty." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2502 +#, no-c-format +msgid "Hibernate Types" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2505 +#, no-c-format +msgid "Entities and values" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2507 +#, no-c-format +msgid "To understand the behaviour of various Java language-level objects with respect to the persistence service, we need to classify them into two groups:" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2512 +#, no-c-format +msgid "An entity exists independently of any other objects holding references to the entity. Contrast this with the usual Java model where an unreferenced object is garbage collected. Entities must be explicitly saved and deleted (except that saves and deletions may be cascaded from a parent entity to its children). This is different from the ODMG model of object persistence by reachablity - and corresponds more closely to how application objects are usually used in large systems. Entities support circular and shared references. They may also be versioned." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2523 +#, no-c-format +msgid "An entity's persistent state consists of references to other entities and instances of value types. Values are primitives, collections (not what's inside a collection), components and certain immutable objects. Unlike entities, values (in particular collections and components) are persisted and deleted by reachability. Since value objects (and primitives) are persisted and deleted along with their containing entity they may not be independently versioned. Values have no independent identity, so they cannot be shared by two entities or collections." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2534 +#, no-c-format +msgid "Up until now, we've been using the term \"persistent class\" to refer to entities. We will continue to do that. Strictly speaking, however, not all user-defined classes with persistent state are entities. A component is a user defined class with value semantics. A Java property of type java.lang.String also has value semantics. Given this definition, we can say that all types (classes) provided by the JDK have value type semantics in Java, while user-defined types may be mapped with entity or value type semantics. This decision is up to the application developer. A good hint for an entity class in a domain model are shared references to a single instance of that class, while composition or aggregation usually translates to a value type." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2548 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2552 +#, no-c-format +msgid "The challenge is to map the Java type system (and the developers' definition of entities and value types) to the SQL/database type system. The bridge between both systems is provided by Hibernate: for entities we use <class>, <subclass> and so on. For value types we use <property>, <component>, etc, usually with a type attribute. The value of this attribute is the name of a Hibernate mapping type. Hibernate provides many mappings (for standard JDK value types) out of the box. You can write your own mapping types and implement your custom conversion strategies as well, as you'll see later." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2565 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2572 +#, no-c-format +msgid "Basic value types" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2574 +#, no-c-format +msgid "The built-in basic mapping types may be roughly categorized into" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2579 +#, no-c-format +msgid "integer, long, short, float, double, character, byte, boolean, yes_no, true_false" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2582 +#, no-c-format +msgid "Type mappings from Java primitives or wrapper classes to appropriate (vendor-specific) SQL column types. boolean, yes_no and true_false are all alternative encodings for a Java boolean or java.lang.Boolean." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2591 +#, no-c-format +msgid "string" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2593 +#, no-c-format +msgid "A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2600 +#, no-c-format +msgid "date, time, timestamp" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2602 +#, no-c-format +msgid "Type mappings from java.util.Date and its subclasses to SQL types DATE, TIME and TIMESTAMP (or equivalent)." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2610 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2612 +#, no-c-format +msgid "Type mappings from java.util.Calendar to SQL types TIMESTAMP and DATE (or equivalent)." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2620 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "Type mappings from java.math.BigDecimal and java.math.BigInteger to NUMERIC (or Oracle NUMBER)." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "Type mappings from java.util.Locale, java.util.TimeZone and java.util.Currency to VARCHAR (or Oracle VARCHAR2). Instances of Locale and Currency are mapped to their ISO codes. Instances of TimeZone are mapped to their ID." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2644 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2646 +#, no-c-format +msgid "A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class is mapped to its fully qualified name." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2654 +#, no-c-format +msgid "binary" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2656 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2662 +#, no-c-format +msgid "text" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2664 +#, no-c-format +msgid "Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2671 +#, no-c-format +msgid "serializable" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2673 +#, no-c-format +msgid "Maps serializable Java types to an appropriate SQL binary type. You may also indicate the Hibernate type serializable with the name of a serializable Java class or interface that does not default to a basic type." +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2682 +#, no-c-format +msgid "clob, blob" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2684 +#, no-c-format +msgid "Type mappings for the JDBC classes java.sql.Clob and java.sql.Blob. These types may be inconvenient for some applications, since the blob or clob object may not be reused outside of a transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" + +#. Tag: literal +#: basic_mapping.xml:2694 +#, no-c-format +msgid "imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, imm_serializable, imm_binary" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2698 +#, no-c-format +msgid "Type mappings for what are usually considered mutable Java types, where Hibernate makes certain optimizations appropriate only for immutable Java types, and the application treats the object as immutable. For example, you should not call Date.setTime() for an instance mapped as imm_timestamp. To change the value of the property, and have that change made persistent, the application must assign a new (nonidentical) object to the property." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2713 +#, no-c-format +msgid "Unique identifiers of entities and collections may be of any basic type except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2719 +#, no-c-format +msgid "The basic value types have corresponding Type constants defined on org.hibernate.Hibernate. For example, Hibernate.STRING represents the string type." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2728 +#, no-c-format +msgid "Custom value types" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2730 +#, no-c-format +msgid "It is relatively easy for developers to create their own value types. For example, you might want to persist properties of type java.lang.BigInteger to VARCHAR columns. Hibernate does not provide a built-in type for this. But custom types are not limited to mapping a property (or collection element) to a single table column. So, for example, you might have a Java property getName()/setName() of type java.lang.String that is persisted to the columns FIRST_NAME, INITIAL, SURNAME." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2741 +#, no-c-format +msgid "To implement a custom type, implement either org.hibernate.UserType or org.hibernate.CompositeUserType and declare properties using the fully qualified classname of the type. Check out org.hibernate.test.DoubleStringType to see the kind of things that are possible." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2749 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2751 +#, no-c-format +msgid "Notice the use of <column> tags to map a property to multiple columns." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2756 +#, no-c-format +msgid "The CompositeUserType, EnhancedUserType, UserCollectionType, and UserVersionType interfaces provide support for more specialized uses." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2762 +#, no-c-format +msgid "You may even supply parameters to a UserType in the mapping file. To do this, your UserType must implement the org.hibernate.usertype.ParameterizedType interface. To supply parameters to your custom type, you can use the <type> element in your mapping files." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2770 +#, no-c-format +msgid "" + "\n" + " \n" + " 0\n" + " \n" + "
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2772 +#, no-c-format +msgid "The UserType can now retrieve the value for the parameter named default from the Properties object passed to it." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2777 +#, no-c-format +msgid "If you use a certain UserType very often, it may be useful to define a shorter name for it. You can do this using the <typedef> element. Typedefs assign a name to a custom type, and may also contain a list of default parameter values if the type is parameterized." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2784 +#, no-c-format +msgid "" + "\n" + " 0\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2786 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2788 +#, no-c-format +msgid "It is also possible to override the parameters supplied in a typedef on a case-by-case basis by using type parameters on the property mapping." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2793 +#, no-c-format +msgid "Even though Hibernate's rich range of built-in types and support for components means you will very rarely need to use a custom type, it is nevertheless considered good form to use custom types for (non-entity) classes that occur frequently in your application. For example, a MonetaryAmount class is a good candidate for a CompositeUserType, even though it could easily be mapped as a component. One motivation for this is abstraction. With a custom type, your mapping documents would be future-proofed against possible changes in your way of representing monetary values." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2809 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2810 +#, no-c-format +msgid "It is possible to provide more than one mapping for a particular persistent class. In this case you must specify an entity name do disambiguate between instances of the two mapped entities. (By default, the entity name is the same as the class name.) Hibernate lets you specify the entity name when working with persistent objects, when writing queries, or when mapping associations to the named entity." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2818 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "Notice how associations are now specified using entity-name instead of class." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2828 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2829 +#, no-c-format +msgid "You may force Hibernate to quote an identifier in the generated SQL by enclosing the table or column name in backticks in the mapping document. Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks for MySQL)." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2836 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2842 +#, no-c-format +msgid "Metadata alternatives" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2844 +#, no-c-format +msgid "XML isn't for everyone, and so there are some alternative ways to define O/R mapping metadata in Hibernate." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2849 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2851 +#, no-c-format +msgid "Many Hibernate users prefer to embed mapping information directly in sourcecode using XDoclet @hibernate.tags. We will not cover this approach in this document, since strictly it is considered part of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2858 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2860 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2867 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2869 +#, no-c-format +msgid "JDK 5.0 introduced XDoclet-style annotations at the language level, type-safe and checked at compile time. This mechnism is more powerful than XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, for example, supports auto-completion and syntax highlighting of JDK 5.0 annotations. The new revision of the EJB specification (JSR-220) uses JDK 5.0 annotations as the primary metadata mechanism for entity beans. Hibernate3 implements the EntityManager of JSR-220 (the persistence API), support for mapping metadata is available via the Hibernate Annotations package, as a separate download. Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2880 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2884 +#, no-c-format +msgid "" + " orders;\n" + "\n" + " // Getter/setter and business methods\n" + "}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2886 +#, no-c-format +msgid "Note that support for JDK 5.0 Annotations (and JSR-220) is still work in progress and not completed. Please refer to the Hibernate Annotations module for more details." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2895 +#, no-c-format +msgid "Generated Properties" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2896 +#, no-c-format +msgid "Generated properties are properties which have their values generated by the database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was generating values. Marking properties as generated, however, lets the application delegate this responsibility to Hibernate. Essentially, whenever Hibernate issues an SQL INSERT or UPDATE for an entity which has defined generated properties, it immediately issues a select afterwards to retrieve the generated values." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2905 +#, no-c-format +msgid "Properties marked as generated must additionally be non-insertable and non-updateable. Only versions, timestamps, and simple properties can be marked as generated." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2912 +#, no-c-format +msgid "never (the default) - means that the given property value is not generated within the database." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2916 +#, no-c-format +msgid "insert - states that the given property value is generated on insert, but is not regenerated on subsequent updates. Things like created-date would fall into this category. Note that even thought version and timestamp properties can be marked as generated, this option is not available there..." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2924 +#, no-c-format +msgid "always - states that the property value is generated both on insert and on update." +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2931 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2932 +#, no-c-format +msgid "Allows CREATE and DROP of arbitrary database objects, in conjunction with Hibernate's schema evolution tools, to provide the ability to fully define a user schema within the Hibernate mapping files. Although designed specifically for creating and dropping things like triggers or stored procedures, really any SQL command that can be run via a java.sql.Statement.execute() method is valid here (ALTERs, INSERTS, etc). There are essentially two modes for defining auxiliary database objects..." +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2941 +#, no-c-format +msgid "The first mode is to explicitly list the CREATE and DROP commands out in the mapping file:" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2945 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " CREATE TRIGGER my_trigger ...\n" + " DROP TRIGGER my_trigger\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2946 +#, no-c-format +msgid "The second mode is to supply a custom class which knows how to construct the CREATE and DROP commands. This custom class must implement the org.hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2951 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2952 +#, no-c-format +msgid "Additionally, these database objects can be optionally scoped such that they only apply when certain dialects are used." +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2956 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/batch.pot b/documentation/envers/src/main/docbook/pot/content/batch.pot new file mode 100644 index 0000000000..5ef4ad3fcf --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/batch.pot @@ -0,0 +1,373 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:29 +#, no-c-format +msgid "Batch processing" +msgstr "" + +#. Tag: para +#: batch.xml:31 +#, no-c-format +msgid "A naive approach to inserting 100 000 rows in the database using Hibernate might look like this:" +msgstr "" + +#. Tag: programlisting +#: batch.xml:36 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:38 +#, no-c-format +msgid "This would fall over with an OutOfMemoryException somewhere around the 50 000th row. That's because Hibernate caches all the newly inserted Customer instances in the session-level cache." +msgstr "" + +#. Tag: para +#: batch.xml:44 +#, no-c-format +msgid "In this chapter we'll show you how to avoid this problem. First, however, if you are doing batch processing, it is absolutely critical that you enable the use of JDBC batching, if you intend to achieve reasonable performance. Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" + +#. Tag: programlisting +#: batch.xml:51 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:53 +#, no-c-format +msgid "Note that Hibernate disables insert batching at the JDBC level transparently if you use an identiy identifier generator." +msgstr "" + +#. Tag: para +#: batch.xml:58 +#, no-c-format +msgid "You also might like to do this kind of work in a process where interaction with the second-level cache is completely disabled:" +msgstr "" + +#. Tag: programlisting +#: batch.xml:63 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:65 +#, no-c-format +msgid "However, this is not absolutely necessary, since we can explicitly set the CacheMode to disable interaction with the second-level cache." +msgstr "" + +#. Tag: title +#: batch.xml:71 +#, no-c-format +msgid "Batch inserts" +msgstr "" + +#. Tag: para +#: batch.xml:73 +#, no-c-format +msgid "When making new objects persistent, you must flush() and then clear() the session regularly, to control the size of the first-level cache." +msgstr "" + +#. Tag: programlisting +#: batch.xml:79 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: batch.xml:84 +#, no-c-format +msgid "Batch updates" +msgstr "" + +#. Tag: para +#: batch.xml:86 +#, no-c-format +msgid "For retrieving and updating data the same ideas apply. In addition, you need to use scroll() to take advantage of server-side cursors for queries that return many rows of data." +msgstr "" + +#. Tag: programlisting +#: batch.xml:92 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: batch.xml:97 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "" + +#. Tag: para +#: batch.xml:98 +#, no-c-format +msgid "Alternatively, Hibernate provides a command-oriented API that may be used for streaming data to and from the database in the form of detached objects. A StatelessSession has no persistence context associated with it and does not provide many of the higher-level life cycle semantics. In particular, a stateless session does not implement a first-level cache nor interact with any second-level or query cache. It does not implement transactional write-behind or automatic dirty checking. Operations performed using a stateless session do not ever cascade to associated instances. Collections are ignored by a stateless session. Operations performed via a stateless session bypass Hibernate's event model and interceptors. Stateless sessions are vulnerable to data aliasing effects, due to the lack of a first-level cache. A stateless session is a lower-level abstraction, much closer to the underlying JDBC." +msgstr "" + +#. Tag: programlisting +#: batch.xml:113 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:115 +#, no-c-format +msgid "Note that in this code example, the Customer instances returned by the query are immediately detached. They are never associated with any persistence context." +msgstr "" + +#. Tag: para +#: batch.xml:121 +#, no-c-format +msgid "The insert(), update() and delete() operations defined by the StatelessSession interface are considered to be direct database row-level operations, which result in immediate execution of a SQL INSERT, UPDATE or DELETE respectively. Thus, they have very different semantics to the save(), saveOrUpdate() and delete() operations defined by the Session interface." +msgstr "" + +#. Tag: title +#: batch.xml:134 +#, no-c-format +msgid "DML-style operations" +msgstr "" + +#. Tag: para +#: batch.xml:136 +#, no-c-format +msgid "As already discussed, automatic and transparent object/relational mapping is concerned with the management of object state. This implies that the object state is available in memory, hence manipulating (using the SQL Data Manipulation Language (DML) statements: INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. However, Hibernate provides methods for bulk SQL-style DML statement execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" + +#. Tag: para +#: batch.xml:146 +#, no-c-format +msgid "The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)?. Some points to note:" +msgstr "" + +#. Tag: para +#: batch.xml:154 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "" + +#. Tag: para +#: batch.xml:159 +#, no-c-format +msgid "There can only be a single entity named in the from-clause; it can optionally be aliased. If the entity name is aliased, then any property references must be qualified using that alias; if the entity name is not aliased, then it is illegal for any property references to be qualified." +msgstr "" + +#. Tag: para +#: batch.xml:167 +#, no-c-format +msgid "No joins (either implicit or explicit) can be specified in a bulk HQL query. Sub-queries may be used in the where-clause; the subqueries, themselves, may contain joins." +msgstr "" + +#. Tag: para +#: batch.xml:174 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "" + +#. Tag: para +#: batch.xml:180 +#, no-c-format +msgid "As an example, to execute an HQL UPDATE, use the Query.executeUpdate() method (the method is named for those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "HQL UPDATE statements, by default do not effect the version or the timestamp property values for the affected entities; this is in keeping with the EJB3 specification. However, you can force Hibernate to properly reset the version or timestamp property values through the use of a versioned update. This is achieved by adding the VERSIONED keyword after the UPDATE keyword." +msgstr "" + +#. Tag: programlisting +#: batch.xml:198 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:200 +#, no-c-format +msgid "Note that custom version types (org.hibernate.usertype.UserVersionType) are not allowed in conjunction with a update versioned statement." +msgstr "" + +#. Tag: para +#: batch.xml:205 +#, no-c-format +msgid "To execute an HQL DELETE, use the same Query.executeUpdate() method:" +msgstr "" + +#. Tag: programlisting +#: batch.xml:210 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: batch.xml:212 +#, no-c-format +msgid "The int value returned by the Query.executeUpdate() method indicate the number of entities effected by the operation. Consider this may or may not correlate to the number of rows effected in the database. An HQL bulk operation might result in multiple actual SQL statements being executed, for joined-subclass, for example. The returned number indicates the number of actual entities affected by the statement. Going back to the example of joined-subclass, a delete against one of the subclasses may actually result in deletes against not just the table to which that subclass is mapped, but also the \"root\" table and potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" + +#. Tag: para +#: batch.xml:223 +#, no-c-format +msgid "The pseudo-syntax for INSERT statements is: INSERT INTO EntityName properties_list select_statement. Some points to note:" +msgstr "" + +#. Tag: para +#: batch.xml:231 +#, no-c-format +msgid "Only the INSERT INTO ... SELECT ... form is supported; not the INSERT INTO ... VALUES ... form." +msgstr "" + +#. Tag: para +#: batch.xml:234 +#, no-c-format +msgid "The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities involved in mapped inheritence, only properties directly defined on that given class-level can be used in the properties_list. Superclass properties are not allowed; and subclass properties do not make sense. In other words, INSERT statements are inherently non-polymorphic." +msgstr "" + +#. Tag: para +#: batch.xml:244 +#, no-c-format +msgid "select_statement can be any valid HQL select query, with the caveat that the return types must match the types expected by the insert. Currently, this is checked during query compilation rather than allowing the check to relegate to the database. Note however that this might cause problems between Hibernate Types which are equivalent as opposed to equal. This might cause issues with mismatches between a property defined as a org.hibernate.type.DateType and a property defined as a org.hibernate.type.TimestampType, even though the database might not make a distinction or might be able to handle the conversion." +msgstr "" + +#. Tag: para +#: batch.xml:256 +#, no-c-format +msgid "For the id property, the insert statement gives you two options. You can either explicitly specify the id property in the properties_list (in which case its value is taken from the corresponding select expression) or omit it from the properties_list (in which case a generated value is used). This later option is only available when using id generators that operate in the database; attempting to use this option with any \"in memory\" type generators will cause an exception during parsing. Note that for the purposes of this discussion, in-database generators are considered to be org.hibernate.id.SequenceGenerator (and its subclasses) and any implementors of org.hibernate.id.PostInsertIdentifierGenerator. The most notable exception here is org.hibernate.id.TableHiLoGenerator, which cannot be used because it does not expose a selectable way to get its values." +msgstr "" + +#. Tag: para +#: batch.xml:271 +#, no-c-format +msgid "For properties mapped as either version or timestamp, the insert statement gives you two options. You can either specify the property in the properties_list (in which case its value is taken from the corresponding select expressions) or omit it from the properties_list (in which case the seed value defined by the org.hibernate.type.VersionType is used)." +msgstr "" + +#. Tag: para +#: batch.xml:281 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "" + +#. Tag: programlisting +#: batch.xml:285 +#, no-c-format +msgid "" + "" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/best_practices.pot b/documentation/envers/src/main/docbook/pot/content/best_practices.pot new file mode 100644 index 0000000000..d4e2f3347b --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/best_practices.pot @@ -0,0 +1,250 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:29 +#, no-c-format +msgid "Best Practices" +msgstr "" + +#. Tag: term +#: best_practices.xml:33 +#, no-c-format +msgid "Write fine-grained classes and map them using <component>." +msgstr "" + +#. Tag: para +#: best_practices.xml:35 +#, no-c-format +msgid "Use an Address class to encapsulate street, suburb, state, postcode. This encourages code reuse and simplifies refactoring." +msgstr "" + +#. Tag: term +#: best_practices.xml:43 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "" + +#. Tag: para +#: best_practices.xml:45 +#, no-c-format +msgid "Hibernate makes identifier properties optional. There are all sorts of reasons why you should use them. We recommend that identifiers be 'synthetic' (generated, with no business meaning)." +msgstr "" + +#. Tag: term +#: best_practices.xml:53 +#, no-c-format +msgid "Identify natural keys." +msgstr "" + +#. Tag: para +#: best_practices.xml:55 +#, no-c-format +msgid "Identify natural keys for all entities, and map them using <natural-id>. Implement equals() and hashCode() to compare the properties that make up the natural key." +msgstr "" + +#. Tag: term +#: best_practices.xml:63 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "" + +#. Tag: para +#: best_practices.xml:65 +#, no-c-format +msgid "Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes particularly good sense in a team environment." +msgstr "" + +#. Tag: term +#: best_practices.xml:73 +#, no-c-format +msgid "Load mappings as resources." +msgstr "" + +#. Tag: para +#: best_practices.xml:75 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "" + +#. Tag: term +#: best_practices.xml:81 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "" + +#. Tag: para +#: best_practices.xml:83 +#, no-c-format +msgid "This is a good practice if your queries call non-ANSI-standard SQL functions. Externalising the query strings to mapping files will make the application more portable." +msgstr "" + +#. Tag: term +#: best_practices.xml:91 +#, no-c-format +msgid "Use bind variables." +msgstr "" + +#. Tag: para +#: best_practices.xml:93 +#, no-c-format +msgid "As in JDBC, always replace non-constant values by \"?\". Never use string manipulation to bind a non-constant value in a query! Even better, consider using named parameters in queries." +msgstr "" + +#. Tag: term +#: best_practices.xml:101 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "" + +#. Tag: para +#: best_practices.xml:103 +#, no-c-format +msgid "Hibernate lets the application manage JDBC connections. This approach should be considered a last-resort. If you can't use the built-in connections providers, consider providing your own implementation of org.hibernate.connection.ConnectionProvider." +msgstr "" + +#. Tag: term +#: best_practices.xml:111 +#, no-c-format +msgid "Consider using a custom type." +msgstr "" + +#. Tag: para +#: best_practices.xml:113 +#, no-c-format +msgid "Suppose you have a Java type, say from some library, that needs to be persisted but doesn't provide the accessors needed to map it as a component. You should consider implementing org.hibernate.UserType. This approach frees the application code from implementing transformations to / from a Hibernate type." +msgstr "" + +#. Tag: term +#: best_practices.xml:122 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "" + +#. Tag: para +#: best_practices.xml:124 +#, no-c-format +msgid "In performance-critical areas of the system, some kinds of operations might benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is necessarily faster. If you need to use direct JDBC, it might be worth opening a Hibernate Session and using that JDBC connection. That way you can still use the same transaction strategy and underlying connection provider." +msgstr "" + +#. Tag: term +#: best_practices.xml:134 +#, no-c-format +msgid "Understand Session flushing." +msgstr "" + +#. Tag: para +#: best_practices.xml:136 +#, no-c-format +msgid "From time to time the Session synchronizes its persistent state with the database. Performance will be affected if this process occurs too often. You may sometimes minimize unnecessary flushing by disabling automatic flushing or even by changing the order of queries and other operations within a particular transaction." +msgstr "" + +#. Tag: term +#: best_practices.xml:145 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "" + +#. Tag: para +#: best_practices.xml:147 +#, no-c-format +msgid "When using a servlet / session bean architecture, you could pass persistent objects loaded in the session bean to and from the servlet / JSP layer. Use a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects with the database." +msgstr "" + +#. Tag: term +#: best_practices.xml:156 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "" + +#. Tag: para +#: best_practices.xml:158 +#, no-c-format +msgid "Database Transactions have to be as short as possible for best scalability. However, it is often neccessary to implement long running application transactions, a single unit-of-work from the point of view of a user. An application transaction might span several client request/response cycles. It is common to use detached objects to implement application transactions. An alternative, extremely appropriate in two tiered architecture, is to maintain a single open persistence contact (session) for the whole life cycle of the application transaction and simply disconnect from the JDBC connection at the end of each request and reconnect at the beginning of the subsequent request. Never share a single session across more than one application transaction, or you will be working with stale data." +msgstr "" + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "" + +#. Tag: para +#: best_practices.xml:174 +#, no-c-format +msgid "This is more of a necessary practice than a \"best\" practice. When an exception occurs, roll back the Transaction and close the Session. If you don't, Hibernate can't guarantee that in-memory state accurately represents persistent state. As a special case of this, do not use Session.load() to determine if an instance with the given identifier exists on the database; use Session.get() or a query instead." +msgstr "" + +#. Tag: term +#: best_practices.xml:184 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "" + +#. Tag: para +#: best_practices.xml:186 +#, no-c-format +msgid "Use eager fetching sparingly. Use proxies and lazy collections for most associations to classes that are not likely to be completely held in the second-level cache. For associations to cached classes, where there is an a extremely high probability of a cache hit, explicitly disable eager fetching using lazy=\"false\". When an join fetching is appropriate to a particular use case, use a query with a left join fetch." +msgstr "" + +#. Tag: term +#: best_practices.xml:196 +#, no-c-format +msgid "Use the open session in view pattern, or a disciplined assembly phase to avoid problems with unfetched data." +msgstr "" + +#. Tag: para +#: best_practices.xml:201 +#, no-c-format +msgid "Hibernate frees the developer from writing tedious Data Transfer Objects (DTO). In a traditional EJB architecture, DTOs serve dual purposes: first, they work around the problem that entity beans are not serializable; second, they implicitly define an assembly phase where all data to be used by the view is fetched and marshalled into the DTOs before returning control to the presentation tier. Hibernate eliminates the first purpose. However, you will still need an assembly phase (think of your business methods as having a strict contract with the presentation tier about what data is available in the detached objects) unless you are prepared to hold the persistence context (the session) open across the view rendering process. This is not a limitation of Hibernate! It is a fundamental requirement of safe transactional data access." +msgstr "" + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "" + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "Hide (Hibernate) data-access code behind an interface. Combine the DAO and Thread Local Session patterns. You can even have some classes persisted by handcoded JDBC, associated to Hibernate via a UserType. (This advice is intended for \"sufficiently large\" applications; it is not appropriate for an application with five tables!)" +msgstr "" + +#. Tag: term +#: best_practices.xml:227 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "" + +#. Tag: para +#: best_practices.xml:229 +#, no-c-format +msgid "Good usecases for a real many-to-many associations are rare. Most of the time you need additional information stored in the \"link table\". In this case, it is much better to use two one-to-many associations to an intermediate link class. In fact, we think that most associations are one-to-many and many-to-one, you should be careful when using any other association style and ask yourself if it is really neccessary." +msgstr "" + +#. Tag: term +#: best_practices.xml:239 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "" + +#. Tag: para +#: best_practices.xml:241 +#, no-c-format +msgid "Unidirectional associations are more difficult to query. In a large application, almost all associations must be navigable in both directions in queries." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/collection_mapping.pot b/documentation/envers/src/main/docbook/pot/content/collection_mapping.pot new file mode 100644 index 0000000000..c5478fad95 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/collection_mapping.pot @@ -0,0 +1,1193 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:29 +#, no-c-format +msgid "Collection Mapping" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:32 +#, no-c-format +msgid "Persistent collections" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:34 +#, no-c-format +msgid "Hibernate requires that persistent collection-valued fields be declared as an interface type, for example:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:39 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:41 +#, no-c-format +msgid "The actual interface might be java.util.Set, java.util.Collection, java.util.List, java.util.Map, java.util.SortedSet, java.util.SortedMap or ... anything you like! (Where \"anything you like\" means you will have to write an implementation of org.hibernate.usertype.UserCollectionType.)" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:50 +#, no-c-format +msgid "Notice how we initialized the instance variable with an instance of HashSet. This is the best way to initialize collection valued properties of newly instantiated (non-persistent) instances. When you make the instance persistent - by calling persist(), for example - Hibernate will actually replace the HashSet with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:60 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:62 +#, no-c-format +msgid "The persistent collections injected by Hibernate behave like HashMap, HashSet, TreeMap, TreeSet or ArrayList, depending upon the interface type." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:69 +#, no-c-format +msgid "Collections instances have the usual behavior of value types. They are automatically persisted when referenced by a persistent object and automatically deleted when unreferenced. If a collection is passed from one persistent object to another, its elements might be moved from one table to another. Two entities may not share a reference to the same collection instance. Due to the underlying relational model, collection-valued properties do not support null value semantics; Hibernate does not distinguish between a null collection reference and an empty collection." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:80 +#, no-c-format +msgid "You shouldn't have to worry much about any of this. Use persistent collections the same way you use ordinary Java collections. Just make sure you understand the semantics of bidirectional associations (discussed later)." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:89 +#, no-c-format +msgid "Collection mappings" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:92 +#, no-c-format +msgid "There are quite a range of mappings that can be generated for collections, covering many common relational models. We suggest you experiment with the schema generation tool to get a feeling for how various mapping declarations translate to database tables." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:99 +#, no-c-format +msgid "The Hibernate mapping element used for mapping a collection depends upon the type of the interface. For example, a <set> element is used for mapping properties of type Set." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:105 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:107 +#, no-c-format +msgid "Apart from <set>, there is also <list>, <map>, <bag>, <array> and <primitive-array> mapping elements. The <map> element is representative:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:132 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "name the collection property name" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:140 +#, no-c-format +msgid "table (optional - defaults to property name) the name of the collection table (not used for one-to-many associations)" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:146 +#, no-c-format +msgid "schema (optional) the name of a table schema to override the schema declared on the root element" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:152 +#, no-c-format +msgid "lazy (optional - defaults to true) may be used to disable lazy fetching and specify that the association is always eagerly fetched, or to enable \"extra-lazy\" fetching where most operations do not initialize the collection (suitable for very large collections)" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "inverse (optional - defaults to false) mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:167 +#, no-c-format +msgid "cascade (optional - defaults to none) enable operations to cascade to child entities" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:173 +#, no-c-format +msgid "sort (optional) specify a sorted collection with natural sort order, or a given comparator class" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:179 +#, no-c-format +msgid "order-by (optional, JDK1.4 only) specify a table column (or columns) that define the iteration order of the Map, Set or bag, together with an optional asc or desc" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:186 +#, no-c-format +msgid "where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection (useful if the collection should contain only a subset of the available data)" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:193 +#, no-c-format +msgid "fetch (optional, defaults to select) Choose between outer-join fetching, fetching by sequential select, and fetching by sequential subselect." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "batch-size (optional, defaults to 1) specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:206 +#, no-c-format +msgid "access (optional - defaults to property): The strategy Hibernate should use for accessing the collection property value." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:212 +#, no-c-format +msgid "optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in increment of the owning entity's version. (For one to many associations, it is often reasonable to disable this setting.)" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:220 +#, no-c-format +msgid "mutable (optional - defaults to true): A value of false specifies that the elements of the collection never change (a minor performance optimization in some cases)." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:230 +#, no-c-format +msgid "Collection foreign keys" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:232 +#, no-c-format +msgid "Collection instances are distinguished in the database by the foreign key of the entity that owns the collection. This foreign key is referred to as the collection key column (or columns) of the collection table. The collection key column is mapped by the <key> element." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:240 +#, no-c-format +msgid "There may be a nullability constraint on the foreign key column. For most collections, this is implied. For unidirectional one to many associations, the foreign key column is nullable by default, so you might need to specify not-null=\"true\"." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:247 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:249 +#, no-c-format +msgid "The foreign key constraint may use ON DELETE CASCADE." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:253 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:255 +#, no-c-format +msgid "See the previous chapter for a full definition of the <key> element." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:263 +#, no-c-format +msgid "Collection elements" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:265 +#, no-c-format +msgid "Collections may contain almost any other Hibernate type, including all basic types, custom types, components, and of course, references to other entities. This is an important distinction: an object in a collection might be handled with \"value\" semantics (its life cycle fully depends on the collection owner) or it might be a reference to another entity, with its own life cycle. In the latter case, only the \"link\" between the two objects is considered to be state held by the collection." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:274 +#, no-c-format +msgid "The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of entity references, with <one-to-many> or <many-to-many>. The first two map elements with value semantics, the next two are used to map entity associations." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:286 +#, no-c-format +msgid "Indexed collections" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:288 +#, no-c-format +msgid "All collection mappings, except those with set and bag semantics, need an index column in the collection table - a column that maps to an array index, or List index, or Map key. The index of a Map may be of any basic type, mapped with <map-key>, it may be an entity reference mapped with <map-key-many-to-many>, or it may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> element. The mapped column contains sequential integers (numbered from zero, by default)." +msgstr "" + +#. Tag: sect2 +#: collection_mapping.xml:299 +#, no-c-format +msgid "" + " ]]> column_name (required): The name of the column holding the collection index values. base (optional, defaults to 0): The value of the index column that corresponds to the first element of the list or array. ]]> column (optional): The name of the column holding the collection index values. formula (optional): A SQL formula used to evaluate the key of the map. type (reguired): The type of the map keys. ]]> column (optional): The name of the foreign key column for the collection index values. formula (optional): A SQL formula used to evaluate the foreign key of the map key. class (required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:380 +#, no-c-format +msgid "If your table doesn't have an index column, and you still wish to use List as the property type, you should map the property as a Hibernate <bag>. A bag does not retain its order when it is retrieved from the database, but it may be optionally sorted or ordered." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:390 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:392 +#, no-c-format +msgid "Any collection of values or many-to-many association requires a dedicated collection table with a foreign key column or columns, collection element column or columns and possibly an index column or columns." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:399 +#, no-c-format +msgid "For a collection of values, we use the <element> tag." +msgstr "" + +#. Tag: sect2 +#: collection_mapping.xml:401 +#, no-c-format +msgid "" + " ]]> column (optional): The name of the column holding the collection element values. formula (optional): An SQL formula used to evaluate the element. type (required): The type of the collection element. A many-to-many association is specified using the <many-to-many> element. ]]> column (optional): The name of the element foreign key column. formula (optional): An SQL formula used to evaluate the element foreign key value. class (required): The name of the associated class. fetch (optional - defaults to join): enables outer-join or sequential select fetching for this association. This is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, you would enable join fetching not only of the collection itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation of a unique constraint for the foreign-key column. This makes the association multiplicity effectively one to many. not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be handled: ignore will treat a missing row as a null association. entity-name (optional): The entity name of the associated class, as an alternative to class. property-ref: (optional) The name of a property of the associated class that is joined to this foreign key. If not specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:506 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:510 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:512 +#, no-c-format +msgid "A bag containing integers (with an iteration order determined by the order-by attribute):" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:517 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:519 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:523 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:525 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:529 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:531 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:535 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "
]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:540 +#, no-c-format +msgid "One-to-many associations" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:542 +#, no-c-format +msgid "A one to many association links the tables of two classes via a foreign key, with no intervening collection table. This mapping loses certain semantics of normal Java collections:" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:550 +#, no-c-format +msgid "An instance of the contained entity class may not belong to more than one instance of the collection" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:556 +#, no-c-format +msgid "An instance of the contained entity class may not appear at more than one value of the collection index" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:563 +#, no-c-format +msgid "An association from Product to Part requires existence of a foreign key column and possibly an index column to the Part table. A <one-to-many> tag indicates that this is a one to many association." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:576 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "class (required): The name of the associated class." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:584 +#, no-c-format +msgid "not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will be handled: ignore will treat a missing row as a null association." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:591 +#, no-c-format +msgid "entity-name (optional): The entity name of the associated class, as an alternative to class." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:599 +#, no-c-format +msgid "Notice that the <one-to-many> element does not need to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "Very important note: If the foreign key column of a <one-to-many> association is declared NOT NULL, you must declare the <key> mapping not-null=\"true\" or use a bidirectional association with the collection mapping marked inverse=\"true\". See the discussion of bidirectional associations later in this chapter." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:614 +#, no-c-format +msgid "This example shows a map of Part entities by name (where partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:620 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:626 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:629 +#, no-c-format +msgid "Sorted collections" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:631 +#, no-c-format +msgid "Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a comparator in the mapping file:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:636 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:638 +#, no-c-format +msgid "Allowed values of the sort attribute are unsorted, natural and the name of a class implementing java.util.Comparator." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:644 +#, no-c-format +msgid "Sorted collections actually behave like java.util.TreeSet or java.util.TreeMap." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:649 +#, no-c-format +msgid "If you want the database itself to order the collection elements use the order-by attribute of set, bag or map mappings. This solution is only available under JDK 1.4 or higher (it is implemented using LinkedHashSet or LinkedHashMap). This performs the ordering in the SQL query, not in memory." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:658 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "Note that the value of the order-by attribute is an SQL ordering, not a HQL ordering!" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:665 +#, no-c-format +msgid "Associations may even be sorted by some arbitrary criteria at runtime using a collection filter()." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:670 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:675 +#, no-c-format +msgid "Bidirectional associations" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:677 +#, no-c-format +msgid "A bidirectional association allows navigation from both \"ends\" of the association. Two kinds of bidirectional association are supported:" +msgstr "" + +#. Tag: term +#: collection_mapping.xml:684 +#, no-c-format +msgid "one-to-many" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:686 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "" + +#. Tag: term +#: collection_mapping.xml:692 +#, no-c-format +msgid "many-to-many" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:694 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:703 +#, no-c-format +msgid "You may specify a bidirectional many-to-many association simply by mapping two many-to-many associations to the same database table and declaring one end as inverse (which one is your choice, but it can not be an indexed collection)." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:710 +#, no-c-format +msgid "Here's an example of a bidirectional many-to-many association; each category can have many items and each item can be in many categories:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:715 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ...\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:717 +#, no-c-format +msgid "Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in memory for every bidirectional association, one link from A to B and another link from B to A. This is easier to understand if you think about the Java object model and how we create a many-to-many relationship in Java:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:725 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:727 +#, no-c-format +msgid "The non-inverse side is used to save the in-memory representation to the database." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "You may define a bidirectional one-to-many association by mapping a one-to-many association to the same table column(s) as a many-to-one association and declaring the many-valued end inverse=\"true\"." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:737 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:739 +#, no-c-format +msgid "Mapping one end of an association with inverse=\"true\" doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:747 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:748 +#, no-c-format +msgid "A bidirectional association where one end is represented as a <list> or <map> requires special consideration. If there is a property of the child class which maps to the index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:757 +#, no-c-format +msgid "But, if there is no such property on the child class, we can't think of the association as truly bidirectional (there is information available at one end of the association that is not available at the other end). In this case, we can't map the collection inverse=\"true\". Instead, we could use the following mapping:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:764 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:766 +#, no-c-format +msgid "Note that in this mapping, the collection-valued end of the association is responsible for updates to the foreign key. TODO: Does this really result in some unnecessary update statements?" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:774 +#, no-c-format +msgid "Ternary associations" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:776 +#, no-c-format +msgid "There are three possible approaches to mapping a ternary association. One is to use a Map with an association as its index:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:781 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:783 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:785 +#, no-c-format +msgid "A second approach is to simply remodel the association as an entity class. This is the approach we use most commonly." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:790 +#, no-c-format +msgid "A final alternative is to use composite elements, which we will discuss later." +msgstr "" + +#. Tag: literal +#: collection_mapping.xml:797 +#, no-c-format +msgid "Using an <idbag>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:799 +#, no-c-format +msgid "If you've fully embraced our view that composite keys are a bad thing and that entities should have synthetic identifiers (surrogate keys), then you might find it a bit odd that the many to many associations and collections of values that we've shown so far all map to tables with composite keys! Now, this point is quite arguable; a pure association table doesn't seem to benefit much from a surrogate key (though a collection of composite values might). Nevertheless, Hibernate provides a feature that allows you to map many to many associations and collections of values to a table with a surrogate key." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:810 +#, no-c-format +msgid "The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:815 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:817 +#, no-c-format +msgid "As you can see, an <idbag> has a synthetic id generator, just like an entity class! A different surrogate key is assigned to each collection row. Hibernate does not provide any mechanism to discover the surrogate key value of a particular row, however." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:824 +#, no-c-format +msgid "Note that the update performance of an <idbag> is much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or delete them individually, just like a list, map or set." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "In the current implementation, the native identifier generation strategy is not supported for <idbag> collection identifiers." +msgstr "" + +#. Tag: title +#: collection_mapping.xml:855 +#, no-c-format +msgid "Collection examples" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:857 +#, no-c-format +msgid "The previous sections are pretty confusing. So lets look at an example. This class:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:862 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:864 +#, no-c-format +msgid "has a collection of Child instances. If each child has at most one parent, the most natural mapping is a one-to-many association:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:870 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:872 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:876 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:878 +#, no-c-format +msgid "If the parent is required, use a bidirectional one-to-many association:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:883 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:885 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:889 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "Alternatively, if you absolutely insist that this association should be unidirectional, you can declare the NOT NULL constraint on the <key> mapping:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:897 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:899 +#, no-c-format +msgid "On the other hand, if a child might have multiple parents, a many-to-many association is appropriate:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:904 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:906 +#, no-c-format +msgid "Table definitions:" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:910 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:912 +#, no-c-format +msgid "For more examples and a complete walk-through a parent/child relationship mapping, see ." +msgstr "" + +#. Tag: para +#: collection_mapping.xml:917 +#, no-c-format +msgid "Even more exotic association mappings are possible, we will catalog all possibilities in the next chapter." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/component_mapping.pot b/documentation/envers/src/main/docbook/pot/content/component_mapping.pot new file mode 100644 index 0000000000..2640458463 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/component_mapping.pot @@ -0,0 +1,476 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: component_mapping.xml:29 +#, no-c-format +msgid "Component Mapping" +msgstr "" + +#. Tag: para +#: component_mapping.xml:31 +#, no-c-format +msgid "The notion of a component is re-used in several different contexts, for different purposes, throughout Hibernate." +msgstr "" + +#. Tag: title +#: component_mapping.xml:37 +#, no-c-format +msgid "Dependent objects" +msgstr "" + +#. Tag: para +#: component_mapping.xml:39 +#, no-c-format +msgid "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 "" + +#. Tag: programlisting +#: component_mapping.xml:45 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:47 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: component_mapping.xml:49 +#, no-c-format +msgid "Now Name may be persisted as a component of Person. Notice that Name defines getter and setter methods for its persistent properties, but doesn't need to declare any interfaces or identifier properties." +msgstr "" + +#. Tag: para +#: component_mapping.xml:56 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:60 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "The person table would have the columns pid, birthday, initial, first and last." +msgstr "" + +#. Tag: para +#: component_mapping.xml:70 +#, no-c-format +msgid "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 ad hoc. 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 "" + +#. Tag: para +#: component_mapping.xml:79 +#, no-c-format +msgid "The properties of a component may be of any Hibernate type (collections, many-to-one associations, other components, etc). Nested components should not be considered an exotic usage. Hibernate is intended to support a very fine-grained object model." +msgstr "" + +#. Tag: para +#: component_mapping.xml:86 +#, no-c-format +msgid "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity." +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:92 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:97 +#, no-c-format +msgid "Collections of dependent objects" +msgstr "" + +#. Tag: para +#: component_mapping.xml:99 +#, no-c-format +msgid "Collections of components are supported (eg. an array of type Name). Declare your component collection by replacing the <element> tag with a <composite-element> tag." +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:106 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:108 +#, no-c-format +msgid "Note: if you define a Set of composite elements, it is very important to implement equals() and hashCode() correctly." +msgstr "" + +#. Tag: para +#: component_mapping.xml:114 +#, no-c-format +msgid "Composite elements may contain components but not collections. If your composite element itself contains components, use the <nested-composite-element> 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 "" + +#. Tag: para +#: component_mapping.xml:126 +#, no-c-format +msgid "Please note that a composite element mapping doesn't support null-able properties if you're using a <set>. 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 <list>, <map>, <bag> or <idbag>." +msgstr "" + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "A special case of a composite element is a composite element with a nested <many-to-one> 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 Order to Item where purchaseDate, price and quantity are properties of the association:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:147 +#, no-c-format +msgid "" + "\n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:149 +#, no-c-format +msgid "Of course, there can't be a reference to the purchae on the other side, for bidirectional association navigation. Remember that components are value types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be referenced by the Item at the same time." +msgstr "" + +#. Tag: para +#: component_mapping.xml:157 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:159 +#, no-c-format +msgid "" + "\n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:161 +#, no-c-format +msgid "Composite elements may appear in queries using the same syntax as associations to other entities." +msgstr "" + +#. Tag: title +#: component_mapping.xml:169 +#, no-c-format +msgid "Components as Map indices" +msgstr "" + +#. Tag: para +#: component_mapping.xml:171 +#, no-c-format +msgid "The <composite-map-key> element lets you map a component class as the key of a Map. Make sure you override hashCode() and equals() correctly on the component class." +msgstr "" + +#. Tag: title +#: component_mapping.xml:180 +#, no-c-format +msgid "Components as composite identifiers" +msgstr "" + +#. Tag: para +#: component_mapping.xml:182 +#, no-c-format +msgid "You may use a component as an identifier of an entity class. Your component class must satisfy certain requirements:" +msgstr "" + +#. Tag: para +#: component_mapping.xml:189 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "" + +#. Tag: para +#: component_mapping.xml:194 +#, no-c-format +msgid "It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" + +#. Tag: emphasis +#: component_mapping.xml:203 +#, no-c-format +msgid "Note: in Hibernate3, the second requirement is not an absolutely hard requirement of Hibernate. But do it anyway." +msgstr "" + +#. Tag: para +#: component_mapping.xml:207 +#, no-c-format +msgid "You can't use an IdentifierGenerator to generate composite keys. Instead the application must assign its own identifiers." +msgstr "" + +#. Tag: para +#: component_mapping.xml:212 +#, no-c-format +msgid "Use the <composite-id> tag (with nested <key-property> elements) in place of the usual <id> declaration. For example, the OrderLine class has a primary key that depends upon the (composite) primary key of Order." +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:220 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:222 +#, no-c-format +msgid "Now, any foreign keys referencing the OrderLine table are also composite. You must declare this in your mappings for other classes. An association to OrderLine would be mapped like this:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:228 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "
]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:230 +#, no-c-format +msgid "(Note that the <column> tag is an alternative to the column attribute everywhere.)" +msgstr "" + +#. Tag: para +#: component_mapping.xml:235 +#, no-c-format +msgid "A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:240 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:242 +#, no-c-format +msgid "The collection of OrderLines in Order would use:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:247 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:249 +#, no-c-format +msgid "(The <one-to-many> element, as usual, declares no columns.)" +msgstr "" + +#. Tag: para +#: component_mapping.xml:253 +#, no-c-format +msgid "If OrderLine itself owns a collection, it also has a composite foreign key." +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:258 +#, no-c-format +msgid "" + "\n" + " ....\n" + " ....\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:263 +#, no-c-format +msgid "Dynamic components" +msgstr "" + +#. Tag: para +#: component_mapping.xml:265 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:269 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:271 +#, no-c-format +msgid "The semantics of a <dynamic-component> mapping are identical to <component>. The advantage of this kind of mapping is the ability to determine the actual properties of the bean at deployment time, just by editing the mapping document. Runtime manipulation of the mapping document is also possible, using a DOM parser. Even better, you can access (and change) Hibernate's configuration-time metamodel via the Configuration object." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/configuration.pot b/documentation/envers/src/main/docbook/pot/content/configuration.pot new file mode 100644 index 0000000000..efc9ba2cfb --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/configuration.pot @@ -0,0 +1,2177 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:29 +#, no-c-format +msgid "Configuration" +msgstr "" + +#. Tag: para +#: configuration.xml:31 +#, no-c-format +msgid "Because Hibernate is designed to operate in many different environments, there are a large number of configuration parameters. Fortunately, most have sensible default values and Hibernate is distributed with an example hibernate.properties file in etc/ that shows the various options. Just put the example file in your classpath and customize it." +msgstr "" + +#. Tag: title +#: configuration.xml:40 +#, no-c-format +msgid "Programmatic configuration" +msgstr "" + +#. Tag: para +#: configuration.xml:42 +#, no-c-format +msgid "An instance of org.hibernate.cfg.Configuration represents an entire set of mappings of an application's Java types to an SQL database. The org.hibernate.cfg.Configuration is used to build an (immutable) org.hibernate.SessionFactory. The mappings are compiled from various XML mapping files." +msgstr "" + +#. Tag: para +#: configuration.xml:49 +#, no-c-format +msgid "You may obtain a org.hibernate.cfg.Configuration instance by instantiating it directly and specifying XML mapping documents. If the mapping files are in the classpath, use addResource():" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:55 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:57 +#, no-c-format +msgid "An alternative (sometimes better) way is to specify the mapped class, and let Hibernate find the mapping document for you:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:62 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:64 +#, no-c-format +msgid "Then Hibernate will look for mapping files named /org/hibernate/auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm.xml in the classpath. This approach eliminates any hardcoded filenames." +msgstr "" + +#. Tag: para +#: configuration.xml:70 +#, no-c-format +msgid "A org.hibernate.cfg.Configuration also allows you to specify configuration properties:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:75 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:77 +#, no-c-format +msgid "This is not the only way to pass configuration properties to Hibernate. The various options include:" +msgstr "" + +#. Tag: para +#: configuration.xml:84 +#, no-c-format +msgid "Pass an instance of java.util.Properties to Configuration.setProperties()." +msgstr "" + +#. Tag: para +#: configuration.xml:90 +#, no-c-format +msgid "Place a file named hibernate.properties in a root directory of the classpath." +msgstr "" + +#. Tag: para +#: configuration.xml:95 +#, no-c-format +msgid "Set System properties using java -Dproperty=value." +msgstr "" + +#. Tag: para +#: configuration.xml:100 +#, no-c-format +msgid "Include <property> elements in hibernate.cfg.xml (discussed later)." +msgstr "" + +#. Tag: para +#: configuration.xml:107 +#, no-c-format +msgid "hibernate.properties is the easiest approach if you want to get started quickly." +msgstr "" + +#. Tag: para +#: configuration.xml:111 +#, no-c-format +msgid "The org.hibernate.cfg.Configuration is intended as a startup-time object, to be discarded once a SessionFactory is created." +msgstr "" + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:121 +#, no-c-format +msgid "When all mappings have been parsed by the org.hibernate.cfg.Configuration, the application must obtain a factory for org.hibernate.Session instances. This factory is intended to be shared by all application threads:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, no-c-format +msgid "Hibernate does allow your application to instantiate more than one org.hibernate.SessionFactory. This is useful if you are using more than one database." +msgstr "" + +#. Tag: title +#: configuration.xml:138 +#, no-c-format +msgid "JDBC connections" +msgstr "" + +#. Tag: para +#: configuration.xml:140 +#, no-c-format +msgid "Usually, you want to have the org.hibernate.SessionFactory create and pool JDBC connections for you. If you take this approach, opening a org.hibernate.Session is as simple as:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:146 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:148 +#, no-c-format +msgid "As soon as you do something that requires access to the database, a JDBC connection will be obtained from the pool." +msgstr "" + +#. Tag: para +#: configuration.xml:153 +#, no-c-format +msgid "For this to work, we need to pass some JDBC connection properties to Hibernate. All Hibernate property names and semantics are defined on the class org.hibernate.cfg.Environment. We will now describe the most important settings for JDBC connection configuration." +msgstr "" + +#. Tag: para +#: configuration.xml:159 +#, no-c-format +msgid "Hibernate will obtain (and pool) connections using java.sql.DriverManager if you set the following properties:" +msgstr "" + +#. Tag: title +#: configuration.xml:165 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "" + +#. Tag: entry +#: configuration.xml:171 configuration.xml:257 configuration.xml:353 configuration.xml:548 configuration.xml:743 configuration.xml:850 configuration.xml:938 +#, no-c-format +msgid "Property name" +msgstr "" + +#. Tag: entry +#: configuration.xml:172 configuration.xml:258 configuration.xml:354 configuration.xml:549 configuration.xml:744 configuration.xml:851 configuration.xml:939 +#, no-c-format +msgid "Purpose" +msgstr "" + +#. Tag: property +#: configuration.xml:178 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:181 +#, no-c-format +msgid "JDBC driver class" +msgstr "" + +#. Tag: property +#: configuration.xml:186 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:189 +#, no-c-format +msgid "JDBC URL" +msgstr "" + +#. Tag: property +#: configuration.xml:194 configuration.xml:288 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:197 +#, no-c-format +msgid "database user" +msgstr "" + +#. Tag: property +#: configuration.xml:202 configuration.xml:296 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:205 +#, no-c-format +msgid "database user password" +msgstr "" + +#. Tag: property +#: configuration.xml:210 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:213 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "" + +#. Tag: para +#: configuration.xml:220 +#, no-c-format +msgid "Hibernate's own connection pooling algorithm is however quite rudimentary. It is intended to help you get started and is not intended for use in a production system or even for performance testing. You should use a third party pool for best performance and stability. Just replace the hibernate.connection.pool_size property with connection pool specific settings. This will turn off Hibernate's internal pool. For example, you might like to use C3P0." +msgstr "" + +#. Tag: para +#: configuration.xml:230 +#, no-c-format +msgid "C3P0 is an open source JDBC connection pool distributed along with Hibernate in the lib directory. Hibernate will use its org.hibernate.connection.C3P0ConnectionProvider for connection pooling if you set hibernate.c3p0.* properties. If you'd like to use Proxool refer to the packaged hibernate.properties and the Hibernate web site for more information." +msgstr "" + +#. Tag: para +#: configuration.xml:238 +#, no-c-format +msgid "Here is an example hibernate.properties file for C3P0:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:242 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:244 +#, no-c-format +msgid "For use inside an application server, you should almost always configure Hibernate to obtain connections from an application server javax.sql.Datasource registered in JNDI. You'll need to set at least one of the following properties:" +msgstr "" + +#. Tag: title +#: configuration.xml:251 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "" + +#. Tag: property +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "" + +#. Tag: emphasis +#: configuration.xml:267 +#, no-c-format +msgid "datasource JNDI name" +msgstr "" + +#. Tag: property +#: configuration.xml:272 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "" + +#. Tag: entry +#: configuration.xml:274 +#, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "" + +#. Tag: property +#: configuration.xml:280 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:290 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:298 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:306 +#, no-c-format +msgid "Here's an example hibernate.properties file for an application server provided JNDI datasource:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:311 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:313 +#, no-c-format +msgid "JDBC connections obtained from a JNDI datasource will automatically participate in the container-managed transactions of the application server." +msgstr "" + +#. Tag: para +#: configuration.xml:318 +#, no-c-format +msgid "Arbitrary connection properties may be given by prepending \"hibernate.connection\" to the connection property name. For example, you may specify a charSet connection property using hibernate.connection.charSet." +msgstr "" + +#. Tag: para +#: configuration.xml:324 +#, no-c-format +msgid "You may define your own plugin strategy for obtaining JDBC connections by implementing the interface org.hibernate.connection.ConnectionProvider, and specifying your custom implementation via the hibernate.connection.provider_class property." +msgstr "" + +#. Tag: title +#: configuration.xml:333 +#, no-c-format +msgid "Optional configuration properties" +msgstr "" + +#. Tag: para +#: configuration.xml:335 +#, no-c-format +msgid "There are a number of other properties that control the behaviour of Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" + +#. Tag: para +#: configuration.xml:340 +#, no-c-format +msgid "Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -Dproperty=value or hibernate.properties. They may not be set by the other techniques described above." +msgstr "" + +#. Tag: title +#: configuration.xml:347 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "" + +#. Tag: property +#: configuration.xml:360 +#, no-c-format +msgid "hibernate.dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:362 +#, no-c-format +msgid "The classname of a Hibernate org.hibernate.dialect.Dialect which allows Hibernate to generate SQL optimized for a particular relational database." +msgstr "" + +#. Tag: para +#: configuration.xml:365 +#, no-c-format +msgid "eg. full.classname.of.Dialect" +msgstr "" + +#. Tag: para +#: configuration.xml:369 +#, no-c-format +msgid "In most cases Hibernate will actually be able to chose the correct org.hibernate.dialect.Dialect implementation to use based on the JDBC metadata returned by the JDBC driver." +msgstr "" + +#. Tag: property +#: configuration.xml:378 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "" + +#. Tag: entry +#: configuration.xml:380 +#, no-c-format +msgid "Write all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug." +msgstr "" + +#. Tag: para +#: configuration.xml:384 configuration.xml:396 configuration.xml:490 configuration.xml:503 configuration.xml:516 configuration.xml:529 configuration.xml:583 configuration.xml:610 configuration.xml:623 configuration.xml:678 configuration.xml:906 configuration.xml:921 configuration.xml:1011 +#, no-c-format +msgid "eg. true | false" +msgstr "" + +#. Tag: property +#: configuration.xml:392 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "" + +#. Tag: entry +#: configuration.xml:394 +#, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "" + +#. Tag: property +#: configuration.xml:404 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "" + +#. Tag: entry +#: configuration.xml:406 +#, no-c-format +msgid "Qualify unqualified table names with the given schema/tablespace in generated SQL." +msgstr "" + +#. Tag: para +#: configuration.xml:409 +#, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" + +#. Tag: property +#: configuration.xml:417 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "" + +#. Tag: entry +#: configuration.xml:419 +#, no-c-format +msgid "Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" + +#. Tag: para +#: configuration.xml:422 +#, no-c-format +msgid "eg. CATALOG_NAME" +msgstr "" + +#. Tag: property +#: configuration.xml:430 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "" + +#. Tag: entry +#: configuration.xml:432 +#, no-c-format +msgid "The org.hibernate.SessionFactory will be automatically bound to this name in JNDI after it has been created." +msgstr "" + +#. Tag: para +#: configuration.xml:435 configuration.xml:877 +#, no-c-format +msgid "eg. jndi/composite/name" +msgstr "" + +#. Tag: property +#: configuration.xml:443 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "" + +#. Tag: entry +#: configuration.xml:445 +#, no-c-format +msgid "Set a maximum \"depth\" for the outer join fetch tree for single-ended associations (one-to-one, many-to-one). A 0 disables default outer join fetching." +msgstr "" + +#. Tag: para +#: configuration.xml:449 +#, no-c-format +msgid "eg. recommended values between 0 and 3" +msgstr "" + +#. Tag: property +#: configuration.xml:458 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "" + +#. Tag: entry +#: configuration.xml:460 +#, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "" + +#. Tag: para +#: configuration.xml:462 +#, no-c-format +msgid "eg. recommended values 4, 8, 16" +msgstr "" + +#. Tag: property +#: configuration.xml:471 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "" + +#. Tag: entry +#: configuration.xml:473 +#, no-c-format +msgid "Set a default mode for entity representation for all sessions opened from this SessionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:476 +#, no-c-format +msgid "dynamic-map, dom4j, pojo" +msgstr "" + +#. Tag: property +#: configuration.xml:484 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "" + +#. Tag: entry +#: configuration.xml:486 +#, no-c-format +msgid "Force Hibernate to order SQL updates by the primary key value of the items being updated. This will result in fewer transaction deadlocks in highly concurrent systems." +msgstr "" + +#. Tag: property +#: configuration.xml:498 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "" + +#. Tag: entry +#: configuration.xml:500 +#, no-c-format +msgid "If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" + +#. Tag: property +#: configuration.xml:511 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "" + +#. Tag: entry +#: configuration.xml:513 +#, no-c-format +msgid "If enabled, generated identifier properties will be reset to default values when objects are deleted." +msgstr "" + +#. Tag: property +#: configuration.xml:524 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "" + +#. Tag: entry +#: configuration.xml:526 +#, no-c-format +msgid "If turned on, Hibernate will generate comments inside the SQL, for easier debugging, defaults to false." +msgstr "" + +#. Tag: title +#: configuration.xml:540 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "" + +#. Tag: property +#: configuration.xml:555 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "" + +#. Tag: entry +#: configuration.xml:557 +#, no-c-format +msgid "A non-zero value determines the JDBC fetch size (calls Statement.setFetchSize())." +msgstr "" + +#. Tag: property +#: configuration.xml:564 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "" + +#. Tag: entry +#: configuration.xml:566 +#, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" + +#. Tag: para +#: configuration.xml:568 +#, no-c-format +msgid "eg. recommended values between 5 and 30" +msgstr "" + +#. Tag: property +#: configuration.xml:576 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "" + +#. Tag: entry +#: configuration.xml:578 +#, no-c-format +msgid "Set this property to true if your JDBC driver returns correct row counts from executeBatch() (it is usually safe to turn this option on). Hibernate will then use batched DML for automatically versioned data. Defaults to false." +msgstr "" + +#. Tag: property +#: configuration.xml:591 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:593 +#, no-c-format +msgid "Select a custom org.hibernate.jdbc.Batcher. Most applications will not need this configuration property." +msgstr "" + +#. Tag: para +#: configuration.xml:596 +#, no-c-format +msgid "eg. classname.of.BatcherFactory" +msgstr "" + +#. Tag: property +#: configuration.xml:604 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "" + +#. Tag: entry +#: configuration.xml:606 +#, no-c-format +msgid "Enables use of JDBC2 scrollable resultsets by Hibernate. This property is only necessary when using user supplied JDBC connections, Hibernate uses connection metadata otherwise." +msgstr "" + +#. Tag: property +#: configuration.xml:618 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "" + +#. Tag: entry +#: configuration.xml:620 +#, no-c-format +msgid "Use streams when writing/reading binary or serializable types to/from JDBC. *system-level property*" +msgstr "" + +#. Tag: property +#: configuration.xml:631 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "" + +#. Tag: entry +#: configuration.xml:633 +#, no-c-format +msgid "Enable use of JDBC3 PreparedStatement.getGeneratedKeys() to retrieve natively generated keys after insert. Requires JDBC3+ driver and JRE1.4+, set to false if your driver has problems with the Hibernate identifier generators. By default, tries to determine the driver capabilities using connection metadata." +msgstr "" + +#. Tag: para +#: configuration.xml:639 configuration.xml:769 configuration.xml:781 configuration.xml:795 configuration.xml:833 +#, no-c-format +msgid "eg. true|false" +msgstr "" + +#. Tag: property +#: configuration.xml:647 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:649 +#, no-c-format +msgid "The classname of a custom org.hibernate.connection.ConnectionProvider which provides JDBC connections to Hibernate." +msgstr "" + +#. Tag: para +#: configuration.xml:652 +#, no-c-format +msgid "eg. classname.of.ConnectionProvider" +msgstr "" + +#. Tag: property +#: configuration.xml:660 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "" + +#. Tag: entry +#: configuration.xml:662 +#, no-c-format +msgid "Set the JDBC transaction isolation level. Check java.sql.Connection for meaningful values but note that most databases do not support all isolation levels and some define additional, non-standard isolations." +msgstr "" + +#. Tag: para +#: configuration.xml:666 +#, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" + +#. Tag: property +#: configuration.xml:674 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "" + +#. Tag: entry +#: configuration.xml:676 +#, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" + +#. Tag: property +#: configuration.xml:686 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "" + +#. Tag: entry +#: configuration.xml:688 +#, no-c-format +msgid "Specify when Hibernate should release JDBC connections. By default, a JDBC connection is held until the session is explicitly closed or disconnected. For an application server JTA datasource, you should use after_statement to aggressively release connections after every JDBC call. For a non-JTA connection, it often makes sense to release the connection at the end of each transaction, by using after_transaction. auto will choose after_statement for the JTA and CMT transaction strategies and after_transaction for the JDBC transaction strategy." +msgstr "" + +#. Tag: para +#: configuration.xml:699 +#, no-c-format +msgid "eg. auto (default) | on_close | after_transaction | after_statement" +msgstr "" + +#. Tag: para +#: configuration.xml:704 +#, no-c-format +msgid "Note that this setting only affects Sessions returned from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation configured for use controls the connection release mode for those Sessions. See" +msgstr "" + +#. Tag: entry +#: configuration.xml:715 +#, no-c-format +msgid "hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:718 +#, no-c-format +msgid "Pass the JDBC property <propertyName> to DriverManager.getConnection()." +msgstr "" + +#. Tag: entry +#: configuration.xml:724 +#, no-c-format +msgid "hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:727 +#, no-c-format +msgid "Pass the property <propertyName> to the JNDI InitialContextFactory." +msgstr "" + +#. Tag: title +#: configuration.xml:737 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "" + +#. Tag: literal +#: configuration.xml:750 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:752 +#, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "" + +#. Tag: para +#: configuration.xml:754 +#, no-c-format +msgid "eg. classname.of.CacheProvider" +msgstr "" + +#. Tag: literal +#: configuration.xml:762 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "" + +#. Tag: entry +#: configuration.xml:764 +#, no-c-format +msgid "Optimize second-level cache operation to minimize writes, at the cost of more frequent reads. This setting is most useful for clustered caches and, in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" + +#. Tag: literal +#: configuration.xml:777 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "" + +#. Tag: entry +#: configuration.xml:779 +#, no-c-format +msgid "Enable the query cache, individual queries still have to be set cachable." +msgstr "" + +#. Tag: literal +#: configuration.xml:789 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "" + +#. Tag: entry +#: configuration.xml:791 +#, no-c-format +msgid "May be used to completely disable the second level cache, which is enabled by default for classes which specify a <cache> mapping." +msgstr "" + +#. Tag: literal +#: configuration.xml:803 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "" + +#. Tag: entry +#: configuration.xml:805 +#, no-c-format +msgid "The classname of a custom QueryCache interface, defaults to the built-in StandardQueryCache." +msgstr "" + +#. Tag: para +#: configuration.xml:808 +#, no-c-format +msgid "eg. classname.of.QueryCache" +msgstr "" + +#. Tag: literal +#: configuration.xml:816 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "" + +#. Tag: entry +#: configuration.xml:818 +#, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "" + +#. Tag: para +#: configuration.xml:820 +#, no-c-format +msgid "eg. prefix" +msgstr "" + +#. Tag: literal +#: configuration.xml:828 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "" + +#. Tag: entry +#: configuration.xml:830 +#, no-c-format +msgid "Forces Hibernate to store data in the second-level cache in a more human-friendly format." +msgstr "" + +#. Tag: title +#: configuration.xml:844 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "" + +#. Tag: literal +#: configuration.xml:857 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:859 +#, no-c-format +msgid "The classname of a TransactionFactory to use with Hibernate Transaction API (defaults to JDBCTransactionFactory)." +msgstr "" + +#. Tag: para +#: configuration.xml:863 +#, no-c-format +msgid "eg. classname.of.TransactionFactory" +msgstr "" + +#. Tag: literal +#: configuration.xml:871 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "" + +#. Tag: entry +#: configuration.xml:873 +#, no-c-format +msgid "A JNDI name used by JTATransactionFactory to obtain the JTA UserTransaction from the application server." +msgstr "" + +#. Tag: literal +#: configuration.xml:885 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:887 +#, no-c-format +msgid "The classname of a TransactionManagerLookup - required when JVM-level caching is enabled or when using hilo generator in a JTA environment." +msgstr "" + +#. Tag: para +#: configuration.xml:891 +#, no-c-format +msgid "eg. classname.of.TransactionManagerLookup" +msgstr "" + +#. Tag: literal +#: configuration.xml:899 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "" + +#. Tag: entry +#: configuration.xml:901 +#, no-c-format +msgid "If enabled, the session will be automatically flushed during the before completion phase of the transaction. Built-in and automatic session context management is preferred, see ." +msgstr "" + +#. Tag: literal +#: configuration.xml:914 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "" + +#. Tag: entry +#: configuration.xml:916 +#, no-c-format +msgid "If enabled, the session will be automatically closed during the after completion phase of the transaction. Built-in and utomatic session context management is preferred, see ." +msgstr "" + +#. Tag: title +#: configuration.xml:932 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "" + +#. Tag: literal +#: configuration.xml:945 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:947 +#, no-c-format +msgid "Supply a (custom) strategy for the scoping of the \"current\" Session. See for more information about the built-in strategies." +msgstr "" + +#. Tag: para +#: configuration.xml:952 +#, no-c-format +msgid "eg. jta | thread | managed | custom.Class" +msgstr "" + +#. Tag: literal +#: configuration.xml:961 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "" + +#. Tag: entry +#: configuration.xml:963 +#, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "" + +#. Tag: para +#: configuration.xml:965 +#, no-c-format +msgid "eg. org.hibernate.hql.ast.ASTQueryTranslatorFactory or org.hibernate.hql.classic.ClassicQueryTranslatorFactory" +msgstr "" + +#. Tag: literal +#: configuration.xml:974 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "" + +#. Tag: entry +#: configuration.xml:976 +#, no-c-format +msgid "Mapping from tokens in Hibernate queries to SQL tokens (tokens might be function or literal names, for example)." +msgstr "" + +#. Tag: para +#: configuration.xml:979 +#, no-c-format +msgid "eg. hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +msgstr "" + +#. Tag: literal +#: configuration.xml:987 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "" + +#. Tag: entry +#: configuration.xml:989 +#, no-c-format +msgid "Automatically validate or export schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly." +msgstr "" + +#. Tag: para +#: configuration.xml:995 +#, no-c-format +msgid "eg. validate | update | create | create-drop" +msgstr "" + +#. Tag: literal +#: configuration.xml:1004 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "" + +#. Tag: entry +#: configuration.xml:1006 +#, no-c-format +msgid "Enables use of CGLIB instead of runtime reflection (System-level property). Reflection can sometimes be useful when troubleshooting, note that Hibernate always requires CGLIB even if you turn off the optimizer. You can not set this property in hibernate.cfg.xml." +msgstr "" + +#. Tag: title +#: configuration.xml:1022 +#, no-c-format +msgid "SQL Dialects" +msgstr "" + +#. Tag: para +#: configuration.xml:1024 +#, no-c-format +msgid "You should always set the hibernate.dialect property to the correct org.hibernate.dialect.Dialect subclass for your database. If you specify a dialect, Hibernate will use sensible defaults for some of the other properties listed above, saving you the effort of specifying them manually." +msgstr "" + +#. Tag: title +#: configuration.xml:1032 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "RDBMS" +msgstr "" + +#. Tag: entry +#: configuration.xml:1041 +#, no-c-format +msgid "Dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "DB2 AS/400" +msgstr "" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "DB2 OS390" +msgstr "" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "PostgreSQL" +msgstr "" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "MySQL" +msgstr "" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Oracle (any version)" +msgstr "" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Sybase" +msgstr "" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "SAP DB" +msgstr "" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Informix" +msgstr "" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "HypersonicSQL" +msgstr "" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Ingres" +msgstr "" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1094 +#, no-c-format +msgid "Progress" +msgstr "" + +#. Tag: literal +#: configuration.xml:1094 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1097 +#, no-c-format +msgid "Mckoi SQL" +msgstr "" + +#. Tag: literal +#: configuration.xml:1097 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1100 +#, no-c-format +msgid "Interbase" +msgstr "" + +#. Tag: literal +#: configuration.xml:1100 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1103 +#, no-c-format +msgid "Pointbase" +msgstr "" + +#. Tag: literal +#: configuration.xml:1103 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1106 +#, no-c-format +msgid "FrontBase" +msgstr "" + +#. Tag: literal +#: configuration.xml:1106 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "" + +#. Tag: entry +#: configuration.xml:1109 +#, no-c-format +msgid "Firebird" +msgstr "" + +#. Tag: literal +#: configuration.xml:1109 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "" + +#. Tag: title +#: configuration.xml:1118 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "" + +#. Tag: para +#: configuration.xml:1120 +#, no-c-format +msgid "If your database supports ANSI, Oracle or Sybase style outer joins, outer join fetching will often increase performance by limiting the number of round trips to and from the database (at the cost of possibly more work performed by the database itself). Outer join fetching allows a whole graph of objects connected by many-to-one, one-to-many, many-to-many and one-to-one associations to be retrieved in a single SQL SELECT." +msgstr "" + +#. Tag: para +#: configuration.xml:1129 +#, no-c-format +msgid "Outer join fetching may be disabled globally by setting the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join fetching for one-to-one and many-to-one associations which have been mapped with fetch=\"join\"." +msgstr "" + +#. Tag: para +#: configuration.xml:1137 +#, no-c-format +msgid "See for more information." +msgstr "" + +#. Tag: title +#: configuration.xml:1144 +#, no-c-format +msgid "Binary Streams" +msgstr "" + +#. Tag: para +#: configuration.xml:1146 +#, no-c-format +msgid "Oracle limits the size of byte arrays that may be passed to/from its JDBC driver. If you wish to use large instances of binary or serializable type, you should enable hibernate.jdbc.use_streams_for_binary. This is a system-level setting only." +msgstr "" + +#. Tag: title +#: configuration.xml:1157 +#, no-c-format +msgid "Second-level and query cache" +msgstr "" + +#. Tag: para +#: configuration.xml:1159 +#, no-c-format +msgid "The properties prefixed by hibernate.cache allow you to use a process or cluster scoped second-level cache system with Hibernate. See the for more details." +msgstr "" + +#. Tag: title +#: configuration.xml:1169 +#, no-c-format +msgid "Query Language Substitution" +msgstr "" + +#. Tag: para +#: configuration.xml:1171 +#, no-c-format +msgid "You may define new Hibernate query tokens using hibernate.query.substitutions. For example:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1176 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "" + +#. Tag: para +#: configuration.xml:1178 +#, no-c-format +msgid "would cause the tokens true and false to be translated to integer literals in the generated SQL." +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1183 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "" + +#. Tag: para +#: configuration.xml:1185 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "" + +#. Tag: title +#: configuration.xml:1192 +#, no-c-format +msgid "Hibernate statistics" +msgstr "" + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "If you enable hibernate.generate_statistics, Hibernate will expose a number of metrics that are useful when tuning a running system via SessionFactory.getStatistics(). Hibernate can even be configured to expose these statistics via JMX. Read the Javadoc of the interfaces in org.hibernate.stats for more information." +msgstr "" + +#. Tag: title +#: configuration.xml:1206 +#, no-c-format +msgid "Logging" +msgstr "" + +#. Tag: para +#: configuration.xml:1208 +#, no-c-format +msgid "Hibernate utilizes Simple Logging Facade for Java (SLF4J) in order to log various system events. SLF4J can direct your logging output to several logging frameworks (NOP, Simple, log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your chosen binding. In order to setup logging properly you will need slf4j-api.jar in your classpath together with the jar file for your preferred binding - slf4j-log4j12.jar in the case of Log4J. See the SLF4J documentation for more detail. To use Log4j you will also need to place a log4j.properties file in your classpath, an example properties file is distributed with Hibernate in the src/ directory." +msgstr "" + +#. Tag: para +#: configuration.xml:1219 +#, no-c-format +msgid "We strongly recommend that you familiarize yourself with Hibernate's log messages. A lot of work has been put into making the Hibernate log as detailed as possible, without making it unreadable. It is an essential troubleshooting device. The most interesting log categories are the following:" +msgstr "" + +#. Tag: title +#: configuration.xml:1228 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Category" +msgstr "" + +#. Tag: entry +#: configuration.xml:1235 +#, no-c-format +msgid "Function" +msgstr "" + +#. Tag: literal +#: configuration.xml:1240 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "" + +#. Tag: entry +#: configuration.xml:1241 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "" + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.type" +msgstr "" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "Log the state of all entities (max 20 entities) associated with the session at flush time" +msgstr "" + +#. Tag: literal +#: configuration.xml:1259 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "" + +#. Tag: entry +#: configuration.xml:1260 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "" + +#. Tag: literal +#: configuration.xml:1263 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "" + +#. Tag: entry +#: configuration.xml:1264 +#, no-c-format +msgid "Log transaction related activity" +msgstr "" + +#. Tag: literal +#: configuration.xml:1267 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "" + +#. Tag: entry +#: configuration.xml:1268 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "" + +#. Tag: literal +#: configuration.xml:1271 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "" + +#. Tag: entry +#: configuration.xml:1272 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "" + +#. Tag: literal +#: configuration.xml:1277 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "" + +#. Tag: entry +#: configuration.xml:1278 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "" + +#. Tag: literal +#: configuration.xml:1281 +#, no-c-format +msgid "org.hibernate" +msgstr "" + +#. Tag: entry +#: configuration.xml:1282 +#, no-c-format +msgid "Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "" + +#. Tag: para +#: configuration.xml:1291 +#, no-c-format +msgid "When developing applications with Hibernate, you should almost always work with debug enabled for the category org.hibernate.SQL, or, alternatively, the property hibernate.show_sql enabled." +msgstr "" + +#. Tag: title +#: configuration.xml:1301 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "" + +#. Tag: para +#: configuration.xml:1303 +#, no-c-format +msgid "The interface org.hibernate.cfg.NamingStrategy allows you to specify a \"naming standard\" for database objects and schema elements." +msgstr "" + +#. Tag: para +#: configuration.xml:1308 +#, no-c-format +msgid "You may provide rules for automatically generating database identifiers from Java identifiers or for processing \"logical\" column and table names given in the mapping file into \"physical\" table and column names. This feature helps reduce the verbosity of the mapping document, eliminating repetitive noise (TBL_ prefixes, for example). The default strategy used by Hibernate is quite minimal." +msgstr "" + +#. Tag: para +#: configuration.xml:1317 +#, no-c-format +msgid "You may specify a different strategy by calling Configuration.setNamingStrategy() before adding mappings:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1322 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: configuration.xml:1324 +#, no-c-format +msgid "org.hibernate.cfg.ImprovedNamingStrategy is a built-in strategy that might be a useful starting point for some applications." +msgstr "" + +#. Tag: title +#: configuration.xml:1332 +#, no-c-format +msgid "XML configuration file" +msgstr "" + +#. Tag: para +#: configuration.xml:1334 +#, no-c-format +msgid "An alternative approach to configuration is to specify a full configuration in a file named hibernate.cfg.xml. This file can be used as a replacement for the hibernate.properties file or, if both are present, to override properties." +msgstr "" + +#. Tag: para +#: configuration.xml:1341 +#, no-c-format +msgid "The XML configuration file is by default expected to be in the root o your CLASSPATH. Here is an example:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + "\n" + " \n" + " java:/comp/env/jdbc/MyDB\n" + " org.hibernate.dialect.MySQLDialect\n" + " false\n" + " \n" + " org.hibernate.transaction.JTATransactionFactory\n" + " \n" + " java:comp/UserTransaction\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "As you can see, the advantage of this approach is the externalization of the mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, except for the above mentioned benefits of using the XML syntax." +msgstr "" + +#. Tag: para +#: configuration.xml:1357 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1361 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:1363 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1367 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: configuration.xml:1372 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "" + +#. Tag: para +#: configuration.xml:1374 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "" + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "Container-managed datasources: Hibernate can use JDBC connections managed by the container and provided through JNDI. Usually, a JTA compatible TransactionManager and a ResourceManager take care of transaction management (CMT), esp. distributed transaction handling across several datasources. You may of course also demarcate transaction boundaries programmatically (BMT) or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" + +#. Tag: para +#: configuration.xml:1395 +#, no-c-format +msgid "Automatic JNDI binding: Hibernate can bind its SessionFactory to JNDI after startup." +msgstr "" + +#. Tag: para +#: configuration.xml:1404 +#, no-c-format +msgid "JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply lookup the SessionFactory from JNDI and get the current Session. Let Hibernate take care of flushing and closing the Session when your JTA transaction completes. Transaction demarcation is either declarative (CMT) or programmatic (BMT/UserTransaction)." +msgstr "" + +#. Tag: para +#: configuration.xml:1417 +#, no-c-format +msgid "JMX deployment: If you have a JMX capable application server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed MBean. This saves you the one line startup code to build your SessionFactory from a Configuration. The container will startup your HibernateService, and ideally also take care of service dependencies (Datasource has to be available before Hibernate starts, etc)." +msgstr "" + +#. Tag: para +#: configuration.xml:1428 +#, no-c-format +msgid "Depending on your environment, you might have to set the configuration option hibernate.connection.aggressive_release to true if your application server shows \"connection containment\" exceptions." +msgstr "" + +#. Tag: title +#: configuration.xml:1435 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "" + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "The Hibernate Session API is independent of any transaction demarcation system in your architecture. If you let Hibernate use JDBC directly, through a connection pool, you may begin and end your transactions by calling the JDBC API. If you run in a J2EE application server, you might want to use bean-managed transactions and call the JTA API and UserTransaction when needed." +msgstr "" + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "To keep your code portable between these two (and other) environments we recommend the optional Hibernate Transaction API, which wraps and hides the underlying system. You have to specify a factory class for Transaction instances by setting the Hibernate configuration property hibernate.transaction.factory_class." +msgstr "" + +#. Tag: para +#: configuration.xml:1452 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "" + +#. Tag: literal +#: configuration.xml:1458 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:1460 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "" + +#. Tag: literal +#: configuration.xml:1464 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "delegates to container-managed transaction if an existing transaction is underway in this context (e.g. EJB session bean method), otherwise a new transaction is started and bean-managed transaction are used." +msgstr "" + +#. Tag: literal +#: configuration.xml:1474 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:1476 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "" + +#. Tag: para +#: configuration.xml:1481 +#, no-c-format +msgid "You may also define your own transaction strategies (for a CORBA transaction service, for example)." +msgstr "" + +#. Tag: para +#: configuration.xml:1486 +#, no-c-format +msgid "Some features in Hibernate (i.e. the second level cache, Contextual Sessions with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to specify how Hibernate should obtain a reference to the TransactionManager, since J2EE does not standardize a single mechanism:" +msgstr "" + +#. Tag: title +#: configuration.xml:1494 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "Transaction Factory" +msgstr "" + +#. Tag: entry +#: configuration.xml:1501 +#, no-c-format +msgid "Application Server" +msgstr "" + +#. Tag: literal +#: configuration.xml:1506 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1507 +#, no-c-format +msgid "JBoss" +msgstr "" + +#. Tag: literal +#: configuration.xml:1510 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1511 +#, no-c-format +msgid "Weblogic" +msgstr "" + +#. Tag: literal +#: configuration.xml:1514 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1515 +#, no-c-format +msgid "WebSphere" +msgstr "" + +#. Tag: literal +#: configuration.xml:1518 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1519 +#, no-c-format +msgid "WebSphere 6" +msgstr "" + +#. Tag: literal +#: configuration.xml:1522 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1523 +#, no-c-format +msgid "Orion" +msgstr "" + +#. Tag: literal +#: configuration.xml:1526 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1527 +#, no-c-format +msgid "Resin" +msgstr "" + +#. Tag: literal +#: configuration.xml:1530 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1531 +#, no-c-format +msgid "JOTM" +msgstr "" + +#. Tag: literal +#: configuration.xml:1534 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1535 +#, no-c-format +msgid "JOnAS" +msgstr "" + +#. Tag: literal +#: configuration.xml:1538 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1539 +#, no-c-format +msgid "JRun4" +msgstr "" + +#. Tag: literal +#: configuration.xml:1542 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "" + +#. Tag: entry +#: configuration.xml:1543 +#, no-c-format +msgid "Borland ES" +msgstr "" + +#. Tag: title +#: configuration.xml:1552 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "A JNDI bound Hibernate SessionFactory can simplify the lookup of the factory and the creation of new Sessions. Note that this is not related to a JNDI bound Datasource, both simply use the same registry!" +msgstr "" + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "If you wish to have the SessionFactory bound to a JNDI namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory will not be bound to JNDI. (This is especially useful in environments with a read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" + +#. Tag: para +#: configuration.xml:1569 +#, no-c-format +msgid "When binding the SessionFactory to JNDI, Hibernate will use the values of hibernate.jndi.url, hibernate.jndi.class to instantiate an initial context. If they are not specified, the default InitialContext will be used." +msgstr "" + +#. Tag: para +#: configuration.xml:1576 +#, no-c-format +msgid "Hibernate will automatically place the SessionFactory in JNDI after you call cfg.buildSessionFactory(). This means you will at least have this call in some startup code (or utility class) in your application, unless you use JMX deployment with the HibernateService (discussed later)." +msgstr "" + +#. Tag: para +#: configuration.xml:1583 +#, no-c-format +msgid "If you use a JNDI SessionFactory, an EJB or any other class may obtain the SessionFactory using a JNDI lookup." +msgstr "" + +#. Tag: para +#: configuration.xml:1588 +#, no-c-format +msgid "We recommend that you bind the SessionFactory to JNDI in a managed environment and use a static singleton otherwise. To shield your application code from these details, we also recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory(). Note that such a class is also a convenient way to startup Hibernate—see chapter 1." +msgstr "" + +#. Tag: title +#: configuration.xml:1600 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "" + +#. Tag: para +#: configuration.xml:1602 +#, no-c-format +msgid "The easiest way to handle Sessions and transactions is Hibernates automatic \"current\" Session management. See the discussion of current sessions. Using the \"jta\" session context, if there is no Hibernate Session associated with the current JTA transaction, one will be started and associated with that JTA transaction the first time you call sessionFactory.getCurrentSession(). The Sessions retrieved via getCurrentSession() in \"jta\" context will be set to automatically flush before the transaction completes, close after the transaction completes, and aggressively release JDBC connections after each statement. This allows the Sessions to be managed by the life cycle of the JTA transaction to which it is associated, keeping user code clean of such management concerns. Your code can either use JTA programmatically through UserTransaction, or (recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, declarative transaction demarcation with CMT is preferred." +msgstr "" + +#. Tag: title +#: configuration.xml:1625 +#, no-c-format +msgid "JMX deployment" +msgstr "" + +#. Tag: para +#: configuration.xml:1627 +#, no-c-format +msgid "The line cfg.buildSessionFactory() still has to be executed somewhere to get a SessionFactory into JNDI. You can do this either in a static initializer block (like the one in HibernateUtil) or you deploy Hibernate as a managed service." +msgstr "" + +#. Tag: para +#: configuration.xml:1635 +#, no-c-format +msgid "Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such as JBoss AS. The actual deployment and configuration is vendor specific. Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" + +#. Tag: programlisting +#: configuration.xml:1642 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " jboss.jca:service=RARDeployer\n" + " jboss.jca:service=LocalTxCM,name=HsqlDS\n" + "\n" + " \n" + " java:/hibernate/SessionFactory\n" + "\n" + " \n" + " java:HsqlDS\n" + " org.hibernate.dialect.HSQLDialect\n" + "\n" + " \n" + " \n" + " org.hibernate.transaction.JTATransactionFactory\n" + " \n" + " org.hibernate.transaction.JBossTransactionManagerLookup\n" + " true\n" + " true\n" + "\n" + " \n" + " 5\n" + "\n" + " \n" + " true\n" + " org.hibernate.cache.EhCacheProvider\n" + " true\n" + "\n" + " \n" + " true\n" + "\n" + " \n" + " auction/Item.hbm.xml,auction/Category.hbm.xml\n" + "\n" + "\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1644 +#, no-c-format +msgid "This file is deployed in a directory called META-INF and packaged in a JAR file with the extension .sar (service archive). You also need to package Hibernate, its required third-party libraries, your compiled persistent classes, as well as your mapping files in the same archive. Your enterprise beans (usually session beans) may be kept in their own JAR file, but you may include this EJB JAR file in the main service archive to get a single (hot-)deployable unit. Consult the JBoss AS documentation for more information about JMX service and EJB deployment." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/events.pot b/documentation/envers/src/main/docbook/pot/content/events.pot new file mode 100644 index 0000000000..4e739403c5 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/events.pot @@ -0,0 +1,311 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:29 +#, no-c-format +msgid "Interceptors and events" +msgstr "" + +#. Tag: para +#: events.xml:31 +#, no-c-format +msgid "It is often useful for the application to react to certain events that occur inside Hibernate. This allows implementation of certain kinds of generic functionality, and extension of Hibernate functionality." +msgstr "" + +#. Tag: title +#: events.xml:38 +#, no-c-format +msgid "Interceptors" +msgstr "" + +#. Tag: para +#: events.xml:40 +#, no-c-format +msgid "The Interceptor interface provides callbacks from the session to the application allowing the application to inspect and/or manipulate properties of a persistent object before it is saved, updated, deleted or loaded. One possible use for this is to track auditing information. For example, the following Interceptor automatically sets the createTimestamp when an Auditable is created and updates the lastUpdateTimestamp property when an Auditable is updated." +msgstr "" + +#. Tag: para +#: events.xml:51 +#, no-c-format +msgid "You may either implement Interceptor directly or (better) extend EmptyInterceptor." +msgstr "" + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:58 +#, no-c-format +msgid "Interceptors come in two flavors: Session-scoped and SessionFactory-scoped." +msgstr "" + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "A Session-scoped interceptor is specified when a session is opened using one of the overloaded SessionFactory.openSession() methods accepting an Interceptor." +msgstr "" + +#. Tag: programlisting +#: events.xml:69 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:71 +#, no-c-format +msgid "A SessionFactory-scoped interceptor is registered with the Configuration object prior to building the SessionFactory. In this case, the supplied interceptor will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the interceptor to use. SessionFactory-scoped interceptors must be thread safe, taking care to not store session-specific state since multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" + +#. Tag: programlisting +#: events.xml:80 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: events.xml:85 +#, no-c-format +msgid "Event system" +msgstr "" + +#. Tag: para +#: events.xml:87 +#, no-c-format +msgid "If you have to react to particular events in your persistence layer, you may also use the Hibernate3 event architecture. The event system can be used in addition or as a replacement for interceptors." +msgstr "" + +#. Tag: para +#: events.xml:93 +#, no-c-format +msgid "Essentially all of the methods of the Session interface correlate to an event. You have a LoadEvent, a FlushEvent, etc (consult the XML configuration-file DTD or the org.hibernate.event package for the full list of defined event types). When a request is made of one of these methods, the Hibernate Session generates an appropriate event and passes it to the configured event listeners for that type. Out-of-the-box, these listeners implement the same processing in which those methods always resulted. However, you are free to implement a customization of one of the listener interfaces (i.e., the LoadEvent is processed by the registered implemenation of the LoadEventListener interface), in which case their implementation would be responsible for processing any load() requests made of the Session." +msgstr "" + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "The listeners should be considered effectively singletons; meaning, they are shared between requests, and thus should not save any state as instance variables." +msgstr "" + +#. Tag: para +#: events.xml:113 +#, no-c-format +msgid "A custom listener should implement the appropriate interface for the event it wants to process and/or extend one of the convenience base classes (or even the default event listeners used by Hibernate out-of-the-box as these are declared non-final for this purpose). Custom listeners can either be registered programmatically through the Configuration object, or specified in the Hibernate configuration XML (declarative configuration through the properties file is not supported). Here's an example of a custom load event listener:" +msgstr "" + +#. Tag: programlisting +#: events.xml:123 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:125 +#, no-c-format +msgid "You also need a configuration entry telling Hibernate to use the listener in addition to the default listener:" +msgstr "" + +#. Tag: programlisting +#: events.xml:130 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: events.xml:132 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "" + +#. Tag: programlisting +#: events.xml:136 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: events.xml:138 +#, no-c-format +msgid "Listeners registered declaratively cannot share instances. If the same class name is used in multiple <listener/> elements, each reference will result in a separate instance of that class. If you need the capability to share listener instances between listener types you must use the programmatic registration approach." +msgstr "" + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "Why implement an interface and define the specific type during configuration? Well, a listener implementation could implement multiple event listener interfaces. Having the type additionally defined during registration makes it easier to turn custom listeners on or off during configuration." +msgstr "" + +#. Tag: title +#: events.xml:156 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "" + +#. Tag: para +#: events.xml:157 +#, no-c-format +msgid "Usually, declarative security in Hibernate applications is managed in a session facade layer. Now, Hibernate3 allows certain actions to be permissioned via JACC, and authorized via JAAS. This is optional functionality built on top of the event architecture." +msgstr "" + +#. Tag: para +#: events.xml:163 +#, no-c-format +msgid "First, you must configure the appropriate event listeners, to enable the use of JAAS authorization." +msgstr "" + +#. Tag: programlisting +#: events.xml:168 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: events.xml:170 +#, no-c-format +msgid "Note that <listener type=\"...\" class=\"...\"/> is just a shorthand for <event type=\"...\"><listener class=\"...\"/></event> when there is exactly one listener for a particular event type." +msgstr "" + +#. Tag: para +#: events.xml:176 +#, no-c-format +msgid "Next, still in hibernate.cfg.xml, bind the permissions to roles:" +msgstr "" + +#. Tag: programlisting +#: events.xml:180 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: events.xml:182 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/example_mappings.pot b/documentation/envers/src/main/docbook/pot/content/example_mappings.pot new file mode 100644 index 0000000000..1468592945 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/example_mappings.pot @@ -0,0 +1,723 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_mappings.xml:29 +#, no-c-format +msgid "Example: Various Mappings" +msgstr "" + +#. Tag: para +#: example_mappings.xml:31 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "" + +#. Tag: title +#: example_mappings.xml:36 +#, no-c-format +msgid "Employer/Employee" +msgstr "" + +#. Tag: para +#: example_mappings.xml:38 +#, no-c-format +msgid "The following model of the relationship between Employer and Employee uses an actual entity class (Employment) 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 "" + +#. Tag: para +#: example_mappings.xml:55 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:59 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " employer_id_seq\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " employment_id_seq\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " employee_id_seq\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:61 +#, no-c-format +msgid "And heres the table schema generated by SchemaExport." +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:70 +#, no-c-format +msgid "Author/Work" +msgstr "" + +#. Tag: para +#: example_mappings.xml:72 +#, no-c-format +msgid "Consider the following model of the relationships between Work, Author and Person. We represent the relationship between Work and Author as a many-to-many association. We choose to represent the relationship between Author and Person as one-to-one association. Another possibility would be to have Author extend Person." +msgstr "" + +#. Tag: para +#: example_mappings.xml:90 +#, no-c-format +msgid "The following mapping document correctly represents these relationships:" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:94 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:96 +#, no-c-format +msgid "There are four tables in this mapping. works, authors and persons hold work, author and person data respectively. author_work is an association table linking authors to works. Heres the table schema, as generated by SchemaExport." +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:104 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:109 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "" + +#. Tag: para +#: example_mappings.xml:111 +#, no-c-format +msgid "Now consider a model of the relationships between Customer, Order and LineItem and Product. There is a one-to-many association between Customer and Order, but how should we represent Order / LineItem / Product? I've chosen to map LineItem as an association class representing the many-to-many association between Order and Product. In Hibernate, this is called a composite element." +msgstr "" + +#. Tag: para +#: example_mappings.xml:131 +#, no-c-format +msgid "The mapping document:" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:137 +#, no-c-format +msgid "customers, orders, line_items and products hold customer, order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:144 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_mappings.xml:149 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "" + +#. Tag: para +#: example_mappings.xml:151 +#, no-c-format +msgid "These examples are all taken from the Hibernate test suite. You will find many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" + +#. Tag: para +#: example_mappings.xml:157 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "" + +#. Tag: title +#: example_mappings.xml:160 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:161 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " name\n" + " 'HOME'\n" + " \n" + " \n" + " name\n" + " 'MAILING'\n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:165 +#, no-c-format +msgid "Composite key example" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:166 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ( select sum(li.quantity*p.price) \n" + " from LineItem li, Product p \n" + " where li.productId = p.productId \n" + " and li.customerId = customerId \n" + " and li.orderNumber = orderNumber )\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ( select sum(li.quantity) \n" + " from LineItem li \n" + " where li.productId = productId )\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:170 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:171 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " org\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " org\n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:175 +#, no-c-format +msgid "Content based discrimination" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:176 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " case \n" + " when title is not null then 'E' \n" + " when salesperson is not null then 'C' \n" + " else 'P' \n" + " end\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:180 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "" + +#. Tag: programlisting +#: example_mappings.xml:181 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/example_parentchild.pot b/documentation/envers/src/main/docbook/pot/content/example_parentchild.pot new file mode 100644 index 0000000000..2b8a83336c --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/example_parentchild.pot @@ -0,0 +1,397 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:29 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:31 +#, no-c-format +msgid "One of the very first things that new users try to do with Hibernate is to model a parent / child type relationship. There are two different approaches to this. For various reasons the most convenient approach, especially for new users, is to model both Parent and Child as entity classes with a <one-to-many> association from Parent to Child. (The alternative approach is to declare the Child as a <composite-element>.) Now, it turns out that default semantics of a one to many association (in Hibernate) are much less close to the usual semantics of a parent / child relationship than those of a composite element mapping. We will explain how to use a bidirectional one to many association with cascades to model a parent / child relationship efficiently and elegantly. It's not at all difficult!" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:45 +#, no-c-format +msgid "A note about collections" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:47 +#, no-c-format +msgid "Hibernate collections are considered to be a logical part of their owning entity; never of the contained entities. This is a crucial distinction! It has the following consequences:" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "When we remove / add an object from / to a collection, the version number of the collection owner is incremented." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:60 +#, no-c-format +msgid "If an object that was removed from a collection is an instance of a value type (eg, a composite element), that object will cease to be persistent and its state will be completely removed from the database. Likewise, adding a value type instance to the collection will cause its state to be immediately persistent." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:68 +#, no-c-format +msgid "On the other hand, if an entity is removed from a collection (a one-to-many or many-to-many association), it will not be deleted, by default. This behaviour is completely consistent - a change to the internal state of another entity should not cause the associated entity to vanish! Likewise, adding an entity to a collection does not cause that entity to become persistent, by default." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:78 +#, no-c-format +msgid "Instead, the default behaviour is that adding an entity to a collection merely creates a link between the two entities, while removing it removes the link. This is very appropriate for all sorts of cases. Where it is not appropriate at all is the case of a parent / child relationship, where the life of the child is bound to the life cycle of the parent." +msgstr "" + +#. Tag: title +#: example_parentchild.xml:88 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:90 +#, no-c-format +msgid "Suppose we start with a simple <one-to-many> association from Parent to Child." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:95 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:97 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:109 +#, no-c-format +msgid "an INSERT to create the record for c" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:112 +#, no-c-format +msgid "an UPDATE to create the link from p to c" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix the nullability constraint violation by specifying not-null=\"true\" in the collection mapping:" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:125 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:127 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:130 +#, no-c-format +msgid "The underlying cause of this behaviour is that the link (the foreign key parent_id) from p to c is not considered part of the state of the Child object and is therefore not created in the INSERT. So the solution is to make the link part of the Child mapping." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:137 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:139 +#, no-c-format +msgid "(We also need to add the parent property to the Child class.)" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "Now that the Child entity is managing the state of the link, we tell the collection not to update the link. We use the inverse attribute." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:148 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:150 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:154 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:156 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:160 +#, no-c-format +msgid "To tighten things up a bit, we could create an addChild() method of Parent." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:171 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:176 +#, no-c-format +msgid "Cascading life cycle" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:178 +#, no-c-format +msgid "The explicit call to save() is still annoying. We will address this by using cascades." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:183 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:185 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:189 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:191 +#, no-c-format +msgid "Similarly, we don't need to iterate over the children when saving or deleting a Parent. The following removes p and all its children from the database." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:196 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:198 +#, no-c-format +msgid "However, this code" +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:202 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:204 +#, no-c-format +msgid "will not remove c from the database; it will ony remove the link to p (and cause a NOT NULL constraint violation, in this case). You need to explicitly delete() the Child." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:210 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:212 +#, no-c-format +msgid "Now, in our case, a Child can't really exist without its parent. So if we remove a Child from the collection, we really do want it to be deleted. For this, we must use cascade=\"all-delete-orphan\"." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:218 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "Note: even though the collection mapping specifies inverse=\"true\", cascades are still processed by iterating the collection elements. So if you require that an object be saved, deleted or updated by cascade, you must add it to the collection. It is not enough to simply call setParent()." +msgstr "" + +#. Tag: title +#: example_parentchild.xml:230 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:232 +#, no-c-format +msgid "Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes in a new session by calling update(). The Parent will contain a collection of childen and, since cascading update is enabled, Hibernate needs to know which children are newly instantiated and which represent existing rows in the database. Lets assume that both Parent and Child have genenerated identifier properties of type Long. Hibernate will use the identifier and version/timestamp property value to determine which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an unsaved-value explicitly." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:244 +#, no-c-format +msgid "The following code will update parent and child and insert newChild." +msgstr "" + +#. Tag: programlisting +#: example_parentchild.xml:249 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:251 +#, no-c-format +msgid "Well, that's all very well for the case of a generated identifier, but what about assigned identifiers and composite identifiers? This is more difficult, since Hibernate can't use the identifier property to distinguish between a newly instantiated object (with an identifier assigned by the user) and an object loaded in a previous session. In this case, Hibernate will either use the timestamp or version property, or will actually query the second-level cache or, worst case, the database, to see if the row exists." +msgstr "" + +#. Tag: title +#: example_parentchild.xml:284 +#, no-c-format +msgid "Conclusion" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:286 +#, no-c-format +msgid "There is quite a bit to digest here and it might look confusing first time around. However, in practice, it all works out very nicely. Most Hibernate applications use the parent / child pattern in many places." +msgstr "" + +#. Tag: para +#: example_parentchild.xml:291 +#, no-c-format +msgid "We mentioned an alternative in the first paragraph. None of the above issues exist in the case of <composite-element> mappings, which have exactly the semantics of a parent / child relationship. Unfortunately, there are two big limitations to composite element classes: composite elements may not own collections, and they should not be the child of any entity other than the unique parent." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/example_weblog.pot b/documentation/envers/src/main/docbook/pot/content/example_weblog.pot new file mode 100644 index 0000000000..01d3d68e0e --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/example_weblog.pot @@ -0,0 +1,478 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:29 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "" + +#. Tag: title +#: example_weblog.xml:32 +#, no-c-format +msgid "Persistent Classes" +msgstr "" + +#. Tag: para +#: example_weblog.xml:34 +#, no-c-format +msgid "The persistent classes represent a weblog, and an item posted in a weblog. They are to be modelled as a standard parent/child relationship, but we will use an ordered bag, instead of a set." +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:40 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:42 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: example_weblog.xml:47 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "" + +#. Tag: para +#: example_weblog.xml:49 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:53 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:55 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:60 +#, no-c-format +msgid "Hibernate Code" +msgstr "" + +#. Tag: para +#: example_weblog.xml:62 +#, no-c-format +msgid "The following class demonstrates some of the kinds of things we can do with these classes, using Hibernate." +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:67 +#, no-c-format +msgid "" + " :minDate\"\n" + " );\n" + "\n" + " Calendar cal = Calendar.getInstance();\n" + " cal.roll(Calendar.MONTH, false);\n" + " q.setCalendar(\"minDate\", cal);\n" + " \n" + " result = q.list();\n" + " tx.commit();\n" + " }\n" + " catch (HibernateException he) {\n" + " if (tx!=null) tx.rollback();\n" + " throw he;\n" + " }\n" + " finally {\n" + " session.close();\n" + " }\n" + " return result;\n" + " }\n" + "}]]>" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/filters.pot b/documentation/envers/src/main/docbook/pot/content/filters.pot new file mode 100644 index 0000000000..586a784c85 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/filters.pot @@ -0,0 +1,199 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:29 +#, no-c-format +msgid "Filtering data" +msgstr "" + +#. Tag: para +#: filters.xml:31 +#, no-c-format +msgid "Hibernate3 provides an innovative new approach to handling data with \"visibility\" rules. A Hibernate filter is a global, named, parameterized filter that may be enabled or disabled for a particular Hibernate session." +msgstr "" + +#. Tag: title +#: filters.xml:38 +#, no-c-format +msgid "Hibernate filters" +msgstr "" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "Hibernate3 adds the ability to pre-define filter criteria and attach those filters at both a class and a collection level. A filter criteria is the ability to define a restriction clause very similiar to the existing \"where\" attribute available on the class and various collection elements. Except these filter conditions can be parameterized. The application can then make the decision at runtime whether given filters should be enabled and what their parameter values should be. Filters can be used like database views, but parameterized inside the application." +msgstr "" + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "In order to use filters, they must first be defined and then attached to the appropriate mapping elements. To define a filter, use the <filter-def/> element within a <hibernate-mapping/> element:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:56 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:58 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:62 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:64 +#, no-c-format +msgid "or, to a collection:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:68 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:70 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "" + +#. Tag: para +#: filters.xml:74 +#, no-c-format +msgid "The methods on Session are: enableFilter(String filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By default, filters are not enabled for a given session; they must be explcitly enabled through use of the Session.enableFilter() method, which returns an instance of the Filter interface. Using the simple filter defined above, this would look like:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:83 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: filters.xml:85 +#, no-c-format +msgid "Note that methods on the org.hibernate.Filter interface do allow the method-chaining common to much of Hibernate." +msgstr "" + +#. Tag: para +#: filters.xml:89 +#, no-c-format +msgid "A full example, using temporal data with an effective record date pattern:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:93 +#, no-c-format +msgid "" + "\n" + " \n" + "\n" + "\n" + "\n" + "...\n" + " \n" + " \n" + " \n" + "...\n" + " \n" + " \n" + "\n" + "\n" + "\n" + "...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:95 +#, no-c-format +msgid "Then, in order to ensure that you always get back currently effective records, simply enable the filter on the session prior to retrieving employee data:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:100 +#, no-c-format +msgid "" + " :targetSalary\")\n" + " .setLong(\"targetSalary\", new Long(1000000))\n" + " .list();\n" + "]]>" +msgstr "" + +#. Tag: para +#: filters.xml:102 +#, no-c-format +msgid "In the HQL above, even though we only explicitly mentioned a salary constraint on the results, because of the enabled filter the query will return only currently active employees who have a salary greater than a million dollars." +msgstr "" + +#. Tag: para +#: filters.xml:108 +#, no-c-format +msgid "Note: if you plan on using filters with outer joining (either through HQL or load fetching) be careful of the direction of the condition expression. Its safest to set this up for left outer joining; in general, place the parameter first followed by the column name(s) after the operator." +msgstr "" + +#. Tag: para +#: filters.xml:115 +#, no-c-format +msgid "After being defined a filter might be attached to multiple entities and/or collections each with its own condition. That can be tedious when the conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or CDATA:" +msgstr "" + +#. Tag: programlisting +#: filters.xml:122 +#, no-c-format +msgid "" + " xyz\">...\n" + "abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:124 +#, no-c-format +msgid "This default condition will then be used whenever the filter is attached to something without specifying a condition. Note that this means you can give a specific condition as part of the attachment of the filter which overrides the default condition in that particular case." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/inheritance_mapping.pot b/documentation/envers/src/main/docbook/pot/content/inheritance_mapping.pot new file mode 100644 index 0000000000..c855020ad3 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/inheritance_mapping.pot @@ -0,0 +1,631 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:29 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "The Three Strategies" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:34 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:40 +#, no-c-format +msgid "table per class hierarchy" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, no-c-format +msgid "table per subclass" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:50 +#, no-c-format +msgid "table per concrete class" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:56 +#, no-c-format +msgid "In addition, Hibernate supports a fourth, slightly different kind of polymorphism:" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:63 +#, no-c-format +msgid "implicit polymorphism" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:69 +#, no-c-format +msgid "It is possible to use different mapping strategies for different branches of the same inheritance hierarchy, and then make use of implicit polymorphism to achieve polymorphism across the whole hierarchy. However, Hibernate does not support mixing <subclass>, and <joined-subclass> and <union-subclass> mappings under the same root <class> element. It is possible to mix together the table per hierarchy and table per subclass strategies, under the the same <class> element, by combining the <subclass> and <join> elements (see below)." +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "It is possible to define subclass, union-subclass, and joined-subclass mappings in separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new mapping file. You must specify an extends attribute in the subclass mapping, naming a previously mapped superclass. Note: Previously this feature made the ordering of the mapping documents important. Since Hibernate3, the ordering of mapping files does not matter when using the extends keyword. The ordering inside a single mapping file still needs to be defined as superclasses before subclasses." +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:98 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "Suppose we have an interface Payment, with implementors CreditCardPayment, CashPayment, ChequePayment. The table per hierarchy mapping would look like:" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:107 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:109 +#, no-c-format +msgid "Exactly one table is required. There is one big limitation of this mapping strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:118 +#, no-c-format +msgid "Table per subclass" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:120 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:124 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:126 +#, 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 "" + +#. Tag: title +#: inheritance_mapping.xml:135 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:137 +#, no-c-format +msgid "Note that Hibernate's implementation of table per subclass requires no discriminator column. Other object/relational mappers use a different implementation of table per subclass which 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 would like to use a discriminator column with the table per subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:149 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "The optional fetch=\"select\" declaration tells Hibernate not to fetch the ChequePayment subclass data using an outer join when querying the superclass." +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:160 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:162 +#, no-c-format +msgid "You may even mix the table per hierarchy and table per subclass strategies using this approach:" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:167 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:169 +#, no-c-format +msgid "For any of these mapping strategies, a polymorphic association to the root Payment class is mapped using <many-to-one>." +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:175 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:180 +#, no-c-format +msgid "Table per concrete class" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:182 +#, no-c-format +msgid "There are two ways we could go about mapping the table per concrete class strategy. The first is to use <union-subclass>." +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:187 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:189 +#, 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 +#: inheritance_mapping.xml:194 +#, 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. (We might relax this in a future release of Hibernate.) The identity generator strategy is not allowed in union subclass inheritance, indeed the primary key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:203 +#, no-c-format +msgid "If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to PAYMENT in the example above) is needed to hold instances of the superclass." +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:213 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:215 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:219 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:221 +#, no-c-format +msgid "Notice that nowhere do we mention the Payment interface explicitly. Also notice that properties of Payment are mapped in each of the subclasses. If you want to avoid duplication, consider using XML entities (e.g. [ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] in the DOCTYPE declartion and &allproperties; in the mapping)." +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:231 +#, no-c-format +msgid "The disadvantage of this approach is that Hibernate does not generate SQL UNIONs when performing polymorphic queries." +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:236 +#, no-c-format +msgid "For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:241 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:246 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:248 +#, no-c-format +msgid "There is one further thing to notice about this mapping. Since the subclasses are each mapped in their own <class> element (and since Payment is just an interface), each of the subclasses could easily be part of another inheritance hierarchy! (And you can still use polymorphic queries against the Payment interface.)" +msgstr "" + +#. Tag: programlisting +#: inheritance_mapping.xml:256 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, no-c-format +msgid "Once again, we don't mention Payment explicitly. If we execute a query against the Payment interface - for example, from Payment - Hibernate automatically returns instances of CreditCardPayment (and its subclasses, since they also implement Payment), CashPayment and ChequePayment but not instances of NonelectronicTransaction." +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:273 +#, no-c-format +msgid "Limitations" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:275 +#, no-c-format +msgid "There are certain limitations to the \"implicit polymorphism\" approach to the table per concrete-class mapping strategy. There are somewhat less restrictive limitations to <union-subclass> mappings." +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "The following table shows the limitations of table per concrete-class mappings, and of implicit polymorphism, in Hibernate." +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:288 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, no-c-format +msgid "Inheritance strategy" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:301 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:302 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:303 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:304 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:305 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:306 +#, no-c-format +msgid "Polymorphic queries" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:307 +#, no-c-format +msgid "Polymorphic joins" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:308 +#, no-c-format +msgid "Outer join fetching" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:314 inheritance_mapping.xml:325 inheritance_mapping.xml:336 +#, no-c-format +msgid "<many-to-one>" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:315 inheritance_mapping.xml:326 inheritance_mapping.xml:337 +#, no-c-format +msgid "<one-to-one>" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:316 inheritance_mapping.xml:327 +#, no-c-format +msgid "<one-to-many>" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 inheritance_mapping.xml:339 +#, no-c-format +msgid "<many-to-many>" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:318 inheritance_mapping.xml:329 inheritance_mapping.xml:340 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:319 inheritance_mapping.xml:330 inheritance_mapping.xml:341 inheritance_mapping.xml:352 +#, no-c-format +msgid "from Payment p" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:320 inheritance_mapping.xml:331 inheritance_mapping.xml:342 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "" + +#. Tag: emphasis +#: inheritance_mapping.xml:321 inheritance_mapping.xml:332 inheritance_mapping.xml:343 +#, no-c-format +msgid "supported" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:324 +#, no-c-format +msgid "table per subclass" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:335 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:338 +#, no-c-format +msgid "<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:346 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:347 +#, no-c-format +msgid "<any>" +msgstr "" + +#. Tag: emphasis +#: inheritance_mapping.xml:348 inheritance_mapping.xml:349 inheritance_mapping.xml:353 inheritance_mapping.xml:354 +#, no-c-format +msgid "not supported" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:350 +#, no-c-format +msgid "<many-to-any>" +msgstr "" + +#. Tag: literal +#: inheritance_mapping.xml:351 +#, no-c-format +msgid "s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/performance.pot b/documentation/envers/src/main/docbook/pot/content/performance.pot new file mode 100644 index 0000000000..e650711063 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/performance.pot @@ -0,0 +1,1556 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:29 +#, no-c-format +msgid "Improving performance" +msgstr "" + +#. Tag: title +#: performance.xml:32 +#, no-c-format +msgid "Fetching strategies" +msgstr "" + +#. Tag: para +#: performance.xml:34 +#, no-c-format +msgid "A fetching strategy is the strategy Hibernate will use for retrieving associated objects if the application needs to navigate the association. Fetch strategies may be declared in the O/R mapping metadata, or over-ridden by a particular HQL or Criteria query." +msgstr "" + +#. Tag: para +#: performance.xml:41 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "" + +#. Tag: para +#: performance.xml:47 +#, no-c-format +msgid "Join fetching - Hibernate retrieves the associated instance or collection in the same SELECT, using an OUTER JOIN." +msgstr "" + +#. Tag: para +#: performance.xml:54 +#, no-c-format +msgid "Select fetching - a second SELECT is used to retrieve the associated entity or collection. Unless you explicitly disable lazy fetching by specifying lazy=\"false\", this second select will only be executed when you actually access the association." +msgstr "" + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "Subselect fetching - a second SELECT is used to retrieve the associated collections for all entities retrieved in a previous query or fetch. Unless you explicitly disable lazy fetching by specifying lazy=\"false\", this second select will only be executed when you actually access the association." +msgstr "" + +#. Tag: para +#: performance.xml:72 +#, no-c-format +msgid "Batch fetching - an optimization strategy for select fetching - Hibernate retrieves a batch of entity instances or collections in a single SELECT, by specifying a list of primary keys or foreign keys." +msgstr "" + +#. Tag: para +#: performance.xml:81 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "" + +#. Tag: para +#: performance.xml:87 +#, no-c-format +msgid "Immediate fetching - an association, collection or attribute is fetched immediately, when the owner is loaded." +msgstr "" + +#. Tag: para +#: performance.xml:93 +#, no-c-format +msgid "Lazy collection fetching - a collection is fetched when the application invokes an operation upon that collection. (This is the default for collections.)" +msgstr "" + +#. Tag: para +#: performance.xml:100 +#, no-c-format +msgid "\"Extra-lazy\" collection fetching - individual elements of the collection are accessed from the database as needed. Hibernate tries not to fetch the whole collection into memory unless absolutely needed (suitable for very large collections)" +msgstr "" + +#. Tag: para +#: performance.xml:108 +#, no-c-format +msgid "Proxy fetching - a single-valued association is fetched when a method other than the identifier getter is invoked upon the associated object." +msgstr "" + +#. Tag: para +#: performance.xml:115 +#, no-c-format +msgid "\"No-proxy\" fetching - a single-valued association is fetched when the instance variable is accessed. Compared to proxy fetching, this approach is less lazy (the association is fetched even when only the identifier is accessed) but more transparent, since no proxy is visible to the application. This approach requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" + +#. Tag: para +#: performance.xml:125 +#, no-c-format +msgid "Lazy attribute fetching - an attribute or single valued association is fetched when the instance variable is accessed. This approach requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "We have two orthogonal notions here: when is the association fetched, and how is it fetched (what SQL is used). Don't confuse them! We use fetch to tune performance. We may use lazy to define a contract for what data is always available in any detached instance of a particular class." +msgstr "" + +#. Tag: title +#: performance.xml:143 +#, no-c-format +msgid "Working with lazy associations" +msgstr "" + +#. Tag: para +#: performance.xml:145 +#, no-c-format +msgid "By default, Hibernate3 uses lazy select fetching for collections and lazy proxy fetching for single-valued associations. These defaults make sense for almost all associations in almost all applications." +msgstr "" + +#. Tag: para +#: performance.xml:151 +#, no-c-format +msgid "Note: if you set hibernate.default_batch_fetch_size, Hibernate will use the batch fetch optimization for lazy fetching (this optimization may also be enabled at a more granular level)." +msgstr "" + +#. Tag: para +#: performance.xml:158 +#, no-c-format +msgid "However, lazy fetching poses one problem that you must be aware of. Access to a lazy association outside of the context of an open Hibernate session will result in an exception. For example:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:164 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:166 +#, no-c-format +msgid "Since the permissions collection was not initialized when the Session was closed, the collection will not be able to load its state. Hibernate does not support lazy initialization for detached objects. The fix is to move the code that reads from the collection to just before the transaction is committed." +msgstr "" + +#. Tag: para +#: performance.xml:174 +#, no-c-format +msgid "Alternatively, we could use a non-lazy collection or association, by specifying lazy=\"false\" for the association mapping. However, it is intended that lazy initialization be used for almost all collections and associations. If you define too many non-lazy associations in your object model, Hibernate will end up needing to fetch the entire database into memory in every transaction!" +msgstr "" + +#. Tag: para +#: performance.xml:183 +#, no-c-format +msgid "On the other hand, we often want to choose join fetching (which is non-lazy by nature) instead of select fetching in a particular transaction. We'll now see how to customize the fetching strategy. In Hibernate3, the mechanisms for choosing a fetch strategy are identical for single-valued associations and collections." +msgstr "" + +#. Tag: title +#: performance.xml:194 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "" + +#. Tag: para +#: performance.xml:196 +#, no-c-format +msgid "Select fetching (the default) is extremely vulnerable to N+1 selects problems, so we might want to enable join fetching in the mapping document:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:201 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "" +msgstr "" + +#. Tag: programlisting +#: performance.xml:203 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:205 +#, no-c-format +msgid "The fetch strategy defined in the mapping document affects:" +msgstr "" + +#. Tag: para +#: performance.xml:211 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "" + +#. Tag: para +#: performance.xml:216 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "" + +#. Tag: para +#: performance.xml:221 +#, no-c-format +msgid "Criteria queries" +msgstr "" + +#. Tag: para +#: performance.xml:226 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "" + +#. Tag: para +#: performance.xml:232 +#, no-c-format +msgid "No matter what fetching strategy you use, the defined non-lazy graph is guaranteed to be loaded into memory. Note that this might result in several immediate selects being used to execute a particular HQL query." +msgstr "" + +#. Tag: para +#: performance.xml:238 +#, no-c-format +msgid "Usually, we don't use the mapping document to customize fetching. Instead, we keep the default behavior, and override it for a particular transaction, using left join fetch in HQL. This tells Hibernate to fetch the association eagerly in the first select, using an outer join. In the Criteria query API, you would use setFetchMode(FetchMode.JOIN)." +msgstr "" + +#. Tag: para +#: performance.xml:247 +#, no-c-format +msgid "If you ever feel like you wish you could change the fetching strategy used by get() or load(), simply use a Criteria query, for example:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:253 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:255 +#, no-c-format +msgid "(This is Hibernate's equivalent of what some ORM solutions call a \"fetch plan\".)" +msgstr "" + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "A completely different way to avoid problems with N+1 selects is to use the second-level cache." +msgstr "" + +#. Tag: title +#: performance.xml:267 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "" + +#. Tag: para +#: performance.xml:269 +#, no-c-format +msgid "Lazy fetching for collections is implemented using Hibernate's own implementation of persistent collections. However, a different mechanism is needed for lazy behavior in single-ended associations. The target entity of the association must be proxied. Hibernate implements lazy initializing proxies for persistent objects using runtime bytecode enhancement (via the excellent CGLIB library)." +msgstr "" + +#. Tag: para +#: performance.xml:277 +#, no-c-format +msgid "By default, Hibernate3 generates proxies (at startup) for all persistent classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" + +#. Tag: para +#: performance.xml:283 +#, no-c-format +msgid "The mapping file may declare an interface to use as the proxy interface for that class, with the proxy attribute. By default, Hibernate uses a subclass of the class. Note that the proxied class must implement a default constructor with at least package visibility. We recommend this constructor for all persistent classes!" +msgstr "" + +#. Tag: para +#: performance.xml:290 +#, no-c-format +msgid "There are some gotchas to be aware of when extending this approach to polymorphic classes, eg." +msgstr "" + +#. Tag: programlisting +#: performance.xml:295 +#, no-c-format +msgid "" + "\n" + " ......\n" + " \n" + " .....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:297 +#, no-c-format +msgid "Firstly, instances of Cat will never be castable to DomesticCat, even if the underlying instance is an instance of DomesticCat:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:303 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "" + +#. Tag: programlisting +#: performance.xml:309 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:311 +#, no-c-format +msgid "However, the situation is not quite as bad as it looks. Even though we now have two references to different proxy objects, the underlying instance will still be the same object:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:316 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:318 +#, no-c-format +msgid "Third, you may not use a CGLIB proxy for a final class or a class with any final methods." +msgstr "" + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "Finally, if your persistent object acquires any resources upon instantiation (eg. in initializers or default constructor), then those resources will also be acquired by the proxy. The proxy class is an actual subclass of the persistent class." +msgstr "" + +#. Tag: para +#: performance.xml:329 +#, no-c-format +msgid "These problems are all due to fundamental limitations in Java's single inheritance model. If you wish to avoid these problems your persistent classes must each implement an interface that declares its business methods. You should specify these interfaces in the mapping file. eg." +msgstr "" + +#. Tag: programlisting +#: performance.xml:335 +#, no-c-format +msgid "" + "\n" + " ......\n" + " \n" + " .....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:337 +#, no-c-format +msgid "where CatImpl implements the interface Cat and DomesticCatImpl implements the interface DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" + +#. Tag: programlisting +#: performance.xml:345 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:347 +#, no-c-format +msgid "Relationships are also lazily initialized. This means you must declare any properties to be of type Cat, not CatImpl." +msgstr "" + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "Certain operations do not require proxy initialization" +msgstr "" + +#. Tag: para +#: performance.xml:358 +#, no-c-format +msgid "equals(), if the persistent class does not override equals()" +msgstr "" + +#. Tag: para +#: performance.xml:364 +#, no-c-format +msgid "hashCode(), if the persistent class does not override hashCode()" +msgstr "" + +#. Tag: para +#: performance.xml:370 +#, no-c-format +msgid "The identifier getter method" +msgstr "" + +#. Tag: para +#: performance.xml:376 +#, no-c-format +msgid "Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" + +#. Tag: para +#: performance.xml:381 +#, no-c-format +msgid "By choosing lazy=\"no-proxy\" instead of the default lazy=\"proxy\", we can avoid the problems associated with typecasting. However, we will require buildtime bytecode instrumentation, and all operations will result in immediate proxy initialization." +msgstr "" + +#. Tag: title +#: performance.xml:391 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "" + +#. Tag: para +#: performance.xml:393 +#, no-c-format +msgid "A LazyInitializationException will be thrown by Hibernate if an uninitialized collection or proxy is accessed outside of the scope of the Session, ie. when the entity owning the collection or having the reference to the proxy is in the detached state." +msgstr "" + +#. Tag: para +#: performance.xml:399 +#, no-c-format +msgid "Sometimes we need to ensure that a proxy or collection is initialized before closing the Session. Of course, we can alway force initialization by calling cat.getSex() or cat.getKittens().size(), for example. But that is confusing to readers of the code and is not convenient for generic code." +msgstr "" + +#. Tag: para +#: performance.xml:406 +#, no-c-format +msgid "The static methods Hibernate.initialize() and Hibernate.isInitialized() provide the application with a convenient way of working with lazily initialized collections or proxies. Hibernate.initialize(cat) will force the initialization of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "Another option is to keep the Session open until all needed collections and proxies have been loaded. In some application architectures, particularly where the code that accesses data using Hibernate, and the code that uses it are in different application layers or different physical processes, it can be a problem to ensure that the Session is open when a collection is initialized. There are two basic ways to deal with this issue:" +msgstr "" + +#. Tag: para +#: performance.xml:426 +#, no-c-format +msgid "In a web-based application, a servlet filter can be used to close the Session only at the very end of a user request, once the rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness of the exception handling of your application infrastructure. It is vitally important that the Session is closed and the transaction ended before returning to the user, even when an exception occurs during rendering of the view. See the Hibernate Wiki for examples of this \"Open Session in View\" pattern." +msgstr "" + +#. Tag: para +#: performance.xml:439 +#, no-c-format +msgid "In an application with a separate business tier, the business logic must \"prepare\" all collections that will be needed by the web tier before returning. This means that the business tier should load all the data and return all the data already initialized to the presentation/web tier that is required for a particular use case. Usually, the application calls Hibernate.initialize() for each collection that will be needed in the web tier (this call must occur before the session is closed) or retrieves the collection eagerly using a Hibernate query with a FETCH clause or a FetchMode.JOIN in Criteria. This is usually easier if you adopt the Command pattern instead of a Session Facade." +msgstr "" + +#. Tag: para +#: performance.xml:454 +#, no-c-format +msgid "You may also attach a previously loaded object to a new Session with merge() or lock() before accessing uninitialized collections (or other proxies). No, Hibernate does not, and certainly should not do this automatically, since it would introduce ad hoc transaction semantics!" +msgstr "" + +#. Tag: para +#: performance.xml:464 +#, no-c-format +msgid "Sometimes you don't want to initialize a large collection, but still need some information about it (like its size) or a subset of the data." +msgstr "" + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "You can use a collection filter to get the size of a collection without initializing it:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:473 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:475 +#, no-c-format +msgid "The createFilter() method is also used to efficiently retrieve subsets of a collection without needing to initialize the whole collection:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:480 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: performance.xml:485 +#, no-c-format +msgid "Using batch fetching" +msgstr "" + +#. Tag: para +#: performance.xml:487 +#, no-c-format +msgid "Hibernate can make efficient use of batch fetching, that is, Hibernate can load several uninitialized proxies if one proxy is accessed (or collections. Batch fetching is an optimization of the lazy select fetching strategy. There are two ways you can tune batch fetching: on the class and the collection level." +msgstr "" + +#. Tag: para +#: performance.xml:493 +#, no-c-format +msgid "Batch fetching for classes/entities is easier to understand. Imagine you have the following situation at runtime: You have 25 Cat instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, lazy=\"true\". If you now iterate through all cats and call getOwner() on each, Hibernate will by default execute 25 SELECT statements, to retrieve the proxied owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:503 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:505 +#, no-c-format +msgid "Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" + +#. Tag: para +#: performance.xml:509 +#, no-c-format +msgid "You may also enable batch fetching of collections. For example, if each Person has a lazy collection of Cats, and 10 persons are currently loaded in the Session, iterating through all persons will generate 10 SELECTs, one for every call to getCats(). If you enable batch fetching for the cats collection in the mapping of Person, Hibernate can pre-fetch collections:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:518 +#, no-c-format +msgid "" + "\n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:520 +#, no-c-format +msgid "With a batch-size of 3, Hibernate will load 3, 3, 3, 1 collections in four SELECTs. Again, the value of the attribute depends on the expected number of uninitialized collections in a particular Session." +msgstr "" + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "Batch fetching of collections is particularly useful if you have a nested tree of items, ie. the typical bill-of-materials pattern. (Although a nested set or a materialized path might be a better option for read-mostly trees.)" +msgstr "" + +#. Tag: title +#: performance.xml:535 +#, no-c-format +msgid "Using subselect fetching" +msgstr "" + +#. Tag: para +#: performance.xml:537 +#, no-c-format +msgid "If one lazy collection or single-valued proxy has to be fetched, Hibernate loads all of them, re-running the original query in a subselect. This works in the same way as batch-fetching, without the piecemeal loading." +msgstr "" + +#. Tag: title +#: performance.xml:548 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "" + +#. Tag: para +#: performance.xml:550 +#, no-c-format +msgid "Hibernate3 supports the lazy fetching of individual properties. This optimization technique is also known as fetch groups. Please note that this is mostly a marketing feature, as in practice, optimizing row reads is much more important than optimization of column reads. However, only loading some properties of a class might be useful in extreme cases, when legacy tables have hundreds of columns and the data model can not be improved." +msgstr "" + +#. Tag: para +#: performance.xml:559 +#, no-c-format +msgid "To enable lazy property loading, set the lazy attribute on your particular property mappings:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:564 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:566 +#, no-c-format +msgid "Lazy property loading requires buildtime bytecode instrumentation! If your persistent classes are not enhanced, Hibernate will silently ignore lazy property settings and fall back to immediate fetching." +msgstr "" + +#. Tag: para +#: performance.xml:572 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:576 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:578 +#, no-c-format +msgid "A different (better?) way to avoid unnecessary column reads, at least for read-only transactions is to use the projection features of HQL or Criteria queries. This avoids the need for buildtime bytecode processing and is certainly a preferred solution." +msgstr "" + +#. Tag: para +#: performance.xml:585 +#, no-c-format +msgid "You may force the usual eager fetching of properties using fetch all properties in HQL." +msgstr "" + +#. Tag: title +#: performance.xml:595 +#, no-c-format +msgid "The Second Level Cache" +msgstr "" + +#. Tag: para +#: performance.xml:597 +#, no-c-format +msgid "A Hibernate Session is a transaction-level cache of persistent data. It is possible to configure a cluster or JVM-level (SessionFactory-level) cache on a class-by-class and collection-by-collection basis. You may even plug in a clustered cache. Be careful. Caches are never aware of changes made to the persistent store by another application (though they may be configured to regularly expire cached data)." +msgstr "" + +#. Tag: para +#: performance.xml:605 +#, no-c-format +msgid "You have the option to tell Hibernate which caching implementation to use by specifying the name of a class that implements org.hibernate.cache.CacheProvider using the property hibernate.cache.provider_class. Hibernate comes bundled with a number of built-in integrations with open-source cache providers (listed below); additionally, you could implement your own and plug it in as outlined above. Note that versions prior to 3.2 defaulted to use EhCache as the default cache provider; that is no longer the case as of 3.2." +msgstr "" + +#. Tag: title +#: performance.xml:616 +#, no-c-format +msgid "Cache Providers" +msgstr "" + +#. Tag: entry +#: performance.xml:625 performance.xml:813 +#, no-c-format +msgid "Cache" +msgstr "" + +#. Tag: entry +#: performance.xml:626 +#, no-c-format +msgid "Provider class" +msgstr "" + +#. Tag: entry +#: performance.xml:627 +#, no-c-format +msgid "Type" +msgstr "" + +#. Tag: entry +#: performance.xml:628 +#, no-c-format +msgid "Cluster Safe" +msgstr "" + +#. Tag: entry +#: performance.xml:629 +#, no-c-format +msgid "Query Cache Supported" +msgstr "" + +#. Tag: entry +#: performance.xml:634 performance.xml:822 +#, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "" + +#. Tag: literal +#: performance.xml:635 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "" + +#. Tag: entry +#: performance.xml:636 +#, no-c-format +msgid "memory" +msgstr "" + +#. Tag: entry +#: performance.xml:638 performance.xml:645 performance.xml:652 performance.xml:823 performance.xml:824 performance.xml:825 performance.xml:830 performance.xml:831 performance.xml:832 performance.xml:837 performance.xml:838 performance.xml:839 performance.xml:844 performance.xml:845 performance.xml:851 performance.xml:854 performance.xml:858 performance.xml:861 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:641 performance.xml:829 +#, no-c-format +msgid "EHCache" +msgstr "" + +#. Tag: literal +#: performance.xml:642 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "" + +#. Tag: entry +#: performance.xml:643 performance.xml:650 +#, no-c-format +msgid "memory, disk" +msgstr "" + +#. Tag: entry +#: performance.xml:648 performance.xml:836 +#, no-c-format +msgid "OSCache" +msgstr "" + +#. Tag: literal +#: performance.xml:649 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "" + +#. Tag: entry +#: performance.xml:655 performance.xml:843 +#, no-c-format +msgid "SwarmCache" +msgstr "" + +#. Tag: literal +#: performance.xml:656 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "" + +#. Tag: entry +#: performance.xml:657 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "" + +#. Tag: entry +#: performance.xml:658 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "" + +#. Tag: entry +#: performance.xml:662 performance.xml:850 +#, no-c-format +msgid "JBoss Cache 1.x" +msgstr "" + +#. Tag: literal +#: performance.xml:663 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "" + +#. Tag: entry +#: performance.xml:664 performance.xml:671 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "" + +#. Tag: entry +#: performance.xml:665 +#, no-c-format +msgid "yes (replication)" +msgstr "" + +#. Tag: entry +#: performance.xml:666 performance.xml:673 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "" + +#. Tag: entry +#: performance.xml:669 performance.xml:857 +#, no-c-format +msgid "JBoss Cache 2" +msgstr "" + +#. Tag: literal +#: performance.xml:670 +#, no-c-format +msgid "org.hibernate.cache.jbc2.JBossCacheRegionFactory" +msgstr "" + +#. Tag: entry +#: performance.xml:672 +#, no-c-format +msgid "yes (replication or invalidation)" +msgstr "" + +#. Tag: title +#: performance.xml:680 +#, no-c-format +msgid "Cache mappings" +msgstr "" + +#. Tag: para +#: performance.xml:682 +#, no-c-format +msgid "The <cache> element of a class or collection mapping has the following form:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:693 +#, no-c-format +msgid "" + "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "usage (required) specifies the caching strategy: transactional, read-write, nonstrict-read-write or read-only" +msgstr "" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "region (optional, defaults to the class or collection role name) specifies the name of the second level cache region" +msgstr "" + +#. Tag: para +#: performance.xml:712 +#, no-c-format +msgid "include (optional, defaults to all) non-lazy specifies that properties of the entity mapped with lazy=\"true\" may not be cached when attribute-level lazy fetching is enabled" +msgstr "" + +#. Tag: para +#: performance.xml:722 +#, no-c-format +msgid "Alternatively (preferably?), you may specify <class-cache> and <collection-cache> elements in hibernate.cfg.xml." +msgstr "" + +#. Tag: para +#: performance.xml:727 +#, no-c-format +msgid "The usage attribute specifies a cache concurrency strategy." +msgstr "" + +#. Tag: title +#: performance.xml:734 +#, no-c-format +msgid "Strategy: read only" +msgstr "" + +#. Tag: para +#: performance.xml:736 +#, no-c-format +msgid "If your application needs to read but never modify instances of a persistent class, a read-only cache may be used. This is the simplest and best performing strategy. It's even perfectly safe for use in a cluster." +msgstr "" + +#. Tag: programlisting +#: performance.xml:742 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + "]]>" +msgstr "" + +#. Tag: title +#: performance.xml:748 +#, no-c-format +msgid "Strategy: read/write" +msgstr "" + +#. Tag: para +#: performance.xml:750 +#, no-c-format +msgid "If the application needs to update data, a read-write cache might be appropriate. This cache strategy should never be used if serializable transaction isolation level is required. If the cache is used in a JTA environment, you must specify the property hibernate.transaction.manager_lookup_class, naming a strategy for obtaining the JTA TransactionManager. In other environments, you should ensure that the transaction is completed when Session.close() or Session.disconnect() is called. If you wish to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. The built-in cache providers do not." +msgstr "" + +#. Tag: programlisting +#: performance.xml:761 +#, no-c-format +msgid "" + "\n" + " \n" + " ....\n" + " \n" + " \n" + " ....\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: performance.xml:766 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "" + +#. Tag: para +#: performance.xml:768 +#, no-c-format +msgid "If the application only occasionally needs to update data (ie. if it is extremely unlikely that two transactions would try to update the same item simultaneously) and strict transaction isolation is not required, a nonstrict-read-write cache might be appropriate. If the cache is used in a JTA environment, you must specify hibernate.transaction.manager_lookup_class. In other environments, you should ensure that the transaction is completed when Session.close() or Session.disconnect() is called." +msgstr "" + +#. Tag: title +#: performance.xml:780 +#, no-c-format +msgid "Strategy: transactional" +msgstr "" + +#. Tag: para +#: performance.xml:782 +#, no-c-format +msgid "The transactional cache strategy provides support for fully transactional cache providers such as JBoss TreeCache. Such a cache may only be used in a JTA environment and you must specify hibernate.transaction.manager_lookup_class." +msgstr "" + +#. Tag: title +#: performance.xml:791 +#, no-c-format +msgid "Cache-provider/concurrency-strategy compatibility" +msgstr "" + +#. Tag: para +#: performance.xml:794 +#, no-c-format +msgid "None of the cache providers support all of the cache concurrency strategies." +msgstr "" + +#. Tag: para +#: performance.xml:799 +#, no-c-format +msgid "The following table shows which providers are compatible with which concurrency strategies." +msgstr "" + +#. Tag: title +#: performance.xml:804 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "" + +#. Tag: entry +#: performance.xml:814 +#, no-c-format +msgid "read-only" +msgstr "" + +#. Tag: entry +#: performance.xml:815 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "" + +#. Tag: entry +#: performance.xml:816 +#, no-c-format +msgid "read-write" +msgstr "" + +#. Tag: entry +#: performance.xml:817 +#, no-c-format +msgid "transactional" +msgstr "" + +#. Tag: title +#: performance.xml:872 +#, no-c-format +msgid "Managing the caches" +msgstr "" + +#. Tag: para +#: performance.xml:874 +#, no-c-format +msgid "Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an object using load(), get(), list(), iterate() or scroll(), that object is added to the internal cache of the Session." +msgstr "" + +#. Tag: para +#: performance.xml:881 +#, no-c-format +msgid "When flush() is subsequently called, the state of that object will be synchronized with the database. If you do not want this synchronization to occur or if you are processing a huge number of objects and need to manage memory efficiently, the evict() method may be used to remove the object and its collections from the first-level cache." +msgstr "" + +#. Tag: programlisting +#: performance.xml:889 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:891 +#, no-c-format +msgid "The Session also provides a contains() method to determine if an instance belongs to the session cache." +msgstr "" + +#. Tag: para +#: performance.xml:896 +#, no-c-format +msgid "To completely evict all objects from the session cache, call Session.clear()" +msgstr "" + +#. Tag: para +#: performance.xml:900 +#, no-c-format +msgid "For the second-level cache, there are methods defined on SessionFactory for evicting the cached state of an instance, entire class, collection instance or entire collection role." +msgstr "" + +#. Tag: programlisting +#: performance.xml:906 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:908 +#, no-c-format +msgid "The CacheMode controls how a particular session interacts with the second-level cache." +msgstr "" + +#. Tag: para +#: performance.xml:915 +#, no-c-format +msgid "CacheMode.NORMAL - read items from and write items to the second-level cache" +msgstr "" + +#. Tag: para +#: performance.xml:920 +#, no-c-format +msgid "CacheMode.GET - read items from the second-level cache, but don't write to the second-level cache except when updating data" +msgstr "" + +#. Tag: para +#: performance.xml:926 +#, no-c-format +msgid "CacheMode.PUT - write items to the second-level cache, but don't read from the second-level cache" +msgstr "" + +#. Tag: para +#: performance.xml:932 +#, no-c-format +msgid "CacheMode.REFRESH - write items to the second-level cache, but don't read from the second-level cache, bypass the effect of hibernate.cache.use_minimal_puts, forcing a refresh of the second-level cache for all items read from the database" +msgstr "" + +#. Tag: para +#: performance.xml:940 +#, no-c-format +msgid "To browse the contents of a second-level or query cache region, use the Statistics API:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:945 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:947 +#, no-c-format +msgid "You'll need to enable statistics, and, optionally, force Hibernate to keep the cache entries in a more human-understandable format:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:952 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: performance.xml:957 +#, no-c-format +msgid "The Query Cache" +msgstr "" + +#. Tag: para +#: performance.xml:959 +#, no-c-format +msgid "Query result sets may also be cached. This is only useful for queries that are run frequently with the same parameters. To use the query cache you must first enable it:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:964 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "This setting causes the creation of two new cache regions - one holding cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual entities in the result set; it caches only identifier values and results of value type. So the query cache should always be used in conjunction with the second-level cache." +msgstr "" + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "Most queries do not benefit from caching, so by default queries are not cached. To enable caching, call Query.setCacheable(true). This call allows the query to look for existing cache results or add its results to the cache when it is executed." +msgstr "" + +#. Tag: para +#: performance.xml:983 +#, no-c-format +msgid "If you require fine-grained control over query cache expiration policies, you may specify a named cache region for a particular query by calling Query.setCacheRegion()." +msgstr "" + +#. Tag: programlisting +#: performance.xml:989 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "If the query should force a refresh of its query cache region, you should call Query.setCacheMode(CacheMode.REFRESH). This is particularly useful in cases where underlying data may have been updated via a separate process (i.e., not modified through Hibernate) and allows the application to selectively refresh particular query result sets. This is a more efficient alternative to eviction of a query cache region via SessionFactory.evictQueries()." +msgstr "" + +#. Tag: title +#: performance.xml:1003 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "" + +#. Tag: para +#: performance.xml:1005 +#, no-c-format +msgid "We've already spent quite some time talking about collections. In this section we will highlight a couple more issues about how collections behave at runtime." +msgstr "" + +#. Tag: title +#: performance.xml:1012 +#, no-c-format +msgid "Taxonomy" +msgstr "" + +#. Tag: para +#: performance.xml:1014 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "" + +#. Tag: para +#: performance.xml:1018 +#, no-c-format +msgid "collections of values" +msgstr "" + +#. Tag: para +#: performance.xml:1021 +#, no-c-format +msgid "one to many associations" +msgstr "" + +#. Tag: para +#: performance.xml:1024 +#, no-c-format +msgid "many to many associations" +msgstr "" + +#. Tag: para +#: performance.xml:1028 +#, no-c-format +msgid "This classification distinguishes the various table and foreign key relationships but does not tell us quite everything we need to know about the relational model. To fully understand the relational structure and performance characteristics, we must also consider the structure of the primary key that is used by Hibernate to update or delete collection rows. This suggests the following classification:" +msgstr "" + +#. Tag: para +#: performance.xml:1039 +#, no-c-format +msgid "indexed collections" +msgstr "" + +#. Tag: para +#: performance.xml:1042 +#, no-c-format +msgid "sets" +msgstr "" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "bags" +msgstr "" + +#. Tag: para +#: performance.xml:1049 +#, no-c-format +msgid "All indexed collections (maps, lists, arrays) have a primary key consisting of the <key> and <index> columns. In this case collection updates are usually extremely efficient - the primary key may be efficiently indexed and a particular row may be efficiently located when Hibernate tries to update or delete it." +msgstr "" + +#. Tag: para +#: performance.xml:1057 +#, no-c-format +msgid "Sets have a primary key consisting of <key> and element columns. This may be less efficient for some types of collection element, particularly composite elements or large text or binary fields; the database may not be able to index a complex primary key as efficiently. On the other hand, for one to many or many to many associations, particularly in the case of synthetic identifiers, it is likely to be just as efficient. (Side-note: if you want SchemaExport to actually create the primary key of a <set> for you, you must declare all columns as not-null=\"true\".)" +msgstr "" + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "<idbag> mappings define a surrogate key, so they are always very efficient to update. In fact, they are the best case." +msgstr "" + +#. Tag: para +#: performance.xml:1073 +#, no-c-format +msgid "Bags are the worst case. Since a bag permits duplicate element values and has no index column, no primary key may be defined. Hibernate has no way of distinguishing between duplicate rows. Hibernate resolves this problem by completely removing (in a single DELETE) and recreating the collection whenever it changes. This might be very inefficient." +msgstr "" + +#. Tag: para +#: performance.xml:1081 +#, no-c-format +msgid "Note that for a one-to-many association, the \"primary key\" may not be the physical primary key of the database table - but even in this case, the above classification is still useful. (It still reflects how Hibernate \"locates\" individual rows of the collection.)" +msgstr "" + +#. Tag: title +#: performance.xml:1091 +#, no-c-format +msgid "Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "" + +#. Tag: para +#: performance.xml:1093 +#, no-c-format +msgid "From the discussion above, it should be clear that indexed collections and (usually) sets allow the most efficient operation in terms of adding, removing and updating elements." +msgstr "" + +#. Tag: para +#: performance.xml:1099 +#, no-c-format +msgid "There is, arguably, one more advantage that indexed collections have over sets for many to many associations or collections of values. Because of the structure of a Set, Hibernate doesn't ever UPDATE a row when an element is \"changed\". Changes to a Set always work via INSERT and DELETE (of individual rows). Once again, this consideration does not apply to one to many associations." +msgstr "" + +#. Tag: para +#: performance.xml:1108 +#, no-c-format +msgid "After observing that arrays cannot be lazy, we would conclude that lists, maps and idbags are the most performant (non-inverse) collection types, with sets not far behind. Sets are expected to be the most common kind of collection in Hibernate applications. This is because the \"set\" semantics are most natural in the relational model." +msgstr "" + +#. Tag: para +#: performance.xml:1116 +#, no-c-format +msgid "However, in well-designed Hibernate domain models, we usually see that most collections are in fact one-to-many associations with inverse=\"true\". For these associations, the update is handled by the many-to-one end of the association, and so considerations of collection update performance simply do not apply." +msgstr "" + +#. Tag: title +#: performance.xml:1126 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "" + +#. Tag: para +#: performance.xml:1128 +#, no-c-format +msgid "Just before you ditch bags forever, there is a particular case in which bags (and also lists) are much more performant than sets. For a collection with inverse=\"true\" (the standard bidirectional one-to-many relationship idiom, for example) we can add elements to a bag or list without needing to initialize (fetch) the bag elements! This is because Collection.add() or Collection.addAll() must always return true for a bag or List (unlike a Set). This can make the following common code much faster." +msgstr "" + +#. Tag: programlisting +#: performance.xml:1138 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: performance.xml:1143 +#, no-c-format +msgid "One shot delete" +msgstr "" + +#. Tag: para +#: performance.xml:1145 +#, no-c-format +msgid "Occasionally, deleting collection elements one by one can be extremely inefficient. Hibernate isn't completely stupid, so it knows not to do that in the case of an newly-empty collection (if you called list.clear(), for example). In this case, Hibernate will issue a single DELETE and we are done!" +msgstr "" + +#. Tag: para +#: performance.xml:1152 +#, no-c-format +msgid "Suppose we add a single element to a collection of size twenty and then remove two elements. Hibernate will issue one INSERT statement and two DELETE statements (unless the collection is a bag). This is certainly desirable." +msgstr "" + +#. Tag: para +#: performance.xml:1158 +#, no-c-format +msgid "However, suppose that we remove eighteen elements, leaving two and then add thee new elements. There are two possible ways to proceed" +msgstr "" + +#. Tag: para +#: performance.xml:1165 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "" + +#. Tag: para +#: performance.xml:1168 +#, no-c-format +msgid "remove the whole collection (in one SQL DELETE) and insert all five current elements (one by one)" +msgstr "" + +#. Tag: para +#: performance.xml:1173 +#, no-c-format +msgid "Hibernate isn't smart enough to know that the second option is probably quicker in this case. (And it would probably be undesirable for Hibernate to be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" + +#. Tag: para +#: performance.xml:1179 +#, no-c-format +msgid "Fortunately, you can force this behaviour (ie. the second strategy) at any time by discarding (ie. dereferencing) the original collection and returning a newly instantiated collection with all the current elements. This can be very useful and powerful from time to time." +msgstr "" + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "Of course, one-shot-delete does not apply to collections mapped inverse=\"true\"." +msgstr "" + +#. Tag: title +#: performance.xml:1194 +#, no-c-format +msgid "Monitoring performance" +msgstr "" + +#. Tag: para +#: performance.xml:1196 +#, no-c-format +msgid "Optimization is not much use without monitoring and access to performance numbers. Hibernate provides a full range of figures about its internal operations. Statistics in Hibernate are available per SessionFactory." +msgstr "" + +#. Tag: title +#: performance.xml:1203 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "" + +#. Tag: para +#: performance.xml:1205 +#, no-c-format +msgid "You can access SessionFactory metrics in two ways. Your first option is to call sessionFactory.getStatistics() and read or display the Statistics yourself." +msgstr "" + +#. Tag: para +#: performance.xml:1211 +#, no-c-format +msgid "Hibernate can also use JMX to publish metrics if you enable the StatisticsService MBean. You may enable a single MBean for all your SessionFactory or one per factory. See the following code for minimalistic configuration examples:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1218 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1221 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "TODO: This doesn't make sense: In the first case, we retrieve and use the MBean directly. In the second one, we must give the JNDI name in which the session factory is held before using it. Use hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" + +#. Tag: para +#: performance.xml:1228 +#, no-c-format +msgid "You can (de)activate the monitoring for a SessionFactory" +msgstr "" + +#. Tag: para +#: performance.xml:1233 +#, no-c-format +msgid "at configuration time, set hibernate.generate_statistics to false" +msgstr "" + +#. Tag: para +#: performance.xml:1240 +#, no-c-format +msgid "at runtime: sf.getStatistics().setStatisticsEnabled(true) or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" + +#. Tag: para +#: performance.xml:1247 +#, no-c-format +msgid "Statistics can be reset programmatically using the clear() method. A summary can be sent to a logger (info level) using the logSummary() method." +msgstr "" + +#. Tag: title +#: performance.xml:1256 +#, no-c-format +msgid "Metrics" +msgstr "" + +#. Tag: para +#: performance.xml:1258 +#, no-c-format +msgid "Hibernate provides a number of metrics, from very basic to the specialized information only relevant in certain scenarios. All available counters are described in the Statistics interface API, in three categories:" +msgstr "" + +#. Tag: para +#: performance.xml:1265 +#, no-c-format +msgid "Metrics related to the general Session usage, such as number of open sessions, retrieved JDBC connections, etc." +msgstr "" + +#. Tag: para +#: performance.xml:1271 +#, no-c-format +msgid "Metrics related to he entities, collections, queries, and caches as a whole (aka global metrics)," +msgstr "" + +#. Tag: para +#: performance.xml:1277 +#, no-c-format +msgid "Detailed metrics related to a particular entity, collection, query or cache region." +msgstr "" + +#. Tag: para +#: performance.xml:1284 +#, no-c-format +msgid "For example, you can check the cache hit, miss, and put ratio of entities, collections and queries, and the average time a query needs. Beware that the number of milliseconds is subject to approximation in Java. Hibernate is tied to the JVM precision, on some platforms this might even only be accurate to 10 seconds." +msgstr "" + +#. Tag: para +#: performance.xml:1291 +#, no-c-format +msgid "Simple getters are used to access the global metrics (i.e. not tied to a particular entity, collection, cache region, etc.). You can access the metrics of a particular entity, collection or cache region through its name, and through its HQL or SQL representation for queries. Please refer to the Statistics, EntityStatistics, CollectionStatistics, SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple example:" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1301 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: performance.xml:1303 +#, no-c-format +msgid "To work on all entities, collections, queries and region caches, you can retrieve the list of names of entities, collections, queries and region caches with the following methods: getQueries(), getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/persistent_classes.pot b/documentation/envers/src/main/docbook/pot/content/persistent_classes.pot new file mode 100644 index 0000000000..8f7ed82893 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/persistent_classes.pot @@ -0,0 +1,566 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:29 +#, no-c-format +msgid "Persistent Classes" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "Persistent classes are classes in an application that implement the entities of the business problem (e.g. Customer and Order in an E-commerce application). Not all instances of a persistent class are considered to be in the persistent state - an instance may instead be transient or detached." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:38 +#, no-c-format +msgid "Hibernate works best if these classes follow some simple rules, also known as the Plain Old Java Object (POJO) programming model. However, none of these rules are hard requirements. Indeed, Hibernate3 assumes very little about the nature of your persistent objects. You may express a domain model in other ways: using trees of Map instances, for example." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:47 +#, no-c-format +msgid "A simple POJO example" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:49 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:53 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:55 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:61 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:63 +#, no-c-format +msgid "Cat has a no-argument constructor. All persistent classes must have a default constructor (which may be non-public) so that Hibernate can instantiate them using Constructor.newInstance(). We strongly recommend having a default constructor with at least package visibility for runtime proxy generation in Hibernate." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:73 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:75 +#, no-c-format +msgid "Cat has a property called id. This property maps to the primary key column of a database table. The property might have been called anything, and its type might have been any primitive type, any primitive \"wrapper\" type, java.lang.String or java.util.Date. (If your legacy database table has composite keys, you can even use a user-defined class with properties of these types - see the section on composite identifiers later.)" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:84 +#, no-c-format +msgid "The identifier property is strictly optional. You can leave them off and let Hibernate keep track of object identifiers internally. We do not recommend this, however." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "In fact, some functionality is available only to classes which declare an identifier property:" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:96 +#, no-c-format +msgid "Transitive reattachment for detached objects (cascade update or cascade merge) - see" +msgstr "" + +#. Tag: literal +#: persistent_classes.xml:103 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "" + +#. Tag: literal +#: persistent_classes.xml:108 +#, no-c-format +msgid "Session.merge()" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:113 +#, no-c-format +msgid "We recommend you declare consistently-named identifier properties on persistent classes. We further recommend that you use a nullable (ie. non-primitive) type." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:120 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:121 +#, no-c-format +msgid "A central feature of Hibernate, proxies, depends upon the persistent class being either non-final, or the implementation of an interface that declares all public methods." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:126 +#, no-c-format +msgid "You can persist final classes that do not implement an interface with Hibernate, but you won't be able to use proxies for lazy association fetching - which will limit your options for performance tuning." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:131 +#, no-c-format +msgid "You should also avoid declaring public final methods on the non-final classes. If you want to use a class with a public final method, you must explicitly disable proxying by setting lazy=\"false\"." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:139 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:141 +#, no-c-format +msgid "Cat declares accessor methods for all its persistent fields. Many other ORM tools directly persist instance variables. We believe it is better to provide an indirection between the relational schema and internal data structures of the class. By default, Hibernate persists JavaBeans style properties, and recognizes method names of the form getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, if needed." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "Properties need not be declared public - Hibernate can persist a property with a default, protected or private get / set pair." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:162 +#, no-c-format +msgid "Implementing inheritance" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "A subclass must also observe the first and second rules. It inherits its identifier property from the superclass, Cat." +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:169 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:173 +#, no-c-format +msgid "Implementing equals() and hashCode()" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:175 +#, no-c-format +msgid "You have to override the equals() and hashCode() methods if you" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:181 +#, no-c-format +msgid "intend to put instances of persistent classes in a Set (the recommended way to represent many-valued associations) and" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:188 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:194 +#, no-c-format +msgid "Hibernate guarantees equivalence of persistent identity (database row) and Java identity only inside a particular session scope. So as soon as we mix instances retrieved in different sessions, we must implement equals() and hashCode() if we wish to have meaningful semantics for Sets." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "The most obvious way is to implement equals()/hashCode() by comparing the identifier value of both objects. If the value is the same, both must be the same database row, they are therefore equal (if both are added to a Set, we will only have one element in the Set). Unfortunately, we can't use that approach with generated identifiers! Hibernate will only assign identifier values to objects that are persistent, a newly created instance will not have any identifier value! Furthermore, if an instance is unsaved and currently in a Set, saving it will assign an identifier value to the object. If equals() and hashCode() are based on the identifier value, the hash code would change, breaking the contract of the Set. See the Hibernate website for a full discussion of this problem. Note that this is not a Hibernate issue, but normal Java semantics of object identity and equality." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:216 +#, no-c-format +msgid "We recommend implementing equals() and hashCode() using Business key equality. Business key equality means that the equals() method compares only the properties that form the business key, a key that would identify our instance in the real world (a natural candidate key):" +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:224 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:226 +#, no-c-format +msgid "Note that a business key does not have to be as solid as a database primary key candidate (see ). Immutable or unique properties are usually good candidates for a business key." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:236 +#, no-c-format +msgid "Dynamic models" +msgstr "" + +#. Tag: emphasis +#: persistent_classes.xml:239 +#, no-c-format +msgid "Note that the following features are currently considered experimental and may change in the near future." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:243 +#, no-c-format +msgid "Persistent entities don't necessarily have to be represented as POJO classes or as JavaBean objects at runtime. Hibernate also supports dynamic models (using Maps of Maps at runtime) and the representation of entities as DOM4J trees. With this approach, you don't write persistent classes, only mapping files." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:251 +#, no-c-format +msgid "By default, Hibernate works in normal POJO mode. You may set a default entity representation mode for a particular SessionFactory using the default_entity_mode configuration option (see ." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:258 +#, no-c-format +msgid "The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has to be declared instead of (or in addition to) a class name:" +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:264 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:266 +#, no-c-format +msgid "Note that even though associations are declared using target class names, the target type of an associations may also be a dynamic entity instead of a POJO." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "After setting the default entity mode to dynamic-map for the SessionFactory, we can at runtime work with Maps of Maps:" +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:279 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:281 +#, no-c-format +msgid "The advantages of a dynamic mapping are quick turnaround time for prototyping without the need for entity class implementation. However, you lose compile-time type checking and will very likely deal with many exceptions at runtime. Thanks to the Hibernate mapping, the database schema can easily be normalized and sound, allowing to add a proper domain model implementation on top later on." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:289 +#, no-c-format +msgid "Entity representation modes can also be set on a per Session basis:" +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:294 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:297 +#, no-c-format +msgid "Please note that the call to getSession() using an EntityMode is on the Session API, not the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the primary unit of work." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:307 +#, no-c-format +msgid "More information about the XML representation capabilities can be found in ." +msgstr "" + +#. Tag: title +#: persistent_classes.xml:315 +#, no-c-format +msgid "Tuplizers" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:317 +#, no-c-format +msgid "org.hibernate.tuple.Tuplizer, and its sub-interfaces, are responsible for managing a particular representation of a piece of data, given that representation's org.hibernate.EntityMode. If a given piece of data is thought of as a data structure, then a tuplizer is the thing which knows how to create such a data structure and how to extract values from and inject values into such a data structure. For example, for the POJO entity mode, the correpsonding tuplizer knows how create the POJO through its constructor and how to access the POJO properties using the defined property accessors. There are two high-level types of Tuplizers, represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for managing the above mentioned contracts in regards to entities, while ComponentTuplizers do the same for components." +msgstr "" + +#. Tag: para +#: persistent_classes.xml:332 +#, no-c-format +msgid "Users may also plug in their own tuplizers. Perhaps you require that a java.util.Map implementation other than java.util.HashMap be used while in the dynamic-map entity-mode; or perhaps you need to define a different proxy generation strategy than the one used by default. Both would be achieved by defining a custom tuplizer implementation. Tuplizers definitions are attached to the entity or component mapping they are meant to manage. Going back to the example of our customer entity:" +msgstr "" + +#. Tag: programlisting +#: persistent_classes.xml:341 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " ...\n" + " \n" + "\n" + "\n" + "\n" + "public class CustomMapTuplizerImpl\n" + " extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" + " // override the buildInstantiator() method to plug in our custom map...\n" + " protected final Instantiator buildInstantiator(\n" + " org.hibernate.mapping.PersistentClass mappingInfo) {\n" + " return new CustomMapInstantiator( mappingInfo );\n" + " }\n" + "\n" + " private static final class CustomMapInstantiator\n" + " extends org.hibernate.tuple.DynamicMapInstantitor {\n" + " // override the generateMap() method to return our custom map...\n" + " protected final Map generateMap() {\n" + " return new CustomMap();\n" + " }\n" + " }\n" + "}]]>" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:347 +#, no-c-format +msgid "Extentsions" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:348 +#, no-c-format +msgid "TODO: Document user-extension framework in the property and proxy packages" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/preface.pot b/documentation/envers/src/main/docbook/pot/content/preface.pot new file mode 100644 index 0000000000..c6b922d961 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/preface.pot @@ -0,0 +1,100 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:29 +#, no-c-format +msgid "Preface" +msgstr "" + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "Working with object-oriented software and a relational database can be cumbersome and time consuming in today's enterprise environments. Hibernate is an object/relational mapping tool for Java environments. The term object/relational mapping (ORM) refers to the technique of mapping a data representation from an object model to a relational data model with a SQL-based schema." +msgstr "" + +#. Tag: para +#: preface.xml:39 +#, no-c-format +msgid "Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC." +msgstr "" + +#. Tag: para +#: preface.xml:46 +#, no-c-format +msgid "Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks. Hibernate may not be the best solution for data-centric applications that only use stored-procedures to implement the business logic in the database, it is most useful with object-oriented domain models and business logic in the Java-based middle-tier. However, Hibernate can certainly help you to remove or encapsulate vendor-specific SQL code and will help with the common task of result set translation from a tabular representation to a graph of objects." +msgstr "" + +#. Tag: para +#: preface.xml:56 +#, no-c-format +msgid "If you are new to Hibernate and Object/Relational Mapping or even Java, please follow these steps:" +msgstr "" + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "Read for a tutorial with step-by-step instructions. The source code for the tutorial is included in the distribution in the doc/reference/tutorial/ directory." +msgstr "" + +#. Tag: para +#: preface.xml:71 +#, no-c-format +msgid "Read to understand the environments where Hibernate can be used." +msgstr "" + +#. Tag: para +#: preface.xml:77 +#, no-c-format +msgid "Have a look at the eg/ directory in the Hibernate distribution, it contains a simple standalone application. Copy your JDBC driver to the lib/ directory and edit etc/hibernate.properties, specifying correct values for your database. From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" + +#. Tag: para +#: preface.xml:88 +#, no-c-format +msgid "Use this reference documentation as your primary source of information. Consider reading Java Persistence with Hibernate (http://www.manning.com/bauer2) if you need more help with application design or if you prefer a step-by-step tutorial. Also visit http://caveatemptor.hibernate.org and download the example application for Java Persistence with Hibernate." +msgstr "" + +#. Tag: para +#: preface.xml:98 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "" + +#. Tag: para +#: preface.xml:103 +#, no-c-format +msgid "Third party demos, examples, and tutorials are linked on the Hibernate website." +msgstr "" + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "The Community Area on the Hibernate website is a good resource for design patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, etc.)." +msgstr "" + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "If you have questions, use the user forum linked on the Hibernate website. We also provide a JIRA issue trackings system for bug reports and feature requests. If you are interested in the development of Hibernate, join the developer mailing list. If you are interested in translating this documentation into your language, contact us on the developer mailing list." +msgstr "" + +#. Tag: para +#: preface.xml:125 +#, no-c-format +msgid "Commercial development support, production support, and training for Hibernate is available through JBoss Inc. (see http://www.hibernate.org/SupportTraining/). Hibernate is a Professional Open Source project and a critical component of the JBoss Enterprise Middleware System (JEMS) suite of products." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/query_criteria.pot b/documentation/envers/src/main/docbook/pot/content/query_criteria.pot new file mode 100644 index 0000000000..3c416e8619 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/query_criteria.pot @@ -0,0 +1,630 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:29 +#, no-c-format +msgid "Criteria Queries" +msgstr "" + +#. Tag: para +#: query_criteria.xml:31 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "" + +#. Tag: title +#: query_criteria.xml:36 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "" + +#. Tag: para +#: query_criteria.xml:38 +#, no-c-format +msgid "The interface org.hibernate.Criteria represents a query against a particular persistent class. The Session is a factory for Criteria instances." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:44 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:49 +#, no-c-format +msgid "Narrowing the result set" +msgstr "" + +#. Tag: para +#: query_criteria.xml:51 +#, no-c-format +msgid "An individual query criterion is an instance of the interface org.hibernate.criterion.Criterion. The class org.hibernate.criterion.Restrictions defines factory methods for obtaining certain built-in Criterion types." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:59 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:61 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:67 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:69 +#, no-c-format +msgid "There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL directly." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:76 +#, no-c-format +msgid "The {alias} placeholder with be replaced by the row alias of the queried entity." +msgstr "" + +#. Tag: para +#: query_criteria.xml:81 +#, no-c-format +msgid "An alternative approach to obtaining a criterion is to get it from a Property instance. You can create a Property by calling Property.forName()." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:87 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:92 +#, no-c-format +msgid "Ordering the results" +msgstr "" + +#. Tag: para +#: query_criteria.xml:94 +#, no-c-format +msgid "You may order the results using org.hibernate.criterion.Order." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:98 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:105 +#, no-c-format +msgid "Associations" +msgstr "" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "You may easily specify constraints upon related entities by navigating associations using createCriteria()." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:112 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:114 +#, no-c-format +msgid "note that the second createCriteria() returns a new instance of Criteria, which refers to the elements of the kittens collection." +msgstr "" + +#. Tag: para +#: query_criteria.xml:120 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:124 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:126 +#, no-c-format +msgid "(createAlias() does not create a new instance of Criteria.)" +msgstr "" + +#. Tag: para +#: query_criteria.xml:131 +#, no-c-format +msgid "Note that the kittens collections held by the Cat instances returned by the previous two queries are not pre-filtered by the criteria! If you wish to retrieve just the kittens that match the criteria, you must use a ResultTransformer." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:138 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:143 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "You may specify association fetching semantics at runtime using setFetchMode()." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:152 +#, no-c-format +msgid "This query will fetch both mate and kittens by outer join. See for more information." +msgstr "" + +#. Tag: title +#: query_criteria.xml:160 +#, no-c-format +msgid "Example queries" +msgstr "" + +#. Tag: para +#: query_criteria.xml:162 +#, no-c-format +msgid "The class org.hibernate.criterion.Example allows you to construct a query criterion from a given instance." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:167 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:169 +#, no-c-format +msgid "Version properties, identifiers and associations are ignored. By default, null valued properties are excluded." +msgstr "" + +#. Tag: para +#: query_criteria.xml:174 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:178 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:180 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:184 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:189 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "" + +#. Tag: para +#: query_criteria.xml:190 +#, no-c-format +msgid "The class org.hibernate.criterion.Projections is a factory for Projection instances. We apply a projection to a query by calling setProjection()." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:196 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:198 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:200 +#, no-c-format +msgid "There is no explicit \"group by\" necessary in a criteria query. Certain projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" + +#. Tag: para +#: query_criteria.xml:206 +#, no-c-format +msgid "An alias may optionally be assigned to a projection, so that the projected value may be referred to in restrictions or orderings. Here are two different ways to do this:" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:212 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:214 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:216 +#, no-c-format +msgid "The alias() and as() methods simply wrap a projection instance in another, aliased, instance of Projection. As a shortcut, you can assign an alias when you add the projection to a projection list:" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:223 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:225 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:227 +#, no-c-format +msgid "You can also use Property.forName() to express projections:" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:231 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:233 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:238 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "" + +#. Tag: para +#: query_criteria.xml:239 +#, no-c-format +msgid "The DetachedCriteria class lets you create a query outside the scope of a session, and then later execute it using some arbitrary Session." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:244 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:246 +#, no-c-format +msgid "A DetachedCriteria may also be used to express a subquery. Criterion instances involving subqueries may be obtained via Subqueries or Property." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:252 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:254 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_criteria.xml:256 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_criteria.xml:269 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "" + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "For most queries, including criteria queries, the query cache is not very efficient, because query cache invalidation occurs too frequently. However, there is one special kind of query where we can optimize the cache invalidation algorithm: lookups by a constant natural key. In some applications, this kind of query occurs frequently. The criteria API provides special provision for this use case." +msgstr "" + +#. Tag: para +#: query_criteria.xml:279 +#, no-c-format +msgid "First, you should map the natural key of your entity using <natural-id>, and enable use of the second-level cache." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:284 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:286 +#, no-c-format +msgid "Note that this functionality is not intended for use with entities with mutable natural keys." +msgstr "" + +#. Tag: para +#: query_criteria.xml:291 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "" + +#. Tag: para +#: query_criteria.xml:295 +#, no-c-format +msgid "Now, Restrictions.naturalId() allows us to make use of the more efficient cache algorithm." +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:300 +#, no-c-format +msgid "" + "" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/query_hql.pot b/documentation/envers/src/main/docbook/pot/content/query_hql.pot new file mode 100644 index 0000000000..5a0153d92a --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/query_hql.pot @@ -0,0 +1,1793 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:29 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "" + +#. Tag: para +#: query_hql.xml:31 +#, no-c-format +msgid "Hibernate is equipped with an extremely powerful query language that (quite intentionally) looks very much like SQL. But don't be fooled by the syntax; HQL is fully object-oriented, understanding notions like inheritence, polymorphism and association." +msgstr "" + +#. Tag: title +#: query_hql.xml:38 +#, no-c-format +msgid "Case Sensitivity" +msgstr "" + +#. Tag: para +#: query_hql.xml:40 +#, no-c-format +msgid "Queries are case-insensitive, except for names of Java classes and properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate.eg.FOO is not org.hibernate.eg.Foo and foo.barSet is not foo.BARSET." +msgstr "" + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "This manual uses lowercase HQL keywords. Some users find queries with uppercase keywords more readable, but we find this convention ugly when embedded in Java code." +msgstr "" + +#. Tag: title +#: query_hql.xml:59 +#, no-c-format +msgid "The from clause" +msgstr "" + +#. Tag: para +#: query_hql.xml:61 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "which simply returns all instances of the class eg.Cat. We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:73 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:75 +#, no-c-format +msgid "Most of the time, you will need to assign an alias, since you will want to refer to the Cat in other parts of the query." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:81 query_hql.xml:396 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:83 +#, no-c-format +msgid "This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The as keyword is optional; we could also write:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:89 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:91 +#, no-c-format +msgid "Multiple classes may appear, resulting in a cartesian product or \"cross\" join." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:95 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:96 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:98 +#, no-c-format +msgid "It is considered good practice to name query aliases using an initial lowercase, consistent with Java naming standards for local variables (eg. domesticCat)." +msgstr "" + +#. Tag: title +#: query_hql.xml:107 +#, no-c-format +msgid "Associations and joins" +msgstr "" + +#. Tag: para +#: query_hql.xml:109 +#, no-c-format +msgid "We may also assign aliases to associated entities, or even to elements of a collection of values, using a join." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:114 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:116 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:118 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:120 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "" + +#. Tag: literal +#: query_hql.xml:127 +#, no-c-format +msgid "inner join" +msgstr "" + +#. Tag: literal +#: query_hql.xml:132 +#, no-c-format +msgid "left outer join" +msgstr "" + +#. Tag: literal +#: query_hql.xml:137 +#, no-c-format +msgid "right outer join" +msgstr "" + +#. Tag: para +#: query_hql.xml:141 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "The inner join, left outer join and right outer join constructs may be abbreviated." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:152 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:154 +#, no-c-format +msgid "You may supply extra join conditions using the HQL with keyword." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:159 +#, no-c-format +msgid "" + " 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:161 +#, no-c-format +msgid "In addition, a \"fetch\" join allows associations or collections of values to be initialized along with their parent objects, using a single select. This is particularly useful in the case of a collection. It effectively overrides the outer join and lazy declarations of the mapping file for associations and collections. See for more information." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:169 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:171 +#, no-c-format +msgid "A fetch join does not usually need to assign an alias, because the associated objects should not be used in the where clause (or any other clause). Also, the associated objects are not returned directly in the query results. Instead, they may be accessed via the parent object. The only reason we might need an alias is if we are recursively join fetching a further collection:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:181 +#, no-c-format +msgid "Note that the fetch construct may not be used in queries called using iterate() (though scroll() can be used). Nor should fetch be used together with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually contain duplicates for eager collection fetching, hence, the number of rows is not what you'd expect. Nor may fetch be used together with an ad hoc with condition. It is possible to create a cartesian product by join fetching more than one collection in a query, so take care in this case. Join fetching multiple collection roles also sometimes gives unexpected results for bag mappings, so be careful about how you formulate your queries in this case. Finally, note that full join fetch and right join fetch are not meaningful." +msgstr "" + +#. Tag: para +#: query_hql.xml:196 +#, no-c-format +msgid "If you are using property-level lazy fetching (with bytecode instrumentation), it is possible to force Hibernate to fetch the lazy properties immediately (in the first query) using fetch all properties." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:203 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:208 +#, no-c-format +msgid "Forms of join syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:210 +#, no-c-format +msgid "HQL supports two forms of association joining: implicit and explicit." +msgstr "" + +#. Tag: para +#: query_hql.xml:214 +#, no-c-format +msgid "The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. This is the recommended form." +msgstr "" + +#. Tag: para +#: query_hql.xml:219 +#, no-c-format +msgid "The implicit form does not use the join keyword. Instead, the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:226 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:230 +#, no-c-format +msgid "Refering to identifier property" +msgstr "" + +#. Tag: para +#: query_hql.xml:232 +#, no-c-format +msgid "There are, generally speaking, 2 ways to refer to an entity's identifier property:" +msgstr "" + +#. Tag: para +#: query_hql.xml:237 +#, no-c-format +msgid "The special property (lowercase) id may be used to reference the identifier property of an entity provided that entity does not define a non-identifier property named id." +msgstr "" + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "If the entity defines a named identifier property, you may use that property name." +msgstr "" + +#. Tag: para +#: query_hql.xml:250 +#, no-c-format +msgid "References to composite identifier properties follow the same naming rules. If the entity has a non-identifier property named id, the composite identifier property can only be referenced by its defined named; otherwise, the special id property can be used to rerference the identifier property." +msgstr "" + +#. Tag: para +#: query_hql.xml:257 +#, no-c-format +msgid "Note: this has changed significantly starting in version 3.2.2. In previous versions, id always referred to the identifier property no matter what its actual name. A ramification of that decision was that non-identifier properties named id could never be referenced in Hibernate queries." +msgstr "" + +#. Tag: title +#: query_hql.xml:266 +#, no-c-format +msgid "The select clause" +msgstr "" + +#. Tag: para +#: query_hql.xml:268 +#, no-c-format +msgid "The select clause picks which objects and properties to return in the query result set. Consider:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:273 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:275 +#, no-c-format +msgid "The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:280 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:282 +#, no-c-format +msgid "Queries may return properties of any value type including properties of component type:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:286 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:288 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:290 +#, no-c-format +msgid "Queries may return multiple objects and/or properties as an array of type Object[]," +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:295 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:297 +#, no-c-format +msgid "or as a List," +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:301 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:303 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:307 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:309 +#, no-c-format +msgid "assuming that the class Family has an appropriate constructor." +msgstr "" + +#. Tag: para +#: query_hql.xml:313 +#, no-c-format +msgid "You may assign aliases to selected expressions using as:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:317 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:319 +#, no-c-format +msgid "This is most useful when used together with select new map:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:323 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "This query returns a Map from aliases to selected values." +msgstr "" + +#. Tag: title +#: query_hql.xml:332 +#, no-c-format +msgid "Aggregate functions" +msgstr "" + +#. Tag: para +#: query_hql.xml:334 +#, no-c-format +msgid "HQL queries may even return the results of aggregate functions on properties:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:338 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:349 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "" + +#. Tag: literal +#: query_hql.xml:356 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "" + +#. Tag: literal +#: query_hql.xml:361 +#, no-c-format +msgid "count(*)" +msgstr "" + +#. Tag: literal +#: query_hql.xml:366 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "" + +#. Tag: para +#: query_hql.xml:371 +#, no-c-format +msgid "You may use arithmetic operators, concatenation, and recognized SQL functions in the select clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:376 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:378 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:380 +#, no-c-format +msgid "The distinct and all keywords may be used and have the same semantics as in SQL." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:385 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:390 +#, no-c-format +msgid "Polymorphic queries" +msgstr "" + +#. Tag: para +#: query_hql.xml:392 +#, no-c-format +msgid "A query like:" +msgstr "" + +#. Tag: para +#: query_hql.xml:398 +#, no-c-format +msgid "returns instances not only of Cat, but also of subclasses like DomesticCat. Hibernate queries may name any Java class or interface in the from clause. The query will return instances of all persistent classes that extend that class or implement the interface. The following query would return all persistent objects:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:406 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:408 +#, no-c-format +msgid "The interface Named might be implemented by various persistent classes:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "Note that these last two queries will require more than one SQL SELECT. This means that the order by clause does not correctly order the whole result set. (It also means you can't call these queries using Query.scroll().)" +msgstr "" + +#. Tag: title +#: query_hql.xml:424 +#, no-c-format +msgid "The where clause" +msgstr "" + +#. Tag: para +#: query_hql.xml:426 +#, no-c-format +msgid "The where clause allows you to narrow the list of instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:431 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:433 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:443 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:445 +#, no-c-format +msgid "will return all instances of Foo for which there exists an instance of bar with a date property equal to the startDate property of the Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:454 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:456 +#, no-c-format +msgid "This query translates to an SQL query with a table (inner) join. If you were to write something like" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:461 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:463 +#, no-c-format +msgid "you would end up with a query that would require four table joins in SQL." +msgstr "" + +#. Tag: para +#: query_hql.xml:467 +#, no-c-format +msgid "The = operator may be used to compare not only properties, but also instances:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:472 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:474 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:476 +#, no-c-format +msgid "The special property (lowercase) id may be used to reference the unique identifier of an object. See for more information." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:482 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:484 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "" + +#. Tag: para +#: query_hql.xml:488 +#, no-c-format +msgid "Properties of composite identifiers may also be used. Suppose Person has a composite identifier consisting of country and medicareNumber. Again, see for more information regarding referencing identifier properties." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:495 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:497 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:499 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "" + +#. Tag: para +#: query_hql.xml:503 +#, no-c-format +msgid "Likewise, the special property class accesses the discriminator value of an instance in the case of polymorphic persistence. A Java class name embedded in the where clause will be translated to its discriminator value." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:509 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:511 +#, no-c-format +msgid "You may also use components or composite user types, or properties of said component types. See for more details." +msgstr "" + +#. Tag: para +#: query_hql.xml:516 +#, no-c-format +msgid "An \"any\" type has the special properties id and class, allowing us to express a join in the following way (where AuditLog.item is a property mapped with <any>)." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:522 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:524 +#, no-c-format +msgid "Notice that log.item.class and payment.class would refer to the values of completely different database columns in the above query." +msgstr "" + +#. Tag: title +#: query_hql.xml:532 +#, no-c-format +msgid "Expressions" +msgstr "" + +#. Tag: para +#: query_hql.xml:534 +#, no-c-format +msgid "Expressions allowed in the where clause include most of the kind of things you could write in SQL:" +msgstr "" + +#. Tag: para +#: query_hql.xml:541 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "" + +#. Tag: para +#: query_hql.xml:546 +#, no-c-format +msgid "binary comparison operators =, >=, <=, <>, !=, like" +msgstr "" + +#. Tag: para +#: query_hql.xml:551 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "in, not in, between, is null, is not null, is empty, is not empty, member of and not member of" +msgstr "" + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "\"Simple\" case, case ... when ... then ... else ... end, and \"searched\" case, case when ... then ... else ... end" +msgstr "" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "string concatenation ...||... or concat(...,...)" +msgstr "" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "current_date(), current_time(), current_timestamp()" +msgstr "" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "second(...), minute(...), hour(...), day(...), month(...), year(...)," +msgstr "" + +#. Tag: para +#: query_hql.xml:598 +#, no-c-format +msgid "Any function or operator defined by EJB-QL 3.0: substring(), trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +msgstr "" + +#. Tag: para +#: query_hql.xml:604 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "" + +#. Tag: para +#: query_hql.xml:609 +#, no-c-format +msgid "str() for converting numeric or temporal values to a readable string" +msgstr "" + +#. Tag: para +#: query_hql.xml:615 +#, no-c-format +msgid "cast(... as ...), where the second argument is the name of a Hibernate type, and extract(... from ...) if ANSI cast() and extract() is supported by the underlying database" +msgstr "" + +#. Tag: para +#: query_hql.xml:623 +#, no-c-format +msgid "the HQL index() function, that applies to aliases of a joined indexed collection" +msgstr "" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "HQL functions that take collection-valued path expressions: size(), minelement(), maxelement(), minindex(), maxindex(), along with the special elements() and indices functions which may be quantified using some, all, exists, any, in." +msgstr "" + +#. Tag: para +#: query_hql.xml:637 +#, no-c-format +msgid "Any database-supported SQL scalar function like sign(), trunc(), rtrim(), sin()" +msgstr "" + +#. Tag: para +#: query_hql.xml:643 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "" + +#. Tag: para +#: query_hql.xml:648 +#, no-c-format +msgid "named parameters :name, :start_date, :x1" +msgstr "" + +#. Tag: para +#: query_hql.xml:653 +#, no-c-format +msgid "SQL literals 'foo', 69, 6.66E+2, '1970-01-01 10:00:01.0'" +msgstr "" + +#. Tag: para +#: query_hql.xml:659 +#, no-c-format +msgid "Java public static final constants eg.Color.TABBY" +msgstr "" + +#. Tag: para +#: query_hql.xml:665 +#, no-c-format +msgid "in and between may be used as follows:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:669 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:671 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:673 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:677 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:679 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:681 +#, no-c-format +msgid "Likewise, is null and is not null may be used to test for null values." +msgstr "" + +#. Tag: para +#: query_hql.xml:686 +#, no-c-format +msgid "Booleans may be easily used in expressions by declaring HQL query substitutions in Hibernate configuration:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:691 +#, no-c-format +msgid "true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:693 +#, no-c-format +msgid "This will replace the keywords true and false with the literals 1 and 0 in the translated SQL from this HQL:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:698 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:700 +#, no-c-format +msgid "You may test the size of a collection with the special property size, or the special size() function." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:709 +#, no-c-format +msgid "For indexed collections, you may refer to the minimum and maximum indices using minindex and maxindex functions. Similarly, you may refer to the minimum and maximum elements of a collection of basic type using the minelement and maxelement functions." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:717 +#, no-c-format +msgid " current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:719 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:721 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:723 +#, no-c-format +msgid "The SQL functions any, some, all, exists, in are supported when passed the element or index set of a collection (elements and indices functions) or the result of a subquery (see below)." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:735 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:737 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:739 +#, no-c-format +msgid "Note that these constructs - size, elements, indices, minindex, maxindex, minelement, maxelement - may only be used in the where clause in Hibernate3." +msgstr "" + +#. Tag: para +#: query_hql.xml:746 +#, no-c-format +msgid "Elements of indexed collections (arrays, lists, maps) may be referred to by index (in a where clause only):" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:751 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:753 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:755 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:757 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:759 +#, no-c-format +msgid "The expression inside [] may even be an arithmetic expression." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:763 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:765 +#, no-c-format +msgid "HQL also provides the built-in index() function, for elements of a one-to-many association or collection of values." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:770 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "If you are not yet convinced by all this, think how much longer and less readable the following query would be in SQL:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:783 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:785 +#, no-c-format +msgid "Hint: something like" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:789 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:794 +#, no-c-format +msgid "The order by clause" +msgstr "" + +#. Tag: para +#: query_hql.xml:796 +#, no-c-format +msgid "The list returned by a query may be ordered by any property of a returned class or components:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:800 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:802 +#, no-c-format +msgid "The optional asc or desc indicate ascending or descending order respectively." +msgstr "" + +#. Tag: title +#: query_hql.xml:809 +#, no-c-format +msgid "The group by clause" +msgstr "" + +#. Tag: para +#: query_hql.xml:811 +#, no-c-format +msgid "A query that returns aggregate values may be grouped by any property of a returned class or components:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:815 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:817 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:819 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:823 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:825 +#, no-c-format +msgid "SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the underlying database (eg. not in MySQL)." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" + " 100\n" + "order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:833 +#, no-c-format +msgid "Note that neither the group by clause nor the order by clause may contain arithmetic expressions. Also note that Hibernate currently does not expand a grouped entity, so you can't write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties explicitly." +msgstr "" + +#. Tag: title +#: query_hql.xml:845 +#, no-c-format +msgid "Subqueries" +msgstr "" + +#. Tag: para +#: query_hql.xml:847 +#, no-c-format +msgid "For databases that support subselects, Hibernate supports subqueries within queries. A subquery must be surrounded by parentheses (often by an SQL aggregate function call). Even correlated subqueries (subqueries that refer to an alias in the outer query) are allowed." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:853 +#, no-c-format +msgid "" + " (\n" + " select avg(cat.weight) from DomesticCat cat\n" + ")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:855 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:857 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:859 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:861 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:863 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" + +#. Tag: para +#: query_hql.xml:867 +#, no-c-format +msgid "Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" + +#. Tag: title +#: query_hql.xml:875 +#, no-c-format +msgid "HQL examples" +msgstr "" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "Hibernate queries can be quite powerful and complex. In fact, the power of the query language is one of Hibernate's main selling points. Here are some example queries very similar to queries that I used on a recent project. Note that most queries you will write are much simpler than these!" +msgstr "" + +#. Tag: para +#: query_hql.xml:883 +#, no-c-format +msgid "The following query returns the order id, number of items and total value of the order for all unpaid orders for a particular customer and given minimum total value, ordering the results by total value. In determining the prices, it uses the current catalog. The resulting SQL query, against the ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has four inner joins and an (uncorrelated) subselect." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" + "= all (\n" + " select cat.effectiveDate\n" + " from Catalog as cat\n" + " where cat.effectiveDate < sysdate\n" + " )\n" + "group by order\n" + "having sum(price.amount) > :minAmount\n" + "order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "What a monster! Actually, in real life, I'm not very keen on subqueries, so my query was really more like this:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:899 +#, no-c-format +msgid "" + " :minAmount\n" + "order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:901 +#, no-c-format +msgid "The next query counts the number of payments in each status, excluding all payments in the AWAITING_APPROVAL status where the most recent status change was made by the current user. It translates to an SQL query with two inner joins and a correlated subselect against the PAYMENT, PAYMENT_STATUS and PAYMENT_STATUS_CHANGE tables." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" + " PaymentStatus.AWAITING_APPROVAL\n" + " or (\n" + " statusChange.timeStamp = (\n" + " select max(change.timeStamp)\n" + " from PaymentStatusChange change\n" + " where change.payment = payment\n" + " )\n" + " and statusChange.user <> :currentUser\n" + " )\n" + "group by status.name, status.sortOrder\n" + "order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:911 +#, no-c-format +msgid "If I would have mapped the statusChanges collection as a list, instead of a set, the query would have been much simpler to write." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:916 +#, no-c-format +msgid "" + " PaymentStatus.AWAITING_APPROVAL\n" + " or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :currentUser\n" + "group by status.name, status.sortOrder\n" + "order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:918 +#, no-c-format +msgid "The next query uses the MS SQL Server isNull() function to return all the accounts and unpaid payments for the organization to which the current user belongs. It translates to an SQL query with three inner joins, an outer join and a subselect against the ACCOUNT, PAYMENT, PAYMENT_STATUS, ACCOUNT_TYPE, ORGANIZATION and ORG_USER tables." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:927 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:929 +#, no-c-format +msgid "For some databases, we would need to do away with the (correlated) subselect." +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:933 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_hql.xml:938 +#, no-c-format +msgid "Bulk update and delete" +msgstr "" + +#. Tag: para +#: query_hql.xml:940 +#, no-c-format +msgid "HQL now supports update, delete and insert ... select ... statements. See for details." +msgstr "" + +#. Tag: title +#: query_hql.xml:948 +#, no-c-format +msgid "Tips & Tricks" +msgstr "" + +#. Tag: para +#: query_hql.xml:950 +#, no-c-format +msgid "You can count the number of query results without actually returning them:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:954 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:956 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:960 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:962 +#, no-c-format +msgid "If your database supports subselects, you can place a condition upon selection size in the where clause of your query:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:967 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:969 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:973 +#, no-c-format +msgid "" + "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:975 +#, no-c-format +msgid "As this solution can't return a User with zero messages because of the inner join, the following form is also useful:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:982 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:986 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:988 +#, no-c-format +msgid "Collections are pageable by using the Query interface with a filter:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:992 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:994 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:998 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1000 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1004 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:1009 +#, no-c-format +msgid "Components" +msgstr "" + +#. Tag: para +#: query_hql.xml:1011 +#, no-c-format +msgid "Components might be used in just about every way that simple value types can be used in HQL queries. They can appear in the select clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1016 query_hql.xml:1062 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1017 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1019 +#, no-c-format +msgid "where the Person's name property is a component. Components can also be used in the where clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1024 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1031 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "Another common use of components is in row value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1040 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:1042 +#, no-c-format +msgid "HQL supports the use of ANSI SQL row value constructor syntax (sometimes called tuple syntax), even though the underlying database may not support that notion. Here we are generally referring to multi-valued comparisons, typically associated with components. Consider an entity Person which defines a name component:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1049 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1051 +#, no-c-format +msgid "That's valid syntax, although a little verbose. It be nice to make this a bit more concise and use row value constructor syntax:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1056 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1058 +#, no-c-format +msgid "It can also be useful to specify this in the select clause:" +msgstr "" + +#. Tag: para +#: query_hql.xml:1064 +#, no-c-format +msgid "Another time using row value constructor syntax can be beneficial is when using subqueries needing to compare against multiple values:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1069 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1071 +#, no-c-format +msgid "One thing to consider when deciding if you want to use this syntax is that the query will be dependent upon the ordering of the component sub-properties in the metadata." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/query_sql.pot b/documentation/envers/src/main/docbook/pot/content/query_sql.pot new file mode 100644 index 0000000000..67a2035612 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/query_sql.pot @@ -0,0 +1,1112 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:29 +#, no-c-format +msgid "Native SQL" +msgstr "" + +#. Tag: para +#: query_sql.xml:31 +#, no-c-format +msgid "You may also express queries in the native SQL dialect of your database. This is useful if you want to utilize database specific features such as query hints or the CONNECT keyword in Oracle. It also provides a clean migration path from a direct SQL/JDBC based application to Hibernate." +msgstr "" + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "Hibernate3 allows you to specify handwritten SQL (including stored procedures) for all create, update, delete, and load operations." +msgstr "" + +#. Tag: title +#: query_sql.xml:41 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "" + +#. Tag: para +#: query_sql.xml:43 +#, no-c-format +msgid "Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session.createSQLQuery(). The following describes how to use this API for querying." +msgstr "" + +#. Tag: title +#: query_sql.xml:49 +#, no-c-format +msgid "Scalar queries" +msgstr "" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:54 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:56 +#, no-c-format +msgid "These will both return a List of Object arrays (Object[]) with scalar values for each column in the CATS table. Hibernate will use ResultSetMetadata to deduce the actual order and types of the returned scalar values." +msgstr "" + +#. Tag: para +#: query_sql.xml:61 +#, no-c-format +msgid "To avoid the overhead of using ResultSetMetadata or simply to be more explicit in what is returned one can use addScalar()." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:65 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:67 query_sql.xml:113 query_sql.xml:194 query_sql.xml:345 +#, no-c-format +msgid "This query specified:" +msgstr "" + +#. Tag: para +#: query_sql.xml:71 query_sql.xml:117 query_sql.xml:349 +#, no-c-format +msgid "the SQL query string" +msgstr "" + +#. Tag: para +#: query_sql.xml:75 +#, no-c-format +msgid "the columns and types to return" +msgstr "" + +#. Tag: para +#: query_sql.xml:79 +#, no-c-format +msgid "This will still return Object arrays, but now it will not use ResultSetMetadata but will instead explicitly get the ID, NAME and BIRTHDATE column as respectively a Long, String and a Short from the underlying resultset. This also means that only these three columns will be returned, even though the query is using * and could return more than the three listed columns." +msgstr "" + +#. Tag: para +#: query_sql.xml:87 +#, no-c-format +msgid "It is possible to leave out the type information for all or some of the scalars." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:90 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:92 +#, no-c-format +msgid "This is essentially the same query as before, but now ResultSetMetaData is used to decide the type of NAME and BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" + +#. Tag: para +#: query_sql.xml:96 +#, no-c-format +msgid "How the java.sql.Types returned from ResultSetMetaData is mapped to Hibernate types is controlled by the Dialect. If a specific type is not mapped or does not result in the expected type it is possible to customize it via calls to registerHibernateType in the Dialect." +msgstr "" + +#. Tag: title +#: query_sql.xml:104 +#, no-c-format +msgid "Entity queries" +msgstr "" + +#. Tag: para +#: query_sql.xml:106 +#, no-c-format +msgid "The above queries were all about returning scalar values, basically returning the \"raw\" values from the resultset. The following shows how to get entity objects from a native sql query via addEntity()." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:111 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "the entity returned by the query" +msgstr "" + +#. Tag: para +#: query_sql.xml:125 +#, no-c-format +msgid "Assuming that Cat is mapped as a class with the columns ID, NAME and BIRTHDATE the above queries will both return a List where each element is a Cat entity." +msgstr "" + +#. Tag: para +#: query_sql.xml:129 +#, no-c-format +msgid "If the entity is mapped with a many-to-one to another entity it is required to also return this when performing the native query, otherwise a database specific \"column not found\" error will occur. The additional columns will automatically be returned when using the * notation, but we prefer to be explicit as in the following example for a many-to-one to a Dog:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:137 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:139 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "" + +#. Tag: title +#: query_sql.xml:143 +#, no-c-format +msgid "Handling associations and collections" +msgstr "" + +#. Tag: para +#: query_sql.xml:145 +#, no-c-format +msgid "It is possible to eagerly join in the Dog to avoid the possible extra roundtrip for initializing the proxy. This is done via the addJoin() method, which allows you to join in an association or collection." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:152 +#, no-c-format +msgid "In this example the returned Cat's will have their dog property fully initialized without any extra roundtrip to the database. Notice that we added a alias name (\"cat\") to be able to specify the target property path of the join. It is possible to do the same eager joining for collections, e.g. if the Cat had a one-to-many to Dog instead." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:160 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:162 +#, no-c-format +msgid "At this stage we are reaching the limits of what is possible with native queries without starting to enhance the sql queries to make them usable in Hibernate; the problems starts to arise when returning multiple entities of the same type or when the default alias/column names are not enough." +msgstr "" + +#. Tag: title +#: query_sql.xml:170 +#, no-c-format +msgid "Returning multiple entities" +msgstr "" + +#. Tag: para +#: query_sql.xml:172 +#, no-c-format +msgid "Until now the result set column names are assumed to be the same as the column names specified in the mapping document. This can be problematic for SQL queries which join multiple tables, since the same column names may appear in more than one table." +msgstr "" + +#. Tag: para +#: query_sql.xml:177 +#, no-c-format +msgid "Column alias injection is needed in the following query (which most likely will fail):" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:180 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:182 +#, no-c-format +msgid "The intention for this query is to return two Cat instances per row, a cat and its mother. This will fail since there is a conflict of names since they are mapped to the same column names and on some databases the returned column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. which are not equal to the columns specified in the mappings (\"ID\" and \"NAME\")." +msgstr "" + +#. Tag: para +#: query_sql.xml:189 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:198 +#, no-c-format +msgid "the SQL query string, with placeholders for Hibernate to inject column aliases" +msgstr "" + +#. Tag: para +#: query_sql.xml:203 +#, no-c-format +msgid "the entities returned by the query" +msgstr "" + +#. Tag: para +#: query_sql.xml:207 +#, no-c-format +msgid "The {cat.*} and {mother.*} notation used above is a shorthand for \"all properties\". Alternatively, you may list the columns explicitly, but even in this case we let Hibernate inject the SQL column aliases for each property. The placeholder for a column alias is just the property name qualified by the table alias. In the following example, we retrieve Cats and their mothers from a different table (cat_log) to the one declared in the mapping metadata. Notice that we may even use the property aliases in the where clause if we like." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:216 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:219 +#, no-c-format +msgid "Alias and property references" +msgstr "" + +#. Tag: para +#: query_sql.xml:221 +#, no-c-format +msgid "For most cases the above alias injection is needed, but for queries relating to more complex mappings like composite properties, inheritance discriminators, collections etc. there are some specific aliases to use to allow Hibernate to inject the proper aliases." +msgstr "" + +#. Tag: para +#: query_sql.xml:226 +#, no-c-format +msgid "The following table shows the different possibilities of using the alias injection. Note: the alias names in the result are examples, each alias will have a unique and probably different name when used." +msgstr "" + +#. Tag: title +#: query_sql.xml:232 +#, no-c-format +msgid "Alias injection names" +msgstr "" + +#. Tag: entry +#: query_sql.xml:243 +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: entry +#: query_sql.xml:245 +#, no-c-format +msgid "Syntax" +msgstr "" + +#. Tag: entry +#: query_sql.xml:247 +#, no-c-format +msgid "Example" +msgstr "" + +#. Tag: entry +#: query_sql.xml:253 +#, no-c-format +msgid "A simple property" +msgstr "" + +#. Tag: literal +#: query_sql.xml:255 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "" + +#. Tag: literal +#: query_sql.xml:257 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:261 +#, no-c-format +msgid "A composite property" +msgstr "" + +#. Tag: literal +#: query_sql.xml:263 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:265 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "All properties of an entity" +msgstr "" + +#. Tag: literal +#: query_sql.xml:280 query_sql.xml:328 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "{item.*}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "A collection key" +msgstr "" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "The id of an collection" +msgstr "" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "The element of an collection" +msgstr "" + +#. Tag: literal +#: query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:310 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "" + +#. Tag: literal +#: query_sql.xml:312 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:314 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:318 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "" + +#. Tag: literal +#: query_sql.xml:320 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "" + +#. Tag: literal +#: query_sql.xml:322 +#, no-c-format +msgid "{coll.element.*}" +msgstr "" + +#. Tag: entry +#: query_sql.xml:326 +#, no-c-format +msgid "All properties of the the collection" +msgstr "" + +#. Tag: literal +#: query_sql.xml:330 +#, no-c-format +msgid "{coll.*}" +msgstr "" + +#. Tag: title +#: query_sql.xml:339 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "" + +#. Tag: para +#: query_sql.xml:341 +#, no-c-format +msgid "It is possible to apply a ResultTransformer to native sql queries. Allowing it to e.g. return non-managed entities." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:343 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:353 +#, no-c-format +msgid "a result transformer" +msgstr "" + +#. Tag: para +#: query_sql.xml:357 +#, no-c-format +msgid "The above query will return a list of CatDTO which has been instantiated and injected the values of NAME and BIRTHNAME into its corresponding properties or fields." +msgstr "" + +#. Tag: title +#: query_sql.xml:364 +#, no-c-format +msgid "Handling inheritance" +msgstr "" + +#. Tag: para +#: query_sql.xml:366 +#, no-c-format +msgid "Native sql queries which query for entities that is mapped as part of an inheritance must include all properties for the baseclass and all it subclasses." +msgstr "" + +#. Tag: title +#: query_sql.xml:372 +#, no-c-format +msgid "Parameters" +msgstr "" + +#. Tag: para +#: query_sql.xml:374 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:385 +#, no-c-format +msgid "Named SQL queries" +msgstr "" + +#. Tag: para +#: query_sql.xml:387 +#, no-c-format +msgid "Named SQL queries may be defined in the mapping document and called in exactly the same way as a named HQL query. In this case, we do not need to call addEntity()." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:392 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex}\n" + " FROM PERSON person\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:394 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:396 +#, no-c-format +msgid "The <return-join> and <load-collection> elements are used to join associations and define queries which initialize collections, respectively." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:401 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex},\n" + " address.STREET AS {address.street},\n" + " address.CITY AS {address.city},\n" + " address.STATE AS {address.state},\n" + " address.ZIP AS {address.zip}\n" + " FROM PERSON person\n" + " JOIN ADDRESS address\n" + " ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:403 +#, no-c-format +msgid "A named SQL query may return a scalar value. You must declare the column alias and Hibernate type using the <return-scalar> element:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:407 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " SELECT p.NAME AS name,\n" + " p.AGE AS age,\n" + " FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:409 +#, no-c-format +msgid "You can externalize the resultset mapping informations in a <resultset> element to either reuse them across several named queries or through the setResultSetMapping() API." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:414 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "\n" + "\n" + "\n" + " SELECT person.NAME AS {person.name},\n" + " person.AGE AS {person.age},\n" + " person.SEX AS {person.sex},\n" + " address.STREET AS {address.street},\n" + " address.CITY AS {address.city},\n" + " address.STATE AS {address.state},\n" + " address.ZIP AS {address.zip}\n" + " FROM PERSON person\n" + " JOIN ADDRESS address\n" + " ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" + " WHERE person.NAME LIKE :namePattern\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:416 +#, no-c-format +msgid "You can alternatively use the resultset mapping information in your hbm files directly in java code." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:419 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:422 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "" + +#. Tag: para +#: query_sql.xml:425 +#, no-c-format +msgid "With <return-property> you can explicitly tell Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:430 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " SELECT person.NAME AS myName,\n" + " person.AGE AS myAge,\n" + " person.SEX AS mySex,\n" + " FROM PERSON person WHERE person.NAME LIKE :name\n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:432 +#, no-c-format +msgid "<return-property> also works with multiple columns. This solves a limitation with the {}-syntax which can not allow fine grained control of multi-column properties." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:437 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" + " STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" + " REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" + " FROM EMPLOYMENT\n" + " WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" + " ORDER BY STARTDATE ASC\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:439 +#, no-c-format +msgid "Notice that in this example we used <return-property> in combination with the {}-syntax for injection. Allowing users to choose how they want to refer column and properties." +msgstr "" + +#. Tag: para +#: query_sql.xml:444 +#, no-c-format +msgid "If your mapping has a discriminator you must use <return-discriminator> to specify the discriminator column." +msgstr "" + +#. Tag: title +#: query_sql.xml:450 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "" + +#. Tag: para +#: query_sql.xml:452 +#, no-c-format +msgid "Hibernate 3 introduces support for queries via stored procedures and functions. Most of the following documentation is equivalent for both. The stored procedure/function must return a resultset as the first out-parameter to be able to work with Hibernate. An example of such a stored function in Oracle 9 and higher is as follows:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:458 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: query_sql.xml:460 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:463 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " { ? = call selectAllEmployments() }\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:465 +#, no-c-format +msgid "Notice stored procedures currently only return scalars and entities. <return-join> and <load-collection> are not supported." +msgstr "" + +#. Tag: title +#: query_sql.xml:470 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "" + +#. Tag: para +#: query_sql.xml:472 +#, no-c-format +msgid "To use stored procedures with Hibernate the procedures/functions have to follow some rules. If they do not follow those rules they are not usable with Hibernate. If you still want to use these procedures you have to execute them via session.connection(). The rules are different for each database, since database vendors have different stored procedure semantics/syntax." +msgstr "" + +#. Tag: para +#: query_sql.xml:479 +#, no-c-format +msgid "Stored procedure queries can't be paged with setFirstResult()/setMaxResults()." +msgstr "" + +#. Tag: para +#: query_sql.xml:482 +#, no-c-format +msgid "Recommended call form is standard SQL92: { ? = call functionName(<parameters>) } or { ? = call procedureName(<parameters>}. Native call syntax is not supported." +msgstr "" + +#. Tag: para +#: query_sql.xml:487 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "" + +#. Tag: para +#: query_sql.xml:491 +#, no-c-format +msgid "A function must return a result set. The first parameter of a procedure must be an OUT that returns a result set. This is done by using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle you need to define a REF CURSOR type, see Oracle literature." +msgstr "" + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "" + +#. Tag: para +#: query_sql.xml:504 +#, no-c-format +msgid "The procedure must return a result set. Note that since these servers can/will return multiple result sets and update counts, Hibernate will iterate the results and take the first result that is a result set as its return value. Everything else will be discarded." +msgstr "" + +#. Tag: para +#: query_sql.xml:512 +#, no-c-format +msgid "If you can enable SET NOCOUNT ON in your procedure it will probably be more efficient, but this is not a requirement." +msgstr "" + +#. Tag: title +#: query_sql.xml:522 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "" + +#. Tag: para +#: query_sql.xml:524 +#, no-c-format +msgid "Hibernate3 can use custom SQL statements for create, update, and delete operations. The class and collection persisters in Hibernate already contain a set of configuration time generated strings (insertsql, deletesql, updatesql etc.). The mapping tags <sql-insert>, <sql-delete>, and <sql-update> override these strings:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:532 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" + " UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" + " DELETE FROM PERSON WHERE ID=?\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:534 +#, no-c-format +msgid "The SQL is directly executed in your database, so you are free to use any dialect you like. This will of course reduce the portability of your mapping if you use database specific SQL." +msgstr "" + +#. Tag: para +#: query_sql.xml:538 +#, no-c-format +msgid "Stored procedures are supported if the callable attribute is set:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:541 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " {call createPerson (?, ?)}\n" + " {? = call deletePerson (?)}\n" + " {? = call updatePerson (?, ?)}\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:543 +#, no-c-format +msgid "The order of the positional parameters are currently vital, as they must be in the same sequence as Hibernate expects them." +msgstr "" + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "You can see the expected order by enabling debug logging for the org.hibernate.persister.entity level. With this level enabled Hibernate will print out the static SQL that is used to create, update, delete etc. entities. (To see the expected sequence, remember to not include your custom SQL in the mapping files as that will override the Hibernate generated static sql.)" +msgstr "" + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "The stored procedures are in most cases (read: better do it than not) required to return the number of rows inserted/updated/deleted, as Hibernate has some runtime checks for the success of the statement. Hibernate always registers the first statement parameter as a numeric output parameter for the CUD operations:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:559 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: query_sql.xml:563 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "" + +#. Tag: para +#: query_sql.xml:565 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:568 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT NAME AS {pers.name}, ID AS {pers.id}\n" + " FROM PERSON\n" + " WHERE ID=?\n" + " FOR UPDATE\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:570 +#, no-c-format +msgid "This is just a named query declaration, as discussed earlier. You may reference this named query in a class mapping:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:573 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:575 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "" + +#. Tag: para +#: query_sql.xml:577 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:579 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:581 +#, no-c-format +msgid "" + "\n" + " \n" + " SELECT {emp.*}\n" + " FROM EMPLOYMENT emp\n" + " WHERE EMPLOYER = :id\n" + " ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" + "]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:583 +#, no-c-format +msgid "You could even define an entity loader that loads a collection by join fetching:" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:586 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " SELECT NAME AS {pers.*}, {emp.*}\n" + " FROM PERSON pers\n" + " LEFT OUTER JOIN EMPLOYMENT emp\n" + " ON pers.ID = emp.PERSON_ID\n" + " WHERE ID=?\n" + "]]>" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/session_api.pot b/documentation/envers/src/main/docbook/pot/content/session_api.pot new file mode 100644 index 0000000000..5f68d4b4b3 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/session_api.pot @@ -0,0 +1,1354 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:29 +#, no-c-format +msgid "Working with objects" +msgstr "" + +#. Tag: para +#: session_api.xml:31 +#, no-c-format +msgid "Hibernate is a full object/relational mapping solution that not only shields the developer from the details of the underlying database management system, but also offers state management of objects. This is, contrary to the management of SQL statements in common JDBC/SQL persistence layers, a very natural object-oriented view of persistence in Java applications." +msgstr "" + +#. Tag: para +#: session_api.xml:40 +#, no-c-format +msgid "In other words, Hibernate application developers should always think about the state of their objects, and not necessarily about the execution of SQL statements. This part is taken care of by Hibernate and is only relevant for the application developer when tuning the performance of the system." +msgstr "" + +#. Tag: title +#: session_api.xml:48 +#, no-c-format +msgid "Hibernate object states" +msgstr "" + +#. Tag: para +#: session_api.xml:50 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "" + +#. Tag: para +#: session_api.xml:56 +#, no-c-format +msgid "Transient - an object is transient if it has just been instantiated using the new operator, and it is not associated with a Hibernate Session. It has no persistent representation in the database and no identifier value has been assigned. Transient instances will be destroyed by the garbage collector if the application doesn't hold a reference anymore. Use the Hibernate Session to make an object persistent (and let Hibernate take care of the SQL statements that need to be executed for this transition)." +msgstr "" + +#. Tag: para +#: session_api.xml:68 +#, no-c-format +msgid "Persistent - a persistent instance has a representation in the database and an identifier value. It might just have been saved or loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent state and synchronize the state with the database when the unit of work completes. Developers don't execute manual UPDATE statements, or DELETE statements when an object should be made transient." +msgstr "" + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "Detached - a detached instance is an object that has been persistent, but its Session has been closed. The reference to the object is still valid, of course, and the detached instance might even be modified in this state. A detached instance can be reattached to a new Session at a later point in time, making it (and all the modifications) persistent again. This feature enables a programming model for long running units of work that require user think-time. We call them application transactions, i.e. a unit of work from the point of view of the user." +msgstr "" + +#. Tag: para +#: session_api.xml:93 +#, no-c-format +msgid "We'll now discuss the states and state transitions (and the Hibernate methods that trigger a transition) in more detail." +msgstr "" + +#. Tag: title +#: session_api.xml:101 +#, no-c-format +msgid "Making objects persistent" +msgstr "" + +#. Tag: para +#: session_api.xml:103 +#, no-c-format +msgid "Newly instantiated instances of a a persistent class are considered transient by Hibernate. We can make a transient instance persistent by associating it with a session:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:110 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:112 +#, no-c-format +msgid "If Cat has a generated identifier, the identifier is generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned to the cat instance before calling save(). You may also use persist() instead of save(), with the semantics defined in the EJB3 early draft." +msgstr "" + +#. Tag: para +#: session_api.xml:124 +#, no-c-format +msgid "persist() makes a transient instance persistent. However, it doesn't guarantee that the identifier value will be assigned to the persistent instance immediately, the assignment might happen at flush time. persist() also guarantees that it will not execute an INSERT statement if it is called outside of transaction boundaries. This is useful in long-running conversations with an extended Session/persistence context." +msgstr "" + +#. Tag: para +#: session_api.xml:135 +#, no-c-format +msgid "save() does guarantee to return an identifier. If an INSERT has to be executed to get the identifier ( e.g. \"identity\" generator, not \"sequence\"), this INSERT happens immediately, no matter if you are inside or outside of a transaction. This is problematic in a long-running conversation with an extended Session/persistence context." +msgstr "" + +#. Tag: para +#: session_api.xml:145 +#, no-c-format +msgid "Alternatively, you may assign the identifier using an overloaded version of save()." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:150 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:152 +#, no-c-format +msgid "If the object you make persistent has associated objects (e.g. the kittens collection in the previous example), these objects may be made persistent in any order you like unless you have a NOT NULL constraint upon a foreign key column. There is never a risk of violating foreign key constraints. However, you might violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "Usually you don't bother with this detail, as you'll very likely use Hibernate's transitive persistence feature to save the associated objects automatically. Then, even NOT NULL constraint violations don't occur - Hibernate will take care of everything. Transitive persistence is discussed later in this chapter." +msgstr "" + +#. Tag: title +#: session_api.xml:173 +#, no-c-format +msgid "Loading an object" +msgstr "" + +#. Tag: para +#: session_api.xml:175 +#, no-c-format +msgid "The load() methods of Session gives you a way to retrieve a persistent instance if you already know its identifier. load() takes a class object and will load the state into a newly instantiated instance of that class, in persistent state." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:182 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:184 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:186 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:190 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:192 +#, no-c-format +msgid "Note that load() will throw an unrecoverable exception if there is no matching database row. If the class is mapped with a proxy, load() just returns an uninitialized proxy and does not actually hit the database until you invoke a method of the proxy. This behaviour is very useful if you wish to create an association to an object without actually loading it from the database. It also allows multiple instances to be loaded as a batch if batch-size is defined for the class mapping." +msgstr "" + +#. Tag: para +#: session_api.xml:203 +#, no-c-format +msgid "If you are not certain that a matching row exists, you should use the get() method, which hits the database immediately and returns null if there is no matching row." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:209 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:211 +#, no-c-format +msgid "You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for more information." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:216 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:218 +#, no-c-format +msgid "Note that any associated instances or contained collections are not selected FOR UPDATE, unless you decide to specify lock or all as a cascade style for the association." +msgstr "" + +#. Tag: para +#: session_api.xml:225 +#, no-c-format +msgid "It is possible to re-load an object and all its collections at any time, using the refresh() method. This is useful when database triggers are used to initialize some of the properties of the object." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:231 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "An important question usually appears at this point: How much does Hibernate load from the database and how many SQL SELECTs will it use? This depends on the fetching strategy and is explained in ." +msgstr "" + +#. Tag: title +#: session_api.xml:243 +#, no-c-format +msgid "Querying" +msgstr "" + +#. Tag: para +#: session_api.xml:245 +#, no-c-format +msgid "If you don't know the identifiers of the objects you are looking for, you need a query. Hibernate supports an easy-to-use but powerful object oriented query language (HQL). For programmatic query creation, Hibernate supports a sophisticated Criteria and Example query feature (QBC and QBE). You may also express your query in the native SQL of your database, with optional support from Hibernate for result set conversion into objects." +msgstr "" + +#. Tag: title +#: session_api.xml:255 +#, no-c-format +msgid "Executing queries" +msgstr "" + +#. Tag: para +#: session_api.xml:257 +#, no-c-format +msgid "HQL and native SQL queries are represented with an instance of org.hibernate.Query. This interface offers methods for parameter binding, result set handling, and for the execution of the actual query. You always obtain a Query using the current Session:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:264 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:266 +#, no-c-format +msgid "A query is usually executed by invoking list(), the result of the query will be loaded completely into a collection in memory. Entity instances retrieved by a query are in persistent state. The uniqueResult() method offers a shortcut if you know your query will only return a single object. Note that queries that make use of eager fetching of collections usually return duplicates of the root objects (but with their collections initialized). You can filter these duplicates simply through a Set." +msgstr "" + +#. Tag: title +#: session_api.xml:278 +#, no-c-format +msgid "Iterating results" +msgstr "" + +#. Tag: para +#: session_api.xml:280 +#, no-c-format +msgid "Occasionally, you might be able to achieve better performance by executing the query using the iterate() method. This will only usually be the case if you expect that the actual entity instances returned by the query will already be in the session or second-level cache. If they are not already cached, iterate() will be slower than list() and might require many database hits for a simple query, usually 1 for the initial select which only returns identifiers, and n additional selects to initialize the actual instances." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:296 +#, no-c-format +msgid "Queries that return tuples" +msgstr "" + +#. Tag: para +#: session_api.xml:298 +#, no-c-format +msgid "Hibernate queries sometimes return tuples of objects, in which case each tuple is returned as an array:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:303 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:308 +#, no-c-format +msgid "Scalar results" +msgstr "" + +#. Tag: para +#: session_api.xml:310 +#, no-c-format +msgid "Queries may specify a property of a class in the select clause. They may even call SQL aggregate functions. Properties or aggregates are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:316 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:321 +#, no-c-format +msgid "Bind parameters" +msgstr "" + +#. Tag: para +#: session_api.xml:323 +#, no-c-format +msgid "Methods on Query are provided for binding values to named parameters or JDBC-style ? parameters. Contrary to JDBC, Hibernate numbers parameters from zero. Named parameters are identifiers of the form :name in the query string. The advantages of named parameters are:" +msgstr "" + +#. Tag: para +#: session_api.xml:333 +#, no-c-format +msgid "named parameters are insensitive to the order they occur in the query string" +msgstr "" + +#. Tag: para +#: session_api.xml:339 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "" + +#. Tag: para +#: session_api.xml:344 +#, no-c-format +msgid "they are self-documenting" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:350 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:352 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:354 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:359 +#, no-c-format +msgid "Pagination" +msgstr "" + +#. Tag: para +#: session_api.xml:361 +#, no-c-format +msgid "If you need to specify bounds upon your result set (the maximum number of rows you want to retrieve and / or the first row you want to retrieve) you should use methods of the Query interface:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:367 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:369 +#, no-c-format +msgid "Hibernate knows how to translate this limit query into the native SQL of your DBMS." +msgstr "" + +#. Tag: title +#: session_api.xml:377 +#, no-c-format +msgid "Scrollable iteration" +msgstr "" + +#. Tag: para +#: session_api.xml:379 +#, no-c-format +msgid "If your JDBC driver supports scrollable ResultSets, the Query interface may be used to obtain a ScrollableResults object, which allows flexible navigation of the query results." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:386 +#, no-c-format +msgid "" + " i++ ) && cats.next() ) pageOfCats.add( cats.get(1) );\n" + "\n" + "}\n" + "cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:388 +#, no-c-format +msgid "Note that an open database connection (and cursor) is required for this functionality, use setMaxResult()/setFirstResult() if you need offline pagination functionality." +msgstr "" + +#. Tag: title +#: session_api.xml:397 +#, no-c-format +msgid "Externalizing named queries" +msgstr "" + +#. Tag: para +#: session_api.xml:399 +#, no-c-format +msgid "You may also define named queries in the mapping document. (Remember to use a CDATA section if your query contains characters that could be interpreted as markup.)" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:405 +#, no-c-format +msgid "" + " ?\n" + "] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:407 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:411 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:413 +#, no-c-format +msgid "Note that the actual program code is independent of the query language that is used, you may also define native SQL queries in metadata, or migrate existing queries to Hibernate by placing them in mapping files." +msgstr "" + +#. Tag: para +#: session_api.xml:419 +#, no-c-format +msgid "Also note that a query declaration inside a <hibernate-mapping> element requires a global unique name for the query, while a query declaration inside a <class> element is made unique automatically by prepending the fully qualified name of the class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" + +#. Tag: title +#: session_api.xml:432 +#, no-c-format +msgid "Filtering collections" +msgstr "" + +#. Tag: para +#: session_api.xml:433 +#, no-c-format +msgid "A collection filter is a special type of query that may be applied to a persistent collection or array. The query string may refer to this, meaning the current collection element." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:439 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:441 +#, no-c-format +msgid "The returned collection is considered a bag, and it's a copy of the given collection. The original collection is not modified (this is contrary to the implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" + +#. Tag: para +#: session_api.xml:447 +#, no-c-format +msgid "Observe that filters do not require a from clause (though they may have one if required). Filters are not limited to returning the collection elements themselves." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:452 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:454 +#, no-c-format +msgid "Even an empty filter query is useful, e.g. to load a subset of elements in a huge collection:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:459 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: session_api.xml:464 +#, no-c-format +msgid "Criteria queries" +msgstr "" + +#. Tag: para +#: session_api.xml:466 +#, no-c-format +msgid "HQL is extremely powerful but some developers prefer to build queries dynamically, using an object-oriented API, rather than building query strings. Hibernate provides an intuitive Criteria query API for these cases:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:472 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:474 +#, no-c-format +msgid "The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" + +#. Tag: title +#: session_api.xml:482 +#, no-c-format +msgid "Queries in native SQL" +msgstr "" + +#. Tag: para +#: session_api.xml:484 +#, no-c-format +msgid "You may express a query in SQL, using createSQLQuery() and let Hibernate take care of the mapping from result sets to objects. Note that you may at any time call session.connection() and use the JDBC Connection directly. If you chose to use the Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:492 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:494 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:496 +#, no-c-format +msgid "SQL queries may contain named and positional parameters, just like Hibernate queries. More information about native SQL queries in Hibernate can be found in ." +msgstr "" + +#. Tag: title +#: session_api.xml:507 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "" + +#. Tag: para +#: session_api.xml:509 +#, no-c-format +msgid "Transactional persistent instances (ie. objects loaded, saved, created or queried by the Session) may be manipulated by the application and any changes to persistent state will be persisted when the Session is flushed (discussed later in this chapter). There is no need to call a particular method (like update(), which has a different purpose) to make your modifications persistent. So the most straightforward way to update the state of an object is to load() it, and then manipulate it directly, while the Session is open:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:520 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:522 +#, no-c-format +msgid "Sometimes this programming model is inefficient since it would require both an SQL SELECT (to load an object) and an SQL UPDATE (to persist its updated state) in the same session. Therefore Hibernate offers an alternate approach, using detached instances." +msgstr "" + +#. Tag: emphasis +#: session_api.xml:530 +#, no-c-format +msgid "Note that Hibernate does not offer its own API for direct execution of UPDATE or DELETE statements. Hibernate is a state management service, you don't have to think in statements to use it. JDBC is a perfect API for executing SQL statements, you can get a JDBC Connection at any time by calling session.connection(). Furthermore, the notion of mass operations conflicts with object/relational mapping for online transaction processing-oriented applications. Future versions of Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" + +#. Tag: title +#: session_api.xml:545 +#, no-c-format +msgid "Modifying detached objects" +msgstr "" + +#. Tag: para +#: session_api.xml:547 +#, no-c-format +msgid "Many applications need to retrieve an object in one transaction, send it to the UI layer for manipulation, then save the changes in a new transaction. Applications that use this kind of approach in a high-concurrency environment usually use versioned data to ensure isolation for the \"long\" unit of work." +msgstr "" + +#. Tag: para +#: session_api.xml:554 +#, no-c-format +msgid "Hibernate supports this model by providing for reattachment of detached instances using the Session.update() or Session.merge() methods:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:560 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:562 +#, no-c-format +msgid "If the Cat with identifier catId had already been loaded by secondSession when the application tried to reattach it, an exception would have been thrown." +msgstr "" + +#. Tag: para +#: session_api.xml:568 +#, no-c-format +msgid "Use update() if you are sure that the session does not contain an already persistent instance with the same identifier, and merge() if you want to merge your modifications at any time without consideration of the state of the session. In other words, update() is usually the first method you would call in a fresh session, ensuring that reattachment of your detached instances is the first operation that is executed." +msgstr "" + +#. Tag: para +#: session_api.xml:577 +#, no-c-format +msgid "The application should individually update() detached instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of course, using transitive persistence, see ." +msgstr "" + +#. Tag: para +#: session_api.xml:584 +#, no-c-format +msgid "The lock() method also allows an application to reassociate an object with a new session. However, the detached instance has to be unmodified!" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:589 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:591 +#, no-c-format +msgid "Note that lock() can be used with various LockModes, see the API documentation and the chapter on transaction handling for more information. Reattachment is not the only usecase for lock()." +msgstr "" + +#. Tag: para +#: session_api.xml:598 +#, no-c-format +msgid "Other models for long units of work are discussed in ." +msgstr "" + +#. Tag: title +#: session_api.xml:605 +#, no-c-format +msgid "Automatic state detection" +msgstr "" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "Hibernate users have requested a general purpose method that either saves a transient instance by generating a new identifier or updates/reattaches the detached instances associated with its current identifier. The saveOrUpdate() method implements this functionality." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:614 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:616 +#, no-c-format +msgid "The usage and semantics of saveOrUpdate() seems to be confusing for new users. Firstly, so long as you are not trying to use instances from one session in another new session, you should not need to use update(), saveOrUpdate(), or merge(). Some whole applications will never use either of these methods." +msgstr "" + +#. Tag: para +#: session_api.xml:624 +#, no-c-format +msgid "Usually update() or saveOrUpdate() are used in the following scenario:" +msgstr "" + +#. Tag: para +#: session_api.xml:631 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "" + +#. Tag: para +#: session_api.xml:636 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "" + +#. Tag: para +#: session_api.xml:641 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "" + +#. Tag: para +#: session_api.xml:646 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "the application persists these modifications by calling update() in a second session" +msgstr "" + +#. Tag: para +#: session_api.xml:658 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "" + +#. Tag: para +#: session_api.xml:664 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "" + +#. Tag: para +#: session_api.xml:669 +#, no-c-format +msgid "if another object associated with the session has the same identifier, throw an exception" +msgstr "" + +#. Tag: para +#: session_api.xml:675 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "" + +#. Tag: para +#: session_api.xml:680 +#, no-c-format +msgid "if the object's identifier has the value assigned to a newly instantiated object, save() it" +msgstr "" + +#. Tag: para +#: session_api.xml:686 +#, no-c-format +msgid "if the object is versioned (by a <version> or <timestamp>), and the version property value is the same value assigned to a newly instantiated object, save() it" +msgstr "" + +#. Tag: para +#: session_api.xml:694 +#, no-c-format +msgid "otherwise update() the object" +msgstr "" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "and merge() is very different:" +msgstr "" + +#. Tag: para +#: session_api.xml:706 +#, no-c-format +msgid "if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance" +msgstr "" + +#. Tag: para +#: session_api.xml:713 +#, no-c-format +msgid "if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance" +msgstr "" + +#. Tag: para +#: session_api.xml:719 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "" + +#. Tag: para +#: session_api.xml:724 +#, no-c-format +msgid "the given instance does not become associated with the session, it remains detached" +msgstr "" + +#. Tag: title +#: session_api.xml:734 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "" + +#. Tag: para +#: session_api.xml:736 +#, no-c-format +msgid "Session.delete() will remove an object's state from the database. Of course, your application might still hold a reference to a deleted object. It's best to think of delete() as making a persistent instance transient." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:743 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:745 +#, no-c-format +msgid "You may delete objects in any order you like, without risk of foreign key constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" + +#. Tag: title +#: session_api.xml:756 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "" + +#. Tag: para +#: session_api.xml:758 +#, no-c-format +msgid "It is occasionally useful to be able to take a graph of persistent instances and make them persistent in a different datastore, without regenerating identifier values." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:764 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:766 +#, no-c-format +msgid "The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" + +#. Tag: para +#: session_api.xml:773 +#, no-c-format +msgid "ReplicationMode.IGNORE - ignore the object when there is an existing database row with the same identifier" +msgstr "" + +#. Tag: para +#: session_api.xml:779 +#, no-c-format +msgid "ReplicationMode.OVERWRITE - overwrite any existing database row with the same identifier" +msgstr "" + +#. Tag: para +#: session_api.xml:785 +#, no-c-format +msgid "ReplicationMode.EXCEPTION - throw an exception if there is an existing database row with the same identifier" +msgstr "" + +#. Tag: para +#: session_api.xml:791 +#, no-c-format +msgid "ReplicationMode.LATEST_VERSION - overwrite the row if its version number is earlier than the version number of the object, or ignore the object otherwise" +msgstr "" + +#. Tag: para +#: session_api.xml:799 +#, no-c-format +msgid "Usecases for this feature include reconciling data entered into different database instances, upgrading system configuration information during product upgrades, rolling back changes made during non-ACID transactions and more." +msgstr "" + +#. Tag: title +#: session_api.xml:808 +#, no-c-format +msgid "Flushing the Session" +msgstr "" + +#. Tag: para +#: session_api.xml:810 +#, no-c-format +msgid "From time to time the Session will execute the SQL statements needed to synchronize the JDBC connection's state with the state of objects held in memory. This process, flush, occurs by default at the following points" +msgstr "" + +#. Tag: para +#: session_api.xml:819 +#, no-c-format +msgid "before some query executions" +msgstr "" + +#. Tag: para +#: session_api.xml:824 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "" + +#. Tag: para +#: session_api.xml:829 +#, no-c-format +msgid "from Session.flush()" +msgstr "" + +#. Tag: para +#: session_api.xml:835 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "" + +#. Tag: para +#: session_api.xml:841 +#, no-c-format +msgid "all entity insertions, in the same order the corresponding objects were saved using Session.save()" +msgstr "" + +#. Tag: para +#: session_api.xml:847 +#, no-c-format +msgid "all entity updates" +msgstr "" + +#. Tag: para +#: session_api.xml:852 +#, no-c-format +msgid "all collection deletions" +msgstr "" + +#. Tag: para +#: session_api.xml:857 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "" + +#. Tag: para +#: session_api.xml:862 +#, no-c-format +msgid "all collection insertions" +msgstr "" + +#. Tag: para +#: session_api.xml:867 +#, no-c-format +msgid "all entity deletions, in the same order the corresponding objects were deleted using Session.delete()" +msgstr "" + +#. Tag: para +#: session_api.xml:874 +#, no-c-format +msgid "(An exception is that objects using native ID generation are inserted when they are saved.)" +msgstr "" + +#. Tag: para +#: session_api.xml:879 +#, no-c-format +msgid "Except when you explicity flush(), there are absolutely no guarantees about when the Session executes the JDBC calls, only the order in which they are executed. However, Hibernate does guarantee that the Query.list(..) will never return stale data; nor will they return the wrong data." +msgstr "" + +#. Tag: para +#: session_api.xml:887 +#, no-c-format +msgid "It is possible to change the default behavior so that flush occurs less frequently. The FlushMode class defines three different modes: only flush at commit time (and only when the Hibernate Transaction API is used), flush automatically using the explained routine, or never flush unless flush() is called explicitly. The last mode is useful for long running units of work, where a Session is kept open and disconnected for a long time (see )." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:897 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: session_api.xml:899 +#, no-c-format +msgid "During flush, an exception might occur (e.g. if a DML operation violates a constraint). Since handling exceptions involves some understanding of Hibernate's transactional behavior, we discuss it in ." +msgstr "" + +#. Tag: title +#: session_api.xml:908 +#, no-c-format +msgid "Transitive persistence" +msgstr "" + +#. Tag: para +#: session_api.xml:910 +#, no-c-format +msgid "It is quite cumbersome to save, delete, or reattach individual objects, especially if you deal with a graph of associated objects. A common case is a parent/child relationship. Consider the following example:" +msgstr "" + +#. Tag: para +#: session_api.xml:916 +#, no-c-format +msgid "If the children in a parent/child relationship would be value typed (e.g. a collection of addresses or strings), their life cycle would depend on the parent and no further action would be required for convenient \"cascading\" of state changes. When the parent is saved, the value-typed child objects are saved as well, when the parent is deleted, the children will be deleted, etc. This even works for operations such as the removal of a child from the collection; Hibernate will detect this and, since value-typed objects can't have shared references, delete the child from the database." +msgstr "" + +#. Tag: para +#: session_api.xml:927 +#, no-c-format +msgid "Now consider the same scenario with parent and child objects being entities, not value-types (e.g. categories and items, or parent and child cats). Entities have their own life cycle, support shared references (so removing an entity from the collection does not mean it can be deleted), and there is by default no cascading of state from one entity to any other associated entities. Hibernate does not implement persistence by reachability by default." +msgstr "" + +#. Tag: para +#: session_api.xml:936 +#, no-c-format +msgid "For each basic operation of the Hibernate session - including persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate() - there is a corresponding cascade style. Respectively, the cascade styles are named create, merge, save-update, delete, lock, refresh, evict, replicate. If you want an operation to be cascaded along an association, you must indicate that in the mapping document. For example:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:945 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:947 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:951 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:953 +#, no-c-format +msgid "You may even use cascade=\"all\" to specify that all operations should be cascaded along the association. The default cascade=\"none\" specifies that no operations are to be cascaded." +msgstr "" + +#. Tag: para +#: session_api.xml:959 +#, no-c-format +msgid "A special cascade style, delete-orphan, applies only to one-to-many associations, and indicates that the delete() operation should be applied to any child object that is removed from the association." +msgstr "" + +#. Tag: para +#: session_api.xml:966 +#, no-c-format +msgid "Recommendations:" +msgstr "" + +#. Tag: para +#: session_api.xml:972 +#, no-c-format +msgid "It doesn't usually make sense to enable cascade on a <many-to-one> or <many-to-many> association. Cascade is often useful for <one-to-one> and <one-to-many> associations." +msgstr "" + +#. Tag: para +#: session_api.xml:980 +#, no-c-format +msgid "If the child object's lifespan is bounded by the lifespan of the parent object, make it a life cycle object by specifying cascade=\"all,delete-orphan\"." +msgstr "" + +#. Tag: para +#: session_api.xml:987 +#, no-c-format +msgid "Otherwise, you might not need cascade at all. But if you think that you will often be working with the parent and children together in the same transaction, and you want to save yourself some typing, consider using cascade=\"persist,merge,save-update\"." +msgstr "" + +#. Tag: para +#: session_api.xml:995 +#, no-c-format +msgid "Mapping an association (either a single valued association, or a collection) with cascade=\"all\" marks the association as a parent/child style relationship where save/update/delete of the parent results in save/update/delete of the child or children." +msgstr "" + +#. Tag: para +#: session_api.xml:1001 +#, no-c-format +msgid "Futhermore, a mere reference to a child from a persistent parent will result in save/update of the child. This metaphor is incomplete, however. A child which becomes unreferenced by its parent is not automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child relationship are as follows:" +msgstr "" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "If a parent is passed to persist(), all children are passed to persist()" +msgstr "" + +#. Tag: para +#: session_api.xml:1018 +#, no-c-format +msgid "If a parent is passed to merge(), all children are passed to merge()" +msgstr "" + +#. Tag: para +#: session_api.xml:1024 +#, no-c-format +msgid "If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to saveOrUpdate()" +msgstr "" + +#. Tag: para +#: session_api.xml:1030 +#, no-c-format +msgid "If a transient or detached child becomes referenced by a persistent parent, it is passed to saveOrUpdate()" +msgstr "" + +#. Tag: para +#: session_api.xml:1036 +#, no-c-format +msgid "If a parent is deleted, all children are passed to delete()" +msgstr "" + +#. Tag: para +#: session_api.xml:1041 +#, no-c-format +msgid "If a child is dereferenced by a persistent parent, nothing special happens - the application should explicitly delete the child if necessary - unless cascade=\"delete-orphan\", in which case the \"orphaned\" child is deleted." +msgstr "" + +#. Tag: para +#: session_api.xml:1050 +#, no-c-format +msgid "Finally, note that cascading of operations can be applied to an object graph at call time or at flush time. All operations, if enabled, are cascaded to associated entities reachable when the operation is executed. However, save-upate and delete-orphan are transitive for all associated entities reachable during flush of the Session." +msgstr "" + +#. Tag: title +#: session_api.xml:1062 +#, no-c-format +msgid "Using metadata" +msgstr "" + +#. Tag: para +#: session_api.xml:1064 +#, no-c-format +msgid "Hibernate requires a very rich meta-level model of all entity and value types. From time to time, this model is very useful to the application itself. For example, the application might use Hibernate's metadata to implement a \"smart\" deep-copy algorithm that understands which objects should be copied (eg. mutable value types) and which should not (eg. immutable value types and, possibly, associated entities)." +msgstr "" + +#. Tag: para +#: session_api.xml:1071 +#, no-c-format +msgid "Hibernate exposes metadata via the ClassMetadata and CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained from the SessionFactory." +msgstr "" + +#. Tag: programlisting +#: session_api.xml:1078 +#, no-c-format +msgid "" + "" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/toolset_guide.pot b/documentation/envers/src/main/docbook/pot/content/toolset_guide.pot new file mode 100644 index 0000000000..b54dd57983 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/toolset_guide.pot @@ -0,0 +1,950 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:29 +#, no-c-format +msgid "Toolset Guide" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:31 +#, no-c-format +msgid "Roundtrip engineering with Hibernate is possible using a set of Eclipse plugins, commandline tools, as well as Ant tasks." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:36 +#, no-c-format +msgid "The Hibernate Tools currently include plugins for the Eclipse IDE as well as Ant tasks for reverse engineering of existing databases:" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:42 +#, no-c-format +msgid "Mapping Editor: An editor for Hibernate XML mapping files, supporting auto-completion and syntax highlighting. It also supports semantic auto-completion for class names and property/field names, making it much more versatile than a normal XML editor." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:47 +#, no-c-format +msgid "Console: The console is a new view in Eclipse. In addition to a tree overview of your console configurations, you also get an interactive view of your persistent classes and their relationships. The console allows you to execute HQL queries against your database and browse the result directly in Eclipse." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:54 +#, no-c-format +msgid "Development Wizards: Several wizards are provided with the Hibernate Eclipse tools; you can use a wizard to quickly generate Hibernate configuration (cfg.xml) files, or you may even completely reverse engineer an existing database schema into POJO source files and Hibernate mapping files. The reverse engineering wizard supports customizable templates." +msgstr "" + +#. Tag: emphasis +#: toolset_guide.xml:62 +#, no-c-format +msgid "Ant Tasks:" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:67 +#, no-c-format +msgid "Please refer to the Hibernate Tools package and it's documentation for more information." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:72 +#, no-c-format +msgid "However, the Hibernate main package comes bundled with an integrated tool (it can even be used from \"inside\" Hibernate on-the-fly): SchemaExport aka hbm2ddl." +msgstr "" + +#. Tag: title +#: toolset_guide.xml:79 +#, no-c-format +msgid "Automatic schema generation" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:81 +#, no-c-format +msgid "DDL may be generated from your mapping files by a Hibernate utility. The generated schema includes referential integrity constraints (primary and foreign keys) for entity and collection tables. Tables and sequences are also created for mapped identifier generators." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:88 +#, no-c-format +msgid "You must specify a SQL Dialect via the hibernate.dialect property when using this tool, as DDL is highly vendor specific." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:94 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "" + +#. Tag: title +#: toolset_guide.xml:99 +#, no-c-format +msgid "Customizing the schema" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:101 +#, no-c-format +msgid "Many Hibernate mapping elements define optional attributes named length, precision and scale. You may set the length, precision and scale of a column with this attribute." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:108 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:109 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:111 +#, no-c-format +msgid "Some tags also accept a not-null attribute (for generating a NOT NULL constraint on table columns) and a unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:117 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:119 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:121 +#, no-c-format +msgid "A unique-key attribute may be used to group columns in a single unique key constraint. Currently, the specified value of the unique-key attribute is not used to name the constraint in the generated DDL, only to group the columns in the mapping file." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:129 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:131 +#, no-c-format +msgid "An index attribute specifies the name of an index that will be created using the mapped column or columns. Multiple columns may be grouped into the same index, simply by specifying the same index name." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "A foreign-key attribute may be used to override the name of any generated foreign key constraint." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "Many mapping elements also accept a child <column> element. This is particularly useful for mapping multi-column types:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:151 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:153 +#, no-c-format +msgid "The default attribute lets you specify a default value for a column (you should assign the same value to the mapped property before saving a new instance of the mapped class)." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:159 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:161 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:163 +#, no-c-format +msgid "The sql-type attribute allows the user to override the default mapping of a Hibernate type to SQL datatype." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:168 +#, no-c-format +msgid "" + "\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:170 +#, no-c-format +msgid "The check attribute allows you to specify a check constraint." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:174 +#, no-c-format +msgid "" + "\n" + " 10\"/>\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:176 +#, no-c-format +msgid "" + "\n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:180 +#, no-c-format +msgid "Summary" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "Attribute" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:188 +#, no-c-format +msgid "Values" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:189 +#, no-c-format +msgid "Interpretation" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:194 +#, no-c-format +msgid "length" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:195 toolset_guide.xml:200 toolset_guide.xml:205 +#, no-c-format +msgid "number" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:196 +#, no-c-format +msgid "column length" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:199 +#, no-c-format +msgid "precision" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:201 +#, no-c-format +msgid "column decimal precision" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:204 +#, no-c-format +msgid "scale" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:206 +#, no-c-format +msgid "column decimal scale" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:209 +#, no-c-format +msgid "not-null" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:210 toolset_guide.xml:215 +#, no-c-format +msgid "true|false" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:211 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:214 +#, no-c-format +msgid "unique" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:216 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:219 +#, no-c-format +msgid "index" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:220 +#, no-c-format +msgid "index_name" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:221 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:224 +#, no-c-format +msgid "unique-key" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "unique_key_name" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:226 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:229 +#, no-c-format +msgid "foreign-key" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:230 +#, no-c-format +msgid "foreign_key_name" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:231 +#, no-c-format +msgid "specifies the name of the foreign key constraint generated for an association, for a <one-to-one>, <many-to-one>, <key>, or <many-to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:241 +#, no-c-format +msgid "sql-type" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:242 +#, no-c-format +msgid "SQL column type" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:243 +#, no-c-format +msgid "overrides the default column type (attribute of <column> element only)" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:249 +#, no-c-format +msgid "default" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:250 toolset_guide.xml:257 +#, no-c-format +msgid "SQL expression" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:251 +#, no-c-format +msgid "specify a default value for the column" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:256 +#, no-c-format +msgid "check" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:258 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:266 +#, no-c-format +msgid "The <comment> element allows you to specify comments for the generated schema." +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:271 +#, no-c-format +msgid "" + "\n" + " Current customers only\n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:273 +#, no-c-format +msgid "" + "\n" + " \n" + " Balance in USD\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:275 +#, no-c-format +msgid "This results in a comment on table or comment on column statement in the generated DDL (where supported)." +msgstr "" + +#. Tag: title +#: toolset_guide.xml:284 +#, no-c-format +msgid "Running the tool" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:286 +#, no-c-format +msgid "The SchemaExport tool writes a DDL script to standard out and/or executes the DDL statements." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:291 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaExport options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:297 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:303 toolset_guide.xml:453 toolset_guide.xml:522 +#, no-c-format +msgid "Option" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:304 toolset_guide.xml:391 toolset_guide.xml:454 toolset_guide.xml:523 +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:459 +#, no-c-format +msgid "--quiet" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:310 toolset_guide.xml:460 +#, no-c-format +msgid "don't output the script to stdout" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:313 +#, no-c-format +msgid "--drop" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:314 +#, no-c-format +msgid "only drop the tables" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--create" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "only create the tables" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:321 toolset_guide.xml:463 +#, no-c-format +msgid "--text" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "don't export to the database" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:325 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:326 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:329 toolset_guide.xml:467 toolset_guide.xml:528 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:330 toolset_guide.xml:468 toolset_guide.xml:529 +#, no-c-format +msgid "select a NamingStrategy" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:333 toolset_guide.xml:475 toolset_guide.xml:536 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:334 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:337 toolset_guide.xml:471 toolset_guide.xml:532 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:338 toolset_guide.xml:472 toolset_guide.xml:533 +#, no-c-format +msgid "read database properties from a file" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:341 +#, no-c-format +msgid "--format" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:342 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:345 +#, no-c-format +msgid "--delimiter=;" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:346 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:352 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:356 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:361 +#, no-c-format +msgid "Properties" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:363 +#, no-c-format +msgid "Database properties may be specified" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:369 +#, no-c-format +msgid "as system properties with -D<property>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:372 +#, no-c-format +msgid "in hibernate.properties" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:375 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:379 +#, no-c-format +msgid "The needed properties are:" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:384 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:390 +#, no-c-format +msgid "Property Name" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:396 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:397 +#, no-c-format +msgid "jdbc driver class" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:400 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:401 +#, no-c-format +msgid "jdbc url" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:404 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:405 +#, no-c-format +msgid "database user" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:408 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:409 +#, no-c-format +msgid "user password" +msgstr "" + +#. Tag: literal +#: toolset_guide.xml:412 +#, no-c-format +msgid "hibernate.dialect" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:413 +#, no-c-format +msgid "dialect" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:422 +#, no-c-format +msgid "Using Ant" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:424 +#, no-c-format +msgid "You can call SchemaExport from your Ant build script:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:428 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:433 +#, no-c-format +msgid "Incremental schema updates" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:435 +#, no-c-format +msgid "The SchemaUpdate tool will update an existing schema with \"incremental\" changes. Note that SchemaUpdate depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:441 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaUpdate options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:447 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:464 +#, no-c-format +msgid "don't export the script to the database" +msgstr "" + +#. Tag: entry +#: toolset_guide.xml:476 toolset_guide.xml:537 +#, no-c-format +msgid "specify a .cfg.xml file" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:482 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:486 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:491 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:493 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:497 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:502 +#, no-c-format +msgid "Schema validation" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:504 +#, no-c-format +msgid "The SchemaValidator tool will validate that the existing database schema \"matches\" your mapping documents. Note that SchemaValidator depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers. This tool is extremely useful for testing." +msgstr "" + +#. Tag: para +#: toolset_guide.xml:510 +#, no-c-format +msgid "java -cp hibernate_classpaths org.hibernate.tool.hbm2ddl.SchemaValidator options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:516 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:543 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:547 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:552 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:554 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:558 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/transactions.pot b/documentation/envers/src/main/docbook/pot/content/transactions.pot new file mode 100644 index 0000000000..5d2ddd4f75 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/transactions.pot @@ -0,0 +1,949 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:29 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "" + +#. Tag: para +#: transactions.xml:31 +#, no-c-format +msgid "The most important point about Hibernate and concurrency control is that it is very easy to understand. Hibernate directly uses JDBC connections and JTA resources without adding any additional locking behavior. We highly recommend you spend some time with the JDBC, ANSI, and transaction isolation specification of your database management system." +msgstr "" + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "Hibernate does not lock objects in memory. Your application can expect the behavior as defined by the isolation level of your database transactions. Note that thanks to the Session, which is also a transaction-scoped cache, Hibernate provides repeatable reads for lookup by identifier and entity queries (not reporting queries that return scalar values)." +msgstr "" + +#. Tag: para +#: transactions.xml:46 +#, no-c-format +msgid "In addition to versioning for automatic optimistic concurrency control, Hibernate also offers a (minor) API for pessimistic locking of rows, using the SELECT FOR UPDATE syntax. Optimistic concurrency control and this API are discussed later in this chapter." +msgstr "" + +#. Tag: para +#: transactions.xml:53 +#, no-c-format +msgid "We start the discussion of concurrency control in Hibernate with the granularity of Configuration, SessionFactory, and Session, as well as database transactions and long conversations." +msgstr "" + +#. Tag: title +#: transactions.xml:60 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "" + +#. Tag: para +#: transactions.xml:62 +#, no-c-format +msgid "A SessionFactory is an expensive-to-create, threadsafe object intended to be shared by all application threads. It is created once, usually on application startup, from a Configuration instance." +msgstr "" + +#. Tag: para +#: transactions.xml:68 +#, no-c-format +msgid "A Session is an inexpensive, non-threadsafe object that should be used once, for a single request, a conversation, single unit of work, and then discarded. A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed, hence consume no resources until used." +msgstr "" + +#. Tag: para +#: transactions.xml:76 +#, no-c-format +msgid "To complete this picture you also have to think about database transactions. A database transaction has to be as short as possible, to reduce lock contention in the database. Long database transactions will prevent your application from scaling to highly concurrent load. Hence, it is almost never good design to hold a database transaction open during user think time, until the unit of work is complete." +msgstr "" + +#. Tag: para +#: transactions.xml:85 +#, no-c-format +msgid "What is the scope of a unit of work? Can a single Hibernate Session span several database transactions or is this a one-to-one relationship of scopes? When should you open and close a Session and how do you demarcate the database transaction boundaries?" +msgstr "" + +#. Tag: title +#: transactions.xml:93 +#, no-c-format +msgid "Unit of work" +msgstr "" + +#. Tag: para +#: transactions.xml:95 +#, no-c-format +msgid "First, don't use the session-per-operation antipattern, that is, don't open and close a Session for every simple database call in a single thread! Of course, the same is true for database transactions. Database calls in an application are made using a planned sequence, they are grouped into atomic units of work. (Note that this also means that auto-commit after every single SQL statement is useless in an application, this mode is intended for ad-hoc SQL console work. Hibernate disables, or expects the application server to do so, auto-commit mode immediately.) Database transactions are never optional, all communication with a database has to occur inside a transaction, no matter if you read or write data. As explained, auto-commit behavior for reading data should be avoided, as many small transactions are unlikely to perform better than one clearly defined unit of work. The latter is also much more maintainable and extensible." +msgstr "" + +#. Tag: para +#: transactions.xml:111 +#, no-c-format +msgid "The most common pattern in a multi-user client/server application is session-per-request. In this model, a request from the client is sent to the server (where the Hibernate persistence layer runs), a new Hibernate Session is opened, and all database operations are executed in this unit of work. Once the work has been completed (and the response for the client has been prepared), the session is flushed and closed. You would also use a single database transaction to serve the clients request, starting and committing it when you open and close the Session. The relationship between the two is one-to-one and this model is a perfect fit for many applications." +msgstr "" + +#. Tag: para +#: transactions.xml:123 +#, no-c-format +msgid "The challenge lies in the implementation. Hibernate provides built-in management of the \"current session\" to simplify this pattern. All you have to do is start a transaction when a server request has to be processed, and end the transaction before the response is sent to the client. You can do this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/interception container. An EJB container is a standardized way to implement cross-cutting aspects such as transaction demarcation on EJB session beans, declaratively with CMT. If you decide to use programmatic transaction demarcation, prefer the Hibernate Transaction API shown later in this chapter, for ease of use and code portability." +msgstr "" + +#. Tag: para +#: transactions.xml:136 +#, no-c-format +msgid "Your application code can access a \"current session\" to process the request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a Session scoped to the current database transaction. This has to be configured for either resource-local or JTA environments, see ." +msgstr "" + +#. Tag: para +#: transactions.xml:144 +#, no-c-format +msgid "Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This is especially useful in servlet applications that utilize a separate rendering phase after the request has been processed. Extending the database transaction until view rendering is complete is easy to do if you implement your own interceptor. However, it is not easily doable if you rely on EJBs with container-managed transactions, as a transaction will be completed when an EJB method returns, before rendering of any view can start. See the Hibernate website and forum for tips and examples around this Open Session in View pattern." +msgstr "" + +#. Tag: title +#: transactions.xml:159 +#, no-c-format +msgid "Long conversations" +msgstr "" + +#. Tag: para +#: transactions.xml:161 +#, no-c-format +msgid "The session-per-request pattern is not the only useful concept you can use to design units of work. Many business processes require a whole series of interactions with the user interleaved with database accesses. In web and enterprise applications it is not acceptable for a database transaction to span a user interaction. Consider the following example:" +msgstr "" + +#. Tag: para +#: transactions.xml:171 +#, no-c-format +msgid "The first screen of a dialog opens, the data seen by the user has been loaded in a particular Session and database transaction. The user is free to modify the objects." +msgstr "" + +#. Tag: para +#: transactions.xml:178 +#, no-c-format +msgid "The user clicks \"Save\" after 5 minutes and expects his modifications to be made persistent; he also expects that he was the only person editing this information and that no conflicting modification can occur." +msgstr "" + +#. Tag: para +#: transactions.xml:186 +#, no-c-format +msgid "We call this unit of work, from the point of view of the user, a long running conversation (or application transaction). There are many ways how you can implement this in your application." +msgstr "" + +#. Tag: para +#: transactions.xml:192 +#, no-c-format +msgid "A first naive implementation might keep the Session and database transaction open during user think time, with locks held in the database to prevent concurrent modification, and to guarantee isolation and atomicity. This is of course an anti-pattern, since lock contention would not allow the application to scale with the number of concurrent users." +msgstr "" + +#. Tag: para +#: transactions.xml:200 +#, no-c-format +msgid "Clearly, we have to use several database transactions to implement the conversation. In this case, maintaining isolation of business processes becomes the partial responsibility of the application tier. A single conversation usually spans several database transactions. It will be atomic if only one of these database transactions (the last one) stores the updated data, all others simply read data (e.g. in a wizard-style dialog spanning several request/response cycles). This is easier to implement than it might sound, especially if you use Hibernate's features:" +msgstr "" + +#. Tag: para +#: transactions.xml:213 +#, no-c-format +msgid "Automatic Versioning - Hibernate can do automatic optimistic concurrency control for you, it can automatically detect if a concurrent modification occurred during user think time. Usually we only check at the end of the conversation." +msgstr "" + +#. Tag: para +#: transactions.xml:221 +#, no-c-format +msgid "Detached Objects - If you decide to use the already discussed session-per-request pattern, all loaded instances will be in detached state during user think time. Hibernate allows you to reattach the objects and persist the modifications, the pattern is called session-per-request-with-detached-objects. Automatic versioning is used to isolate concurrent modifications." +msgstr "" + +#. Tag: para +#: transactions.xml:231 +#, no-c-format +msgid "Extended (or Long) Session - The Hibernate Session may be disconnected from the underlying JDBC connection after the database transaction has been committed, and reconnected when a new client request occurs. This pattern is known as session-per-conversation and makes even reattachment unnecessary. Automatic versioning is used to isolate concurrent modifications and the Session is usually not allowed to be flushed automatically, but explicitly." +msgstr "" + +#. Tag: para +#: transactions.xml:244 +#, no-c-format +msgid "Both session-per-request-with-detached-objects and session-per-conversation have advantages and disadvantages, we discuss them later in this chapter in the context of optimistic concurrency control." +msgstr "" + +#. Tag: title +#: transactions.xml:253 +#, no-c-format +msgid "Considering object identity" +msgstr "" + +#. Tag: para +#: transactions.xml:255 +#, no-c-format +msgid "An application may concurrently access the same persistent state in two different Sessions. However, an instance of a persistent class is never shared between two Session instances. Hence there are two different notions of identity:" +msgstr "" + +#. Tag: term +#: transactions.xml:264 +#, no-c-format +msgid "Database Identity" +msgstr "" + +#. Tag: literal +#: transactions.xml:267 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "" + +#. Tag: term +#: transactions.xml:272 +#, no-c-format +msgid "JVM Identity" +msgstr "" + +#. Tag: literal +#: transactions.xml:275 +#, no-c-format +msgid "foo==bar" +msgstr "" + +#. Tag: para +#: transactions.xml:281 +#, no-c-format +msgid "Then for objects attached to a particular Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database identity is guaranteed by Hibernate. However, while the application might concurrently access the \"same\" (persistent identity) business object in two different sessions, the two instances will actually be \"different\" (JVM identity). Conflicts are resolved using (automatic versioning) at flush/commit time, using an optimistic approach." +msgstr "" + +#. Tag: para +#: transactions.xml:290 +#, no-c-format +msgid "This approach leaves Hibernate and the database to worry about concurrency; it also provides the best scalability, since guaranteeing identity in single-threaded units of work only doesn't need expensive locking or other means of synchronization. The application never needs to synchronize on any business object, as long as it sticks to a single thread per Session. Within a Session the application may safely use == to compare objects." +msgstr "" + +#. Tag: para +#: transactions.xml:299 +#, no-c-format +msgid "However, an application that uses == outside of a Session, might see unexpected results. This might occur even in some unexpected places, for example, if you put two detached instances into the same Set. Both might have the same database identity (i.e. they represent the same row), but JVM identity is by definition not guaranteed for instances in detached state. The developer has to override the equals() and hashCode() methods in persistent classes and implement his own notion of object equality. There is one caveat: Never use the database identifier to implement equality, use a business key, a combination of unique, usually immutable, attributes. The database identifier will change if a transient object is made persistent. If the transient instance (usually together with detached instances) is held in a Set, changing the hashcode breaks the contract of the Set. Attributes for business keys don't have to be as stable as database primary keys, you only have to guarantee stability as long as the objects are in the same Set. See the Hibernate website for a more thorough discussion of this issue. Also note that this is not a Hibernate issue, but simply how Java object identity and equality has to be implemented." +msgstr "" + +#. Tag: title +#: transactions.xml:320 +#, no-c-format +msgid "Common issues" +msgstr "" + +#. Tag: para +#: transactions.xml:322 +#, no-c-format +msgid "Never use the anti-patterns session-per-user-session or session-per-application (of course, there are rare exceptions to this rule). Note that some of the following issues might also appear with the recommended patterns, make sure you understand the implications before making a design decision:" +msgstr "" + +#. Tag: para +#: transactions.xml:331 +#, no-c-format +msgid "A Session is not thread-safe. Things which are supposed to work concurrently, like HTTP requests, session beans, or Swing workers, will cause race conditions if a Session instance would be shared. If you keep your Hibernate Session in your HttpSession (discussed later), you should consider synchronizing access to your Http session. Otherwise, a user that clicks reload fast enough may use the same Session in two concurrently running threads." +msgstr "" + +#. Tag: para +#: transactions.xml:342 +#, no-c-format +msgid "An exception thrown by Hibernate means you have to rollback your database transaction and close the Session immediately (discussed later in more detail). If your Session is bound to the application, you have to stop the application. Rolling back the database transaction doesn't put your business objects back into the state they were at the start of the transaction. This means the database state and the business objects do get out of sync. Usually this is not a problem, because exceptions are not recoverable and you have to start over after rollback anyway." +msgstr "" + +#. Tag: para +#: transactions.xml:354 +#, no-c-format +msgid "The Session caches every object that is in persistent state (watched and checked for dirty state by Hibernate). This means it grows endlessly until you get an OutOfMemoryException, if you keep it open for a long time or simply load too much data. One solution for this is to call clear() and evict() to manage the Session cache, but you most likely should consider a Stored Procedure if you need mass data operations. Some solutions are shown in . Keeping a Session open for the duration of a user session also means a high probability of stale data." +msgstr "" + +#. Tag: title +#: transactions.xml:372 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "" + +#. Tag: para +#: transactions.xml:374 +#, no-c-format +msgid "Database (or system) transaction boundaries are always necessary. No communication with the database can occur outside of a database transaction (this seems to confuse many developers who are used to the auto-commit mode). Always use clear transaction boundaries, even for read-only operations. Depending on your isolation level and database capabilities this might not be required but there is no downside if you always demarcate transactions explicitly. Certainly, a single database transaction is going to perform better than many small transactions, even for reading data." +msgstr "" + +#. Tag: para +#: transactions.xml:384 +#, no-c-format +msgid "A Hibernate application can run in non-managed (i.e. standalone, simple Web- or Swing applications) and managed J2EE environments. In a non-managed environment, Hibernate is usually responsible for its own database connection pool. The application developer has to manually set transaction boundaries, in other words, begin, commit, or rollback database transactions himself. A managed environment usually provides container-managed transactions (CMT), with the transaction assembly defined declaratively in deployment descriptors of EJB session beans, for example. Programmatic transaction demarcation is then no longer necessary." +msgstr "" + +#. Tag: para +#: transactions.xml:394 +#, no-c-format +msgid "However, it is often desirable to keep your persistence layer portable between non-managed resource-local environments, and systems that can rely on JTA but use BMT instead of CMT. In both cases you'd use programmatic transaction demarcation. Hibernate offers a wrapper API called Transaction that translates into the native transaction system of your deployment environment. This API is actually optional, but we strongly encourage its use unless you are in a CMT session bean." +msgstr "" + +#. Tag: para +#: transactions.xml:403 +#, no-c-format +msgid "Usually, ending a Session involves four distinct phases:" +msgstr "" + +#. Tag: para +#: transactions.xml:409 +#, no-c-format +msgid "flush the session" +msgstr "" + +#. Tag: para +#: transactions.xml:414 +#, no-c-format +msgid "commit the transaction" +msgstr "" + +#. Tag: para +#: transactions.xml:419 +#, no-c-format +msgid "close the session" +msgstr "" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "handle exceptions" +msgstr "" + +#. Tag: para +#: transactions.xml:430 +#, no-c-format +msgid "Flushing the session has been discussed earlier, we'll now have a closer look at transaction demarcation and exception handling in both managed- and non-managed environments." +msgstr "" + +#. Tag: title +#: transactions.xml:437 +#, no-c-format +msgid "Non-managed environment" +msgstr "" + +#. Tag: para +#: transactions.xml:439 +#, no-c-format +msgid "If a Hibernate persistence layer runs in a non-managed environment, database connections are usually handled by simple (i.e. non-DataSource) connection pools from which Hibernate obtains connections as needed. The session/transaction handling idiom looks like this:" +msgstr "" + +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:448 +#, no-c-format +msgid "You don't have to flush() the Session explicitly - the call to commit() automatically triggers the synchronization (depending upon the FlushMode for the session. A call to close() marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" + +#. Tag: para +#: transactions.xml:457 +#, no-c-format +msgid "A much more flexible solution is Hibernate's built-in \"current session\" context management, as described earlier:" +msgstr "" + +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format +msgid "You will very likely never see these code snippets in a regular application; fatal (system) exceptions should always be caught at the \"top\". In other words, the code that executes Hibernate calls (in the persistence layer) and the code that handles RuntimeException (and usually can only clean up and exit) are in different layers. The current context management by Hibernate can significantly simplify this design, as all you need is access to a SessionFactory. Exception handling is discussed later in this chapter." +msgstr "" + +#. Tag: para +#: transactions.xml:474 +#, no-c-format +msgid "Note that you should select org.hibernate.transaction.JDBCTransactionFactory (which is the default), and for the second example \"thread\" as your hibernate.current_session_context_class." +msgstr "" + +#. Tag: title +#: transactions.xml:483 +#, no-c-format +msgid "Using JTA" +msgstr "" + +#. Tag: para +#: transactions.xml:485 +#, no-c-format +msgid "If your persistence layer runs in an application server (e.g. behind EJB session beans), every datasource connection obtained by Hibernate will automatically be part of the global JTA transaction. You can also install a standalone JTA implementation and use it without EJB. Hibernate offers two strategies for JTA integration." +msgstr "" + +#. Tag: para +#: transactions.xml:492 +#, no-c-format +msgid "If you use bean-managed transactions (BMT) Hibernate will tell the application server to start and end a BMT transaction if you use the Transaction API. So, the transaction management code is identical to the non-managed environment." +msgstr "" + +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format +msgid "If you want to use a transaction-bound Session, that is, the getCurrentSession() functionality for easy context propagation, you will have to use the JTA UserTransaction API directly:" +msgstr "" + +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:508 +#, no-c-format +msgid "With CMT, transaction demarcation is done in session bean deployment descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format +msgid "In a CMT/EJB even rollback happens automatically, since an unhandled RuntimeException thrown by a session bean method tells the container to set the global transaction to rollback. This means you do not need to use the Hibernate Transaction API at all with BMT or CMT, and you get automatic propagation of the \"current\" Session bound to the transaction." +msgstr "" + +#. Tag: para +#: transactions.xml:523 +#, no-c-format +msgid "Note that you should choose org.hibernate.transaction.JTATransactionFactory if you use JTA directly (BMT), and org.hibernate.transaction.CMTTransactionFactory in a CMT session bean, when you configure Hibernate's transaction factory. Remember to also set hibernate.transaction.manager_lookup_class. Furthermore, make sure that your hibernate.current_session_context_class is either unset (backwards compatibility), or set to \"jta\"." +msgstr "" + +#. Tag: para +#: transactions.xml:532 +#, no-c-format +msgid "The getCurrentSession() operation has one downside in a JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a silly limitation of the JTA spec, it is not possible for Hibernate to automatically clean up any unclosed ScrollableResults or Iterator instances returned by scroll() or iterate(). You must release the underlying database cursor by calling ScrollableResults.close() or Hibernate.close(Iterator) explicitly from a finally block. (Of course, most applications can easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" + +#. Tag: title +#: transactions.xml:548 +#, no-c-format +msgid "Exception handling" +msgstr "" + +#. Tag: para +#: transactions.xml:550 +#, no-c-format +msgid "If the Session throws an exception (including any SQLException), you should immediately rollback the database transaction, call Session.close() and discard the Session instance. Certain methods of Session will not leave the session in a consistent state. No exception thrown by Hibernate can be treated as recoverable. Ensure that the Session will be closed by calling close() in a finally block." +msgstr "" + +#. Tag: para +#: transactions.xml:561 +#, no-c-format +msgid "The HibernateException, which wraps most of the errors that can occur in a Hibernate persistence layer, is an unchecked exception (it wasn't in older versions of Hibernate). In our opinion, we shouldn't force the application developer to catch an unrecoverable exception at a low layer. In most systems, unchecked and fatal exceptions are handled in one of the first frames of the method call stack (i.e. in higher layers) and an error message is presented to the application user (or some other appropriate action is taken). Note that Hibernate might also throw other unchecked exceptions which are not a HibernateException. These are, again, not recoverable and appropriate action should be taken." +msgstr "" + +#. Tag: para +#: transactions.xml:573 +#, no-c-format +msgid "Hibernate wraps SQLExceptions thrown while interacting with the database in a JDBCException. In fact, Hibernate will attempt to convert the exception into a more meaningful subclass of JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an appropriate JDBCException subclass using the SQLExceptionConverter attached to the SessionFactory. By default, the SQLExceptionConverter is defined by the configured dialect; however, it is also possible to plug in a custom implementation (see the javadocs for the SQLExceptionConverterFactory class for details). The standard JDBCException subtypes are:" +msgstr "" + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "JDBCConnectionException - indicates an error with the underlying JDBC communication." +msgstr "" + +#. Tag: para +#: transactions.xml:595 +#, no-c-format +msgid "SQLGrammarException - indicates a grammar or syntax problem with the issued SQL." +msgstr "" + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "ConstraintViolationException - indicates some form of integrity constraint violation." +msgstr "" + +#. Tag: para +#: transactions.xml:607 +#, no-c-format +msgid "LockAcquisitionException - indicates an error acquiring a lock level necessary to perform the requested operation." +msgstr "" + +#. Tag: para +#: transactions.xml:613 +#, no-c-format +msgid "GenericJDBCException - a generic exception which did not fall into any of the other categories." +msgstr "" + +#. Tag: title +#: transactions.xml:623 +#, no-c-format +msgid "Transaction timeout" +msgstr "" + +#. Tag: para +#: transactions.xml:625 +#, no-c-format +msgid "One extremely important feature provided by a managed environment like EJB that is never provided for non-managed code is transaction timeout. Transaction timeouts ensure that no misbehaving transaction can indefinitely tie up resources while returning no response to the user. Outside a managed (JTA) environment, Hibernate cannot fully provide this functionality. However, Hibernate can at least control data access operations, ensuring that database level deadlocks and queries with huge result sets are limited by a defined timeout. In a managed environment, Hibernate can delegate transaction timeout to JTA. This functionality is abstracted by the Hibernate Transaction object." +msgstr "" + +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format +msgid "Note that setTimeout() may not be called in a CMT bean, where transaction timeouts must be defined declaratively." +msgstr "" + +#. Tag: title +#: transactions.xml:650 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "The only approach that is consistent with high concurrency and high scalability is optimistic concurrency control with versioning. Version checking uses version numbers, or timestamps, to detect conflicting updates (and to prevent lost updates). Hibernate provides for three possible approaches to writing application code that uses optimistic concurrency. The use cases we show are in the context of long conversations, but version checking also has the benefit of preventing lost updates in single database transactions." +msgstr "" + +#. Tag: title +#: transactions.xml:663 +#, no-c-format +msgid "Application version checking" +msgstr "" + +#. Tag: para +#: transactions.xml:665 +#, no-c-format +msgid "In an implementation without much help from Hibernate, each interaction with the database occurs in a new Session and the developer is responsible for reloading all persistent instances from the database before manipulating them. This approach forces the application to carry out its own version checking to ensure conversation transaction isolation. This approach is the least efficient in terms of database access. It is the approach most similar to entity EJBs." +msgstr "" + +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format +msgid "The version property is mapped using <version>, and Hibernate will automatically increment it during flush if the entity is dirty." +msgstr "" + +#. Tag: para +#: transactions.xml:682 +#, no-c-format +msgid "Of course, if you are operating in a low-data-concurrency environment and don't require version checking, you may use this approach and just skip the version check. In that case, last commit wins will be the default strategy for your long conversations. Keep in mind that this might confuse the users of the application, as they might experience lost updates without error messages or a chance to merge conflicting changes." +msgstr "" + +#. Tag: para +#: transactions.xml:691 +#, no-c-format +msgid "Clearly, manual version checking is only feasible in very trivial circumstances and not practical for most applications. Often not only single instances, but complete graphs of modified objects have to be checked. Hibernate offers automatic version checking with either an extended Session or detached instances as the design paradigm." +msgstr "" + +#. Tag: title +#: transactions.xml:702 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "" + +#. Tag: para +#: transactions.xml:704 +#, no-c-format +msgid "A single Session instance and its persistent instances are used for the whole conversation, known as session-per-conversation. Hibernate checks instance versions at flush time, throwing an exception if concurrent modification is detected. It's up to the developer to catch and handle this exception (common options are the opportunity for the user to merge changes or to restart the business conversation with non-stale data)." +msgstr "" + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "The Session is disconnected from any underlying JDBC connection when waiting for user interaction. This approach is the most efficient in terms of database access. The application need not concern itself with version checking or with reattaching detached instances, nor does it have to reload instances in every database transaction." +msgstr "" + +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format +msgid "The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old session obtains a new connection and resumes the session. Committing a database transaction disconnects a session from the JDBC connection and returns the connection to the pool. After reconnection, to force a version check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might have been updated by another transaction. You don't need to lock any data that you are updating. Usually you would set FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to actually persist all modifications made in this conversation. Hence, only this last database transaction would include the flush() operation, and then also close() the session to end the conversation." +msgstr "" + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "This pattern is problematic if the Session is too big to be stored during user think time, e.g. an HttpSession should be kept as small as possible. As the Session is also the (mandatory) first-level cache and contains all loaded objects, we can probably use this strategy only for a few request/response cycles. You should use a Session only for a single conversation, as it will soon also have stale data." +msgstr "" + +#. Tag: para +#: transactions.xml:747 +#, no-c-format +msgid "(Note that earlier Hibernate versions required explicit disconnection and reconnection of a Session. These methods are deprecated, as beginning and ending a transaction has the same effect.)" +msgstr "" + +#. Tag: para +#: transactions.xml:753 +#, no-c-format +msgid "Also note that you should keep the disconnected Session close to the persistence layer. In other words, use an EJB stateful session bean to hold the Session in a three-tier environment, and don't transfer it to the web layer (or even serialize it to a separate tier) to store it in the HttpSession." +msgstr "" + +#. Tag: para +#: transactions.xml:761 +#, no-c-format +msgid "The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session context management. You need to supply your own implementation of the CurrentSessionContext for this, see the Hibernate Wiki for examples." +msgstr "" + +#. Tag: title +#: transactions.xml:771 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "" + +#. Tag: para +#: transactions.xml:773 +#, no-c-format +msgid "Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each interaction with the database. The application manipulates the state of detached instances originally loaded in another Session and then reattaches them using Session.update(), Session.saveOrUpdate(), or Session.merge()." +msgstr "" + +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: transactions.xml:783 +#, no-c-format +msgid "Again, Hibernate will check instance versions during flush, throwing an exception if conflicting updates occurred." +msgstr "" + +#. Tag: para +#: transactions.xml:788 +#, no-c-format +msgid "You may also call lock() instead of update() and use LockMode.READ (performing a version check, bypassing all caches) if you are sure that the object has not been modified." +msgstr "" + +#. Tag: title +#: transactions.xml:797 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "" + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "You may disable Hibernate's automatic version increment for particular properties and collections by setting the optimistic-lock mapping attribute to false. Hibernate will then no longer increment versions if the property is dirty." +msgstr "" + +#. Tag: para +#: transactions.xml:806 +#, no-c-format +msgid "Legacy database schemas are often static and can't be modified. Or, other applications might also access the same database and don't know how to handle version numbers or even timestamps. In both cases, versioning can't rely on a particular column in a table. To force a version check without a version or timestamp property mapping, with a comparison of the state of all fields in a row, turn on optimistic-lock=\"all\" in the <class> mapping. Note that this conceptually only works if Hibernate can compare the old and new state, i.e. if you use a single long Session and not session-per-request-with-detached-objects." +msgstr "" + +#. Tag: para +#: transactions.xml:817 +#, no-c-format +msgid "Sometimes concurrent modification can be permitted as long as the changes that have been made don't overlap. If you set optimistic-lock=\"dirty\" when mapping the <class>, Hibernate will only compare dirty fields during flush." +msgstr "" + +#. Tag: para +#: transactions.xml:823 +#, no-c-format +msgid "In both cases, with dedicated version/timestamp columns or with full/dirty field comparison, Hibernate uses a single UPDATE statement (with an appropriate WHERE clause) per entity to execute the version check and update the information. If you use transitive persistence to cascade reattachment to associated entities, Hibernate might execute unnecessary updates. This is usually not a problem, but on update triggers in the database might be executed even when no changes have been made to detached instances. You can customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate to SELECT the instance to ensure that changes did actually occur, before updating the row." +msgstr "" + +#. Tag: title +#: transactions.xml:841 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "" + +#. Tag: para +#: transactions.xml:843 +#, no-c-format +msgid "It is not intended that users spend much time worrying about locking strategies. It's usually enough to specify an isolation level for the JDBC connections and then simply let the database do all the work. However, advanced users may sometimes wish to obtain exclusive pessimistic locks, or re-obtain locks at the start of a new transaction." +msgstr "" + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "Hibernate will always use the locking mechanism of the database, never lock objects in memory!" +msgstr "" + +#. Tag: para +#: transactions.xml:855 +#, no-c-format +msgid "The LockMode class defines the different lock levels that may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" + +#. Tag: para +#: transactions.xml:862 +#, no-c-format +msgid "LockMode.WRITE is acquired automatically when Hibernate updates or inserts a row." +msgstr "" + +#. Tag: para +#: transactions.xml:868 +#, no-c-format +msgid "LockMode.UPGRADE may be acquired upon explicit user request using SELECT ... FOR UPDATE on databases which support that syntax." +msgstr "" + +#. Tag: para +#: transactions.xml:874 +#, no-c-format +msgid "LockMode.UPGRADE_NOWAIT may be acquired upon explicit user request using a SELECT ... FOR UPDATE NOWAIT under Oracle." +msgstr "" + +#. Tag: para +#: transactions.xml:880 +#, no-c-format +msgid "LockMode.READ is acquired automatically when Hibernate reads data under Repeatable Read or Serializable isolation level. May be re-acquired by explicit user request." +msgstr "" + +#. Tag: para +#: transactions.xml:887 +#, no-c-format +msgid "LockMode.NONE represents the absence of a lock. All objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update() or saveOrUpdate() also start out in this lock mode." +msgstr "" + +#. Tag: para +#: transactions.xml:896 +#, no-c-format +msgid "The \"explicit user request\" is expressed in one of the following ways:" +msgstr "" + +#. Tag: para +#: transactions.xml:902 +#, no-c-format +msgid "A call to Session.load(), specifying a LockMode." +msgstr "" + +#. Tag: para +#: transactions.xml:907 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "" + +#. Tag: para +#: transactions.xml:912 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "" + +#. Tag: para +#: transactions.xml:918 +#, no-c-format +msgid "If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was not yet loaded by the session, the object is loaded using SELECT ... FOR UPDATE. If load() is called for an object that is already loaded with a less restrictive lock than the one requested, Hibernate calls lock() for that object." +msgstr "" + +#. Tag: para +#: transactions.xml:927 +#, no-c-format +msgid "Session.lock() performs a version number check if the specified lock mode is READ, UPGRADE or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR UPDATE is used.)" +msgstr "" + +#. Tag: para +#: transactions.xml:934 +#, no-c-format +msgid "If the database does not support the requested lock mode, Hibernate will use an appropriate alternate mode (instead of throwing an exception). This ensures that applications will be portable." +msgstr "" + +#. Tag: title +#: transactions.xml:943 +#, no-c-format +msgid "Connection Release Modes" +msgstr "" + +#. Tag: para +#: transactions.xml:945 +#, no-c-format +msgid "The legacy (2.x) behavior of Hibernate in regards to JDBC connection management was that a Session would obtain a connection when it was first needed and then hold unto that connection until the session was closed. Hibernate 3.x introduced the notion of connection release modes to tell a session how to handle its JDBC connections. Note that the following discussion is pertinent only to connections provided through a configured ConnectionProvider; user-supplied connections are outside the breadth of this discussion. The different release modes are identified by the enumerated values of org.hibernate.ConnectionReleaseMode:" +msgstr "" + +#. Tag: para +#: transactions.xml:959 +#, no-c-format +msgid "ON_CLOSE - is essentially the legacy behavior described above. The Hibernate session obtains a connection when it first needs to perform some JDBC access and holds unto that connection until the session is closed." +msgstr "" + +#. Tag: para +#: transactions.xml:966 +#, no-c-format +msgid "AFTER_TRANSACTION - says to release connections after a org.hibernate.Transaction has completed." +msgstr "" + +#. Tag: para +#: transactions.xml:972 +#, no-c-format +msgid "AFTER_STATEMENT (also referred to as aggressive release) - says to release connections after each and every statement execution. This aggressive releasing is skipped if that statement leaves open resources associated with the given session; currently the only situation where this occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" + +#. Tag: para +#: transactions.xml:982 +#, no-c-format +msgid "The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "auto (the default) - this choice delegates to the release mode returned by the org.hibernate.transaction.TransactionFactory.getDefaultReleaseMode() method. For JTATransactionFactory, this returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good idea to change this default behavior as failures due to the value of this setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" + +#. Tag: para +#: transactions.xml:999 +#, no-c-format +msgid "on_close - says to use ConnectionReleaseMode.ON_CLOSE. This setting is left for backwards compatibility, but its use is highly discouraged." +msgstr "" + +#. Tag: para +#: transactions.xml:1005 +#, no-c-format +msgid "after_transaction - says to use ConnectionReleaseMode.AFTER_TRANSACTION. This setting should not be used in JTA environments. Also note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is considered to be in auto-commit mode connections will be released as if the release mode were AFTER_STATEMENT." +msgstr "" + +#. Tag: para +#: transactions.xml:1013 +#, no-c-format +msgid "after_statement - says to use ConnectionReleaseMode.AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting (supportsAggressiveRelease()). If not, the release mode is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only safe in environments where we can either re-acquire the same underlying JDBC connection each time we make a call into ConnectionProvider.getConnection() or in auto-commit environments where it does not matter whether we get back the same connection." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/tutorial.pot b/documentation/envers/src/main/docbook/pot/content/tutorial.pot new file mode 100644 index 0000000000..d773a48d85 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/tutorial.pot @@ -0,0 +1,1690 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:33 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "" + +#. Tag: title +#: tutorial.xml:36 +#, no-c-format +msgid "Preface" +msgstr "" + +#. Tag: para +#: tutorial.xml:38 +#, no-c-format +msgid "This chapter is an introduction to Hibernate by way of a tutorial, intended for new users of Hibernate. We start with a simple application using an in-memory database. We build the application in small, easy to understand steps. The tutorial is based on another, earlier one developed by Michael Gloegl. All code is contained in the tutorials/web directory of the project source." +msgstr "" + +#. Tag: para +#: tutorial.xml:51 +#, no-c-format +msgid "This tutorial expects the user have knowledge of both Java and SQL. If you are new or uncomfortable with either, it is advised that you start with a good introduction to that technology prior to attempting to learn Hibernate. It will save time and effort in the long run." +msgstr "" + +#. Tag: para +#: tutorial.xml:61 +#, no-c-format +msgid "There is another tutorial/example application in the /tutorials/eg directory of the project source. That example is console based and as such would not have the dependency on a servlet container to execute. The basic setup is the same as the instructions below." +msgstr "" + +#. Tag: title +#: tutorial.xml:71 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "" + +#. Tag: para +#: tutorial.xml:73 +#, no-c-format +msgid "Let's assume we need a small database application that can store events we want to attend, and information about the host(s) of these events. We will use an in-memory, Java database named HSQLDB to avoid describing installation/setup of any particular database servers. Feel free to tweak this tutorial to use whatever database you feel comfortable using." +msgstr "" + +#. Tag: para +#: tutorial.xml:82 +#, no-c-format +msgid "The first thing we need to do is set up our development environment, and specifically to setup all the required dependencies to Hibernate as well as other libraries. Hibernate is built using Maven which amongst other features provides dependecy management; moreover it provides transitive dependecy management which simply means that to use Hibernate we can simply define our dependency on Hibernate, Hibernate itself defines the dependencies it needs which then become transitive dependencies of our project." +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:94 +#, no-c-format +msgid "" + "\n" + "\n" + " ...\n" + "\n" + " \n" + " \n" + " ${groupId}\n" + " hibernate-core\n" + " \n" + "\n" + " \n" + " \n" + " javax.servlet\n" + " servlet-api\n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:97 +#, no-c-format +msgid "Essentially we are describing here the /tutorials/web/pom.xml file. See the Maven site for more information." +msgstr "" + +#. Tag: para +#: tutorial.xml:105 +#, no-c-format +msgid "While not strictly necessary, most IDEs have integration with Maven to read these POM files and automatically set up a project for you which can save lots of time and effort." +msgstr "" + +#. Tag: para +#: tutorial.xml:112 +#, no-c-format +msgid "Next we create a class that represents the event we want to store in database." +msgstr "" + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The first class" +msgstr "" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "Our first persistent class is a simple JavaBean class with some properties:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:123 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:125 +#, no-c-format +msgid "You can see that this class uses standard JavaBean naming conventions for property getter and setter methods, as well as private visibility for the fields. This is a recommended design - but not required. Hibernate can also access fields directly, the benefit of accessor methods is robustness for refactoring. The no-argument constructor is required to instantiate an object of this class through reflection." +msgstr "" + +#. Tag: para +#: tutorial.xml:133 +#, no-c-format +msgid "The id property holds a unique identifier value for a particular event. All persistent entity classes (there are less important dependent classes as well) will need such an identifier property if we want to use the full feature set of Hibernate. In fact, most applications (esp. web applications) need to distinguish objects by identifier, so you should consider this a feature rather than a limitation. However, we usually don't manipulate the identity of an object, hence the setter method should be private. Only Hibernate will assign identifiers when an object is saved. You can see that Hibernate can access public, private, and protected accessor methods, as well as (public, private, protected) fields directly. The choice is up to you and you can match it to fit your application design." +msgstr "" + +#. Tag: para +#: tutorial.xml:145 +#, no-c-format +msgid "The no-argument constructor is a requirement for all persistent classes; Hibernate has to create objects for you, using Java Reflection. The constructor can be private, however, package visibility is required for runtime proxy generation and efficient data retrieval without bytecode instrumentation." +msgstr "" + +#. Tag: para +#: tutorial.xml:152 +#, no-c-format +msgid "Place this Java source file in a directory called src in the development folder, and in its correct package. The directory should now look like this:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:157 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:159 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "" + +#. Tag: title +#: tutorial.xml:166 +#, no-c-format +msgid "The mapping file" +msgstr "" + +#. Tag: para +#: tutorial.xml:168 +#, no-c-format +msgid "Hibernate needs to know how to load and store objects of the persistent class. This is where the Hibernate mapping file comes into play. The mapping file tells Hibernate what table in the database it has to access, and what columns in that table it should use." +msgstr "" + +#. Tag: para +#: tutorial.xml:175 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:179 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "[...]\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:181 +#, no-c-format +msgid "Note that the Hibernate DTD is very sophisticated. You can use it for auto-completion of XML mapping elements and attributes in your editor or IDE. You also should open up the DTD file in your text editor - it's the easiest way to get an overview of all elements and attributes and to see the defaults, as well as some comments. Note that Hibernate will not load the DTD file from the web, but first look it up from the classpath of the application. The DTD file is included in hibernate3.jar as well as in the src/ directory of the Hibernate distribution." +msgstr "" + +#. Tag: para +#: tutorial.xml:192 +#, no-c-format +msgid "We will omit the DTD declaration in future examples to shorten the code. It is of course not optional." +msgstr "" + +#. Tag: para +#: tutorial.xml:197 +#, no-c-format +msgid "Between the two hibernate-mapping tags, include a class element. All persistent entity classes (again, there might be dependent classes later on, which are not first-class entities) need such a mapping, to a table in the SQL database:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:204 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:206 +#, no-c-format +msgid "So far we told Hibernate how to persist and load object of class Event to the table EVENTS, each instance represented by a row in that table. Now we continue with a mapping of the unique identifier property to the tables primary key. In addition, as we don't want to care about handling this identifier, we configure Hibernate's identifier generation strategy for a surrogate primary key column:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:214 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:216 +#, no-c-format +msgid "The id element is the declaration of the identifier property, name=\"id\" declares the name of the Java property - Hibernate will use the getter and setter methods to access the property. The column attribute tells Hibernate which column of the EVENTS table we use for this primary key. The nested generator element specifies the identifier generation strategy, in this case we used native, which picks the best strategy depending on the configured database (dialect). Hibernate supports database generated, globally unique, as well as application assigned identifiers (or any strategy you have written an extension for)." +msgstr "" + +#. Tag: para +#: tutorial.xml:229 +#, no-c-format +msgid "Finally we include declarations for the persistent properties of the class in the mapping file. By default, no properties of the class are considered persistent:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:235 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:237 +#, no-c-format +msgid "Just as with the id element, the name attribute of the property element tells Hibernate which getter and setter methods to use. So, in this case, Hibernate will look for getDate()/setDate(), as well as getTitle()/setTitle()." +msgstr "" + +#. Tag: para +#: tutorial.xml:244 +#, no-c-format +msgid "Why does the date property mapping include the column attribute, but the title doesn't? Without the column attribute Hibernate by default uses the property name as the column name. This works fine for title. However, date is a reserved keyword in most database, so we better map it to a different name." +msgstr "" + +#. Tag: para +#: tutorial.xml:253 +#, no-c-format +msgid "The next interesting thing is that the title mapping also lacks a type attribute. The types we declare and use in the mapping files are not, as you might expect, Java data types. They are also not SQL database types. These types are so called Hibernate mapping types, converters which can translate from Java to SQL data types and vice versa. Again, Hibernate will try to determine the correct conversion and mapping type itself if the type attribute is not present in the mapping. In some cases this automatic detection (using Reflection on the Java class) might not have the default you expect or need. This is the case with the date property. Hibernate can't know if the property (which is of java.util.Date) should map to a SQL date, timestamp, or time column. We preserve full date and time information by mapping the property with a timestamp converter." +msgstr "" + +#. Tag: para +#: tutorial.xml:269 +#, no-c-format +msgid "This mapping file should be saved as Event.hbm.xml, right in the directory next to the Event Java class source file. The naming of mapping files can be arbitrary, however the hbm.xml suffix is a convention in the Hibernate developer community. The directory structure should now look like this:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:277 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java\n" + " Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:279 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "" + +#. Tag: title +#: tutorial.xml:286 +#, no-c-format +msgid "Hibernate configuration" +msgstr "" + +#. Tag: para +#: tutorial.xml:288 +#, no-c-format +msgid "We now have a persistent class and its mapping file in place. It is time to configure Hibernate. Before we do this, we will need a database. HSQL DB, a java-based SQL DBMS, can be downloaded from the HSQL DB website(http://hsqldb.org/). Actually, you only need the hsqldb.jar from this download. Place this file in the lib/ directory of the development folder." +msgstr "" + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "Create a directory called data in the root of the development directory - this is where HSQL DB will store its data files. Now start the database by running java -classpath ../lib/hsqldb.jar org.hsqldb.Server in this data directory. You can see it start up and bind to a TCP/IP socket, this is where our application will connect later. If you want to start with a fresh database during this tutorial, shutdown HSQL DB (press CTRL + C in the window), delete all files in the data/ directory, and start HSQL DB again." +msgstr "" + +#. Tag: para +#: tutorial.xml:306 +#, no-c-format +msgid "Hibernate is the layer in your application which connects to this database, so it needs connection information. The connections are made through a JDBC connection pool, which we also have to configure. The Hibernate distribution contains several open source JDBC connection pooling tools, but will use the Hibernate built-in connection pool for this tutorial. Note that you have to copy the required library into your classpath and use different connection pooling settings if you want to use a production-quality third party JDBC pooling software." +msgstr "" + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "For Hibernate's configuration, we can use a simple hibernate.properties file, a slightly more sophisticated hibernate.cfg.xml file, or even complete programmatic setup. Most users prefer the XML configuration file:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:322 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + "\n" + "\n" + " \n" + "\n" + " \n" + " org.hsqldb.jdbcDriver\n" + " jdbc:hsqldb:hsql://localhost\n" + " sa\n" + " \n" + "\n" + " \n" + " 1\n" + "\n" + " \n" + " org.hibernate.dialect.HSQLDialect\n" + "\n" + " \n" + " thread\n" + "\n" + " \n" + " org.hibernate.cache.NoCacheProvider\n" + "\n" + " \n" + " true\n" + "\n" + " \n" + " create\n" + "\n" + " \n" + "\n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:324 +#, no-c-format +msgid "Note that this XML configuration uses a different DTD. We configure Hibernate's SessionFactory - a global factory responsible for a particular database. If you have several databases, use several <session-factory> configurations, usually in several configuration files (for easier startup)." +msgstr "" + +#. Tag: para +#: tutorial.xml:332 +#, no-c-format +msgid "The first four property elements contain the necessary configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. Hibernate's automatic session management for persistence contexts will come in handy as you will soon see. The hbm2ddl.auto option turns on automatic generation of database schemas - directly into the database. This can of course also be turned off (by removing the config option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent classes to the configuration." +msgstr "" + +#. Tag: para +#: tutorial.xml:345 +#, no-c-format +msgid "Copy this file into the source directory, so it will end up in the root of the classpath. Hibernate automatically looks for a file called hibernate.cfg.xml in the root of the classpath, on startup." +msgstr "" + +#. Tag: title +#: tutorial.xml:354 +#, no-c-format +msgid "Building with Ant" +msgstr "" + +#. Tag: para +#: tutorial.xml:356 +#, no-c-format +msgid "We'll now build the tutorial with Ant. You will need to have Ant installed - get it from the Ant download page. How to install Ant will not be covered here. Please refer to the Ant manual. After you have installed Ant, we can start to create the buildfile. It will be called build.xml and placed directly in the development directory." +msgstr "" + +#. Tag: para +#: tutorial.xml:365 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:369 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:371 +#, no-c-format +msgid "This will tell Ant to add all files in the lib directory ending with .jar to the classpath used for compilation. It will also copy all non-Java source files to the target directory, e.g. configuration and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:378 +#, no-c-format +msgid "" + "ant\n" + "Buildfile: build.xml\n" + "\n" + "copy-resources:\n" + " [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" + "\n" + "compile:\n" + " [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" + "\n" + "BUILD SUCCESSFUL\n" + "Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:383 +#, no-c-format +msgid "Startup and helpers" +msgstr "" + +#. Tag: para +#: tutorial.xml:385 +#, no-c-format +msgid "It's time to load and store some Event objects, but first we have to complete the setup with some infrastructure code. We have to startup Hibernate. This startup includes building a global SessionFactory object and to store it somewhere for easy access in application code. A SessionFactory can open up new Session's. A Session represents a single-threaded unit of work, the SessionFactory is a thread-safe global object, instantiated once." +msgstr "" + +#. Tag: para +#: tutorial.xml:395 +#, no-c-format +msgid "We'll create a HibernateUtil helper class which takes care of startup and makes accessing a SessionFactory convenient. Let's have a look at the implementation:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:401 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:403 +#, no-c-format +msgid "This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is loaded), but also hides the fact that it uses a static singleton. It might as well lookup the SessionFactory from JNDI in an application server." +msgstr "" + +#. Tag: para +#: tutorial.xml:410 +#, no-c-format +msgid "If you give the SessionFactory a name in your configuration file, Hibernate will in fact try to bind it to JNDI after it has been built. To avoid this code completely you could also use JMX deployment and let the JMX-capable container instantiate and bind a HibernateService to JNDI. These advanced options are discussed in the Hibernate reference documentation." +msgstr "" + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "Place HibernateUtil.java in the development source directory, in a package next to events:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:424 +#, no-c-format +msgid "" + "\n" + "+src\n" + " +events\n" + " Event.java\n" + " Event.hbm.xml\n" + " +util\n" + " HibernateUtil.java\n" + " hibernate.cfg.xml\n" + "+data\n" + "build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:426 +#, no-c-format +msgid "This should again compile without problems. We finally need to configure a logging system - Hibernate uses commons logging and leaves you the choice between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy log4j.properties from the Hibernate distribution (it's in the etc/ directory) to your src directory, next to hibernate.cfg.xml. Have a look at the example configuration and change the settings if you like to have more verbose output. By default, only Hibernate startup message are shown on stdout." +msgstr "" + +#. Tag: para +#: tutorial.xml:436 +#, no-c-format +msgid "The tutorial infrastructure is complete - and we are ready to do some real work with Hibernate." +msgstr "" + +#. Tag: title +#: tutorial.xml:444 +#, no-c-format +msgid "Loading and storing objects" +msgstr "" + +#. Tag: para +#: tutorial.xml:446 +#, no-c-format +msgid "Finally, we can use Hibernate to load and store objects. We write an EventManager class with a main() method:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:451 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:453 +#, no-c-format +msgid "We create a new Event object, and hand it over to Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" + +#. Tag: para +#: tutorial.xml:460 +#, no-c-format +msgid "A Session is a single unit of work. For now we'll keep things simple and assume a one-to-one granularity between a Hibernate Session and a database transaction. To shield our code from the actual underlying transaction system (in this case plain JDBC, but it could also run with JTA) we use the Transaction API that is available on the Hibernate Session." +msgstr "" + +#. Tag: para +#: tutorial.xml:468 +#, no-c-format +msgid "What does sessionFactory.getCurrentSession() do? First, you can call it as many times and anywhere you like, once you get hold of your SessionFactory (easy thanks to HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that we switched the configuration option for this mechanism to \"thread\" in hibernate.cfg.xml? Hence, the current unit of work is bound to the current Java thread that executes our application. However, this is not the full picture, you also have to consider scope, when a unit of work begins and when it ends." +msgstr "" + +#. Tag: para +#: tutorial.xml:479 +#, no-c-format +msgid "A Session begins when it is first needed, when the first call to getCurrentSession() is made. It is then bound by Hibernate to the current thread. When the transaction ends, either through commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call getCurrentSession() again, you get a new Session and can start a new unit of work. This thread-bound programming model is the most popular way of using Hibernate, as it allows flexible layering of your code (transaction demarcation code can be separated from data access code, we'll do this later in this tutorial)." +msgstr "" + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above example uses one Session for one operation. This is pure coincidence, the example is just not complex enough to show any other approach. The scope of a Hibernate Session is flexible but you should never design your application to use a new Hibernate Session for every database operation. So even if you see it a few more times in the following (very trivial) examples, consider session-per-operation an anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" + +#. Tag: para +#: tutorial.xml:501 +#, no-c-format +msgid "Have a look at for more information about transaction handling and demarcation. We also skipped any error handling and rollback in the previous example." +msgstr "" + +#. Tag: para +#: tutorial.xml:507 +#, no-c-format +msgid "To run this first routine we have to add a callable target to the Ant build file:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:511 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:513 +#, no-c-format +msgid "The value of the action argument is set on the command line when calling the target:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:518 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:520 +#, no-c-format +msgid "You should see, after compilation, Hibernate starting up and, depending on your configuration, lots of log output. At the end you will find the following line:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:525 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: tutorial.xml:527 +#, no-c-format +msgid "This is the INSERT executed by Hibernate, the question marks represent JDBC bind parameters. To see the values bound as arguments, or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" + +#. Tag: para +#: tutorial.xml:533 +#, no-c-format +msgid "Now we'd like to list stored events as well, so we add an option to the main method:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:537 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:539 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:543 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:545 +#, no-c-format +msgid "What we do here is use an HQL (Hibernate Query Language) query to load all existing Event objects from the database. Hibernate will generate the appropriate SQL, send it to the database and populate Event objects with the data. You can create more complex queries with HQL, of course." +msgstr "" + +#. Tag: para +#: tutorial.xml:552 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "" + +#. Tag: para +#: tutorial.xml:558 +#, no-c-format +msgid "Run ant run -Daction=store to store something into the database and, of course, to generate the database schema before through hbm2ddl." +msgstr "" + +#. Tag: para +#: tutorial.xml:564 +#, no-c-format +msgid "Now disable hbm2ddl by commenting out the property in your hibernate.cfg.xml file. Usually you only leave it turned on in continuous unit testing, but another run of hbm2ddl would drop everything you have stored - the create configuration setting actually translates into \"drop all tables from the schema, then re-create all tables, when the SessionFactory is build\"." +msgstr "" + +#. Tag: para +#: tutorial.xml:574 +#, no-c-format +msgid "If you now call Ant with -Daction=list, you should see the events you have stored so far. You can of course also call the store action a few times more." +msgstr "" + +#. Tag: para +#: tutorial.xml:580 +#, no-c-format +msgid "Note: Most new Hibernate users fail at this point and we see questions about Table not found error messages regularly. However, if you follow the steps outlined above you will not have this problem, as hbm2ddl creates the database schema on the first run, and subsequent application restarts will use this schema. If you change the mapping and/or database schema, you have to re-enable hbm2ddl once again." +msgstr "" + +#. Tag: title +#: tutorial.xml:593 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "" + +#. Tag: para +#: tutorial.xml:595 +#, no-c-format +msgid "We mapped a persistent entity class to a table. Let's build on this and add some class associations. First we'll add people to our application, and store a list of events they participate in." +msgstr "" + +#. Tag: title +#: tutorial.xml:601 +#, no-c-format +msgid "Mapping the Person class" +msgstr "" + +#. Tag: para +#: tutorial.xml:603 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:607 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:609 +#, no-c-format +msgid "Create a new mapping file called Person.hbm.xml (don't forget the DTD reference at the top):" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:614 +#, no-c-format +msgid "" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:616 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:620 +#, no-c-format +msgid "" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:622 +#, no-c-format +msgid "We'll now create an association between these two entities. Obviously, persons can participate in events, and events have participants. The design questions we have to deal with are: directionality, multiplicity, and collection behavior." +msgstr "" + +#. Tag: title +#: tutorial.xml:632 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "" + +#. Tag: para +#: tutorial.xml:634 +#, no-c-format +msgid "We'll add a collection of events to the Person class. That way we can easily navigate to the events for a particular person, without executing an explicit query - by calling aPerson.getEvents(). We use a Java collection, a Set, because the collection will not contain duplicate elements and the ordering is not relevant for us." +msgstr "" + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "We need a unidirectional, many-valued associations, implemented with a Set. Let's write the code for this in the Java classes and then map it:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:646 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:648 +#, no-c-format +msgid "Before we map this association, think about the other side. Clearly, we could just keep this unidirectional. Or, we could create another collection on the Event, if we want to be able to navigate it bi-directional, i.e. anEvent.getParticipants(). This is not necessary, from a functional perspective. You could always execute an explicit query to retrieve the participants for a particular event. This is a design choice left to you, but what is clear from this discussion is the multiplicity of the association: \"many\" valued on both sides, we call this a many-to-many association. Hence, we use Hibernate's many-to-many mapping:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:659 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:661 +#, no-c-format +msgid "Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:m entity relationship), an association table is needed. Each row in this table represents a link between a person and an event. The table name is configured with the table attribute of the set element. The identifier column name in the association, for the person's side, is defined with the <key> element, the column name for the event's side with the column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your collection (correct: the class on the other side of the collection of references)." +msgstr "" + +#. Tag: para +#: tutorial.xml:673 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:677 +#, no-c-format +msgid "" + " | *EVENT_ID | | |\n" + " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" + " | TITLE | |__________________| | AGE |\n" + " |_____________| | FIRSTNAME |\n" + " | LASTNAME |\n" + " |_____________|\n" + " ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:682 +#, no-c-format +msgid "Working the association" +msgstr "" + +#. Tag: para +#: tutorial.xml:684 +#, no-c-format +msgid "Let's bring some people and events together in a new method in EventManager:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:688 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:690 +#, no-c-format +msgid "After loading a Person and an Event, simply modify the collection using the normal collection methods. As you can see, there is no explicit call to update() or save(), Hibernate automatically detects that the collection has been modified and needs to be updated. This is called automatic dirty checking, and you can also try it by modifying the name or the date property of any of your objects. As long as they are in persistent state, that is, bound to a particular Hibernate Session (i.e. they have been just loaded or saved in a unit of work), Hibernate monitors any changes and executes SQL in a write-behind fashion. The process of synchronizing the memory state with the database, usually only at the end of a unit of work, is called flushing. In our code, the unit of work ends with a commit (or rollback) of the database transaction - as defined by the thread configuration option for the CurrentSessionContext class." +msgstr "" + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "You might of course load person and event in different units of work. Or you modify an object outside of a Session, when it is not in persistent state (if it was persistent before, we call this state detached). You can even modify a collection when it is detached:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:712 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:714 +#, no-c-format +msgid "The call to update makes a detached object persistent again, you could say it binds it to a new unit of work, so any modifications you made to it while detached can be saved to the database. This includes any modifications (additions/deletions) you made to a collection of that entity object." +msgstr "" + +#. Tag: para +#: tutorial.xml:721 +#, no-c-format +msgid "Well, this is not much use in our current situation, but it's an important concept you can design into your own application. For now, complete this exercise by adding a new action to the EventManager's main method and call it from the command line. If you need the identifiers of a person and an event - the save() method returns it (you might have to modify some of the previous methods to return that identifier):" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:729 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:731 +#, no-c-format +msgid "This was an example of an association between two equally important classes, two entities. As mentioned earlier, there are other classes and types in a typical model, usually \"less important\". Some you have already seen, like an int or a String. We call these classes value types, and their instances depend on a particular entity. Instances of these types don't have their own identity, nor are they shared between entities (two persons don't reference the same firstname object, even if they have the same first name). Of course, value types can not only be found in the JDK (in fact, in a Hibernate application all JDK classes are considered value types), but you can also write dependent classes yourself, Address or MonetaryAmount, for example." +msgstr "" + +#. Tag: para +#: tutorial.xml:744 +#, no-c-format +msgid "You can also design a collection of value types. This is conceptually very different from a collection of references to other entities, but looks almost the same in Java." +msgstr "" + +#. Tag: title +#: tutorial.xml:752 +#, no-c-format +msgid "Collection of values" +msgstr "" + +#. Tag: para +#: tutorial.xml:754 +#, no-c-format +msgid "We add a collection of value typed objects to the Person entity. We want to store email addresses, so the type we use is String, and the collection is again a Set:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:759 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:761 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:765 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain references to another entity, but a collection of elements of type String (the lowercase name tells you it's a Hibernate mapping type/converter). Once again, the table attribute of the set element determines the table name for the collection. The key element defines the foreign-key column name in the collection table. The column attribute in the element element defines the column name where the String values will actually be stored." +msgstr "" + +#. Tag: para +#: tutorial.xml:777 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:781 +#, no-c-format +msgid "" + " | *EVENT_ID | | | |___________________|\n" + " | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | *PERSON_ID |\n" + " | TITLE | |__________________| | AGE | | *EMAIL_ADDR |\n" + " |_____________| | FIRSTNAME | |___________________|\n" + " | LASTNAME |\n" + " |_____________|\n" + " ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:783 +#, no-c-format +msgid "You can see that the primary key of the collection table is in fact a composite key, using both columns. This also implies that there can't be duplicate email addresses per person, which is exactly the semantics we need for a set in Java." +msgstr "" + +#. Tag: para +#: tutorial.xml:789 +#, no-c-format +msgid "You can now try and add elements to this collection, just like we did before by linking persons and events. It's the same code in Java:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:794 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:796 +#, no-c-format +msgid "This time we didn't use a fetch query to initialize the collection. Hence, the call to its getter method will trigger an additional select to initialize it, so we can add an element to it. Monitor the SQL log and try to optimize this with an eager fetch." +msgstr "" + +#. Tag: title +#: tutorial.xml:806 +#, no-c-format +msgid "Bi-directional associations" +msgstr "" + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "Next we are going to map a bi-directional association - making the association between person and event work from both sides in Java. Of course, the database schema doesn't change, we still have many-to-many multiplicity. A relational database is more flexible than a network programming language, so it doesn't need anything like a navigation direction - data can be viewed and retrieved in any possible way." +msgstr "" + +#. Tag: para +#: tutorial.xml:816 +#, no-c-format +msgid "First, add a collection of participants to the Event Event class:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:820 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "Now map this side of the association too, in Event.hbm.xml." +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:826 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:828 +#, no-c-format +msgid "As you see, these are normal set mappings in both mapping documents. Notice that the column names in key and many-to-many are swapped in both mapping documents. The most important addition here is the inverse=\"true\" attribute in the set element of the Event's collection mapping." +msgstr "" + +#. Tag: para +#: tutorial.xml:836 +#, no-c-format +msgid "What this means is that Hibernate should take the other side - the Person class - when it needs to find out information about the link between the two. This will be a lot easier to understand once you see how the bi-directional link between our two entities is created ." +msgstr "" + +#. Tag: title +#: tutorial.xml:845 +#, no-c-format +msgid "Working bi-directional links" +msgstr "" + +#. Tag: para +#: tutorial.xml:847 +#, no-c-format +msgid "First, keep in mind that Hibernate does not affect normal Java semantics. How did we create a link between a Person and an Event in the unidirectional example? We added an instance of Event to the collection of event references, of an instance of Person. So, obviously, if we want to make this link working bi-directional, we have to do the same on the other side - adding a Person reference to the collection in an Event. This \"setting the link on both sides\" is absolutely necessary and you should never forget doing it." +msgstr "" + +#. Tag: para +#: tutorial.xml:857 +#, no-c-format +msgid "Many developers program defensively and create link management methods to correctly set both sides, e.g. in Person:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:862 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:864 +#, no-c-format +msgid "Notice that the get and set methods for the collection are now protected - this allows classes in the same package and subclasses to still access the methods, but prevents everybody else from messing with the collections directly (well, almost). You should probably do the same with the collection on the other side." +msgstr "" + +#. Tag: para +#: tutorial.xml:871 +#, no-c-format +msgid "What about the inverse mapping attribute? For you, and for Java, a bi-directional link is simply a matter of setting the references on both sides correctly. Hibernate however doesn't have enough information to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to handle bi-directional associations properly. Making one side of the association inverse tells Hibernate to basically ignore it, to consider it a mirror of the other side. That's all that is necessary for Hibernate to work out all of the issues when transformation a directional navigation model to a SQL database schema. The rules you have to remember are straightforward: All bi-directional associations need one side as inverse. In a one-to-many association it has to be the many-side, in many-to-many association you can pick either side, there is no difference." +msgstr "" + +#. Tag: title +#: tutorial.xml:889 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "" + +#. Tag: para +#: tutorial.xml:891 +#, no-c-format +msgid "Let's turn the following discussion into a small web application..." +msgstr "" + +#. Tag: para +#: tutorial.xml:895 +#, no-c-format +msgid "A Hibernate web application uses Session and Transaction almost like a standalone application. However, some common patterns are useful. We now write an EventManagerServlet. This servlet can list all events stored in the database, and it provides an HTML form to enter new events." +msgstr "" + +#. Tag: title +#: tutorial.xml:903 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "" + +#. Tag: para +#: tutorial.xml:905 +#, no-c-format +msgid "Create a new class in your source directory, in the events package:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:910 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:912 +#, no-c-format +msgid "The servlet handles HTTP GET requests only, hence, the method we implement is doGet():" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:917 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:919 +#, no-c-format +msgid "The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate Session is opened through the first call to getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to occur inside a transaction, no matter if data is read or written (we don't use the auto-commit mode in applications)." +msgstr "" + +#. Tag: para +#: tutorial.xml:928 +#, no-c-format +msgid "Do not use a new Hibernate Session for every database operation. Use one Hibernate Session that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" + +#. Tag: para +#: tutorial.xml:935 +#, no-c-format +msgid "Next, the possible actions of the request are processed and the response HTML is rendered. We'll get to that part soon." +msgstr "" + +#. Tag: para +#: tutorial.xml:940 +#, no-c-format +msgid "Finally, the unit of work ends when processing and rendering is complete. If any problem occurred during processing or rendering, an exception will be thrown and the database transaction rolled back. This completes the session-per-request pattern. Instead of the transaction demarcation code in every servlet you could also write a servlet filter. See the Hibernate website and Wiki for more information about this pattern, called Open Session in View—you'll need it as soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Processing and rendering" +msgstr "" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "Let's implement the processing of the request and rendering of the page." +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:960 +#, no-c-format +msgid "" + "Event Manager\");\n" + "\n" + "// Handle actions\n" + "if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" + "\n" + " String eventTitle = request.getParameter(\"eventTitle\");\n" + " String eventDate = request.getParameter(\"eventDate\");\n" + "\n" + " if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" + " out.println(\"Please enter event title and date.\");\n" + " } else {\n" + " createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" + " out.println(\"Added event.\");\n" + " }\n" + "}\n" + "\n" + "// Print page\n" + "printEventForm(out);\n" + "listEvents(out, dateFormatter);\n" + "\n" + "// Write HTML footer\n" + "out.println(\"\");\n" + "out.flush();\n" + "out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:962 +#, no-c-format +msgid "Granted, this coding style with a mix of Java and HTML would not scale in a more complex application—keep in mind that we are only illustrating basic Hibernate concepts in this tutorial. The code prints an HTML header and a footer. Inside this page, an HTML form for event entry and a list of all events in the database are printed. The first method is trivial and only outputs HTML:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:971 +#, no-c-format +msgid "" + "Add new event:\");\n" + " out.println(\"
\");\n" + " out.println(\"Title:
\");\n" + " out.println(\"Date (e.g. 24.12.2009):
\");\n" + " out.println(\"\");\n" + " out.println(\"
\");\n" + "}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:973 +#, no-c-format +msgid "The listEvents() method uses the Hibernate Session bound to the current thread to execute a query:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:979 +#, no-c-format +msgid "" + " 0) {\n" + " out.println(\"

Events in database:

\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " for (Iterator it = result.iterator(); it.hasNext();) {\n" + " Event event = (Event) it.next();\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " out.println(\"\");\n" + " }\n" + " out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + \"
\");\n" + " }\n" + "}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:981 +#, no-c-format +msgid "Finally, the store action is dispatched to the createAndStoreEvent() method, which also uses the Session of the current thread:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:987 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: tutorial.xml:989 +#, no-c-format +msgid "That's it, the servlet is complete. A request to the servlet will be processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can automatically bind these objects to the current thread of execution. This gives you the freedom to layer your code and access the SessionFactory in any way you like. Usually you'd use a more sophisticated design and move the data access code into data access objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" + +#. Tag: title +#: tutorial.xml:1003 +#, no-c-format +msgid "Deploying and testing" +msgstr "" + +#. Tag: para +#: tutorial.xml:1005 +#, no-c-format +msgid "To deploy this application you have to create a web archive, a WAR. Add the following Ant target to your build.xml:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:1010 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + "\n" + " \n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:1012 +#, no-c-format +msgid "This target creates a file called hibernate-tutorial.war in your project directory. It packages all libraries and the web.xml descriptor, which is expected in the base directory of your project:" +msgstr "" + +#. Tag: programlisting +#: tutorial.xml:1018 +#, no-c-format +msgid "" + "\n" + "\n" + "\n" + " \n" + " Event Manager\n" + " events.EventManagerServlet\n" + " \n" + "\n" + " \n" + " Event Manager\n" + " /eventmanager\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:1020 +#, no-c-format +msgid "Before you compile and deploy the web application, note that an additional library is required: jsdk.jar. This is the Java servlet development kit, if you don't have this library already, get it from the Sun website and copy it to your library directory. However, it will be only used for compilation and excluded from the WAR package." +msgstr "" + +#. Tag: para +#: tutorial.xml:1028 +#, no-c-format +msgid "To build and deploy call ant war in your project directory and copy the hibernate-tutorial.war file into your Tomcat webapp directory. If you don't have Tomcat installed, download it and follow the installation instructions. You don't have to change any Tomcat configuration to deploy this application though." +msgstr "" + +#. Tag: para +#: tutorial.xml:1036 +#, no-c-format +msgid "Once deployed and Tomcat is running, access the application at http://localhost:8080/hibernate-tutorial/eventmanager. Make sure you watch the Tomcat log to see Hibernate initialize when the first request hits your servlet (the static initializer in HibernateUtil is called) and to get the detailed output if any exceptions occurs." +msgstr "" + +#. Tag: title +#: tutorial.xml:1049 +#, no-c-format +msgid "Summary" +msgstr "" + +#. Tag: para +#: tutorial.xml:1051 +#, no-c-format +msgid "This tutorial covered the basics of writing a simple standalone Hibernate application and a small web application." +msgstr "" + +#. Tag: para +#: tutorial.xml:1056 +#, no-c-format +msgid "If you already feel confident with Hibernate, continue browsing through the reference documentation table of contents for topics you find interesting - most asked are transactional processing (), fetch performance (), or the usage of the API () and the query features ()." +msgstr "" + +#. Tag: para +#: tutorial.xml:1064 +#, no-c-format +msgid "Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/content/xml.pot b/documentation/envers/src/main/docbook/pot/content/xml.pot new file mode 100644 index 0000000000..615adbcf60 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/content/xml.pot @@ -0,0 +1,356 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:29 +#, no-c-format +msgid "XML Mapping" +msgstr "" + +#. Tag: emphasis +#: xml.xml:31 +#, no-c-format +msgid "Note that this is an experimental feature in Hibernate 3.0 and is under extremely active development." +msgstr "" + +#. Tag: title +#: xml.xml:37 +#, no-c-format +msgid "Working with XML data" +msgstr "" + +#. Tag: para +#: xml.xml:39 +#, no-c-format +msgid "Hibernate lets you work with persistent XML data in much the same way you work with persistent POJOs. A parsed XML tree can be thought of as just another way to represent the relational data at the object level, instead of POJOs." +msgstr "" + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "Hibernate supports dom4j as API for manipulating XML trees. You can write queries that retrieve dom4j trees from the database and have any modification you make to the tree automatically synchronized to the database. You can even take an XML document, parse it using dom4j, and write it to the database with any of Hibernate's basic operations: persist(), saveOrUpdate(), merge(), delete(), replicate() (merging is not yet supported)." +msgstr "" + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "This feature has many applications including data import/export, externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" + +#. Tag: para +#: xml.xml:61 +#, no-c-format +msgid "A single mapping may be used to simultaneously map properties of a class and nodes of an XML document to the database, or, if there is no class to map, it may be used to map just the XML." +msgstr "" + +#. Tag: title +#: xml.xml:68 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "" + +#. Tag: para +#: xml.xml:70 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:74 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: title +#: xml.xml:78 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "" + +#. Tag: para +#: xml.xml:80 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:84 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:86 +#, no-c-format +msgid "This mapping allows you to access the data as a dom4j tree, or as a graph of property name/value pairs (java Maps). The property names are purely logical constructs that may be referred to in HQL queries." +msgstr "" + +#. Tag: title +#: xml.xml:97 +#, no-c-format +msgid "XML mapping metadata" +msgstr "" + +#. Tag: para +#: xml.xml:99 +#, no-c-format +msgid "Many Hibernate mapping elements accept the node attribute. This let's you specify the name of an XML attribute or element that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" + +#. Tag: para +#: xml.xml:108 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "" + +#. Tag: para +#: xml.xml:111 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" + +#. Tag: para +#: xml.xml:114 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "\"element-name/@attribute-name\" - map to the named attribute of the named element" +msgstr "" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "For collections and single valued associations, there is an additional embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection of value type) will be embedded directly in the XML tree for the entity that owns the association. Otherwise, if embed-xml=\"false\", then only the referenced identifier value will appear in the XML for single point associations and collections will simply not appear at all." +msgstr "" + +#. Tag: para +#: xml.xml:134 +#, no-c-format +msgid "You should be careful not to leave embed-xml=\"true\" for too many associations, since XML does not deal well with circularity!" +msgstr "" + +#. Tag: programlisting +#: xml.xml:139 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " ...\n" + " \n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:141 +#, no-c-format +msgid "in this case, we have decided to embed the collection of account ids, but not the actual account data. The following HQL query:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:146 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: xml.xml:148 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:152 +#, no-c-format +msgid "" + "\n" + " 987632567\n" + " 985612323\n" + " \n" + " Gavin\n" + " A\n" + " King\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: para +#: xml.xml:154 +#, no-c-format +msgid "If you set embed-xml=\"true\" on the <one-to-many> mapping, the data might look more like this:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:159 +#, no-c-format +msgid "" + "\n" + " \n" + " \n" + " 100.29\n" + " \n" + " \n" + " \n" + " -2370.34\n" + " \n" + " \n" + " Gavin\n" + " A\n" + " King\n" + " \n" + " ...\n" + "]]>" +msgstr "" + +#. Tag: title +#: xml.xml:165 +#, no-c-format +msgid "Manipulating XML data" +msgstr "" + +#. Tag: para +#: xml.xml:167 +#, no-c-format +msgid "Let's rearead and update XML documents in the application. We do this by obtaining a dom4j session:" +msgstr "" + +#. Tag: programlisting +#: xml.xml:172 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: programlisting +#: xml.xml:174 +#, no-c-format +msgid "" + "" +msgstr "" + +#. Tag: para +#: xml.xml:176 +#, no-c-format +msgid "It is extremely useful to combine this feature with Hibernate's replicate() operation to implement XML-based data import/export." +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pot/legal_notice.pot b/documentation/envers/src/main/docbook/pot/legal_notice.pot new file mode 100644 index 0000000000..ebbf6e64d7 --- /dev/null +++ b/documentation/envers/src/main/docbook/pot/legal_notice.pot @@ -0,0 +1,58 @@ +# SOME DESCRIPTIVE TITLE. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-05-07 21:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: legal_notice.xml:28 +#, no-c-format +msgid "Legal Notice" +msgstr "" + +#. Tag: address +#: legal_notice.xml:30 +#, no-c-format +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "" + +#. Tag: para +#: legal_notice.xml:39 +#, no-c-format +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "" + +#. Tag: para +#: legal_notice.xml:45 +#, no-c-format +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "" + +#. Tag: para +#: legal_notice.xml:48 +#, no-c-format +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "" + +#. Tag: para +#: legal_notice.xml:51 +#, no-c-format +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "" + +#. Tag: para +#: legal_notice.xml:54 +#, no-c-format +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pt-BR/Hibernate_Reference.po b/documentation/envers/src/main/docbook/pt-BR/Hibernate_Reference.po new file mode 100644 index 0000000000..340d321a22 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - Relational Persistence for Idiomatic Java" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "Documentação da Referência do Hibernate" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pt-BR/content/architecture.po b/documentation/envers/src/main/docbook/pt-BR/content/architecture.po new file mode 100644 index 0000000000..62ca4b848f --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/architecture.po @@ -0,0 +1,644 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:21 +#, no-c-format +msgid "Architecture" +msgstr "Arquitetura" + +#. Tag: title +#: architecture.xml:24 +#, no-c-format +msgid "Overview" +msgstr "Visão Geral" + +#. Tag: para +#: architecture.xml:26 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "Uma visão bem ampla da arquitetura do Hibernate:" + +#. Tag: para +#: architecture.xml:39 +#, no-c-format +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"Esse diagrama mostra o Hibernate usando o banco de dados e a configuração de " +"dados para prover persistência de serviços (e persistência de objetos) para " +"o aplicativo." + +#. Tag: para +#: architecture.xml:44 +#, no-c-format +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"Nós gostaríamos de mostrar uma visão mais detalhada da arquitetura em " +"execução. Infelizmente, o Hibernate é muito flexível e suporta várias " +"aproximações. Nós iremos mostrar os dois extremos. Na arquitetura mais " +"simples o aplicativo fornece suas próprias conexões JDBC e gerencia suas " +"transações. Esta abordagem usa o mínimo de subconjuntos das APIs do " +"Hibernate:" + +#. Tag: para +#: architecture.xml:61 +#, no-c-format +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"A arquitetura \"completa\" abstrai a aplicação de ter de lidar diretamente " +"com JDBC/JTA e APIs e deixa o Hibernate tomar conta dos detalhes." + +#. Tag: para +#: architecture.xml:75 +#, fuzzy, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "Algumas definições dos objetos do diagrama: " + +#. Tag: term +#: architecture.xml:80 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#. Tag: para +#: architecture.xml:82 +#, no-c-format +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"Um cache threadsafe (imutáveis) composto de identidades compiladas para um " +"único banco de dados. Uma fabrica para Session e um " +"cliente de ConnectionProvider. Pode conter um cachê " +"opcional de dados (segundo nível) reutilizáveis entre transações, no nível " +"de processo- ou cluster." + +#. Tag: term +#: architecture.xml:92 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#. Tag: para +#: architecture.xml:94 +#, no-c-format +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"Objeto single-threaded, de vida curta, representando uma conversação entre o " +"aplicativo e o armazenamento persistente. Cria uma camada sobre uma conexão " +"JDBC. É uma fabrica de Transaction. Possui um cachê " +"obrigatório (primeiro nível) de objetos persistentes, usado para navegação " +"no gráficos de objetos e pesquisa de objetos pelo identificador." + +#. Tag: term +#: architecture.xml:104 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "Objetos persistentes e coleções" + +#. Tag: para +#: architecture.xml:106 +#, no-c-format +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"Objetos, de vida curta, single threaded contendo estado persistente e função " +"de negócios. Esses podem ser JavaBeans/POJOs, onde única coisa especial " +"sobre eles é que são associados a (exatamente uma) Session. Quando a Session é fechada, eles são separados " +"e liberados para serem usados dentro de qualquer camada da aplicacao (Ex. " +"diretamente como data transfer objects de e para a camada de apresentação)" + +#. Tag: term +#: architecture.xml:117 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "Objetos e coleções desatachados e transientes" + +#. Tag: para +#: architecture.xml:119 +#, no-c-format +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"Instâncias de classes persistentes que ainda não estão associadas a uma " +"Session. Eles podem ter sido instanciados pela aplicação " +"e não persistido (ainda) ou eles foram instanciados por uma " +"Session que foi encerrada." + +#. Tag: term +#: architecture.xml:128 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "Transaction (org.hibernate.Transaction)" + +#. Tag: para +#: architecture.xml:130 +#, no-c-format +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(Opcional) Objeto de vida curta, single threaded, usado pela aplicação para " +"especificar unidades atômicas de trabalho. Abstrai o aplicativo de lidar " +"diretamente com transações JDBC, JTA ou CORBA. Uma Session pode, em alguns casos, iniciar várias Transactions. Entretanto, a demarcação da transação, mesmo utilizando API ou " +"Transaction subjacentes, nunca é opcional!" + +#. Tag: term +#: architecture.xml:141 +#, no-c-format +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#. Tag: para +#: architecture.xml:143 +#, no-c-format +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(Opcional) Uma fábrica de (e combinações de) conexões JDBC. Abstrai a " +"aplicação de lidar diretamente com Datasource ou " +"DriverManager. Não exposto para a aplicação, mas pode ser " +"implementado ou estendido pelo programador." + +#. Tag: term +#: architecture.xml:151 +#, no-c-format +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#. Tag: para +#: architecture.xml:153 +#, no-c-format +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(Opcional) Uma fábrica para instâncias de Transaction. " +"Não exposta a aplicação, mas pode ser extendida/implementada pelo " +"programador." + +#. Tag: emphasis +#: architecture.xml:160 +#, no-c-format +msgid "Extension Interfaces" +msgstr "Extension Interfaces" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"O Hibernate oferece várias opções de interfaces estendidas que você pode " +"implementar para customizar sua camada persistente. Veja a documentação da " +"API para maiores detalhes." + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"Dada uma arquitetura simples, o aplicativo passa pelas APIs " +"Transaction/TransactionFactory e/ou " +"ConnectionProvider para se comunicar diretamente com a " +"transação JTA ou JDBC." + +#. Tag: title +#: architecture.xml:179 +#, no-c-format +msgid "Instance states" +msgstr "Estados de instância" + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"Uma instância de classes persistentes pode estar em um dos três diferentes " +"estados, que são definidos respeitando um contexto persistente. O objeto Session do Hibernate é o contexto " +"persistente:" + +#. Tag: term +#: architecture.xml:188 +#, no-c-format +msgid "transient" +msgstr "transiente" + +#. Tag: para +#: architecture.xml:190 +#, no-c-format +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "" +"A instância não é, e nunca foi associada com nenhum contexto persistente. " +"Não possui uma identidade persistente (valor de chave primária)." + +#. Tag: term +#: architecture.xml:198 +#, no-c-format +msgid "persistent" +msgstr "persistente" + +#. Tag: para +#: architecture.xml:200 +#, no-c-format +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"A instância está atualmente associada a um contexto persistente. Possui uma " +"identidade persistente (valor de chave primária) e, talvez, correspondente a " +"um registro no banco de dados. Para um contexto persistente em particular, o " +"Hibernate guarantees que a identidade persistente é " +"equivalente a identidade Java (na localização em memória do objeto)." + +#. Tag: term +#: architecture.xml:212 +#, no-c-format +msgid "detached" +msgstr "desatachado" + +#. Tag: para +#: architecture.xml:214 +#, no-c-format +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corrsponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"A instância foi associada com um contexto persistente, porém este contexto " +"foi fechado, ou a instância foi serializada por outro processo. Possui uma " +"identidade persistente, e, talvez, correspondenta a um registro no banco de " +"dados. Para instâncias desatachadas, o Hibernate não garante o " +"relacionamento entre identidade persistente e identidade Java." + +#. Tag: title +#: architecture.xml:229 +#, no-c-format +msgid "JMX Integration" +msgstr "Integração JMX" + +#. Tag: para +#: architecture.xml:231 +#, no-c-format +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMX é padrão J2EE para manipulação de componentes Java. O Hibernate pode ser " +"manipulado por um serviço JMX padrão. Nós fornecemos uma implementação do " +"MBean na distribuição, org.hibernate.jmx.HibernateService." + +#. Tag: para +#: architecture.xml:237 +#, no-c-format +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"Para um exemplo de como instalar o Hibernate como um serviço JMX em um " +"servidor de aplicativo JBoss, por favor, consulte o manual do usuário do " +"JBoss. No JBoss As, você poderá ver os benefícios de de se fazer o deploy " +"usando JMX:" + +#. Tag: para +#: architecture.xml:245 +#, no-c-format +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"Session Management: O ciclo de vida de uma " +"Session do Hibernate pode ser automaticamente conectada a " +"um escopo de transação JTA. Isso significa que você não precisará mais abrir " +"e fechar manualmente uma Session, isso se torna trabalho " +"para um interceptor EJB do JBoss . Você também não precisa se preocupar, " +"nunca mais, com demarcação de transação em seu código (a não ser que você " +"prefira escrever uma camada persistente portável, para isso, use a API " +"opcional do Hibernate Transaction). Você deve chamar " +"HibernateContext para acessar uma Session." + +#. Tag: para +#: architecture.xml:257 +#, no-c-format +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"HAR deployment:: Normalmente você faz o deploy de um " +"serviço JMX do Hibernate usando um serviço descritor de deploy do JBoss (em " +"um EAR e/ou arquivo SAR), que suporta todas as configurações usuais de uma " +"SessionFactory do Hibernate. Entretanto, você ainda " +"precisa nomear todos os seus arquivos de mapeamento no descritor de " +"deploração. Se você decidir usar o deploy opcional HAR, o JBoss irá " +"automaticamente detectar todos os seus arquivos de mapeamento no seu arquivo " +"HAR." + +#. Tag: para +#: architecture.xml:268 +#, no-c-format +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "" +"Consulte o manual do usuário do JBoss AS, para obter maiores informações " +"sobre essas opções." + +#. Tag: para +#: architecture.xml:272 +#, no-c-format +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See . Outra opção " +"disponível como um serviço JMX são as estatísticas de execução do Hibernate. " +"Veja a ." + +#. Tag: title +#: architecture.xml:279 +#, no-c-format +msgid "JCA Support" +msgstr "Suporte JCA" + +#. Tag: para +#: architecture.xml:280 +#, no-c-format +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental. O Hibernate pode também ser configurado como um conector JCA. " +"Por favor, visite o website para maiores detalhes. Entretanto, note que o " +"suporte JCA do Hibernate ainda é considerado experimental." + +#. Tag: title +#: architecture.xml:287 +#, no-c-format +msgid "Contextual Sessions" +msgstr "Sessões contextuais" + +#. Tag: para +#: architecture.xml:288 +#, no-c-format +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"Muitas aplicações que usam o Hibernate necessita de algum tipo de sessão " +"\"contextual\", onde uma sessão dada é na verdade um escopo de um contexto. " +"Entretanto, através de aplicações a definição sobre um contexto é geralmente " +"diferente; e contextos diferentes definem escopos diferentes. Aplicações " +"usando versões anteriores ao Hibernate 3.0 tendem a utilizar tanto sessões " +"contextuais baseadas em ThreadLocal, classes utilitárias " +"como HibernateUtil, ou utilizar frameworks de terceiros" +"(como Spring ou Pico) que provê sessões contextuais baseadas em proxy." + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"A partir da versão 3.0.1, o Hibernate adicionou o método " +"SessionFactory.getCurrentSession(). Inicialmente, este " +"assume o uso de transações JTA, onde a transação " +"JTA define tanto o escopo quanto o contexto de uma sessão " +"atual. O time do Hibernate mantém este recurso, desenvolvendo as diversas " +"implementações do JTA TransactionManager, a maioria (se " +"não todos) aplicativos deveria utilizar o gerenciador de transações " +"JTA sendo ou não instalados dentro de um container " +"J2EE. Baseado neste recurso, você deveria sempre utilizar " +"sessões contextuais baseadas em JTA." + +#. Tag: para +#: architecture.xml:307 +#, no-c-format +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"Entretanto, na versão 3.1, o processo por trás do método " +"SessionFactory.getCurrentSession() é agora plugavel. Com " +"isso, uma nova interface (org.hibernate.context." +"CurrentSessionContext) e um novo parâmetro de configuração " +"(hibernate.current_session_context_class) foram " +"adicionados para possibilitar a compatibilidade do contexto e do escopo na " +"definição de sessões correntes." + +#. Tag: para +#: architecture.xml:314 +#, no-c-format +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"De uma olhada em Javadocs sobre a interface org.hibernate.context." +"CurrentSessionContext para uma discussão detalhada. Ela define um " +"método único, currentSession(), com o qual a " +"implementação é responsável por rastrear a sessão contextual corrente. Por " +"fora do \"encapsulamento\", o Hibernate possui duas implementações dessa " +"interface." + +#. Tag: para +#: architecture.xml:324 +#, no-c-format +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - As sessões " +"correntes são rastreadas e recebem um escopo por uma transação JTA. O processamento aqui é exatamente igual ao antigo processo JTA. " +"Consulte em Javadocs para maiores detalhes." + +#. Tag: para +#: architecture.xml:332 +#, no-c-format +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - As " +"sessões correntes são rastreadas por uma thread de execução. Novamente, " +"consulte em Javadocs para maiores detalhes." + +#. Tag: para +#: architecture.xml:338 +#, no-c-format +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programatic " +"transaction demarcation in plain JSE without JTA, you are adviced to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"As duas primeiras implementações usam o modelo de programação \"uma sessão – " +"uma transação do banco de dados\", também conhecida e usado como " +"sessão por requisição. O começo e o fim de uma sessão " +"Hibernate é definida pela duração da transação do banco de dados. Se você " +"usa demarcação programática de transação (por exemplo. em J2SE puro ou com " +"JTA /UserTransaction/BMT), você é recomendado a usar a API Hibernate " +"Transaction para esconder a base do sistema de transação " +"do seu código. Se você executa em um container EJB que suporta CMT, os " +"limites das transações são definidas declarativamente e você não necessita " +"de qualquer transação ou operação de demarcação de sessão no seu código. " +"Consulte o para mais informações exemplos " +"de código." + +#. Tag: para +#: architecture.xml:359 +#, no-c-format +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"O parâmetro de configuração hibernate." +"current_session_context_class define que a implementação " +"org.hibernate.context.CurrentSessionContext deve ser " +"usada. Note que para compatibilidade anterior, se este parâmetro de " +"configuração não é determinado mas um org.hibernate.transaction." +"TransactionManagerLookup é configurado, Hibernate usará o " +"org.hibernate.context.JTASessionContext. Tipicamente, o " +"valor deste parâmetro nomearia apenas a classe de implementação para usar; " +"para as duas implementações out-of-the-box, entretanto, há três pequenos " +"nomes correspondentes, \"jta\", \"thread\", and \"managed\"." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/association_mapping.po b/documentation/envers/src/main/docbook/pt-BR/content/association_mapping.po new file mode 100644 index 0000000000..b92a76e581 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/association_mapping.po @@ -0,0 +1,914 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:6 +#, no-c-format +msgid "Association Mappings" +msgstr "Mapeamento de Associações" + +#. Tag: title +#: association_mapping.xml:9 +#, no-c-format +msgid "Introduction" +msgstr "Introdução" + +#. Tag: para +#: association_mapping.xml:11 +#, no-c-format +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"Mapeamentos de associações são freqüentemente a coisa mais difícil de se " +"acertar. Nesta seção nós passaremos pêlos casos canônicos um pôr um, " +"começando com mapeamentos unidirecionais e considerando os casos " +"bidirecionais. Nos vamos usar Person e Address em todos os exemplos." + +#. Tag: para +#: association_mapping.xml:19 +#, no-c-format +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "" +"Nós classificaremos as associações pelo seu mapeamento ou a falta do mesmo, " +"sua intervenção na tabela associativa, e pela sua multiplicidade." + +#. Tag: para +#: association_mapping.xml:24 +#, no-c-format +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"O uso de chaves estrangeiras não obrigatórias não é considerada uma boa " +"prática na modelagem de dados tradicional, assim todos nossos exemplos usam " +"chaves estrangeiras obrigatórias. Esta não é uma exigência do Hibernate, e " +"todas as mapeamentos funcionarão se você remover as constraints de " +"obrigatoriedade." + +#. Tag: title +#: association_mapping.xml:34 +#, no-c-format +msgid "Unidirectional associations" +msgstr "Associações Unidirecionais" + +#. Tag: title +#: association_mapping.xml:37 association_mapping.xml:108 +#, no-c-format +msgid "many to one" +msgstr "muitos para um" + +#. Tag: para +#: association_mapping.xml:39 +#, no-c-format +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "" +"Uma associação unidirecional muitos-para-um é o tipo " +"mais comum de associação unidirecional." + +#. Tag: programlisting +#: association_mapping.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:45 association_mapping.xml:161 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:50 association_mapping.xml:121 +#: association_mapping.xml:185 association_mapping.xml:225 +#, fuzzy, no-c-format +msgid "one to one" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"um para um\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"um para um\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"um para um\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"one to one" + +#. Tag: para +#: association_mapping.xml:52 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"Uma associação unidirecional um-para-um em uma chave estrangeira é quase idêntica. A única diferença é a constraint unique na " +"coluna." + +#. Tag: programlisting +#: association_mapping.xml:57 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:58 association_mapping.xml:193 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:60 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"Uma associação unidirecional um-para-um na chave primaria geralmente usa um gerador de id special. ( Note que nós invertemos " +"a direção da associação nesse exemplo)." + +#. Tag: programlisting +#: association_mapping.xml:66 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:67 association_mapping.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:72 association_mapping.xml:94 +#, no-c-format +msgid "one to many" +msgstr "um para muitos" + +#. Tag: para +#: association_mapping.xml:74 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"Uma associação unidirecional um-para-muitos em uma chave " +"estrangeira é um caso muito incomum, e realmente não é " +"recomendada." + +#. Tag: programlisting +#: association_mapping.xml:79 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:82 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "" +"Nós achamos que é melhor usar uma tabela associativa para este tipo de " +"associação." + +#. Tag: title +#: association_mapping.xml:91 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "Associações Unidirecionais com tabelas associativas" + +#. Tag: para +#: association_mapping.xml:96 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"Uma associação um-para-muitos unidirecional usando uma tabela " +"associativa e o mais comum. Note que se especificarmos " +"unique=\"true\", estaremos modificando a cardinalidade de " +"muitos-para-muitos para um-para-muitos." + +#. Tag: programlisting +#: association_mapping.xml:102 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:110 +#, no-c-format +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"Uma associação unidirecional muitos-para-um em uma tabela " +"associativa é bastante comum quando a associação for opcional." + +#. Tag: programlisting +#: association_mapping.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:116 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:123 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Uma associação unidirecional um-para-um em uma tabela associativa é extremamente incomum, mas possível." + +#. Tag: programlisting +#: association_mapping.xml:128 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:129 association_mapping.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:134 association_mapping.xml:238 +#, no-c-format +msgid "many to many" +msgstr "muitos para muitos" + +#. Tag: para +#: association_mapping.xml:136 +#, no-c-format +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "" +"Finalmente, nós temos a associação unidirecional muitos-para- " +"muitos." + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:141 association_mapping.xml:246 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:148 +#, no-c-format +msgid "Bidirectional associations" +msgstr "Associações Bidirecionais" + +#. Tag: title +#: association_mapping.xml:151 association_mapping.xml:211 +#, no-c-format +msgid "one to many / many to one" +msgstr "um para muitos / muitos para um" + +#. Tag: para +#: association_mapping.xml:153 +#, no-c-format +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"Uma associação bidirecional muitos-para-um é o tipo " +"mais comum de associação. (Esse é o relacionamento padrão pai / filho. )" + +#. Tag: programlisting +#: association_mapping.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:163 +#, no-c-format +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"Se você usar uma List ( ou outra coleção indexada ), você " +"precisa especificar a coluna chave estrangeira como not " +"null, e deixar o Hibernate administrar a associação do lado da coleção para " +"que seja mantido o índice de cada elemento da coleção (fazendo com que o " +"outro lado seja virtualmente inverso setando update=\"false\" e insert=\"false\"):" + +#. Tag: programlisting +#: association_mapping.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:173 +#, no-c-format +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"É importante que você defina not-null=\"true\" no " +"elemento <key> no mapeamento na coleção se a coluna " +"de chave estrangeira for NOT NULL. Não declare como " +"not-null=\"true\" apenas um elemento aninhado " +"<column>, mas sim o elemento <key>." + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "" +"Uma associação bidirecional um para um em uma chave estrangeira é bastante comum." + +#. Tag: programlisting +#: association_mapping.xml:192 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:195 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "" +"Uma associação bidirecional um para um em uma chave primária usa um gerador de id especial." + +#. Tag: programlisting +#: association_mapping.xml:200 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:208 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "Associações Bidirecionais com tabelas associativas" + +#. Tag: para +#: association_mapping.xml:213 +#, no-c-format +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"Uma associação bidirecional um para muitos em uma tabela " +"associativa. Veja que inverse=\"true\" pode " +"ser colocado em qualquer ponta associação, na coleção, ou no join." + +#. Tag: programlisting +#: association_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:227 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"Uma associação bidirecional um-para-um em uma tabela de " +"associação é algo bastante incomum, mas possivel." + +#. Tag: programlisting +#: association_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:240 +#, no-c-format +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "" +"Finally, we have a bidirectional many-to-many association. Finalmente, nós temos uma associação bidirecional de muitos para " +"muitos." + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:253 +#, no-c-format +msgid "More complex association mappings" +msgstr "Mapeamento de associações mais complexas" + +#. Tag: para +#: association_mapping.xml:255 +#, no-c-format +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows: Joins de " +"associações mais complexas são extremamente raros. O Hibernate torna " +"possível tratar mapeamentos mais complexos usando fragmentos de SQL " +"embutidos no documento de mapeamento. Por exemplo, se uma tabela com " +"informações de dados históricos de uma conta define a coluna accountNumber, " +"effectiveEndDate e effectiveStartDate, mapeadas assim como segue:" + +#. Tag: programlisting +#: association_mapping.xml:264 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:266 +#, no-c-format +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using: Então nós " +"podemos mapear uma associação para a instância corrente (aquela com a " +"effectiveEndDate igual a null) usando:" + +#. Tag: programlisting +#: association_mapping.xml:271 +#, no-c-format +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:273 +#, no-c-format +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way: Em um exemplo mais complexo, imagine que " +"a associação entre Employee e Organization é mantida em uma tabela " +"Employment cheia de dados históricos do trabalho. Então a associação do " +"funcionário mais recentemente empregado (aquele com a mais recente " +"startDate) deve ser mapeado desta maneira:" + +#. Tag: programlisting +#: association_mapping.xml:281 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:283 +#, no-c-format +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query. Você " +"pode ser criativo com esta funcionalidade, mas geralmente é mais prático " +"tratar estes tipos de casos, usando uma pesquisa HQL ou uma pesquisa por " +"criteria." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/basic_mapping.po b/documentation/envers/src/main/docbook/pt-BR/content/basic_mapping.po new file mode 100644 index 0000000000..eb314e3e74 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/basic_mapping.po @@ -0,0 +1,5778 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:5 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "Mapeamento O/R Bassico" + +#. Tag: title +#: basic_mapping.xml:8 +#, no-c-format +msgid "Mapping declaration" +msgstr "Declaração de mapeamento" + +#. Tag: para +#: basic_mapping.xml:10 +#, no-c-format +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." + +#. Tag: para +#: basic_mapping.xml:17 +#, no-c-format +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." + +#. Tag: para +#: basic_mapping.xml:23 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "Lets kick off with an example mapping:" + +#. Tag: programlisting +#: basic_mapping.xml:27 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:29 +#, no-c-format +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"Discutir agora o conteúdo deste documento de mapeamento. Iremos apenas " +"descrever os elementos do documento e atributos que são utilizados pelo " +"Hibernate em tempo de execução. O documento de mapeamento também contém " +"alguns atributos adicionais e opcionais além de elementos que afetam os " +"esquemas de banco de dados exportados pela ferramenta de exportação de " +"esquemas. (Por exemplo, o atributo not-null)." + +#. Tag: title +#: basic_mapping.xml:40 +#, no-c-format +msgid "Doctype" +msgstr "Doctype" + +#. Tag: para +#: basic_mapping.xml:42 +#, no-c-format +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"Todos os mapeamentos de XML devem declarar o doctype exibido. O DTD atual " +"pode ser encontrado na URL abaixo, no diretório hibernate-x.x.x/src/" +"org/ hibernate ou no hibernate3.jar. O " +"Hibernate sempre irá procurar pelo DTD inicialmente no seu classpath. Se " +"você tentar localizar o DTD usando uma conexão de internet, compare a " +"declaração do seu DTD com o conteúdo do seu classpath" + +#. Tag: title +#: basic_mapping.xml:52 +#, no-c-format +msgid "EntityResolver" +msgstr "EntityResolver" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." + +#. Tag: para +#: basic_mapping.xml:61 +#, no-c-format +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." + +#. Tag: para +#: basic_mapping.xml:70 +#, no-c-format +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." + +#. Tag: para +#: basic_mapping.xml:79 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "An example of utilizing user namespacing:" + +#. Tag: programlisting +#: basic_mapping.xml:82 +#, no-c-format +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:83 +#, no-c-format +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." + +#. Tag: title +#: basic_mapping.xml:91 +#, no-c-format +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#. Tag: para +#: basic_mapping.xml:93 +#, no-c-format +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"Este elemento tem diversos atributos opcionais. Os atributos " +"schema e catalog especificam que " +"tabelas referenciadas neste mapeamento pertencem ao esquema e/ou ao catalogo " +"nomeado. Se especificados, os nomes das tabelas irão ser qualificados no " +"schema ou catalog dado. Se não, os nomes das tabelas não serão qualificados. " +"O atributo default-cascade especifica qual estilo de " +"cascata será assumido pelas propriedades e coleções que não especificarm um " +"atributo cascade. O atributo auto-import nos deixa utilizar nomes de classes não qualificados na linguagem " +"de consulta, por default." + +#. Tag: programlisting +#: basic_mapping.xml:114 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "" +"schema (opcional): O nome do esquema do banco de dados." + +#. Tag: para +#: basic_mapping.xml:122 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "" +"catalog (opcional): O nome do catálogo do banco de dados." + +#. Tag: para +#: basic_mapping.xml:127 +#, no-c-format +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (opcional – default é nenhum ): Um estilo cascata default." + +#. Tag: para +#: basic_mapping.xml:133 +#, no-c-format +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (opcional – default é property): A estratégia que o Hibernate deve utilizar para acessar todas as " +"propridades. Pode ser uma implementação própria de " +"PropertyAccessor." + +#. Tag: para +#: basic_mapping.xml:140 +#, no-c-format +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (opcional - default é true): O valor default para atributos lazy da classe " +"e dos mapeamentos de coleções." + +#. Tag: para +#: basic_mapping.xml:147 +#, no-c-format +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import ((opcional - default é true): Especifica se nós podemos usar nomes de classess não qualificados " +"(das classes deste mapeamento) na linguagem de consulta." + +#. Tag: para +#: basic_mapping.xml:154 +#, no-c-format +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (opcional): Especifica um prefixo da package para " +"assumir para nomes de classes não qualificadas no documento de mapeamento." + +#. Tag: para +#: basic_mapping.xml:162 +#, no-c-format +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"Se voce tem duas classes persistentes com o mesmo nome (não qualificadas), " +"você deve setar auto-import=\"false\". O Hibernate irá " +"gerar uma exceção se você tentar setar duas classes para o mesmo nome " +"\"importado\"." + +#. Tag: para +#: basic_mapping.xml:168 +#, no-c-format +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"Observe que o elemento hibernate-mapping permite a você " +"aninhar diversos mapeamentos de <class> " +"persistentes, como mostrado abaixo. Entretanto, é uma boa prática (e " +"esperado por algumas ferramentas)o mapeamento de apenas uma classe " +"persistente simples (ou uma hierarquia de classes simples) em um arquivo de " +"mapeamento e nomea-la após a superclasse persistente, por exemplo: " +"Cat.hbm.xml, Dog.hbm.xml, ou se " +"estiver usando herança, Animal.hbm.xml." + +#. Tag: title +#: basic_mapping.xml:181 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:183 +#, no-c-format +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "" +"Você pode declarar uma classe persistente utilizando o elemento " +"class:" + +#. Tag: programlisting +#: basic_mapping.xml:211 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:214 +#, no-c-format +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (opcional): O nome da classe Java inteiramente " +"qualificado da classe persistente (ou interface); Se o atributo é ausente, " +"assume-se que o mapeamento é para intidades não-POJO." + +#. Tag: para +#: basic_mapping.xml:221 +#, no-c-format +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (opcional – default para nomes de classes não " +"qualificadas) O nome da sua tabela do banco de dados." + +#. Tag: para +#: basic_mapping.xml:227 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (opcional – default para o nome da " +"classe): Um valor que distingue subclasses individuais, usadas para o " +"comportamento polimorfico. Valores aceitos incluem null e " +"not null" + +#. Tag: para +#: basic_mapping.xml:234 +#, no-c-format +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (opcional - valor default true): Especifica que instancias da classe são (ou não) mutáveis" + +#. Tag: para +#: basic_mapping.xml:240 basic_mapping.xml:2204 +#, fuzzy, no-c-format +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (opcional): Sobrepõe o nome do esquema " +"especificado pelo elemento root <hibernate-mapping>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (opcional): Sobrepõe o nome do esquema " +"especificado pelo elemento raiz <hibernate-mapping>." + +#. Tag: para +#: basic_mapping.xml:246 basic_mapping.xml:2210 +#, fuzzy, no-c-format +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (opcional): Sobrepõe o nome do catálogo " +"especificado pelo elemento root <hibernate-mapping>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (opcional): Sobrepõe o nome do catálogo " +"especificado pelo elemento raiz<hibernate-mapping>." + +#. Tag: para +#: basic_mapping.xml:252 +#, no-c-format +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (opcional): Especifica um interface para ser " +"utilizada pelos proxies de inicialização tardia. Você pode especificar o " +"nome da própria classe." + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (opcional, valor default false): Especifica que o SQL de UPDATE deve ser gerado " +"em tempo de execução e conter apenas aquelas colunas cujos valores foram " +"alterados." + +#. Tag: para +#: basic_mapping.xml:265 +#, no-c-format +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (opcional, valor default false): Especifica que o SQL de INSERT deve ser gerado " +"em tempo de execução e conter apenas aquelas colunas cujos valores não estão " +"nulos." + +#. Tag: para +#: basic_mapping.xml:272 +#, no-c-format +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (opcional, valor default " +"false): Especifica que o Hibernate never deve executar um SQL de UPDATE a não ser que " +"com certeza um objeto está atualmente modificado. Em certos casos " +"(atualmente, apenas quando um objeto transiente foi associado com uma nova " +"sessão utilizando update()), isto significa que o " +"Hibernate ira executar uma instrução SQL de SELECT " +"adicional para determinar se um UPDATE é necessário nesse " +"momento." + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"polymorphism (opcional, default para implicit): Determina se deve ser utilizado a query polimorfica implicita ou " +"explicitamente." + +#. Tag: para +#: basic_mapping.xml:288 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (opicional) especifica um comando SQL " +"WHERE arbitrário para ser usado quando da recuperação de " +"objetos desta classe." + +#. Tag: para +#: basic_mapping.xml:294 +#, no-c-format +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (opcional): Espeicifca uma " +"ClassPersister customizada." + +#. Tag: para +#: basic_mapping.xml:299 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (opcional, valor default 1) " +"especifica um \"tamanho de lote\" para a recuperação de instancias desta " +"classe pelo identificador." + +#. Tag: para +#: basic_mapping.xml:305 +#, no-c-format +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock (octional, valor default " +"version): Determina a estratégia de bloqueio." + +#. Tag: para +#: basic_mapping.xml:311 +#, no-c-format +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (opcional): A recuperação tardia pode ser " +"completamente desabilitada, setando lazy=\"false\"." + +#. Tag: para +#: basic_mapping.xml:317 +#, no-c-format +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name (opcional, default para o nome da classe): O " +"Hibernate3 permite uma classe ser mapeada multiplas vezes, (potencialmente," +"para diferentes tabelas), e permite mapeamentos de entidades que são " +"representadas por Maps ou XML no nível Java. Nestes casos, você deve " +"especificar um nome arbitrário explicitamente para a entidade. Veja e " +"para maiores informações." + +#. Tag: para +#: basic_mapping.xml:327 +#, no-c-format +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (opcional): Uma expressão SQL utilizada para gerar " +"uma constraint de verificação de múltiplas linhas para " +"a geração automática do esquema." + +#. Tag: para +#: basic_mapping.xml:333 +#, no-c-format +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (opcional): O Hibernate poder usar as assim " +"chamadas ROWIDs em bancos de dados que a suportam. Por exemplo, no Oracle, o " +"Hibernate pode utilizar a coluna extra rowid para atualizações mais rápidas " +"se você configurar esta opção para rowid. Um ROWID é uma " +"implementação que representa de maneira detalhada a localização física de " +"uma determinada tupla armazenado." + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information. subselect (opcional): Mapeia uma entidade imutavel e somente de leitura para " +"um subconjunto do banco de dados. Útil se você quiser ter uma view em vez de " +"uma tabela. Veja abaixo para mais informações." + +#. Tag: para +#: basic_mapping.xml:348 +#, no-c-format +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (opcional): Utilizada para marcar superclasses " +"abstratas em hierarquias <union-subclass>." + +#. Tag: para +#: basic_mapping.xml:356 +#, no-c-format +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"É perfeitamente aceitável para uma classe persitente nomeada ser uma " +"interface. Você deverá então declarar as classes implementadas desta " +"interface utilizando o elemento <subclass>. Você " +"pode persistir qualquer classe de aninhada estatica. " +"Você deverá especificar o nome da classe usando a forma padrão, por exemplo: " +"eg.Foo$Bar." + +#. Tag: para +#: basic_mapping.xml:363 +#, no-c-format +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"Classes imutáveis, mutable=\"false\", não podem ser " +"modificadas ou excluídas pela aplicação. Isso permite ao Hibernate fazer " +"alguns aperfeiçoamentos de performance." + +#. Tag: para +#: basic_mapping.xml:368 +#, no-c-format +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"O atributo opcional proxy habilita a inicialização tardia " +"das instâncias persistentes da classe. O Hibernate irá retornar CGLIB " +"proxies como implementado na interface nomeada. O objeto persistente atual " +"será carregado quando um método do proxy for invocado. Veja \"Inicializando " +"coleções e proxies\" abaixo." + +#. Tag: para +#: basic_mapping.xml:375 +#, no-c-format +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"Polimorfismo implícito significa que instâncias de uma " +"classe serão retornada por uma query que dá nome a qualquer superclasse ou " +"interface implementada, ou a classe e as instancias de qualquer subclasse da " +"classe será retornada por umq query que nomeia a classe por si. Polimorfismo " +"explícito significa que instancias da classe serão " +"retornadas apenas por queries que explicitamente nomeiam a classe e que " +"queries que nomeiam as classes irão retornar apenas instancias de subclasses " +"mapeadas dentro da declaração <class> como uma " +"<subclass> ou <joined-subclass>. Para a maioria dos casos, o valor default polymorphism=" +"\"implicit\", é apropriado. Polimorfismo explicito é útil quando " +"duas classes distintas estão mapeadas para a mesma tabela (isso permite um " +"classe \"peso leve\" que contem um subconjunto de colunas da tabela)." + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"O atributo persister deixa você customizar a estratégia " +"de persistência utilizada para a classe. Você pode, por exemplo, especificar " +"sua prórpia subclasse do org.hibernate.persister.EntityPersister ou você pode criar uma implementação completamente nova da " +"interface org.hibernate.persister.ClassPersister que " +"implementa a persistência através de, por exemplo, chamadas a stored " +"procedeures, serialização de arquivos flat ou LDAP. Veja org." +"hibernate.test.CustomPersister para um exemplo simples (de " +"\"persistencia\" para uma Hashtable)." + +#. Tag: para +#: basic_mapping.xml:398 +#, no-c-format +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"Observe que as configurações dynamic-update e " +"dynamic-insert não sao herdadas pelas subclasses e assim " +"podem tambem ser especificadas em elementos <subclass> or <joined-subclass>. Estas configurações " +"podem incrementar a performance em alguns casos, mas pode realmente diminuir " +"a performance em outras. Use-as de forma bastante criteriosa." + +#. Tag: para +#: basic_mapping.xml:406 +#, no-c-format +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"O uso de select-before-update geralmente irá diminuir a " +"performance. Ela é muito útil para prevenir que uma trigger de atualização " +"no banco de dados seja ativada desnecessariamente, se você reconectar um nó " +"de uma instancia desconectada em uma Session." + +#. Tag: para +#: basic_mapping.xml:412 +#, no-c-format +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"Se você ativar dynamic-update, você terá de escolher a " +"estratégia de bloqueio otimista:" + +#. Tag: para +#: basic_mapping.xml:418 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "version verifica a versão e a hora das colunas" + +#. Tag: para +#: basic_mapping.xml:423 +#, no-c-format +msgid "all check all columns" +msgstr "all cverifica todas as colunas" + +#. Tag: para +#: basic_mapping.xml:428 +#, no-c-format +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "" +"dirty verifica as colunas modificadas, permitindo alguns " +"updates concorrentes" + +#. Tag: para +#: basic_mapping.xml:433 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "none não utiliza o bloqueio otimista" + +#. Tag: para +#: basic_mapping.xml:438 +#, no-c-format +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"Nós recomendamos com muita enfase que você utilize a " +"versão e a hora das colunas para o bloqueio otimista com o Hibernate. Esta é " +"a melhor estratégia com respeito a performance e é a única estratégia que " +"trata corretamente as modificações efetuadas em instancias desconectadas " +"(por exemplo, quando Session.merge() é utilizado)." + +#. Tag: para +#: basic_mapping.xml:445 +#, no-c-format +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"Não ha diferença entre uma view e uma tabela para o mapeamento do Hibernate, " +"e como esperado isto é transparente no nível do banco de dados (observe que " +"alguns bancos de dados não suportam views apropriadamente, especialmente com " +"updates). Algumas vezes, você quer utilizar uma view, ma snão pode cria-la " +"no banco de dados (por exemplo, com um esquema legado). Neste caso, você " +"pode mapear uma entidade imutável e de somente leitura, para uma dada " +"expressão SQL, que representa um subselect:" + +#. Tag: programlisting +#: basic_mapping.xml:453 +#, no-c-format +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:455 +#, no-c-format +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"Declare as tabelas para sincronizar com esta entidade, garantindo que o auto-" +"flush ocorra corretamente, e que as queries para esta entidade derivada não " +"retornem dados desatualizados. O <subselect> está " +"disponível tanto como um atributo como um elemento mapeado nested." + +#. Tag: title +#: basic_mapping.xml:465 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:467 +#, no-c-format +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"Classes mapeadas precisam declarar a coluna de chave " +"primaria da tabela do banco de dados. Muitas classes irão tambem ter uma " +"propriedade ao estilo Java-Beans declarando o identificador unico de uma " +"instancia. O elemento <id> define o mapeamento " +"desta propriedade para a chave primária." + +#. Tag: programlisting +#: basic_mapping.xml:482 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:485 +#, no-c-format +msgid "" +"name (optional): The name of the identifier property." +msgstr "name (opcional): O nome do identificador." + +#. Tag: para +#: basic_mapping.xml:490 +#, no-c-format +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "" +"type (opcional): Um nome que indica o tipo no Hibernate." + +#. Tag: para +#: basic_mapping.xml:495 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "" +"column (opcional – default para o a propridade name): O " +"nome coluna chave primaria." + +#. Tag: para +#: basic_mapping.xml:501 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value (opcional - default para um valor \"sensível" +"\"): Uma propriedade de identificação que indica que a instancia foi " +"novamente instanciada (unsaved), diferenciando de instancias desconectadas " +"que foram salvas ou carregadas em uma sessão anterior." + +#. Tag: para +#: basic_mapping.xml:509 basic_mapping.xml:1017 basic_mapping.xml:1156 +#: basic_mapping.xml:1238 basic_mapping.xml:1345 basic_mapping.xml:1534 +#: basic_mapping.xml:1708 basic_mapping.xml:1878 basic_mapping.xml:2457 +#, fuzzy, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default property): A estratégia que o Hiberante deve utilizar para acessar o valor " +"da propriedade\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default property): A estartégia Hibernate que deve ser utilizada para acessar o " +"valor da propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default property): A estratégia Hibernate que deve ser usada para acessar o valor da " +"propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default para property): A estretagia Hibernate que deve ser utilizada para acessar o " +"valor da propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional – valor default property): A estratégia que o Hibernate deve utilizar para acessar o valor " +"da propriedade\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default property): A estrategia que o Hibernate deve utilizar para acessar o valor " +"da propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional - valor default padrão " +"property): A estratégia que o Hibernate pode usar para " +"acessar o valor da propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional – valor default property): A estratégia que o Hibernate pode usar para acessar o valor da " +"propriedade.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (opcional – valor default property): A estratégia que o hibernate deve usar para acessar o valor da " +"propriedade." + +#. Tag: para +#: basic_mapping.xml:517 +#, no-c-format +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "" +"Se o atributo name não for declarado, assume-se que a " +"classe não tem a propriedade de identificação." + +#. Tag: para +#: basic_mapping.xml:522 +#, no-c-format +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "" +"O atributo unsaved-value não é mais necessário no " +"Hibernate 3." + +#. Tag: para +#: basic_mapping.xml:526 +#, no-c-format +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"Há declaração alternativa <composite-id> permite o " +"acesso a dados legados com chaves compostas. Nós desencorajamos fortemente o " +"seu uso por qualquer pessoa." + +#. Tag: title +#: basic_mapping.xml:532 +#, no-c-format +msgid "Generator" +msgstr "Generator" + +#. Tag: para +#: basic_mapping.xml:534 +#, no-c-format +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"O elemento filho opcional <generator> nomeia uma " +"classe Java usada para gerar identificadores unicos para instancias de uma " +"classe persistente. Se algum parâmetro é requerido para configurar ou " +"inicializar a instancia geradora, eles são passados utilizando o elemento " +"<param>." + +#. Tag: programlisting +#: basic_mapping.xml:541 +#, no-c-format +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:543 +#, fuzzy, no-c-format +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"Todos os generators implementam a interface org.hibernate.id." +"IdentifierGenerator. Esta é uma interface bem simples; algumas " +"aplicações podem prover sua própria implementação esepecializada. " +"Entretanto, o Hibernate disponibiliza um conjunto de implementações " +"internamente. Há nomes de atalhos para estes generators próprios: " +"" + +#. Tag: literal +#: basic_mapping.xml:551 +#, no-c-format +msgid "increment" +msgstr "increment" + +#. Tag: para +#: basic_mapping.xml:553 +#, no-c-format +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"gera identificadores dos tipos long, short ou int que são unicos apenas quando nenhum outro " +"processo está inserindo dados na mesma tabela. Não utilize em " +"ambientes de cluster." + +#. Tag: literal +#: basic_mapping.xml:562 +#, no-c-format +msgid "identity" +msgstr "identity" + +#. Tag: para +#: basic_mapping.xml:564 +#, no-c-format +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"suporta colunas de identidade em DB2, MySQL, MS SQL Server, Sybase e " +"HypersonicSQL. O identificador retornado é do tipo long, " +"short ou int." + +#. Tag: literal +#: basic_mapping.xml:572 +#, no-c-format +msgid "sequence" +msgstr "sequence" + +#. Tag: para +#: basic_mapping.xml:574 +#, no-c-format +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"utiliza uma sequence em DB2, PostgreSQL, Oracle, SAP DB, McKoi ou um " +"generator no Interbase. O identificador de retorno é do tipo long, short ou int." + +#. Tag: literal +#: basic_mapping.xml:582 +#, no-c-format +msgid "hilo" +msgstr "hilo" + +#. Tag: para +#: basic_mapping.xml:584 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"utiliza um algoritmo hi/lo para gerar de forma eficiente identificadores do " +"tipo long, short ou int, a partir de uma tabela e coluna fornecida (por default " +"hibernate_unique_key e next_hi) como " +"fonte para os valores hi. O algoritmo hi/lo gera identificadores que são " +"únicos apenas para um banco de dados particular." + +#. Tag: literal +#: basic_mapping.xml:594 +#, no-c-format +msgid "seqhilo" +msgstr "seqhilo" + +#. Tag: para +#: basic_mapping.xml:596 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"utiliza um algoritmo hi/lo para gerar de forma eficinete identificadores do " +"tipo long, short ou int, a partir de uma sequence de banco de dados fornecida." + +#. Tag: literal +#: basic_mapping.xml:604 +#, no-c-format +msgid "uuid" +msgstr "uuid" + +#. Tag: para +#: basic_mapping.xml:606 +#, no-c-format +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"utiliza um algortimo UUID de 128-bits para gerar identificadores do tipo " +"string, unicos em uma rede(o endereço IP é utilizado). O UUID é codificado " +"como um string de digitos hexadecimais de tamanho 32." + +#. Tag: literal +#: basic_mapping.xml:614 +#, no-c-format +msgid "guid" +msgstr "guid" + +#. Tag: para +#: basic_mapping.xml:616 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "" +"utiliza um string GUID gerado pelo banco de dados no MS SQL Server e MySQL." + +#. Tag: literal +#: basic_mapping.xml:622 +#, no-c-format +msgid "native" +msgstr "native" + +#. Tag: para +#: basic_mapping.xml:624 +#, no-c-format +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"seleciona entre identity, sequence ou " +"hilo dependendo das capacidades do banco de dados " +"utilizado." + +#. Tag: literal +#: basic_mapping.xml:632 +#, no-c-format +msgid "assigned" +msgstr "assigned" + +#. Tag: para +#: basic_mapping.xml:634 +#, no-c-format +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"deixa a aplicação definir um identificador para o objeto antes que o " +"save() seja chamado. Esta é a estratégia default se " +"nenhum elemento <generator> é especificado." + +#. Tag: literal +#: basic_mapping.xml:642 +#, no-c-format +msgid "select" +msgstr "select" + +#. Tag: para +#: basic_mapping.xml:644 +#, no-c-format +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "" +"retorna a chave primaria recuperada por uma trigger do banco de dados, " +"selecionado uma linha pela chave única e recuperando o valor da chave " +"primária." + +#. Tag: literal +#: basic_mapping.xml:651 +#, no-c-format +msgid "foreign" +msgstr "foreign" + +#. Tag: para +#: basic_mapping.xml:653 +#, no-c-format +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"utiliza o identificador de um outro objeto associado. Normalmente utilizado " +"em conjunto com uma associaçõa de chave primária do tipo <one-to-" +"one>." + +#. Tag: literal +#: basic_mapping.xml:660 +#, no-c-format +msgid "sequence-identity" +msgstr "sequence-identity" + +#. Tag: para +#: basic_mapping.xml:662 +#, no-c-format +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." + +#. Tag: title +#: basic_mapping.xml:679 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "Algoritmo Hi/lo" + +#. Tag: para +#: basic_mapping.xml:680 +#, no-c-format +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"Os geradores hilo e seqhilo fornecem " +"duas implementações alternativas do algoritmo hi/lo, uma solução " +"preferencial para a geração de identificadores. A primeira implementação " +"requer uma tabela especial do banco de dados para manter o proximo valor \"hi" +"\" disponível. A segunda utiliza uma seqüência do estilo Oracle (quando " +"suportado)." + +#. Tag: programlisting +#: basic_mapping.xml:687 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:691 +#, no-c-format +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"Infelizemente, voce não pode utilizar hilo quando estiver " +"fornecendo sia propria Connection para o Hibernate. " +"Quando o Hibernate está usando um datasource do servidor de aplicações para " +"obter conexões suportadas com JTA, você precisa configurar adequadamente o " +"hibernate.transaction.manager_lookup_class." + +#. Tag: title +#: basic_mapping.xml:700 +#, no-c-format +msgid "UUID algorithm" +msgstr "UUID algorithm" + +#. Tag: para +#: basic_mapping.xml:701 +#, no-c-format +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"O UUID contem: o endereço IP, hora de inicio da JVM (com precisão de um " +"quarto de segundo), a hora do sistema e um valor contador (unico dentro da " +"JVM). Não é possivel obter o endereço MAC ou um endereço de memória do " +"código Java, assim este é o melhor que pode ser feito sem utilizar JNI." + +#. Tag: title +#: basic_mapping.xml:710 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "Colunas de identidade e sequencias" + +#. Tag: para +#: basic_mapping.xml:711 +#, no-c-format +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"Para bancos de dados que suportam colunas de identidade (DB2, MySQL, Sybase, " +"MS SQL), você pode utilizar uma geração de chave identity. Para bancos de dados que suportam sequencias (DB2, Oracle, " +"PostgreSQL, Interbase, McKoi, SAP DB) voce pode utilizar a geração de chaves " +"no estilo sequence. As duas estratégias requerem duas " +"consultas SQL para inserir um novo objeto." + +#. Tag: programlisting +#: basic_mapping.xml:719 +#, no-c-format +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:721 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:723 +#, no-c-format +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"Para desenvolvimento multi-plataforma, a estratégia native irá escolher entre as estratégias i identity, " +"sequence e hilo, dependendo das " +"capacidades do banco de dados utilizado." + +#. Tag: title +#: basic_mapping.xml:732 +#, no-c-format +msgid "Assigned identifiers" +msgstr "Identificadores especificados" + +#. Tag: para +#: basic_mapping.xml:733 +#, no-c-format +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"Se você quer que a aplicação especifique os identificadores (em vez do " +"Hibernate gerá-los) você deve utilizar o gerador assigned. Este gerador especial irá utilizar o valor do identificador " +"especificado para a propriedade de identificação do objeto. Este gerador é " +"usado quando a chave primaria é a chave natural em vez de uma surrogate key. " +"Este é o comportamento padrão se você não especificar um elemento " +"<generator>." + +#. Tag: para +#: basic_mapping.xml:742 +#, no-c-format +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"Escolher o gerador assigned faz com que o Hibernate " +"utilize unsaved-value=\"undefined\", forçando o Hibernate " +"ir até o banco de dados para determinar se uma instância está transiente ou " +"desasociada, a menos que haja uma versão ou uma propriedade timestamp, ou " +"você pode definir Interceptor.isUnsaved()." + +#. Tag: title +#: basic_mapping.xml:752 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "Chaves primárias geradas por triggers" + +#. Tag: para +#: basic_mapping.xml:753 +#, no-c-format +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "Apenas para sistemas legados (o Hibernate nao gera DDL com triggers)." + +#. Tag: programlisting +#: basic_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:759 +#, no-c-format +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"No exemplo acima, há uma única propriedade com valor nomeada " +"socialSecurityNumber definida pela classe, uma chave " +"natural, e uma surrogate key nomeada person_id cujo valor " +"é gerado pro uma trigger." + +#. Tag: title +#: basic_mapping.xml:771 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "Enhanced identifier generators" + +#. Tag: para +#: basic_mapping.xml:773 +#, no-c-format +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#. Tag: para +#: basic_mapping.xml:781 +#, fuzzy, no-c-format +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters: " +"" + +#. Tag: para +#: basic_mapping.xml:795 +#, no-c-format +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#. Tag: para +#: basic_mapping.xml:801 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#. Tag: para +#: basic_mapping.xml:808 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#. Tag: para +#: basic_mapping.xml:815 +#, no-c-format +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#. Tag: para +#: basic_mapping.xml:822 +#, no-c-format +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#. Tag: para +#: basic_mapping.xml:829 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"cascade (opcional – valor default none): o estilo do cascade." + +#. Tag: para +#: basic_mapping.xml:836 +#, fuzzy, no-c-format +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters: " + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#. Tag: para +#: basic_mapping.xml:852 +#, no-c-format +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#. Tag: para +#: basic_mapping.xml:858 +#, no-c-format +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#. Tag: para +#: basic_mapping.xml:865 +#, no-c-format +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#. Tag: para +#: basic_mapping.xml:872 +#, no-c-format +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#. Tag: para +#: basic_mapping.xml:878 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#. Tag: para +#: basic_mapping.xml:884 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#. Tag: para +#: basic_mapping.xml:890 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"cascade (opcional – valor default none): o estilo do cascade." + +#. Tag: title +#: basic_mapping.xml:900 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "Identifier generator optimization" + +#. Tag: para +#: basic_mapping.xml:901 +#, fuzzy, no-c-format +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion. " + +#. Tag: para +#: basic_mapping.xml:909 +#, no-c-format +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#. Tag: para +#: basic_mapping.xml:915 +#, no-c-format +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#. Tag: para +#: basic_mapping.xml:924 +#, no-c-format +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#. Tag: title +#: basic_mapping.xml:937 +#, no-c-format +msgid "composite-id" +msgstr "composite-id" + +#. Tag: programlisting +#: basic_mapping.xml:939 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:941 +#, no-c-format +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"Para tabelas com uma chave composta, você pode mapear múltiplas propriedades " +"da classe como propriedades de identificação. O elemento <" +"composite-id> aceita o mapeamento da propriedade <" +"key-property> e mapeamentos <key-many-to-one>como elements filhos." + +#. Tag: programlisting +#: basic_mapping.xml:948 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:950 +#, no-c-format +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"Sua classe persistente precisa sobre escrever " +"equals() e hashCode() para implementar " +"identificadores compostos igualmente. E precisa também implementar " +"Serializable." + +#. Tag: para +#: basic_mapping.xml:956 +#, no-c-format +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"Infelizmente, esta solução para um identificador composto significa que um " +"objeto persistente é seu próprio identificador. Não há outro \"handle\" que " +"o próprio objeto. Você mesmo precisa instanciar uma instância de outra " +"classe persistente e preencher suas propriedades de identificação antes que " +"você possa dar um load() para o estado persistente " +"associado com uma chave composta. Nos chamamos esta solução de identificador " +"composto embedded e não aconselhamos para aplicações " +"sérias." + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"Uma segunda solução é o que podemos chamar de identificador composto " +"mapped quando a propriedades de identificação nomeadas " +"dentro do elemento <composite-id> estão duplicadas " +"tando na classe persistente como em uma classe de identificação separada." + +#. Tag: programlisting +#: basic_mapping.xml:971 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:973 +#, no-c-format +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"No exemplo, ambas as classes de identificação compostas, " +"MedicareId, e a própria classe entidade tem propriedades " +"nomeadas medicareNumber e dependent. A " +"classe identificadora precisa sobrepor equals() e " +"hashCode() e implementar Serializable. " +"A desvantagem desta solução é obvia – duplicação de código." + +#. Tag: para +#: basic_mapping.xml:982 +#, no-c-format +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "" +"Os seguintes atributos ão utilizados para especificar o mapeamento de um " +"identificador composto:" + +#. Tag: para +#: basic_mapping.xml:988 +#, no-c-format +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped mapped (opcional, valor default false ): indica que um identificar composto mapeado é usado, e que as " +"propriedades de mapeamento contidas refere-se tanto a classe entidade e a " +"classe de identificação composta." + +#. Tag: para +#: basic_mapping.xml:996 +#, no-c-format +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (opcional, mas requerida para um identificar " +"composto mapeado): A classe usada como um identificador composto." + +#. Tag: para +#: basic_mapping.xml:1003 +#, no-c-format +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"Nós iremos descrever uma terceira e as vezes mais conveniente solução, onde " +"o identificador composto é implementado como uma classe componente na . Os atributos descritos abaixo aplicam-" +"se apenas para esta solução:" + +#. Tag: para +#: basic_mapping.xml:1011 +#, no-c-format +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (opcional, requerida para esta solução): Uma " +"propriedade do tipo componente que armazena o identificador composto (veja " +"capítulo 9)" + +#. Tag: para +#: basic_mapping.xml:1023 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (opcional - valor default para o tipo de " +"propriedade determiando por reflexão) : A classe componente utilizada como " +"um identificador composto (veja a próxima sessão)." + +#. Tag: para +#: basic_mapping.xml:1030 +#, no-c-format +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"Esta terceira solução, um componente de identificação, " +"é o que nós recomendamos para a maioria das aplicações." + +#. Tag: title +#: basic_mapping.xml:1038 +#, no-c-format +msgid "discriminator" +msgstr "discriminator" + +#. Tag: para +#: basic_mapping.xml:1040 +#, no-c-format +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"O elemento <discriminator> é necessário para " +"persistência polimórfica utilizando a estratégia de mapeamento table-per-" +"class-hierarchy e declara uma coluna discriminadora da tabela. A coluna " +"discriminadora contem valores de marcação que dizem a camada de persistência " +"qual subclasse instanciar para uma linha particular. Um restrito conjunto de " +"tipos que podem ser utilizados: string, " +"character, integer, byte, short, boolean, " +"yes_no, true_false." + +#. Tag: programlisting +#: basic_mapping.xml:1058 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1061 +#, no-c-format +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column (opcional - valor default class) o nome da coluna discriminadora" + +#. Tag: para +#: basic_mapping.xml:1067 +#, no-c-format +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (opcional - valor default string) " +"o nome que indica o tipo Hibernate" + +#. Tag: para +#: basic_mapping.xml:1073 +#, no-c-format +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force (opcional - valor default false) " +"\"força\" o Hibernate a especificar valores discriminadores permitidos mesmo " +"quando recuperando todas as instancias da classe root." + +#. Tag: para +#: basic_mapping.xml:1080 +#, no-c-format +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (opcional - valor default para true) sete isto para false se sua coluna " +"discriminadora é também parte do identificador composto mapeado. (Diz ao " +"Hibernate para não incluir a coluna em comandos SQL INSERTs)." + +#. Tag: para +#: basic_mapping.xml:1088 +#, no-c-format +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (opcional) uma expressão SQL arbitraria que é e " +"xecutada quando um tipo tem que ser avaliado. Permite discriminação baseada " +"em conteúdo." + +#. Tag: para +#: basic_mapping.xml:1096 +#, no-c-format +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"Valores atuais de uma coluna discriminada são especificados pelo atributo " +"discriminator-value da <class> e " +"elementos da <subclass>." + +#. Tag: para +#: basic_mapping.xml:1102 +#, no-c-format +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"O atributo force é util (apenas) em tabelas contendo " +"linhas com valores discriminadores \"extras\" que não estão mapeados para " +"uma classe persistente. Este não é geralmente o caso." + +#. Tag: para +#: basic_mapping.xml:1108 +#, no-c-format +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"Usando o atributo formula voce pode declarar uma " +"expressão SQL arbitrária que sera utilizada para avaliar o tipo de uma " +"linha :" + +#. Tag: programlisting +#: basic_mapping.xml:1113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1118 +#, no-c-format +msgid "version (optional)" +msgstr "version (optional)" + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"O elemento <version> é opcional e indica que a " +"tabela possui dados versionados. Isto é particularmente útil se você planeja " +"utilizar transações longas (veja abaixo):" + +#. Tag: programlisting +#: basic_mapping.xml:1136 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1139 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column (opcional - default a a propriedade name): O nome " +"da coluna mantendo o numero da versão" + +#. Tag: para +#: basic_mapping.xml:1145 +#, no-c-format +msgid "" +"name: The name of a property of the persistent class." +msgstr "name: O nome da propriedade da classe persistente." + +#. Tag: para +#: basic_mapping.xml:1150 +#, no-c-format +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (opcional - valor default para integer): O tipo do numero da versão" + +#. Tag: para +#: basic_mapping.xml:1162 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (opcional – valor default para " +"undefined ): Um valor para a propriedade versão que " +"indica que uma instancia é uma nova instanciada (unsaved), distinguindo de " +"instancias desconectadas que foram salvas ou carregadas em sessões " +"anteriores. ((undefined especifica que o valor da " +"propriedade de identificação deve ser utilizado)." + +#. Tag: para +#: basic_mapping.xml:1171 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties. generated (opcional - " +"valor default never): Especifica que valor para a " +"propriedade versão é na verdade gerado pelo banco de dados. Veja a discussão " +"da Seção generated properties." + +#. Tag: para +#: basic_mapping.xml:1178 +#, no-c-format +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"insert (opcional - valor default para true): Especifica se a coluna de versão deve ser incluída no comando SQL " +"de insert. Pode ser configurado como false se a coluna do " +"banco de dados está definida com um valor default de 0." + +#. Tag: para +#: basic_mapping.xml:1188 +#, no-c-format +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"Números de versão podem ser dos tipos Hibernate long, " +"integer, short, timestamp ou calendar." + +#. Tag: para +#: basic_mapping.xml:1193 +#, no-c-format +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"A versão de uma propriedade timestamp nunca deve ser nula para uma instancia " +"desconectada, assim o Hibernate irá identificar qualquer instância com uma " +"versão nula ou timestamp como transiente, não importando qual estratégia " +"para foi especificada para unsaved-value. " +"Declarando uma versão nula ou a propriedade timestamp é um caminho " +"fácil para tratar problemas com reconexões transitivas no Hibernate, " +"especialmente úteis para pessoas utilizando identificadores assinaldados ou " +"chaves compostas!" + +#. Tag: title +#: basic_mapping.xml:1204 +#, no-c-format +msgid "timestamp (optional)" +msgstr "timestamp (optional)" + +#. Tag: para +#: basic_mapping.xml:1206 +#, no-c-format +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"O elemento opcional <timestamp> indica que uma " +"tabela contém dados timestamped. Isso tem por objetivo dar uma alternativa " +"para versionamento. Timestamps são por natureza uma implementação menos " +"segura do locking otimista. Entretanto, algumas vezes a aplicação pode usar " +"timestamps em outros caminhos." + +#. Tag: programlisting +#: basic_mapping.xml:1222 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1225 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "" +"column (opcional - valor default para a propriedade " +"name): O nome da coluna que mantem o timestamp." + +#. Tag: para +#: basic_mapping.xml:1231 +#, no-c-format +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name: O nome da propriedade no estilo JavaBeans do tipo " +"Date ou Timestamp da classe " +"persistente Java." + +#. Tag: para +#: basic_mapping.xml:1244 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (opcional - valor default null): Uma propriedade para a versão de que indica que uma instância é " +"uma nova instanciada (unsaved), distinguindo-a de instancias desconectadas " +"que foram salvas ou carregadas em sessões previas. (undefined especifica que um valor de propriedade de identificação deve ser " +"utilizado)" + +#. Tag: para +#: basic_mapping.xml:1253 +#, no-c-format +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"source (opcional - valor default para vm): De onde o Hibernate deve recuperar o valor timestamp? Do banco de " +"dados ou da JVM corrente? Timestamps baseados em banco de dados levam a um " +"overhead porque o Hibernate precisa acessar o banco de dados para determinar " +"o \"próximo valor\", mas é mais seguro para uso em ambientes de \"cluster\". " +"Observe também, que nem todos Dialects suportam a " +"recuperação do timestamp corrente do banco de dados, enquando outros podem " +"não ser seguros para utilização em bloqueios pela falta de precisão (Oracle " +"8 por exemplo)" + +#. Tag: para +#: basic_mapping.xml:1265 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"generated (opcional - valor default never): Especifica que o valor da propriedade timestamp é gerado pelo " +"banco de dados. Veja a discussão generated properties." + +#. Tag: para +#: basic_mapping.xml:1274 +#, no-c-format +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"Observe que <timestamp> é equivalente a " +"<version type=\"timestamp\">. E <" +"timestamp source=\"db\"> é equivalente a <version " +"type=\"dbtimestamp\">." + +#. Tag: title +#: basic_mapping.xml:1284 +#, no-c-format +msgid "property" +msgstr "property" + +#. Tag: para +#: basic_mapping.xml:1286 +#, no-c-format +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"O elemento <property> declara uma propriedade " +"persistente de uma classe, no estilo JavaBean." + +#. Tag: programlisting +#: basic_mapping.xml:1308 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1311 +#, no-c-format +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "" +"name: o nome da propriedade, iniciando com letra " +"minúscula." + +#. Tag: para +#: basic_mapping.xml:1317 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column (opcional - default para a propriedade name): o " +"nome da coluna mapeada do banco de dados, Isto pode também ser especificado " +"pelo(s) elemento(s) <column> aninhados." + +#. Tag: para +#: basic_mapping.xml:1324 +#, no-c-format +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "" +"type (opcional): um nome que indica o tipo Hibernate." + +#. Tag: para +#: basic_mapping.xml:1329 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (opcional - valor default true): especifica que as colunas mapeadas devem ser incluidas nas " +"instruções SQL de UPDATE e/ou INSERT . " +"Setar ambas para to false permite uma propridade " +"\"derivada\" pura cujo valor é inicializado de outra propriedade que mapeie " +"a mesma coluna(s) ou por uma trigger ou outra aplicação." + +#. Tag: para +#: basic_mapping.xml:1338 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula (opcional): uma expressão SQL que definie o valor " +"para uma propriedade calculada. Propriedades calculadas " +"nao tem uma coluna de mapeamento para elas." + +#. Tag: para +#: basic_mapping.xml:1351 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (opcional - valor default para false): Especifica que esta propriedade deve ser trazida de forma \"lazy" +"\" quando a instancia da variável é acessada pela primeira vez (requer " +"instrumentação bytecode em tempo de criação)." + +#. Tag: para +#: basic_mapping.xml:1358 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (opcional): Habilita a geração de DDL de uma unica " +"constraint para as colunas. Assim, permite que isto seja o alvo de uma " +"property-ref." + +#. Tag: para +#: basic_mapping.xml:1365 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (opcional): Habilita a geração de DDL de uma " +"constraint de nulidade para as colunas." + +#. Tag: para +#: basic_mapping.xml:1371 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional - valor default true): Especifica se mudanças para esta propriedade requerem ou não " +"bloqueio otimista. Em outras palavras, determina se um incremento de versão " +"deve ocorrer quando esta propriedade está suja." + +#. Tag: para +#: basic_mapping.xml:1379 +#, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"generated (opcional - valor default never): Especifica que o valor da propriedade é na verdade gerado pelo " +"banco de dados. Veja a discussão da seção generated properties." + +#. Tag: para +#: basic_mapping.xml:1388 +#, no-c-format +msgid "typename could be:" +msgstr "typename pode ser:" + +#. Tag: para +#: basic_mapping.xml:1394 +#, no-c-format +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob). O " +"nome do tipo basico do Hibernate (ex., integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." + +#. Tag: para +#: basic_mapping.xml:1400 +#, no-c-format +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"O nome da classe Java com um tipo básico default (ex. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." + +#. Tag: para +#: basic_mapping.xml:1406 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "O nome da classe Java serializable" + +#. Tag: para +#: basic_mapping.xml:1411 +#, no-c-format +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"O nome da classe de um tipo customizado (ex. com.illflow.type." +"MyCustomType)." + +#. Tag: para +#: basic_mapping.xml:1417 +#, no-c-format +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"Se você não especificar um tipo, o Hibernate ira utilizar reflexão sobre a " +"propriedade nomeada para ter uma idéia do tipo Hibernate correto. O " +"Hibernate ira tentar interpretar o nome da classe retornada, usando as " +"regras 2, 3 e 4 nesta ordem. Entretanto, isto não é sempre suficiente Em " +"certos casos, você ainda irá necessitar do atributo type. " +"(Por exemplo, para distinguir entre Hibernate.DATE ou " +"Hibernate.TIMESTAMP, ou para espcificar uma tipo " +"ciustomizado.)" + +#. Tag: para +#: basic_mapping.xml:1427 +#, no-c-format +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"O atributo access permite voce controlar como o Hibernate " +"irá acessar a propriedade em tempo de execução. Por default, o Hibernate irá " +"chamar os métodos get/set da propriedades. Se voce especificar " +"access=\"field\", o Hibernate ira bipassar os metodos get/" +"set, acessnado o campo diretamente, usando reflexão. Voc epode especificar " +"sua própria estratégia para acesso da propriedade criando uma classe que " +"implemente a interface org.hibernate.property.PropertyAccessor." + +#. Tag: para +#: basic_mapping.xml:1436 +#, no-c-format +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"Um recurso especialmente poderoso é o de propriedades derivadas. Estas " +"propriedades são por definição read-only, e o valor da propriedade é " +"calculado em tempo de execução. Você declara este calculo como uma expressão " +"SQL, que traduz para clausula SELECT de uma subquery " +"daquery SQL que carrega a instancia:" + +#. Tag: programlisting +#: basic_mapping.xml:1443 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1445 +#, no-c-format +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"Observe que você pode referenciar as entidades da própria tabela, através da " +"não declaração de um alias para uma coluna particular ( customerId no exemplo dado). Observe tambem que voce pode usar o mapeamento de " +"elemento aninhado <formula>, se você não gostar de " +"usar o atributo." + +#. Tag: title +#: basic_mapping.xml:1455 +#, no-c-format +msgid "many-to-one" +msgstr "many-to-one" + +#. Tag: para +#: basic_mapping.xml:1457 +#, no-c-format +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"Uma associação ordinária para outra classe persistente é declarada usando o " +"elemento many-to-one. O modelo relacional é uma " +"associação many-to-one: a uma chave estrangeira de uma tabela referenciando " +"a chave primaria da tabela destino." + +#. Tag: programlisting +#: basic_mapping.xml:1485 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1488 basic_mapping.xml:1669 basic_mapping.xml:1855 +#, no-c-format +msgid "name: The name of the property." +msgstr "name: O nome da propriedade." + +#. Tag: para +#: basic_mapping.xml:1493 basic_mapping.xml:2284 +#, fuzzy, no-c-format +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (opcional): O nome da coluna foreign key. Isto " +"pode também ser especificado através de elementos aninhados <" +"column>.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +". column (opcional): O nome da coluna da chave " +"estrangeira. Isto também pode ser especificado por aninhamento de elemento" +"(s) <column>." + +#. Tag: para +#: basic_mapping.xml:1500 basic_mapping.xml:1674 +#, fuzzy, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (opcional – default para o tipo de propriedade " +"determinado pela reflexão). O nome da classe associada.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (opcional – default para o tipo da propriedade " +"definido via reflection): O nome da classe associada." + +#. Tag: para +#: basic_mapping.xml:1506 +#, no-c-format +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (opcional): Especifica quais operações dever ser " +"em cascata do objeto pai para o objeto associado." + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1695 +#, fuzzy, no-c-format +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (opcional - default para select): Escolhe entre recuperação outer-join ou recuperação seqüencial.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch ((opcional – valor default select): Escolhe entre outer-join fetching ou sequential select fetching." + +#. Tag: para +#: basic_mapping.xml:1518 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert (opcional - valor default true): especifica que as colunas mapeadas dever ser incluidas em " +"instruções SQL de UPDATE e/ou INSERT. " +"Setando ambas para false você permite uma associação " +"\"derivada\" pura cujos valores são inicializados de algumas outras " +"propriedades que mapeiam a mesma coluna ou por uma trigger ou outra " +"aplicação." + +#. Tag: para +#: basic_mapping.xml:1527 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref: (opcional) O nome da propriedade da classe " +"associada que faz a junção desta foreign key. Se não especificada, a chave " +"primaria da classe associada será utilizada." + +#. Tag: para +#: basic_mapping.xml:1540 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique (opcional): Habilita a geração DDL de uma " +"constraint unique para a coluna foreign-key. Alem disso, permite ser o alvo " +"de uma property-ref. Isso torna a associação multipla " +"efetivamente um para um." + +#. Tag: para +#: basic_mapping.xml:1548 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (opcional): Habilita a geração DDL de uma " +"constraint de nulidade para as foreign keys." + +#. Tag: para +#: basic_mapping.xml:1554 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional - valor default true): Especifica se mudanças desta propriedade requerem ou não " +"travamento otimista. Em outras palavras, determina se um incremento de " +"versão deve ocorrer quando esta propriedade está suja." + +#. Tag: para +#: basic_mapping.xml:1562 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy(opcional – valor default proxy): " +"Por default, associações de ponto unico são envoltas em um proxie. " +"lazy=\"no-proxy\" especifica que a propriedade deve ser " +"trazida de forma tardia quando a instancia da variável é acessada pela " +"primeira vez (requer instrumentação bytecode em tempo de criação) " +"lazy=\"false\" especifica que a associação será sempre " +"recuperada fortemente." + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (opcional - valor default exception): Especifica como as foreign keys que referenciam linhas ausentes " +"serão tratadas: ignore irá tratar a linha ausente como " +"ama associaççao de null" + +#. Tag: para +#: basic_mapping.xml:1579 basic_mapping.xml:1733 +#, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "" +"entity-name (opcional): O nome da entidade da classe " +"associada." + +#. Tag: para +#: basic_mapping.xml:1585 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (optional): Uma expressão SQL que define um valor " +"para um foreign key computed." + +#. Tag: para +#: basic_mapping.xml:1592 +#, no-c-format +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"Setar o valor do atributo cascade para qualquer valor " +"significativo diferente de none irá propagar certas " +"operações ao objeto associado. Os valores significativos são os nomes das " +"operações básicas do Hibernate, persist, merge, delete, save-" +"update, evict, replicate, lock, refresh, assim como os valores " +"especiais delete-orphan e all e " +"combinações de nomes de operações separadas por vírgula, como por exemplo, " +"cascade=\"persist,merge,evict\" ou cascade=\"all," +"delete-orphan\". Veja a seção para uma explicação completa. Note que associações valoradas " +"simples (associações muitos-pra-um, e um-pra-um) não suportam orphan delete." + +#. Tag: para +#: basic_mapping.xml:1605 +#, no-c-format +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "" +"Uma típica declaração muitos-pra-um se parece com esta:" + +#. Tag: programlisting +#: basic_mapping.xml:1609 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1611 +#, no-c-format +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"O atributo property-ref deve apenas ser usado para mapear " +"dados legados onde uma chave estrangeira se referencia a uma chave exclusiva " +"da tabela associada que não seja à chave primária. Este é um modelo " +"relacional desagradável. Por exemplo, suponha que a classe Product tenha um número seqüencial exclusivo, que não é a chave primária. " +"(O atributo unique controla a geração de DDL do Hibernate " +"com a ferramenta SchemaExport.)" + +#. Tag: programlisting +#: basic_mapping.xml:1620 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1622 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "Então o mapeamento para OrderItem poderia usar:" + +#. Tag: programlisting +#: basic_mapping.xml:1626 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1628 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "Porém, isto obviamente não é indicado, nunca." + +#. Tag: para +#: basic_mapping.xml:1632 +#, no-c-format +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"Se a chave exclusiva referenciada engloba múltiplas propriedades da entidade " +"associada, você deve mapear as propriedades referenciadas dentro de um " +"elemento chamado <properties>" + +#. Tag: para +#: basic_mapping.xml:1637 +#, no-c-format +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "" +"Se a chave exclusiva referenciada é a propriedade de um componente, você " +"pode especificar um caminho para a propriedade." + +#. Tag: programlisting +#: basic_mapping.xml:1641 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1646 +#, no-c-format +msgid "one-to-one" +msgstr "one-to-one (um-pra-um)" + +#. Tag: para +#: basic_mapping.xml:1648 +#, no-c-format +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "" +"Uma associação um-pra-um para outra classe persistente é declarada usando um " +"elemento one-to-one ." + +#. Tag: programlisting +#: basic_mapping.xml:1666 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1680 +#, no-c-format +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade (opcional): Especifica qual operação deve ser " +"cascateada do objeto pai para o objeto associado." + +#. Tag: para +#: basic_mapping.xml:1686 +#, no-c-format +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"constrained (opcional): Especifica que uma chave " +"estrangeira constraint na chave primária da tabela mapeada referencia a " +"tabela da classe associada, Esta opção afeta a ordem em queh save()" +" e delete() são cascateadas, e determina se a " +"associação pode ser substituída (isto também é usado pela ferramenta schema " +"export)." + +#. Tag: para +#: basic_mapping.xml:1701 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"property-ref(opcional): O nome da propriedade da classe " +"associada que é ligada a chave primária desta classe. Se não for " +"especificada, a chave primária da classe associada é utilizada." + +#. Tag: para +#: basic_mapping.xml:1714 +#, no-c-format +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"formula (opcional): Quase todas associações um-pra-um " +"mapeiam para a chave primária da entidade dona. No caso raro, que não é o " +"caso, você pode especificar uma outra coluna, colunas ou expressões para " +"juntar utilizando uma formula SQL. (Veja org.hibernate.test." +"onetooneformula para exemplo)." + +#. Tag: para +#: basic_mapping.xml:1722 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"lazy (opcional – valor default proxy): " +"Por default, associações single point são proxied. lazy=\"no-proxy" +"\" especifica que a propriedade deve ser fetched lazily quando o " +"atributo é acessado pela primeira vez (requer build-time bytecode " +"instrumentation). lazy=\"false\" especifica que a " +"associação vai sempre ser avidamente fetched. Note que se " +"constrained=\"false\", proxing é impossível e o Hibernate " +"vai ávido fetch a associação!" + +#. Tag: para +#: basic_mapping.xml:1740 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "Existem duas variedades de associações um-pra-um:" + +#. Tag: para +#: basic_mapping.xml:1744 +#, no-c-format +msgid "primary key associations" +msgstr "associações de chave primária" + +#. Tag: para +#: basic_mapping.xml:1747 +#, no-c-format +msgid "unique foreign key associations" +msgstr "associações de chave estrangeira exclusiva" + +#. Tag: para +#: basic_mapping.xml:1752 +#, no-c-format +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"Associações de chave primária não necessitam de uma coluna extra de tabela; " +"se duas linhas são relacionadas pela associação então as duas linhas da " +"tabela dividem a mesmo valor da chave primária. Assim, se você quer que dois " +"objetos sejam relacionados por uma associação de chave primária, você deve " +"ter certeza que eles são assinados com o mesmo valor identificador!" + +#. Tag: para +#: basic_mapping.xml:1759 +#, no-c-format +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"Para uma associação de chave primária, adicione os seguintes mapeamentos em " +"Employee e Person, respectivamente." + +#. Tag: programlisting +#: basic_mapping.xml:1764 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1765 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1767 +#, no-c-format +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"Agora nós devemos assegurar que as chaves primárias de linhas relacionadas " +"nas tabelas PERSON e EMPLOYEE são iguais. Nós usamos uma estratégia especial " +"de geração de identificador do Hibernate chamada foreign:" + +#. Tag: programlisting +#: basic_mapping.xml:1773 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1775 +#, no-c-format +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"Uma nova instância de Person salva recentemente é então " +"assinada com o mesmo valor da chave primária da instância de " +"employee referenciada com a propriedade " +"employee daquela Person." + +#. Tag: para +#: basic_mapping.xml:1781 +#, no-c-format +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"Alternativamente, uma chave estrangeira com uma unique constraint, de " +"Employee para Person, pode ser " +"expressa como:" + +#. Tag: programlisting +#: basic_mapping.xml:1786 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1788 +#, no-c-format +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "" +"E esta associação pode ser feita de forma bi-direcional adicionando o " +"seguinte no mapeamento de Person:" + +#. Tag: programlisting +#: basic_mapping.xml:1793 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1798 +#, no-c-format +msgid "natural-id" +msgstr "natural-id" + +#. Tag: programlisting +#: basic_mapping.xml:1800 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1802 +#, no-c-format +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"Embora nós recomendemos o uso de surrogate keys como chaves primárias, você " +"deve ainda identificar chaves naturais para todas as entidades. Uma chave " +"natural é uma propriedade ou combinação de propriedades que é exclusiva e " +"não nula. Se não pude ser modificada, melhor ainda. Mapeie as propriedades " +"da chave natural dentro do elemento <natural-id>. O " +"Hibernate irá gerar a chave exclusiva necessária e as constraints de " +"nullability , e seu mapeamento será apropriadamente auto documentado." + +#. Tag: para +#: basic_mapping.xml:1811 +#, no-c-format +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"Nós recomendamos com enfase que você implemente equals() " +"e hashCode() para comparar as propriedades da chave " +"natural da entidade." + +#. Tag: para +#: basic_mapping.xml:1816 +#, no-c-format +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "" +"Este mapeamento não tem o objetivo de uso com entidades com natural chaves " +"primárias." + +#. Tag: para +#: basic_mapping.xml:1822 +#, no-c-format +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "" +"mutable mutable (opcional, valor defaultfalse): Por default, propriedades naturais identificadoras são " +"consideradas imutáveis (constante)." + +#. Tag: title +#: basic_mapping.xml:1832 +#, no-c-format +msgid "component, dynamic-component" +msgstr "componente, componente dinâmico" + +#. Tag: para +#: basic_mapping.xml:1834 +#, no-c-format +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "" +"O elemento<component> mapeia propriedades de um " +"objeto filho para colunas da tabela de uma classe pai. Componentes podem, um " +"após o outro, declarar suas próprias propriedades, componentes ou coleções. " +"Veja \"Components\" abaixo." + +#. Tag: programlisting +#: basic_mapping.xml:1852 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1860 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"class (opcional – valor default para o tipo de " +"propriedade determinada por reflection): O nome da classe (filha) do " +"componente." + +#. Tag: para +#: basic_mapping.xml:1866 basic_mapping.xml:1955 +#, no-c-format +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"insert: As colunas mapeadas aparecem nos SQL de " +"INSERTs?" + +#. Tag: para +#: basic_mapping.xml:1872 basic_mapping.xml:1961 +#, no-c-format +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"update: As colunas mapeadas aparecem nos SQL de " +"UPDATEs?" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (opcional - valor default false): " +"Especifica que este componente deve ser fetched lazily quando o atributo for " +"acessado pela primeira vez (requer build-time bytecode instrumentation)." + +#. Tag: para +#: basic_mapping.xml:1891 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (opcional – valor default true): Especifica que atualizações para este componente requerem ou não " +"aquisição de um lock otimista. Em outras palavras, determina se uma versão " +"de incremento deve ocorrer quando esta propriedade estiver modificada." + +#. Tag: para +#: basic_mapping.xml:1899 basic_mapping.xml:1975 +#, fuzzy, no-c-format +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"unique (opcional – valor default false): Especifica que existe uma unique constraint em todas as colunas " +"mapeadas do componente.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"unique (opcional – valor defautl false): Especifica que uma unique constraint existe em todas as colunas " +"mapeadas do componente." + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"A tag filha <property> acrescenta a propriedade de " +"mapeamento da classe filha para colunas de uma tabela." + +#. Tag: para +#: basic_mapping.xml:1913 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"O elemento <component> permite um sub-elemento " +"<parent> mapeie uma propriedade da classe do " +"componente como uma referencia de volta para a entidade que o contém." + +#. Tag: para +#: basic_mapping.xml:1919 +#, no-c-format +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "" +"O elemento <dynamic-component> permite que um " +"Map possa ser mapeado como um componente onde os nomes " +"das propriedades referem-se para as chaves no mapa, veja ." + +#. Tag: title +#: basic_mapping.xml:1928 +#, no-c-format +msgid "properties" +msgstr "propriedades" + +#. Tag: para +#: basic_mapping.xml:1930 +#, no-c-format +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"O elemento <properties> permite a definição de um " +"grupo com nome, lógico de propriedades de uma classe. O uso mais importante " +"do construtor é que este permite uma combinação de propriedades para ser o " +"objetivo de uma property-ref. É também um modo " +"conveninente para definir uma unique constraint de múltiplas colunas." + +#. Tag: programlisting +#: basic_mapping.xml:1946 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1949 +#, no-c-format +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"name:: O nome lógico do agrupamento – não é o nome atual de propriedade." + +#. Tag: para +#: basic_mapping.xml:1967 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"optimistic-lock (opcional – valor default true): Especifica que atualizações para estes componentes requerem ou " +"não aquisição de um lock otimista. Em outras palavras, determina se uma " +"versão de incremento deve ocorrer quando estas propriedades estiverem " +"modificadas." + +#. Tag: para +#: basic_mapping.xml:1984 +#, no-c-format +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "" +"Por exemplo, se nós temos o seguinte mapeamento de <" +"properties>:" + +#. Tag: programlisting +#: basic_mapping.xml:1988 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1990 +#, no-c-format +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"Então nós podemos ter uma associação de dados herdados que referem a esta " +"chave exclusiva da tabela Person, ao invés de se " +"referirem a chave primária:" + +#. Tag: programlisting +#: basic_mapping.xml:1995 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1997 +#, no-c-format +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "" +"Nós não recomendamos o uso deste tipo de coisa fora do contexto de " +"mapeamento de dados herdados." + +#. Tag: title +#: basic_mapping.xml:2005 +#, no-c-format +msgid "subclass" +msgstr "subclass (subclasse)" + +#. Tag: para +#: basic_mapping.xml:2007 +#, no-c-format +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "" +"Finalmente, a persistência polimórfica requer a declaração de cada subclasse " +"da classe de persistência raiz. Para a estratégia de mapeamento table-per-" +"class-hierarchy, a declaração <subclass> deve ser " +"usada." + +#. Tag: programlisting +#: basic_mapping.xml:2020 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2023 basic_mapping.xml:2081 basic_mapping.xml:2144 +#, fuzzy, no-c-format +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: O nome de classe completamente qualificada da " +"subclasse.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: O nome da classe completamente qualificada da " +"subclasse.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: O nome da subclasse completamente qualificada." + +#. Tag: para +#: basic_mapping.xml:2028 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"discriminator-value (opcional – valor default o nome da " +"classe): Um valor que distingue subclasses individuais." + +#. Tag: para +#: basic_mapping.xml:2034 basic_mapping.xml:2091 basic_mapping.xml:2154 +#, fuzzy, no-c-format +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (opcional): Especifica a classe ou interface que " +"usará os proxies de inicialização atrasada.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (opcional): Especifica a classe ou interface para " +"usar os proxies de recuperação atrasada.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies. proxy (opcional): " +"Especifica a classe ou interface para usar os proxies de recuperação " +"atrasada." + +#. Tag: para +#: basic_mapping.xml:2040 basic_mapping.xml:2097 basic_mapping.xml:2160 +#, fuzzy, no-c-format +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (opcional, valor default true): " +"Configurar lazy=\"false\" desabilitará o uso de " +"inicialização atrasada.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (opcional, valor default true): " +"Fixanr lazy=\"false\" desabilita o uso recuperação " +"atrasada.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching. " +"lazy (opcional, valor default ptrue): " +"Fixando lazy=\"false\" desabilita o uso da recuperação " +"atrasada." + +#. Tag: para +#: basic_mapping.xml:2048 +#, no-c-format +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"Cada subclasse deve declarar suas próprias propriedades persistentes e " +"subclasses. As propriedades <version> e " +"<id> são configuradas para serem herdades da classe " +"raiz. Cada subclasse numa hierarquia deve definir um único " +"discriminator-value. Se nenhum for especificado, o nome " +"da classe Java completamente qualificada será usada." + +#. Tag: para +#: basic_mapping.xml:2056 basic_mapping.xml:2114 basic_mapping.xml:2172 +#, fuzzy, no-c-format +msgid "" +"For information about inheritance mappings, see ." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Para informações sobre mapeamento de heranças, veja o .\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Para informações de mapeamentos de herança, veja .\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Para informações sobre mapeamentos de herança, veja ." + +#. Tag: title +#: basic_mapping.xml:2063 +#, no-c-format +msgid "joined-subclass" +msgstr "joined-subclass" + +#. Tag: para +#: basic_mapping.xml:2065 +#, no-c-format +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"Alternativamente, cada subclasse pode ser mapeada para sua própria tabela " +"(Estratégia de mapeamento table-per-subclass). O estado herdado é devolvido " +"por associação com a tabela da superclasse. Nós usamos o elemento " +"<joined-subclass>." + +#. Tag: programlisting +#: basic_mapping.xml:2078 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2086 basic_mapping.xml:2149 +#, no-c-format +msgid "table: The name of the subclass table." +msgstr "table: O nome da tabela da subclasse." + +#. Tag: para +#: basic_mapping.xml:2105 +#, no-c-format +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"A coluna discriminator requerida para esta estratégia de mapeamento. Porém, " +"cada subclasse deve declarar uma coluna de tabela com o identificador do " +"objeto usando o elemento <key>. O mapeamento no " +"início do capítulo poderia ser re-escrito assim:" + +#. Tag: programlisting +#: basic_mapping.xml:2112 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2121 +#, no-c-format +msgid "union-subclass" +msgstr "union-subclass" + +#. Tag: para +#: basic_mapping.xml:2123 +#, no-c-format +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"Uma terceira opção é mapear para tabelas apenas as classes concretas de uma " +"hierarquia de heranças, (a estratégia table-per-concrete-class) onde cada " +"tabela define todos os estados persistentes da classe, incluindo estados " +"herdados. No Hibernate, não é absolutamente necessário mapear explicitamente " +"como hierarquia de heranças. Você pode simplesmente mapear cada classe com " +"uma declaração <class> separada. Porém, se você " +"deseja usar associações polimórficas (por exemplo: uma associação para a " +"superclasse de sua hierarquia), você precisa usar o mapeamento <" +"union-subclass>." + +#. Tag: programlisting +#: basic_mapping.xml:2141 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2168 +#, no-c-format +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "" +"A coluna discriminatõria não é requerida para esta estratégia de mapeamento." + +#. Tag: title +#: basic_mapping.xml:2179 +#, no-c-format +msgid "join" +msgstr "join" + +#. Tag: para +#: basic_mapping.xml:2181 +#, no-c-format +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"Usando o elemento <join>>, é possível mapear " +"propriedades de uma classe para várias tabelas." + +#. Tag: programlisting +#: basic_mapping.xml:2195 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2199 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "table: O nome da tabela associada." + +#. Tag: para +#: basic_mapping.xml:2216 +#, no-c-format +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch(opcional – valor default join): " +"Se setado para join, o padrão, o Hibernate irá usar um " +"inner join para restaurar um join definido por uma classe " +"ou suas subclasses e uma outer join para um join definido " +"por uma subclasse. Se setado para select, então o " +"Hibernate irá usar uma seleção seqüencial para um <join> definida numa subclasse, que irá ser emitido apenas se uma linha se " +"concentrar para representar uma instância da subclasse. Inner joins irá " +"ainda ser usado para restaurar um <join> definido " +"pela classe e suas superclasses." + +#. Tag: para +#: basic_mapping.xml:2229 +#, no-c-format +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (opcional – valor default false): Se habilitado, o Hibernate não irá tentar inserir ou atualizar as " +"propriedades definidas por este join." + +#. Tag: para +#: basic_mapping.xml:2236 +#, no-c-format +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optional (opcional – valor default false): Se habilitado, o Hibernate irá inserir uma linha apenas se as " +"propriedades definidas por esta junção não forem nulas e irá sempre usar uma " +"outer join para recuperar as propriedades." + +#. Tag: para +#: basic_mapping.xml:2245 +#, no-c-format +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"Por exemplo, a informação de endereço para uma pessoa pode ser mapeada para " +"uma tabela separada (enquanto preservando o valor da semântica de tipos para " +"todas as propriedades):" + +#. Tag: programlisting +#: basic_mapping.xml:2250 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2252 +#, no-c-format +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"Esta característica é útil apenas para modelos de dados legados, nós " +"recomendamos menos tabelas do que classes e um modelo de domínio bem " +"granulado. Porém, é útil para ficar trocando entre estratégias de mapeamento " +"de herança numa hierarquia simples, como explicado mais a frente." + +#. Tag: title +#: basic_mapping.xml:2262 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2264 +#, no-c-format +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"Nós vimos que o elemento <key> surgiu algumas vezes " +"até agora. Ele aparece em qualquer lugar que o elemento pai define uma " +"junção para a nova tabela, e define a chave estrangeira para a tabela " +"associada, que referencia a chave primária da tabela original." + +#. Tag: programlisting +#: basic_mapping.xml:2280 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2291 +#, no-c-format +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (opcional, valor default noaction): Especifica se a constraint da chave estrangeira no banco de dados " +"esta habilitada para cascade delete ." + +#. Tag: para +#: basic_mapping.xml:2298 +#, no-c-format +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (opcional): Especifica que a chave " +"estrangeira se refere a colunas que não são chave primária da tabela " +"original. (Util para base de dados legadas.)" + +#. Tag: para +#: basic_mapping.xml:2305 +#, no-c-format +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (opcional): Especifica que a coluna da chave " +"estrangeira não aceita valores nulos (isto é implícito em qualquer momento " +"que a chave estrangeira também fizer parte da chave primária)." + +#. Tag: para +#: basic_mapping.xml:2312 +#, no-c-format +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key). update (opcional): Especifica que a " +"chave estrangeira nunca deve ser atualizada (isto é implícito em qualquer " +"momento que a chave estrangeira também fizer parte da chave primária)." + +#. Tag: para +#: basic_mapping.xml:2319 +#, no-c-format +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (opcional): Especifica que a chave estrangeira " +"deve ter uma constraint unique (sto é implícito em qualquer momento que a " +"chave estrangeira também fizer parte da chave primária)." + +#. Tag: para +#: basic_mapping.xml:2327 +#, no-c-format +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"Nós recomendamos que para sistemas que a performance de delete seja " +"importante, todas as chaves deve ser definida on-delete=\"cascade" +"\", e o Hibernate irá usar uma constraint a nível de banco de " +"dados ON CASCADE DELETE, ao invés de muitas instruções " +"DELETE. Esteja ciente que esta característica é um atalho " +"da estratégia usual de optimistic locking do Hibernate para dados " +"versionados." + +#. Tag: para +#: basic_mapping.xml:2335 +#, no-c-format +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"Os atributos not-null e update são " +"úteis quando estamos mapeamos uma associação unidirecional um para muitos. " +"Se você mapear uma asociação unidirecional um para muitos para uma chave " +"estrangeira non-nullable, você deve declarar a coluna " +"chave usando <key not-null=\"true\">." + +#. Tag: title +#: basic_mapping.xml:2345 +#, no-c-format +msgid "column and formula elements" +msgstr "elementos column e formula" + +#. Tag: para +#: basic_mapping.xml:2346 +#, no-c-format +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"Qualquer elemento de mapeamente que aceita um atributo column irá aceitar alternativamente um subelemento <column>" +". Da mesma forma, formula é uma alternativa " +"para o atributo formula." + +#. Tag: programlisting +#: basic_mapping.xml:2352 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2354 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2356 +#, no-c-format +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"O atributo column e formula podem até " +"ser combinados dentro da mesma propriedade ou associação mapeando para " +"expressar, por exemplo, associações exóticas." + +#. Tag: programlisting +#: basic_mapping.xml:2362 +#, no-c-format +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"
]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2367 +#, no-c-format +msgid "import" +msgstr "import" + +#. Tag: para +#: basic_mapping.xml:2369 +#, no-c-format +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"Suponha que a sua aplicação tem duas classes persistentes com o mesmo nome, " +"e você não quer especificar o nome qualificado (do pacote) nas queries do " +"Hibernate. As Classes devem ser \"importadas\" explicitamente, de " +"preferência contando com auto-import=\"true\". Você pode " +"até importar classes e interfaces que não estão explicitamente mapeadas." + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2383 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "" +"class: O nome qualificado (do pacote) de qualquer classe " +"Java." + +#. Tag: para +#: basic_mapping.xml:2391 +#, no-c-format +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename (opcional – valor default, o nome da classe não " +"qualificada): Um nome que pode ser usado numa linguagem de consulta." + +#. Tag: title +#: basic_mapping.xml:2402 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2404 +#, no-c-format +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"Existe mais um tipo de propriedade de mapeamento. O elemento de mapeamento " +"<any> define uma associação polimórfica para " +"classes de múltiplas tabelas. Este tipo de mapeamento sempre requer mais de " +"uma coluna. A primeira coluna possui o tipo da entidade associada. A outra " +"coluna que ficou possui o identificador. É impossível especificar uma " +"restrição de chave estrangeira para este tipo de associação, assim isto " +"claramente não é visto como um caminho usual para associações (polimórficas) " +"de mapeamento. Você deve usar este mapeamento apenas em casos muito " +"especiais (exemplo: audit logs, dados de sessão do usuário, etc)." + +#. Tag: para +#: basic_mapping.xml:2414 +#, no-c-format +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"O atributo meta-type permite a aplicação especificar um " +"tipo adaptado que mapeia valores de colunas de banco de dados para classes " +"persistentes que tem propriedades identificadoras do tipo especificado " +"através do id-type. Você deve especificar o mapeamento de " +"valores do meta-type para nome de classes." + +#. Tag: programlisting +#: basic_mapping.xml:2421 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2432 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2435 +#, no-c-format +msgid "name: the property name." +msgstr "name: o nome da propriedade." + +#. Tag: para +#: basic_mapping.xml:2440 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "id-type: o tipo identificador." + +#. Tag: para +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type (opcional – valor default string): Qualquer tipo que é permitido para um mapeamento discriminador." + +#. Tag: para +#: basic_mapping.xml:2451 +#, no-c-format +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade (opcional – valor default none): o estilo do cascade." + +#. Tag: para +#: basic_mapping.xml:2463 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (opcional - valor defaulttrue): Especifica que as atualizações para esta propriedade requerem ou " +"não aquisição da trava otimista. Em outras palavras, define se uma versão de " +"incremento deve ocorrer se esta propriedade está modificada." + +#. Tag: title +#: basic_mapping.xml:2478 +#, no-c-format +msgid "Hibernate Types" +msgstr "Tipos do Hibernate" + +#. Tag: title +#: basic_mapping.xml:2481 +#, no-c-format +msgid "Entities and values" +msgstr "Entidades e valores" + +#. Tag: para +#: basic_mapping.xml:2483 +#, no-c-format +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"Para entender o comportamento de vários objetos em nível de linguagem de " +"Java a respeito do serviço de persistência, nós precisamos classificá-los em " +"dois grupos." + +#. Tag: para +#: basic_mapping.xml:2488 +#, no-c-format +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +"Uma entidade existe independentemente de qualquer " +"outro objeto guardando referências para a entidade. Em contraste com o " +"modelo usual de Java que um objeto não referenciado é coletado pelo garbage " +"collector. Entidades devem ser explicitamente salvas ou deletada (exceto em " +"operações de salvamento ou deleção que possam ser executada em " +"cascata de uma entidade pai para seus filhos). Isto é " +"diferente do modelo ODMG de persistência do objeto por acessibilidade – e " +"corresponde quase a como objetos de aplicações são geralmente usados em " +"grandes sistemas. Entidades suportam referências circulares e comuns. Eles " +"podem ser versionadas." + +#. Tag: para +#: basic_mapping.xml:2499 +#, no-c-format +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"Uma entidade em estado persistente consiste de referências para outras " +"entidades e instâncias de tipos de valor. Valores são " +"primitivos, coleções (não o que tem dentro de uma coleção), componentes e " +"certos objetos imutáveis. Entidades distintas, valores (em coleções e " +"componentes particulares) são persistidos e apagados " +"por acessibilidade. Visto que objetos value (e primitivos) são persistidos e " +"apagados junto com as entidades que os contém e não podem ser versionados " +"independentemente. Valores têm identidade não independente, assim eles não " +"podem ser comuns para duas entidades ou coleções." + +#. Tag: para +#: basic_mapping.xml:2510 +#, no-c-format +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"Até agora, nós estivemos usando o termo \"classe persistente\" para referir " +"a entidades. Nós iremos continuar a fazer isto. Falando a rigor, porém, nem " +"todas as classes definidas pelo usuário com estados persistentes são " +"entidades. Um componente é uma classe de usuário " +"definida com valores semânticos. Uma propriedade de Java de tipo " +"java.lang.String também tem um valor semêntico. Dada esta " +"definição, nós podemos dizer que todos os tipos (classes) fornecida pelo JDK " +"tem tipo de valor semântico em Java, enquanto que tipos definidos pelo " +"usuário pode ser mapeados com entidade ou valor de tipo semântico. Esta " +"decisão pertence ao desenvolvedor da aplicação. Uma boa dica para uma classe " +"entidade em um modelo de domínio são referências comuns para uma instância " +"simples daquela classe, enquanto a composição ou agregação geralmente se " +"traduz para um valor de tipo." + +#. Tag: para +#: basic_mapping.xml:2524 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "Nós iremos rever ambos os conceitos durante toda a documentação." + +#. Tag: para +#: basic_mapping.xml:2528 +#, no-c-format +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"O desafio pe mapear o sistema de tipo de Java (e a definição do " +"desenvolvedor de entidades e tipos de valor) para o sistema de tipo SQL/" +"banco de dados. A ponte entre ambos os sistemas é fornecido pelo Hibernate: " +"para entidades que usam <class>, <" +"subclass> e assim por diante. Para tipos de valores nós usamos " +"<property>, <component>, " +"etc, geralmente com um atributo type. O valor deste " +"atributo é o nome de um tipo de mapeamento do " +"Hibernate. O Hibernate fornece muitos mapeamentos (para tipos de valores do " +"JDK padrão) ut of the box. Você pode escrever os seus próprios tipos de " +"mapeamentos e implementar sua estratégia de conversão adaptada, como você " +"verá adiante." + +#. Tag: para +#: basic_mapping.xml:2541 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "" +"Todos os tipos internos do hibernate exceto coleções suportam semânticas " +"nulas." + +#. Tag: title +#: basic_mapping.xml:2548 +#, no-c-format +msgid "Basic value types" +msgstr "Valores de tipos básicos" + +#. Tag: para +#: basic_mapping.xml:2550 +#, fuzzy, no-c-format +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "" +"O tipos internos de mapeamentos básicos podem ser a grosso modo categorizado " +"como: " + +#. Tag: literal +#: basic_mapping.xml:2555 +#, no-c-format +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#. Tag: para +#: basic_mapping.xml:2558 +#, no-c-format +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"Tipos de mapeamentos de classes primitivas ou wrapper Java especificos " +"(vendor-specific) para tipos de coluna SQL. Boolean, boolean, " +"yes_no são todas codificações alternativas para um " +"boolean ou java.lang.Boolean do Java." + +#. Tag: literal +#: basic_mapping.xml:2567 +#, no-c-format +msgid "string" +msgstr "string" + +#. Tag: para +#: basic_mapping.xml:2569 +#, no-c-format +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"Um tipo de mapeamento de java.lang.String para " +"VARCHAR (ou VARCHAR2 no Oracle)." + +#. Tag: literal +#: basic_mapping.xml:2576 +#, no-c-format +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#. Tag: para +#: basic_mapping.xml:2578 +#, no-c-format +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"Tipos de mapeamento de java.util.Date e suas subclasses " +"para os tipos SQL DATE, TIME e " +"TIMESTAMP (ou equivalente)." + +#. Tag: literal +#: basic_mapping.xml:2586 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#. Tag: para +#: basic_mapping.xml:2588 +#, no-c-format +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"Tipo de mapeamento de java.util.Calendar para os tipos " +"SQL TIMESTAMP e DATE (ou equivalente)." + +#. Tag: literal +#: basic_mapping.xml:2596 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#. Tag: para +#: basic_mapping.xml:2598 +#, no-c-format +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"Tipo de mapeamento de java.math.BigDecimal and " +"java.math.BigInteger para NUMERIC (ou " +"NUMBER no Oracle)." + +#. Tag: literal +#: basic_mapping.xml:2606 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#. Tag: para +#: basic_mapping.xml:2608 +#, no-c-format +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"Tipos de mapeamentos de java.util.Locale, java." +"util.TimeZone e java.util.Currency para " +"VARCHAR (ou VARCHAR2 no Oracle). " +"Instâncias de f Locale e Currency são " +"mapeados para seus códigos ISO. Instâncias de TimeZone " +"são mapeados para seu ID." + +#. Tag: literal +#: basic_mapping.xml:2620 +#, fuzzy, no-c-format +msgid "class" +msgstr "all cverifica todas as colunas" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"um tipo de mapeamento de java.lang.Class para " +"VARCHAR (ou VARCHAR2 no Oracle). Uma " +"Class é mapeada pelo seu nome qualificado (completo)." + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "binary" +msgstr "binary" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "Mapeia arrays de bytes para um tipo binário de SQL apropriado." + +#. Tag: literal +#: basic_mapping.xml:2638 +#, no-c-format +msgid "text" +msgstr "text" + +#. Tag: para +#: basic_mapping.xml:2640 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"Maps long Java strings to a SQL CLOB or TEXT type. Mapeia strings longas de Java para um tipo SQL CLOB ou TEXT." + +#. Tag: literal +#: basic_mapping.xml:2647 +#, no-c-format +msgid "serializable" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:2649 +#, no-c-format +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"Mapeia tipos Java serializáveis para um tipo binário SQL apropriado. Você " +"pode também indicar o tipo serializable do Hibernate com " +"o nome da classe ou interface Java serializável que não é padrão para um " +"tipo básico." + +#. Tag: literal +#: basic_mapping.xml:2658 +#, no-c-format +msgid "clob, blob" +msgstr "clob, blob" + +#. Tag: para +#: basic_mapping.xml:2660 +#, no-c-format +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"Tipos de mapeamentos para as classes JDBC java.sql.Clob " +"and java.sql.Blob. Estes tipos podem ser inconveniente " +"para algumas aplicações, visto que o objeto blob ou clob pode não ser " +"reusado fora de uma transação. (Além disso, o suporte de driver é imcompleto " +"e inconsistente.)" + +#. Tag: literal +#: basic_mapping.xml:2670 +#, no-c-format +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" + +#. Tag: para +#: basic_mapping.xml:2674 +#, no-c-format +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"Mapeando tipos para o que geralmente são consideradas tipos mutáveis de " +"Java, onde o Hibernate faz determinadas otimizações apropriadas somente para " +"tipos imutáveis de Java, e a aplicação trata o objeto como imutável. Por " +"exemplo, você não deve chamar Date.setTime() para uma " +"instância mapeada como imm_timestamp. Para mudar o valor " +"da propriedade, e ter a mudança feita persistente, a aplicação deve atribuir " +"um novo objeto (nonidentical) à propriedade." + +#. Tag: para +#: basic_mapping.xml:2689 +#, no-c-format +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"Identificadores únicos das entidades e coleções podem ser de qualquer tipo " +"básico exceto binary, blob ou " +"clob. (Identificadores compostos também são permitidos, " +"veja abaixo.)" + +#. Tag: para +#: basic_mapping.xml:2695 +#, no-c-format +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"Os tipos de valores básicos têm suas constantes Type " +"correspondentes definidas em org.hibernate.Hibernate. Por " +"exemplo, Hibernate.STRING representa o tipo " +"string." + +#. Tag: title +#: basic_mapping.xml:2704 +#, no-c-format +msgid "Custom value types" +msgstr "Tipos de valores personalizados" + +#. Tag: para +#: basic_mapping.xml:2706 +#, no-c-format +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"É relativamente fácil para desenvolvedores criar seus próprios tipos de " +"valor. Por exemplo, você pode querer persistir propriedades do tipo " +"java.lang.BigInteger para colunas VARCHAR. O Hibernate não fornece um tipo correspondente para isso. Mas os " +"tipos adaptados não são limitados a mapeamento de uma propriedade (ou " +"elemento de coleção) a uma única coluna da tabela. Assim, por exemplo, você " +"pôde ter uma propriedade Java getName()/setName()" +" do tipo java.lang.String que é persistido para " +"colunas FIRST_NAME, INITIAL, " +"SURNAME." + +#. Tag: para +#: basic_mapping.xml:2717 +#, no-c-format +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"Para implementar um tipo personalizado, implemente org.hibernate." +"UserType or org.hibernate.CompositeUserType e " +"declare propriedades usando o nome qualificado da classe do tipo. Veja " +"org.hibernate.test.DoubleStringType para ver o tipo das " +"coisas que são possíveis." + +#. Tag: programlisting +#: basic_mapping.xml:2725 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2727 +#, no-c-format +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"Observe o uso da tag <column> para mapear uma " +"propriedade para colunas múltiplas." + +#. Tag: para +#: basic_mapping.xml:2732 +#, no-c-format +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"As interfaces CompositeUserType, " +"EnhancedUserType, UserCollectionType, " +"e UserVersionType fornecem suporte para usos mais " +"especializados." + +#. Tag: para +#: basic_mapping.xml:2738 +#, no-c-format +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"Você pode mesmo fornecer parâmetros a um UserType no " +"arquivo de mapeamento. Para isto, seu UserType deve " +"implementar a interface org.hibernate.usertype.ParameterizedType. Para fornecer parâmetros a seu tipo personalizado, você pode usar " +"o elemento <type> em seus arquivos de mapeamento." + +#. Tag: programlisting +#: basic_mapping.xml:2746 +#, no-c-format +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2748 +#, no-c-format +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"O UserType pode agora recuperar o valor para o parâmetro " +"chamado default da Propriedade do " +"passado a ele." + +#. Tag: para +#: basic_mapping.xml:2753 +#, no-c-format +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"Se você usar freqüentemente um determinado UserType, pode " +"ser útil definir um nome mais curto para ele. Você pode fazer isto usando o " +"elemento <typedef>. Typedefs atribui um nome a um " +"tipo personalizado, e pode também conter uma lista de valores default de " +"parâmetro se o tipo for parametrizado." + +#. Tag: programlisting +#: basic_mapping.xml:2760 +#, no-c-format +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2762 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2764 +#, no-c-format +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." + +#. Tag: para +#: basic_mapping.xml:2769 +#, no-c-format +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." + +#. Tag: title +#: basic_mapping.xml:2785 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "Mapping a class more than once" + +#. Tag: para +#: basic_mapping.xml:2786 +#, no-c-format +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." + +#. Tag: programlisting +#: basic_mapping.xml:2794 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2796 +#, no-c-format +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"Notice how associations are now specified using entity-name instead of class." + +#. Tag: title +#: basic_mapping.xml:2804 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "SQL quoted identifiers" + +#. Tag: para +#: basic_mapping.xml:2805 +#, no-c-format +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." + +#. Tag: programlisting +#: basic_mapping.xml:2812 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2818 +#, no-c-format +msgid "Metadata alternatives" +msgstr "Metadata alternatives" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." + +#. Tag: title +#: basic_mapping.xml:2825 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "Using XDoclet markup" + +#. Tag: para +#: basic_mapping.xml:2827 +#, no-c-format +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." + +#. Tag: programlisting +#: basic_mapping.xml:2834 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2836 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "See the Hibernate web site for more examples of XDoclet and Hibernate." + +#. Tag: title +#: basic_mapping.xml:2843 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "Using JDK 5.0 Annotations" + +#. Tag: para +#: basic_mapping.xml:2845 +#, no-c-format +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." + +#. Tag: para +#: basic_mapping.xml:2856 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "This is an example of a POJO class annotated as an EJB entity bean:" + +#. Tag: programlisting +#: basic_mapping.xml:2860 +#, no-c-format +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2862 +#, no-c-format +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." + +#. Tag: title +#: basic_mapping.xml:2871 +#, no-c-format +msgid "Generated Properties" +msgstr "Generated Properties" + +#. Tag: para +#: basic_mapping.xml:2872 +#, no-c-format +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." + +#. Tag: para +#: basic_mapping.xml:2881 +#, no-c-format +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." + +#. Tag: para +#: basic_mapping.xml:2888 +#, no-c-format +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "" +"never (the default) - means that the given property value " +"is not generated within the database." + +#. Tag: para +#: basic_mapping.xml:2892 +#, no-c-format +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." + +#. Tag: para +#: basic_mapping.xml:2900 +#, no-c-format +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "" +"always - states that the property value is generated both " +"on insert and on update." + +#. Tag: title +#: basic_mapping.xml:2907 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "Auxiliary Database Objects" + +#. Tag: para +#: basic_mapping.xml:2908 +#, no-c-format +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." + +#. Tag: para +#: basic_mapping.xml:2917 +#, no-c-format +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" + +#. Tag: programlisting +#: basic_mapping.xml:2921 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2922 +#, no-c-format +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." + +#. Tag: programlisting +#: basic_mapping.xml:2927 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2928 +#, no-c-format +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." + +#. Tag: programlisting +#: basic_mapping.xml:2932 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "class" +#~ msgstr "class" + +#~ msgid "id" +#~ msgstr "id" + +#~ msgid "" +#~ "optimizer (optional, defaults to none): See " +#~ msgstr "" +#~ "optimizer (optional, defaults to none): See " + +#~ msgid "" +#~ "optimizer (optional, defaults to ): See " +#~ "" +#~ msgstr "" +#~ "optimizer (optional, defaults to ): See " +#~ "" + +#~ msgid "key" +#~ msgstr "key" + +#~ msgid "any" +#~ msgstr "any" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/batch.po b/documentation/envers/src/main/docbook/pt-BR/content/batch.po new file mode 100644 index 0000000000..39ddc0abfc --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/batch.po @@ -0,0 +1,650 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:5 +#, no-c-format +msgid "Batch processing" +msgstr "Processamento de lotes" + +#. Tag: para +#: batch.xml:7 +#, no-c-format +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"Uma alternativa para inserir 100.000 linhas no banco de dados usando o " +"Hibernate pode ser a seguinte:" + +#. Tag: programlisting +#: batch.xml:12 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:14 +#, no-c-format +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"Isto irá falhar em algum lugar próximo a linha 50.000, lançando uma " +"OutOfMemoryException. Isso ocorre devido ao fato do " +"Hibernate fazer cache de todas as instâncias de Customer " +"inseridas num cachê em nível de sessão." + +#. Tag: para +#: batch.xml:20 +#, no-c-format +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"Neste capítulo veremos como contornar esse problema. Entretanto, se você vai " +"realizar processamento de lotes, é muito importante que você habilite o uso " +"de lotes JDBC, se você pretende obter um desempenho razoável. Defina o " +"tamanho do lote JDBC em um valor razoável (algo entre 10-50):" + +#. Tag: programlisting +#: batch.xml:27 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:29 +#, no-c-format +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"Você também pode querer rodar esse tipo de processamento de lotes com o " +"cache secundário completamente desabilitado:" + +#. Tag: para +#: batch.xml:34 +#, no-c-format +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." + +#. Tag: programlisting +#: batch.xml:39 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:41 +#, no-c-format +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"Mas isto não é absolutamente necessário, desde que nós possamos ajustar o " +"CacheMode para desabilitar a interação com o cache " +"secundário." + +#. Tag: title +#: batch.xml:47 +#, no-c-format +msgid "Batch inserts" +msgstr "Inserção de lotes" + +#. Tag: para +#: batch.xml:49 +#, no-c-format +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"Quando você estiver inserindo novos objetos persistentes, vocês deve " +"executar os métodos flush() e clear() " +"regularmente na sessão, para controlar o tamanho do cache primário." + +#. Tag: programlisting +#: batch.xml:55 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:60 +#, no-c-format +msgid "Batch updates" +msgstr "Batch updates" + +#. Tag: para +#: batch.xml:62 +#, no-c-format +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"Para recuperar e atualizar informações a mesma idéia é válida. " +"Adicionalmente, pode precisar usar o scroll() para usar " +"recursos no lado do servidor em queries que retornam muita informação." + +#. Tag: programlisting +#: batch.xml:68 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:73 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "A interface StatelessSession" + +#. Tag: para +#: batch.xml:74 +#, no-c-format +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"Alternativamente, o Hibernate provê uma API orientada à comandos, usada para " +"transmitir um fluxo de dados de e para o banco de dados na forma de objetos " +"soltos. Uma StatelessSession não tem um contexto " +"persistente associado e não fornece muito das semânticas de alto nível para " +"controle do ciclo de vida. Em especial, uma StatelessSession não implemente " +"o cache primário e nem interage com o cache secundário ou query cache. Ele " +"não implementa salvamento transacional automatico ou checagem automática de " +"mudanças. Operação realizadas usando uma StatelessSession não fazem nenhum " +"tipo de cascade com as instancias associadas. As coleções são ignoradas por " +"uma StatelessSession. Operações realizadas com um StatelessSession ignoram a " +"arquitetura de eventos e os interceptadores. StatelessSession são " +"vulneráveis aos efeitos do aliasing dos dados, devido a falta do cache " +"primário. Uma StatelessSession é uma abstração de baixo nível, muito mais " +"próxima do JDBC." + +#. Tag: programlisting +#: batch.xml:89 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:91 +#, no-c-format +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "" +"Veja neste exempo, as instancias de Customer retornadas " +"pela query são imediatamente desvinculadas. Elas nunca serão assossiadas à " +"um contexto persistente." + +#. Tag: para +#: batch.xml:97 +#, no-c-format +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"As operações insert(), update() e delete() definidos pela interface StatelessSession são " +"considerados operações diretas no banco de dados (row-level operations), " +"isso resulta em uma execução imediata de comandos SQL INSERT, " +"UPDATE ou DELETE respectivamente. Devido a " +"isso, eles possuem uma semântica bem diferente das operações save" +"(), saveOrUpdate() ou delete() definidas na " +"interface Session." + +#. Tag: title +#: batch.xml:110 +#, no-c-format +msgid "DML-style operations" +msgstr "Operações no estilo DML" + +#. Tag: para +#: batch.xml:112 +#, no-c-format +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" +"Como já discutido, mapeamento objeto/relacional automático e transparente é " +"conseguido com a gerência do estado do objeto. Com isto o estado daquele " +"objeto fica disponível na memória, manipulando(usando as expressões SQL " +"Data Manipulation Language (SQL-style DML): " +"INSERT, UPDATE, DELETE) os dados diretamente no banco de dados não irá afetar o estado " +"registrado em memória. Entretanto, o Hibernate provê métodos para executar " +"queries SQL-style DML, que são totalmente executas com HQL (Hibernate Query " +"Language) (HQL)." + +#. Tag: para +#: batch.xml:122 +#, no-c-format +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"A pseudo-sintaxe para expressões UPDATE e " +"DELETE é: ( UPDATE | DELETE ) FROM? NomeEntidade " +"(WHERE condições_where)?. Algumas observações:" + +#. Tag: para +#: batch.xml:130 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "Na clausula from, a palavra chave FROM é opcional;" + +#. Tag: para +#: batch.xml:135 +#, no-c-format +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "" +"Somente uma entidade pode ser chamada na clausula from; opcionalmente pode " +"ter um alias. Se o nome da entidade for possuir um alias, então qualquer " +"propriedade referenciada deve usar esse alias qualificado; se o nome da " +"entidade não possuir um alias, então nenhuma das propriedade precisa usar o " +"acesso qualificado." + +#. Tag: para +#: batch.xml:143 +#, no-c-format +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"Na joins (ambas implícita ou " +"explicita) pode ser especificada em um bulk HQL query. Sub-queries podem ser " +"usadas na clausula where; as subqueries podem conter joins." + +#. Tag: para +#: batch.xml:150 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "A clausula where também é opcional." + +#. Tag: para +#: batch.xml:156 +#, no-c-format +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"Como exemplo para executar um HQL UPDATE, use o método " +"Query.executeUpdate()(o método ganhou o nome devido a sua " +"familiaridade com o do JDBC PreparedStatement.executeUpdate()):" + +#. Tag: programlisting +#: batch.xml:162 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:164 +#, no-c-format +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." + +#. Tag: programlisting +#: batch.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:176 +#, no-c-format +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." + +#. Tag: para +#: batch.xml:181 +#, no-c-format +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"Para executar um HQL DELETE, use o mesmo método " +"Query.executeUpdate():" + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, no-c-format +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"O valor int retornado pelo método Query." +"executeUpdate() indica o numero de entidade afetadas pela " +"operação. Lembre-se que isso pode estar ou não relacionado ao número de " +"linhas alteradas no banco de dados. Uma operação bulk HQL pode resultar em " +"várias expressões SQL reais a serem executadas, por exemplo, no caso de " +"joined-subclass. O número retornado indica a quantidade real de entidades " +"afetadas pela expressão. Voltando ao exemplo da joined-subclass, a exclusão " +"de uma das subclasses pode resultar numa exclusão em outra tabelas, não " +"apenas na tabela para qual a subclasses está mapeada, mas também tabela " +"\"root\" e possivelmente nas tabelas joined-subclass num nível hierárquico " +"imediatamente abaixo." + +#. Tag: para +#: batch.xml:199 +#, no-c-format +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"A pseudo-sintaxe para o comando INSERT é: INSERT " +"INTO EntityName properties_list select_statement. Alguns pontos a " +"observar:" + +#. Tag: para +#: batch.xml:207 +#, no-c-format +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" +"Apenas a forma INSERT INTO ... SELECT ... é suportada; INSERT INTO ... " +"VALUES ... não é suportada." + +#. Tag: para +#: batch.xml:210 +#, no-c-format +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" +"A lista de propriedade é análoga à especificação da coluna do comando SQL INSERT. Para entidades envolvidas " +"em mapeamentos, apenas a propriedades definidas diretamente a nível da " +"classe podem ser usandas na properties_list. Propriedades da superclass não " +"são permitidas; e as propriedades da subclasse não faz sentido. Em outras " +"palavras, os comandos INSERT não são polimorficos." + +#. Tag: para +#: batch.xml:220 +#, no-c-format +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "" +"O camando select pode ser qualquer query HQL válida, que tenha um retorno " +"compatível com o tipo com o esperado pela inclusão. Atualmente, isto é " +"verificado durante a compilação da query, isto é melhor do que permitir que " +"a verificação chegue ao banco de dados. Entretanto perceba que isso pode " +"causar problemas entre os Tipo do Hibernate que são " +"equivalentes em oposição a equal. " +"Isso pode causar problemas nas combinações entre a propriedade definida como " +"org.hibernate.type.DateTypee um propriedade definida como " +"org.hibernate.type.TimestampType, embora o banco de dados " +"não possa fazer uma distinção ou possa ser capaz de manusear a conversão." + +#. Tag: para +#: batch.xml:232 +#, no-c-format +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" +"Para a propriedade id, a expressão insert oferece duas opções. Você pode " +"especificar qualquer propriedade id explicitamente no properties_list (em " +"alguns casos esse valor é obtido diretamente da expressão select) ou pode " +"omitir do properties_list (nesse caso, um valor gerado é usado). Essa ultima " +"opção só é válida quando são usados geradores de ids que operam no banco de " +"dados; a tentativa de usar essa opção com geradores do tipo \"em memória\" " +"vai causar um exceção durante a etapa de parser. Veja a finalidades desta " +"discussão, os seguintes geradores operam com o banco de dados org." +"hibernate.id.SequenceGenerator (e suas subclasses) e qualquer " +"implementação de org.hibernate.id.PostInsertIdentifierGenerator. Aqui, a exceção mais notável é o org.hibernate.id." +"TableHiLoGenerator, que não pode ser usado porque ele não dispõe " +"de mecanismos para recuperar o seu valor." + +#. Tag: para +#: batch.xml:247 +#, no-c-format +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used). " +"Para propriedades mapeadas como version ou " +"timestamp, a expressão insert oferece a você duas opções. " +"Você pode especificar a propriedade na properties_list (nesse caso o seu " +"valor é obtido a partir da expressão select correspondente) ou ele pode ser " +"omitido da properties_list (neste caso o usa o valor semente definido pela classe org.hibernate.type.VersionType)." + +#. Tag: para +#: batch.xml:257 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "Exemplo da execução de um HQL INSERT:" + +#. Tag: programlisting +#: batch.xml:261 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/best_practices.po b/documentation/envers/src/main/docbook/pt-BR/content/best_practices.po new file mode 100644 index 0000000000..6094cf5463 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/best_practices.po @@ -0,0 +1,454 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:5 +#, no-c-format +msgid "Best Practices" +msgstr "Boas práticas" + +#. Tag: term +#: best_practices.xml:9 +#, no-c-format +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"Escreva classes compactas e mapeie-as usando <component>." + +#. Tag: para +#: best_practices.xml:11 +#, no-c-format +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"Use uma classe Endereco para encapsular rua, bairro, estado, " +"CEP. Isto promove a reutilização de código e simplifica o " +"refactoring." + +#. Tag: term +#: best_practices.xml:19 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "Declare propriedades identificadoras em classes persistentes." + +#. Tag: para +#: best_practices.xml:21 +#, no-c-format +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"O Hibernate constrói propriedades identificadoras opcionais. Existem todos " +"os tipos de razões que explicam porquê você deveria utilizá-las. Nós " +"recomendamos que os identificadores sejam 'sintéticos' (gerados, sem " +"significado para o negocio)." + +#. Tag: term +#: best_practices.xml:29 +#, no-c-format +msgid "Identify natural keys." +msgstr "Identifique chaves naturais." + +#. Tag: para +#: best_practices.xml:31 +#, no-c-format +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"Identifique chaves naturais para todas as entidades, e mapeie-as usando " +"<natural-id>. Implemente equals() e hashCode() para comparar as propriedades que " +"compõem a chave natural." + +#. Tag: term +#: best_practices.xml:39 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "Coloque cada classe de mapeamento em seu próprio arquivo." + +#. Tag: para +#: best_practices.xml:41 +#, no-c-format +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"Não use um único código de mapeamento monolítico. Mapeie com.eg." +"Foo no arquivo com/eg/Foo.hbm.xml. Isto promove " +"particularmente o bom senso no time de desenvolvimento." + +#. Tag: term +#: best_practices.xml:49 +#, no-c-format +msgid "Load mappings as resources." +msgstr "Carregue os mapeamentos como recursos." + +#. Tag: para +#: best_practices.xml:51 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "Faça o deploy dos mapeamentos junto com as classes que eles mapeiam." + +#. Tag: term +#: best_practices.xml:57 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "Considere externalizar as strings de consultas." + +#. Tag: para +#: best_practices.xml:59 +#, no-c-format +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"Esta é uma boa prática se suas consultas chamam funções SQL que não sejam " +"ANSI. Externalizar as strings de consultas para mapear arquivos irão tornar " +"a aplicação mais portável." + +#. Tag: term +#: best_practices.xml:67 +#, no-c-format +msgid "Use bind variables." +msgstr "Use bind variables." + +#. Tag: para +#: best_practices.xml:69 +#, no-c-format +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"Assim como em JDBC, sempre substitua valores não constantes por \"?\". Nunca " +"use a manipulação de strings para concatenar valores não constantes em uma " +"consulta! Até melhor, considere usar parâmetros nomeados nas consultas." + +#. Tag: term +#: best_practices.xml:77 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "Não gerencie suas conexões JDBC." + +#. Tag: para +#: best_practices.xml:79 +#, no-c-format +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"O Hibernate permite que a aplicação gerencie conexões JDBC. Esta abordagem " +"deve ser considerada um último recurso. Se você não pode usar os provedores " +"de conexão embutidos, considere fazer sua implementação a partir de " +"org.hibernate.connection.ConnectionProvider." + +#. Tag: term +#: best_practices.xml:87 +#, no-c-format +msgid "Consider using a custom type." +msgstr "Considere usar tipos customizados." + +#. Tag: para +#: best_practices.xml:89 +#, no-c-format +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"Suponha que você tenha um tipo Java, de alguma biblioteca, que precisa ser " +"persistido mas não provê os acessórios necessários para mapeá-lo como um " +"componente. Você deve implementar org.hibernate.UserType. " +"Esta abordagem livra o código da aplicação de implementar transformações de/" +"para o tipo Hibernate." + +#. Tag: term +#: best_practices.xml:98 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "Use código manual JDBC nos gargalos." + +#. Tag: para +#: best_practices.xml:100 +#, no-c-format +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"Nas áreas de desempenho crítico do sistema, alguns tipos de operações podem " +"se beneficiar do uso direto do JDBC. Mas por favor, espere até você " +"saber se é um gargalo. E não suponha que o uso direto " +"do JDBC é necessariamente mais rápido. Se você precisar usar diretamente o " +"JDBC, vale a pena abrir uma Session do Hibernate e usar " +"uma conexão JDBC. De modo que você possa ainda usar a mesma estratégia de " +"transação e ocultar o provedor a conexão" + +#. Tag: term +#: best_practices.xml:110 +#, no-c-format +msgid "Understand Session flushing." +msgstr "Entenda o Session flushing." + +#. Tag: para +#: best_practices.xml:112 +#, no-c-format +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"De tempos em tempos a sessão sincroniza seu estado persistente com o banco " +"de dados. O desempenho será afetado se este processo ocorrer frequentemente. " +"Você pode algumas vezes minimizar o fluxo desnecessário desabilitando o " +"fluxo automático ou até mesmo mudando a ordem das consultas e outras " +"operações em uma transação particular." + +#. Tag: term +#: best_practices.xml:121 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "" +"Em uma arquitetura de três camadas, considere o uso de objetos separados." + +#. Tag: para +#: best_practices.xml:123 +#, no-c-format +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." + +#. Tag: term +#: best_practices.xml:132 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "" +"In a two tiered architecture, consider using long persistence contexts." + +#. Tag: para +#: best_practices.xml:134 +#, no-c-format +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often necessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." + +#. Tag: term +#: best_practices.xml:148 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "Don't treat exceptions as recoverable." + +#. Tag: para +#: best_practices.xml:150 +#, no-c-format +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." + +#. Tag: term +#: best_practices.xml:160 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "Prefer lazy fetching for associations." + +#. Tag: para +#: best_practices.xml:162 +#, no-c-format +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." + +#. Tag: para +#: best_practices.xml:177 +#, no-c-format +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." + +#. Tag: term +#: best_practices.xml:191 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "Consider abstracting your business logic from Hibernate." + +#. Tag: para +#: best_practices.xml:193 +#, no-c-format +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" + +#. Tag: term +#: best_practices.xml:203 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "Don't use exotic association mappings." + +#. Tag: para +#: best_practices.xml:205 +#, no-c-format +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "Prefer bidirectional associations." + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/collection_mapping.po b/documentation/envers/src/main/docbook/pt-BR/content/collection_mapping.po new file mode 100644 index 0000000000..635d546736 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/collection_mapping.po @@ -0,0 +1,1915 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:5 +#, no-c-format +msgid "Collection Mapping" +msgstr "Mapeamento de Coleções" + +#. Tag: title +#: collection_mapping.xml:8 +#, no-c-format +msgid "Persistent collections" +msgstr "Persistent collections" + +#. Tag: para +#: collection_mapping.xml:10 +#, no-c-format +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" + +#. Tag: programlisting +#: collection_mapping.xml:15 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:17 +#, no-c-format +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" + +#. Tag: para +#: collection_mapping.xml:26 +#, no-c-format +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" + +#. Tag: programlisting +#: collection_mapping.xml:36 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:38 +#, no-c-format +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." + +#. Tag: para +#: collection_mapping.xml:45 +#, no-c-format +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." + +#. Tag: para +#: collection_mapping.xml:56 +#, no-c-format +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." + +#. Tag: title +#: collection_mapping.xml:65 +#, no-c-format +msgid "Collection mappings" +msgstr "Collection mappings" + +#. Tag: para +#: collection_mapping.xml:67 +#, no-c-format +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." + +#. Tag: programlisting +#: collection_mapping.xml:73 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:75 +#, no-c-format +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" + +#. Tag: programlisting +#: collection_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:103 +#, no-c-format +msgid "name the collection property name" +msgstr "name the collection property name" + +#. Tag: para +#: collection_mapping.xml:108 +#, no-c-format +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" + +#. Tag: para +#: collection_mapping.xml:114 +#, no-c-format +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" + +#. Tag: para +#: collection_mapping.xml:120 +#, no-c-format +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" + +#. Tag: para +#: collection_mapping.xml:129 +#, no-c-format +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" + +#. Tag: para +#: collection_mapping.xml:141 +#, no-c-format +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" + +#. Tag: para +#: collection_mapping.xml:147 +#, no-c-format +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" + +#. Tag: para +#: collection_mapping.xml:154 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." + +#. Tag: para +#: collection_mapping.xml:168 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." + +#. Tag: para +#: collection_mapping.xml:174 +#, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." + +#. Tag: para +#: collection_mapping.xml:180 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" + +#. Tag: para +#: collection_mapping.xml:188 +#, no-c-format +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." + +#. Tag: title +#: collection_mapping.xml:198 +#, no-c-format +msgid "Collection foreign keys" +msgstr "Collection foreign keys" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." + +#. Tag: para +#: collection_mapping.xml:208 +#, no-c-format +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." + +#. Tag: programlisting +#: collection_mapping.xml:215 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:217 +#, no-c-format +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "" +"The foreign key constraint may use ON DELETE CASCADE." + +#. Tag: programlisting +#: collection_mapping.xml:221 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:223 +#, no-c-format +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "" +"See the previous chapter for a full definition of the <key> element." + +#. Tag: title +#: collection_mapping.xml:231 +#, no-c-format +msgid "Collection elements" +msgstr "Collection elements" + +#. Tag: para +#: collection_mapping.xml:233 +#, no-c-format +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." + +#. Tag: para +#: collection_mapping.xml:242 +#, no-c-format +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." + +#. Tag: title +#: collection_mapping.xml:254 +#, no-c-format +msgid "Indexed collections" +msgstr "Indexed collections" + +#. Tag: para +#: collection_mapping.xml:256 +#, no-c-format +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." + +#. Tag: sect2 +#: collection_mapping.xml:267 +#, no-c-format +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:348 +#, no-c-format +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." + +#. Tag: para +#: collection_mapping.xml:357 +#, no-c-format +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." + +#. Tag: title +#: collection_mapping.xml:364 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "Collections of values and many-to-many associations" + +#. Tag: para +#: collection_mapping.xml:366 +#, no-c-format +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." + +#. Tag: para +#: collection_mapping.xml:373 +#, no-c-format +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "" +"For a collection of values, we use the <element> " +"tag." + +#. Tag: sect2 +#: collection_mapping.xml:375 +#, no-c-format +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:480 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "Some examples, first, a set of strings:" + +#. Tag: programlisting +#: collection_mapping.xml:484 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:486 +#, no-c-format +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" + +#. Tag: programlisting +#: collection_mapping.xml:491 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:493 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "An array of entities - in this case, a many to many association:" + +#. Tag: programlisting +#: collection_mapping.xml:497 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:499 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "A map from string indices to dates:" + +#. Tag: programlisting +#: collection_mapping.xml:503 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:505 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "A list of components (discussed in the next chapter):" + +#. Tag: programlisting +#: collection_mapping.xml:509 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"
]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:514 +#, no-c-format +msgid "One-to-many associations" +msgstr "One-to-many associations" + +#. Tag: para +#: collection_mapping.xml:516 +#, no-c-format +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" + +#. Tag: para +#: collection_mapping.xml:524 +#, no-c-format +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" + +#. Tag: para +#: collection_mapping.xml:530 +#, no-c-format +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" + +#. Tag: para +#: collection_mapping.xml:537 +#, no-c-format +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." + +#. Tag: programlisting +#: collection_mapping.xml:550 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:553 +#, no-c-format +msgid "class (required): The name of the associated class." +msgstr "class (required): The name of the associated class." + +#. Tag: para +#: collection_mapping.xml:558 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." + +#. Tag: para +#: collection_mapping.xml:565 +#, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." + +#. Tag: para +#: collection_mapping.xml:573 +#, no-c-format +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." + +#. Tag: para +#: collection_mapping.xml:579 +#, no-c-format +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." + +#. Tag: para +#: collection_mapping.xml:588 +#, no-c-format +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." + +#. Tag: programlisting +#: collection_mapping.xml:594 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:600 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "Advanced collection mappings" + +#. Tag: title +#: collection_mapping.xml:603 +#, no-c-format +msgid "Sorted collections" +msgstr "Sorted collections" + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" + +#. Tag: programlisting +#: collection_mapping.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:612 +#, no-c-format +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." + +#. Tag: para +#: collection_mapping.xml:618 +#, no-c-format +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." + +#. Tag: para +#: collection_mapping.xml:623 +#, no-c-format +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." + +#. Tag: programlisting +#: collection_mapping.xml:632 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:634 +#, no-c-format +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" + +#. Tag: para +#: collection_mapping.xml:639 +#, no-c-format +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." + +#. Tag: programlisting +#: collection_mapping.xml:644 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:649 +#, no-c-format +msgid "Bidirectional associations" +msgstr "Bidirectional associations" + +#. Tag: para +#: collection_mapping.xml:651 +#, fuzzy, no-c-format +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported: " + +#. Tag: term +#: collection_mapping.xml:658 +#, no-c-format +msgid "one-to-many" +msgstr "one-to-many" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "set or bag valued at one end, single-valued at the other" + +#. Tag: term +#: collection_mapping.xml:666 +#, no-c-format +msgid "many-to-many" +msgstr "many-to-many" + +#. Tag: para +#: collection_mapping.xml:668 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "set or bag valued at both ends" + +#. Tag: para +#: collection_mapping.xml:677 +#, no-c-format +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." + +#. Tag: para +#: collection_mapping.xml:684 +#, no-c-format +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" + +#. Tag: programlisting +#: collection_mapping.xml:689 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:691 +#, no-c-format +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"As mudanças feitas somente de um lado da associação não " +"são persistidas. Isto significa que o Hibernate tem duas representações na " +"memória para cada associação bidirecional, uma associação de A para B e uma " +"outra associação de B para A. Isto é mais fácil de compreender se você pensa " +"sobre o modelo do objetos do Java e como nós criamos um relacionamento " +"muitos para muitos em Java:" + +#. Tag: programlisting +#: collection_mapping.xml:699 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:701 +#, no-c-format +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "" +"A outra ponta é usada salvar a representação em memória à base de dados." + +#. Tag: para +#: collection_mapping.xml:705 +#, no-c-format +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"Você pode definir uma associação bidirecional um para muitos através de uma " +"associação um-para-muitos indicando as mesmas colunas da tabela que à " +"associação muitos-para-um e declarando a propriedade inverse=\"true" +"\"" + +#. Tag: programlisting +#: collection_mapping.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:713 +#, no-c-format +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"Mapear apenas uma das pontas da associação com inverse=\"true\" não afeta as operações em cascata, isso é um conceito ortogonal." + +#. Tag: title +#: collection_mapping.xml:721 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "Associações bidirecionais com coleções indexadas" + +#. Tag: para +#: collection_mapping.xml:722 +#, no-c-format +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"Uma associação bidirecional onde uma dos lados e representa pôr uma " +"<list> ou <map> requer uma " +"consideração especial. Se houver uma propriedade da classe filha que faça o " +"mapeamento da coluna do índice, sem problema, pode-se continuar usando " +"inverse=\"true\" no mapeamento da coleção." + +#. Tag: programlisting +#: collection_mapping.xml:729 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"Mas, se não houver nenhuma propriedade na classe filha, não podemos ver essa " +"associação como verdadeiramente bidirecional (há uma informação disponível " +"em um lado da associação que não está disponível no extremo oposto). Nesse " +"caso, nos não podemos mapear a coleção usando inverse=\"true\". Nos devemos usar o seguinte mapeamento:" + +#. Tag: programlisting +#: collection_mapping.xml:738 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:740 +#, no-c-format +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"Veja que neste mapeamento, que um dos lado da associação, a coleção, é " +"responsável pela atualização da chave estrangeira. TODO: Isso realmente " +"resulta em updates desnecessários ?." + +#. Tag: title +#: collection_mapping.xml:748 +#, no-c-format +msgid "Ternary associations" +msgstr "Associações Ternárias" + +#. Tag: para +#: collection_mapping.xml:750 +#, no-c-format +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"Há três meios possíveis de se mapear uma associação ternária. Uma é usar um " +"Map com uma associação como seu índice:" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:757 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:759 +#, no-c-format +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"A segunda maneira é simplesmente remodelar a associação das classes da " +"entidade. Esta é a maneira que nós usamos de uma maneira geral." + +#. Tag: para +#: collection_mapping.xml:764 +#, no-c-format +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "" +"Uma alternativa final é usar os elementos compostos, que nós discutiremos " +"mais tarde." + +#. Tag: literal +#: collection_mapping.xml:771 +#, no-c-format +msgid "Using an <idbag>" +msgstr "Usando o <idbag>" + +#. Tag: para +#: collection_mapping.xml:773 +#, no-c-format +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"Se você concorda com nossa visão que chaves compostas são uma coisa ruim e " +"que as entidades devem ter identificadores sintéticos (surrogate keys), " +"então você deve estar achando um pouco estranho que as associações muitos " +"para muitos usando coleções de valores que nós mostramos estejam mapeadas " +"com chaves compostas! Bem, este ponto é bastante discutível; um simples " +"tabela de associação não parece se beneficiar muito de uma surrogate key " +"(entretanto uma coleção de valores compostos sim). " +"Opcionalmente, o Hibernate prove uma maneira de mapear uma associação muitos " +"para muitos com uma coleção de valores para uma tabela com uma surrogate key." + +#. Tag: para +#: collection_mapping.xml:784 +#, no-c-format +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"O elemento <idbag> permite mapear um List (ou uma Collection com uma semântica de bag." + +#. Tag: programlisting +#: collection_mapping.xml:789 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:791 +#, no-c-format +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"Como você pode ver, um <idbag> possui um gerador de " +"id sintético, igual uma classe de entidade! Uma surrogate key diferente é " +"associada para cada elemento de coleção. Porém, o Hibernate não prove nenhum " +"mecanismo para descobrir qual a surrogate key de uma linha em particular." + +#. Tag: para +#: collection_mapping.xml:798 +#, no-c-format +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"Note que o desempenho de atualização de um <idbag> " +"é much melhor que um <bag> " +"normal! O Hibernate pode localizar uma linha individual eficazmente e " +"atualizar ou deletar individualmente, como um list, map ou set." + +#. Tag: para +#: collection_mapping.xml:805 +#, no-c-format +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"Na implementação atual, a estratégia de geração de identificador " +"native não é suportada para identificadores de coleção " +"usando o <idbag>." + +#. Tag: title +#: collection_mapping.xml:829 +#, no-c-format +msgid "Collection examples" +msgstr "Exemplos de coleções" + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "" +"As seções anteriores são uma grande confusão. Assim sendo vejamos uma " +"exemplo. Essa classe:" + +#. Tag: programlisting +#: collection_mapping.xml:836 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:838 +#, no-c-format +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"tem uma coleção de instancias de Child. Se cada Child " +"tiver no máximo um parent, o mapeamento natural é uma associação um para " +"muitos:" + +#. Tag: programlisting +#: collection_mapping.xml:844 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:846 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "Esse mapeamento gera a seguinte definição de tabelas" + +#. Tag: programlisting +#: collection_mapping.xml:850 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:852 +#, no-c-format +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"Se o parent for obrigatório, use uma associação " +"bidirecional um para muitos:" + +#. Tag: programlisting +#: collection_mapping.xml:857 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:859 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "Repare na constraint NOT NULL:" + +#. Tag: programlisting +#: collection_mapping.xml:863 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:865 +#, no-c-format +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"Uma outra alternativa, no caso de você insistir que esta associação devea " +"ser unidirecional, você pode declarar a constraint como NOT NULL na tag <key> do mapeamento:" + +#. Tag: programlisting +#: collection_mapping.xml:871 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:873 +#, no-c-format +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "" +"Por outro lado, se uma child puder ter os múltiplos parents, a associação " +"apropriada é muitos-para-muitos:" + +#. Tag: programlisting +#: collection_mapping.xml:878 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:880 +#, no-c-format +msgid "Table definitions:" +msgstr "Definições das tabelas:" + +#. Tag: programlisting +#: collection_mapping.xml:884 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:886 +#, no-c-format +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see . Para mais exemplos e " +"um exemplo completo de mapeamento de relacionamento de mestre/detalhe, veja " +"." + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "" +"Até mesmo o mapeamento de associações mais exóticas são possíveis, nós " +"catalogaremos todas as possibilidades no próximo capítulo." + +#~ msgid "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." +#~ msgstr "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." + +#~ msgid "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." +#~ msgstr "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." +#~ msgstr "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." +#~ msgstr "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." + +#~ msgid "type (reguired): The type of the map keys." +#~ msgstr "type (reguired): The type of the map keys." + +#~ msgid "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." +#~ msgstr "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." +#~ msgstr "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." + +#~ msgid "" +#~ "class (required): The entity class used as the map key." +#~ msgstr "" +#~ "class (required): The entity class used as the map key." + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." +#~ msgstr "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." +#~ msgstr "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." + +#~ msgid "" +#~ "type (required): The type of the collection element." +#~ msgstr "" +#~ "type (required): The type of the collection element." + +#~ msgid "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." +#~ msgstr "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." + +#~ msgid "" +#~ "column (optional): The name of the element foreign key " +#~ "column." +#~ msgstr "" +#~ "column (optional): The name of the element foreign key " +#~ "column." + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." +#~ msgstr "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." + +#~ msgid "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." +#~ msgstr "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." + +#~ msgid "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." +#~ msgstr "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." + +#~ msgid "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." +#~ msgstr "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." + +#~ msgid "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." +#~ msgstr "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/component_mapping.po b/documentation/envers/src/main/docbook/pt-BR/content/component_mapping.po new file mode 100644 index 0000000000..5fc6048ef3 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/component_mapping.po @@ -0,0 +1,685 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Component Mapping" +msgstr "Mapeamento de Componentes" + +#. Tag: para +#: component_mapping.xml:7 +#, no-c-format +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"A noção de componente é reusada em vários contextos " +"diferentes, para propósitos diferentes, pelo Hibernate." + +#. Tag: title +#: component_mapping.xml:13 +#, no-c-format +msgid "Dependent objects" +msgstr "Objetos dependentes" + +#. Tag: para +#: component_mapping.xml:15 +#, no-c-format +msgid "" +"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 "" +"Um componente é um objeto contido que é persistido como um tipo de valor, " +"não uma referência de entidade. O termo \"componente\" refere-se à noção de " +"composição da orientação a objetos (não a componentes no nível de " +"arquitetura). Por exemplo, você pode modelar uma pessoa desta maneira:" + +#. Tag: programlisting +#: component_mapping.xml:21 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:23 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: component_mapping.xml:25 +#, no-c-format +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"Agora Name pode ser persistido como um componente de " +"Person. Note que Name define métodos " +"getter e setter para suas propriedades persistentes, mas não necessita " +"declarar nenhuma interface ou propriedades identificadoras." + +#. Tag: para +#: component_mapping.xml:32 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "Nosso mapeamento do Hibernate seria semelhante a isso" + +#. Tag: programlisting +#: component_mapping.xml:36 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:38 +#, no-c-format +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"A tabela pessoa teria as seguintes colunas pid, " +"birthday, initial, first and last." + +#. Tag: para +#: component_mapping.xml:46 +#, no-c-format +msgid "" +"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 ad hoc. 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 "" +"Assim como todos tipos por valor, componentes não suportam referencias " +"cruzadas. Em outras palavras, duas pessoas poderiam possuir o mesmo nome, " +"mas os dois objetos pessoa poderiam conter dois objetos nome independentes, " +"apenas com \"o mesmo\" por valor. A semântica dos valores null de um " +"componente são ad hoc. No recarregameno do conteúdo do " +"objeto, O Hibernate assumira que se todas as colunas do componente são null, " +"então todo o componente é null. Isto seria o certo para a maioria dos " +"propósitos." + +#. Tag: para +#: component_mapping.xml:55 +#, no-c-format +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"As propriedades de um componente podem ser de qualquer tipo do Hibernate" +"(collections, associações muitos-para-um, outros componentes, etc). " +"Componentes agrupados não devem ser consideros um uso " +"exótico. O Hibernate tem a intenção de suportar um modelo de objetos muito " +"bem granulado." + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"O elemento <component> permite um subelemento " +"<parent> que mapeia uma propriedade da classe " +"componente como uma referência de volta para a entidade que a contém." + +#. Tag: programlisting +#: component_mapping.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:84 +#, no-c-format +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"Nota: se você definir um Set de elementos compostos, é " +"muito importante implementar equals() e hashCode" +"() corretamente." + +#. Tag: para +#: component_mapping.xml:90 +#, no-c-format +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 "" +"Elementos compostos podem conter componentes mas não collections. Se o seu " +"elemento composto contiver componentes , use a tag <nested-" +"composite-element> . Este é um caso bastante exótico – uma " +"collections de componentes que por si própria possui componentes. Neste " +"momento você deve estar se perguntando se uma associação de um-para-muitos " +"seria mais apropriada. Tente remodelar o elemento composto como uma entidade " +"– mas note que mesmo pensando que o modelo Java é o mesmo, o modelo " +"relacional e a semântica de persistência ainda são diferentes." + +#. Tag: para +#: component_mapping.xml:102 +#, no-c-format +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"Por favor, note que um mapeamento de elemento composto não suporta " +"propriedades capazes de serem null se você estiver usando um <" +"set>. O Hibernate tem que usar cada valor das colunas para " +"identificar um registro quando estiver deletando objetos (não existe coluna " +"chave primária separada na tabela de elemento composto), que não é possível " +"com valores null. Você tem que usar um dos dois, ou apenas propriedades não " +"null em um elemento composto ou escolher uma <list>, <map>, <bag> ou " +"<idbag>." + +#. Tag: para +#: component_mapping.xml:113 +#, no-c-format +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"Um caso especial de elemento composto é um elemento composto com um elemento " +"<many-to-one> aninhado. Um mapeamento como este " +"permite você a mapear colunas extras de uma tabela de associação de muitos-" +"para-muitos para a classe de elemento composto. A seguinte associação de " +"muitos-para-muitos de Order para um Item onde purchaseDate, price e " +"quantity são propriedades da associação:" + +#. Tag: programlisting +#: component_mapping.xml:123 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:125 +#, no-c-format +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"Claro, que não pode ter uma referência para purchase no outro lado, para a " +"navegação da associação bidirecional. Lembre-se que componentes são tipos " +"por valor e não permitem referências compartilhadas. Uma classe " +"Purchase simples pode estar no set de uma classe " +"Order, mas ela não pode ser referenciada por " +"Item no mesmo momento." + +#. Tag: para +#: component_mapping.xml:133 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "Até mesmo associações ternárias (ou quaternária, etc) são possíveis:" + +#. Tag: programlisting +#: component_mapping.xml:135 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "" +"Elementos compostos podem aparecer em pesquisas usando a mesma sintaxe assim " +"como associações para outras entidades." + +#. Tag: title +#: component_mapping.xml:145 +#, no-c-format +msgid "Components as Map indices" +msgstr "Componentes como índices de Map" + +#. Tag: para +#: component_mapping.xml:147 +#, no-c-format +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"O elemento <composite-map-key> permite você mapear " +"uma classe componente como uma chave de um Map. Tenha " +"certeza que você sobrescreveu hashCode() e equals" +"() corretamente na classe componente." + +#. Tag: title +#: component_mapping.xml:156 +#, no-c-format +msgid "Components as composite identifiers" +msgstr ". Componentes como identificadores compostos" + +#. Tag: para +#: component_mapping.xml:158 +#, no-c-format +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"Você pode usar um componente como um identificador de uma classe entidade. " +"Sua classe componente deve satisfazer certos requisitos:" + +#. Tag: para +#: component_mapping.xml:165 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "Ele deve implementar java.io.Serializable." + +#. Tag: para +#: component_mapping.xml:170 +#, no-c-format +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"Ele deve re-implementar equals() e hashCode(), consistentemente com a noção de igualdade de chave composta do " +"banco de dados." + +#. Tag: emphasis +#: component_mapping.xml:179 +#, no-c-format +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"Nota: no Hibernate 3, o segundo requisito não é um requisito absolutamente " +"necessário. Mas atenda ele de qualquer forma." + +#. Tag: para +#: component_mapping.xml:183 +#, no-c-format +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"Você não pode usar um IdentifierGenerator para gerar " +"chaves compostas. Ao invés disso o aplicativo deve gerenciar seus próprios " +"identificadores." + +#. Tag: para +#: component_mapping.xml:188 +#, no-c-format +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"Use a tag <composite-id> (com elementos " +"<key-property> aninhados) no lugar da declaração " +"<id> de costume. Por exemplo, a classe " +"OrderLine possui uma chave primária que depende da chave " +"primária (composta) de Order." + +#. Tag: programlisting +#: component_mapping.xml:196 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:198 +#, no-c-format +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"Agora, qualquer chave estrangeira referenciando a tabela OrderLine também serão compostas. Você deve declarar isto em seus mapeamentos " +"para outras classes. Uma associação para OrderLine seria " +"mapeada dessa forma:" + +#. Tag: programlisting +#: component_mapping.xml:204 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:206 +#, no-c-format +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(Note que a tag <column> é uma alternativa para o " +"atributo column por toda a parte.)" + +#. Tag: para +#: component_mapping.xml:211 +#, no-c-format +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"Uma associação many-to-many para many-to-many também usa a chave estrangeira composta:" + +#. Tag: programlisting +#: component_mapping.xml:216 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:218 +#, no-c-format +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"A collection de OrderLines em Order " +"usaria:" + +#. Tag: programlisting +#: component_mapping.xml:223 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:225 +#, no-c-format +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "" +"(O elemento <one-to-many>, como de costume, não " +"declara colunas.)" + +#. Tag: para +#: component_mapping.xml:229 +#, no-c-format +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "" +"Se OrderLine possui uma collection, ela também tem uma " +"chave estrangeira composta." + +#. Tag: programlisting +#: component_mapping.xml:234 +#, no-c-format +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:239 +#, no-c-format +msgid "Dynamic components" +msgstr "Componentes Dinâmicos" + +#. Tag: para +#: component_mapping.xml:241 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "" +"Você pode até mesmo mapear uma propriedade do tipo Map:" + +#. Tag: programlisting +#: component_mapping.xml:245 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:247 +#, no-c-format +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"A semântica de um mapeamento <dynamic-component> é " +"idêntica à <component>. A vantagem deste tipo de " +"mapeamento é a habilidade de determinar as propriedades atuais do bean no " +"momento de deploy, apenas editando o documento de mapeamento. A Manipulação " +"em tempo de execução do documento de mapeamento também é possível, usando o " +"parser DOM. Até melhor, você pode acessar (e mudar) o metamodelo " +"configuration-time do Hibernate através do objeto Configuration." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/configuration.po b/documentation/envers/src/main/docbook/pt-BR/content/configuration.po new file mode 100644 index 0000000000..43d2e79e44 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/configuration.po @@ -0,0 +1,3888 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:5 +#, no-c-format +msgid "Configuration" +msgstr "Configuração" + +#. Tag: para +#: configuration.xml:7 +#, no-c-format +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"Devido ao fato de o Hibernate ser projetado para operar em vários ambientes " +"diferentes, há um grande número de parâmetros de configuração. Felizmente, a " +"maioria tem valores default lógicos e o Hibernate é distribuído com um " +"arquivo hibernate.properties de exemplo no etc/ que mostra várias opções. Apenas coloque o arquivo de exemplo no " +"seu classpath e personalize-o." + +#. Tag: title +#: configuration.xml:16 +#, no-c-format +msgid "Programmatic configuration" +msgstr "1.11 Configuração programática" + +#. Tag: para +#: configuration.xml:18 +#, no-c-format +msgid "" +"An instance of org.hibernate.cfg.Configuration represents " +"an entire set of mappings of an application's Java types to an SQL database. " +"The Configuration is used to build an (immutable) " +"SessionFactory. The mappings are compiled from various " +"XML mapping files." +msgstr "" +"Uma instância de org.hibernate.cfg.Configuration " +"representa um conjunto inteiro de mapeamentos de tipos Java da aplicação " +"para um banco de dados SQL. O Configuration é usado para " +"construir uma SessionFactory (imutável). Os mapeamentos " +"são compilados a partir de arquivos de mapeamento XML." + +#. Tag: para +#: configuration.xml:26 +#, no-c-format +msgid "" +"You may obtain a Configuration instance by instantiating " +"it directly and specifying XML mapping documents. If the mapping files are " +"in the classpath, use addResource():" +msgstr "" +"Você pode obter uma instância Configuration intanciando- " +"o diretamente e especificando documentos de mapeamento XML. Se o arquivo de " +"mapeamento estão no classpath, use use addResource():" + +#. Tag: programlisting +#: configuration.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:34 +#, no-c-format +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"Uma alternativa (às vezes melhor) é especificar a classe mapeada, e permitir " +"que o Hibernate encontre o documento de mapeamento para você:" + +#. Tag: programlisting +#: configuration.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:41 +#, no-c-format +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"Então o Hibernate procurará pelos arquivos de mapeamento chamados /" +"org/hibernate/auction/Item.hbm.xml e /org/hibernate/" +"auction/Bid.hbm.xml no classpath. Esta abordagem elimina qualquer " +"nome de arquivo de difícil compreensão." + +#. Tag: para +#: configuration.xml:48 +#, no-c-format +msgid "" +"A Configuration also allows you to specify configuration " +"properties:" +msgstr "" +"Uma Configuration também permite você especificar " +"propriedades de configuração:" + +#. Tag: programlisting +#: configuration.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:55 +#, no-c-format +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "" +"Este não é o único caminho para passar as propriedades de configuração para " +"o Hibernate. As várias opções incluem:" + +#. Tag: para +#: configuration.xml:62 +#, no-c-format +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"Passar uma instância de java.util.Properties para " +"Configuration.setProperties()." + +#. Tag: para +#: configuration.xml:68 +#, no-c-format +msgid "" +"Place hibernate.properties in a root directory of the " +"classpath." +msgstr "" +"Colocar hibernate.properties no diretório raiz do " +"classpath." + +#. Tag: para +#: configuration.xml:74 +#, no-c-format +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"Determinar as propriedades do System usando java " +"-Dproperty=value." + +#. Tag: para +#: configuration.xml:80 +#, no-c-format +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later). Incluir elementos <" +"property> no hibernate.cfg.xml (discutido " +"mais tarde)." + +#. Tag: para +#: configuration.xml:87 +#, no-c-format +msgid "" +"hibernate.properties is the easiest approach if you want " +"to get started quickly." +msgstr "" +"hibernate.properties é o caminho mais facil se você quer " +"começar mais rápido." + +#. Tag: para +#: configuration.xml:92 +#, no-c-format +msgid "" +"The Configuration is intended as a startup-time object, " +"to be discarded once a SessionFactory is created." +msgstr "" +"O Configuration é entendido como um objeto startup-time, " +"é descartado uma vez que a SessionFactory é criada." + +#. Tag: title +#: configuration.xml:100 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "Obtendo uma SessionFactory" + +#. Tag: para +#: configuration.xml:102 +#, no-c-format +msgid "" +"When all mappings have been parsed by the Configuration, " +"the application must obtain a factory for Session " +"instances. This factory is intended to be shared by all application threads:" +msgstr "" +"Quando todos os mapeamentos têm sido analisados pelo Configuration, a aplicação deve obter uma factory para as instâncias da " +"Session. O objetivo desta factory é ser compartilhado por " +"todas as threads da aplicação:" + +#. Tag: programlisting +#: configuration.xml:108 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:110 +#, no-c-format +msgid "" +"Hibernate does allow your application to instantiate more than one " +"SessionFactory. This is useful if you are using more than " +"one database." +msgstr "" +"Hibernate permite sua aplicação instanciar mais do que uma " +"SessionFactory. Isto é útil se você está usando mais do " +"que um banco de dados." + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "JDBC connections" +msgstr "Conexões JDBC" + +#. Tag: para +#: configuration.xml:121 +#, no-c-format +msgid "" +"Usually, you want to have the SessionFactory create and " +"pool JDBC connections for you. If you take this approach, opening a " +"Session is as simple as:" +msgstr "" +"Normalmente, você quer mandar criar a SessionFactory " +"criar um pool de conexões JDBC para você. Se você seguir essa abordagem, a " +"abertura de uma Session é tão simples quanto:" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, no-c-format +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"Assim que você fizer algo que requer o acesso ao banco de dados, uma conexão " +"JDBC será obtida do pool." + +#. Tag: para +#: configuration.xml:134 +#, no-c-format +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now describe " +"the most important settings for JDBC connection configuration." +msgstr "" +"Para esse trabalho, nós necessitamos passar algumas propriedades da conexão " +"JDBC para o Hibernate. Todos os nomes de propriedades Hibernate e semânticas " +"são definidas org.hibernate.cfg.Environment. Nós iremos " +"descrever agora o mais importantes configurações de conexão JDBC." + +#. Tag: para +#: configuration.xml:141 +#, no-c-format +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"O Hibernate obterá conexões( e pool) usando java.sql.DriverManager se você determinar as seguintes propriedades:" + +#. Tag: title +#: configuration.xml:147 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "Propriedades JDBC Hibernate" + +#. Tag: entry +#: configuration.xml:153 configuration.xml:241 configuration.xml:338 +#: configuration.xml:529 configuration.xml:725 configuration.xml:832 +#: configuration.xml:920 +#, no-c-format +msgid "Property name" +msgstr "Nome da Propriedade" + +#. Tag: entry +#: configuration.xml:154 configuration.xml:242 configuration.xml:339 +#: configuration.xml:530 configuration.xml:726 configuration.xml:833 +#: configuration.xml:921 +#, no-c-format +msgid "Purpose" +msgstr "Propósito" + +#. Tag: literal +#: configuration.xml:160 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: emphasis +#: configuration.xml:163 +#, no-c-format +msgid "JDBC driver class" +msgstr "Classe driver jdbc" + +#. Tag: literal +#: configuration.xml:168 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: emphasis +#: configuration.xml:171 +#, no-c-format +msgid "JDBC URL" +msgstr "URL jdbc" + +#. Tag: literal +#: configuration.xml:176 configuration.xml:272 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: emphasis +#: configuration.xml:179 +#, no-c-format +msgid "database user" +msgstr "Usuário do banco de dados" + +#. Tag: literal +#: configuration.xml:184 configuration.xml:280 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: emphasis +#: configuration.xml:187 +#, no-c-format +msgid "database user password" +msgstr "Senha do usuário do banco de dados" + +#. Tag: literal +#: configuration.xml:192 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#. Tag: emphasis +#: configuration.xml:195 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "Número máximo de connecxões no pool" + +#. Tag: para +#: configuration.xml:202 +#, no-c-format +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property with " +"connection pool specific settings. This will turn off Hibernate's internal " +"pool. For example, you might like to use C3P0." +msgstr "" +"O algoritmo de pool de conexões do próprio Hibernate entretanto é " +"completamente rudimentar. A intenção dele e ajudar a iniciar e não " +"para usar em um sistema de produção ou até para testar " +"desempenho. Você deveria usar uma ferramente de pool de terceiros para " +"conseguir melhor desempenho e estabilidade. Apenas especifique a propriedade " +"hibernate.connection.pool_size com a definição do pool de " +"conexões. Isto irá desligar o pool interno do Hibernate. Por exemplo, você " +"pode gostar de usar C3P0." + +#. Tag: para +#: configuration.xml:212 +#, no-c-format +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"C3P0ConnectionProvider for connection pooling if you set " +"hibernate.c3p0.* properties. If you'd like to use Proxool " +"refer to the packaged hibernate.properties and the " +"Hibernate web site for more information." +msgstr "" +"O C3P0 é um pool conexão JDBC de código aberto distribuído junto com " +"Hibernate no diretório lib. O Hibernate usará o " +"C3P0ConnectionProvider para o pool de conexão se você " +"configurar a propriedade hibernate.c3p0.*. Se você gostar " +"de usar Proxool consulte ao pacote hibernate.properties e " +"o web site do Hibernate para mais informações." + +#. Tag: para +#: configuration.xml:221 +#, no-c-format +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "" +"Aqui é um exemplo de arquivo hibernate.properties para " +"C3P0:" + +#. Tag: programlisting +#: configuration.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:227 +#, no-c-format +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"Datasource registered in JNDI. You'll need to set at " +"least one of the following properties:" +msgstr "" +"Para usar dentro de um servidor de aplicação, você deve configurar o " +"Hibernate para obter conexões de um application server Datasource registrado no JNDI. Você necessitará determinar pelo menos uma das " +"seguintes propriedades:" + +#. Tag: title +#: configuration.xml:235 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "Propriedades do Datasource do Hibernate" + +#. Tag: literal +#: configuration.xml:248 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#. Tag: emphasis +#: configuration.xml:251 +#, no-c-format +msgid "datasource JNDI name" +msgstr "Nome datasource JNDI" + +#. Tag: literal +#: configuration.xml:256 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#. Tag: entry +#: configuration.xml:258 +#, fuzzy, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "URL do fornecedor JNDI" + +#. Tag: literal +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#. Tag: entry +#: configuration.xml:266 +#, no-c-format +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:274 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:290 +#, no-c-format +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"Eis um exemplo de arquivo hibernate.properties para um " +"servidor de aplicação fornecedor de datasources JNDI:" + +#. Tag: programlisting +#: configuration.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:297 +#, no-c-format +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"Conexões JDBC obtidas de um datasource JNDI irão automaticamente irão " +"participar das transações gerenciadas pelo container no servidor de " +"aplicação." + +#. Tag: para +#: configuration.xml:302 +#, no-c-format +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the property name. For " +"example, you may specify a charSet using " +"hibernate.connection.charSet." +msgstr "" +"Arbitrariamente as propriedades de conexão podem ser acrescentandas ao " +"\"hibernate.connnection\" ao nome da propriedade. Por " +"exemplo, você deve especificar o charSet usando " +"hibernate.connection.charSet.t." + +#. Tag: para +#: configuration.xml:308 +#, no-c-format +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider. You may select a custom implementation by " +"setting hibernate.connection.provider_class." +msgstr "" +"Você pode definir sua própria estratégia de plugin para obter conexões JDBC " +"implementando a interface org.hibernate.connection." +"ConnectionProvider. Você pode escolher uma implementação " +"customizada setando hibernate.connection.provider_class." + +#. Tag: title +#: configuration.xml:317 +#, no-c-format +msgid "Optional configuration properties" +msgstr "Propriedades opcionais de configuração" + +#. Tag: para +#: configuration.xml:319 +#, no-c-format +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"Há um grande número de outras propriedades que controlam o comportamento do " +"Hibernate em tempo de execução. Todos são opcionais e tem valores default " +"lógicos." + +#. Tag: para +#: configuration.xml:324 +#, no-c-format +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"Aviso: algumas destas propriedades são somente a \"nível de sistema" +"\". Propriedades nível de sistema podem ser determinados somente " +"via java -Dproperty=value ou hibernate." +"properties. Elas nãopodem ser configuradas " +"por outras técnicas descritas abaixo." + +#. Tag: title +#: configuration.xml:332 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "Hibernate Configuration Properties" + +#. Tag: literal +#: configuration.xml:345 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: configuration.xml:347 +#, fuzzy, no-c-format +msgid "" +"The classname of a Hibernate Dialect which allows " +"Hibernate to generate SQL optimized for a particular relational database." +msgstr "" +"O nome da classe de um que permite o Hibernate gerar SQL " +"otimizado para um banco de dados relacional em particular. " + +#. Tag: para +#: configuration.xml:351 +#, fuzzy, no-c-format +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:359 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#. Tag: entry +#: configuration.xml:361 +#, fuzzy, no-c-format +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"Escreve todas as instruções SQL no console. Esta é uma alternativa a " +"configurar a categoria de log para . " +"" + +#. Tag: para +#: configuration.xml:365 configuration.xml:377 configuration.xml:471 +#: configuration.xml:484 configuration.xml:497 configuration.xml:510 +#: configuration.xml:564 configuration.xml:591 configuration.xml:605 +#: configuration.xml:660 configuration.xml:888 configuration.xml:903 +#: configuration.xml:993 +#, fuzzy, no-c-format +msgid "" +"eg. true | " +"false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:373 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#. Tag: entry +#: configuration.xml:375 +#, fuzzy, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "Imprime o SQL formatado no log e console. " + +#. Tag: literal +#: configuration.xml:385 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#. Tag: entry +#: configuration.xml:387 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"Qualifica no sql gerado, os nome das tabelas sem qualificar com schena/" +"tablespace dado " + +#. Tag: para +#: configuration.xml:390 +#, fuzzy, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:398 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#. Tag: entry +#: configuration.xml:400 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" +"Qualifica no sql gerado, os nome das tabelas sem qualificar com catálogo " +"dado " + +#. Tag: para +#: configuration.xml:403 +#, fuzzy, no-c-format +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:411 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#. Tag: entry +#: configuration.xml:413 +#, fuzzy, no-c-format +msgid "" +"The SessionFactory will be automatically bound to this " +"name in JNDI after it has been created." +msgstr "" +"O irá automaticamente se ligar a este nome no JNDI depois " +"de ter sido criado. " + +#. Tag: para +#: configuration.xml:416 configuration.xml:859 +#, fuzzy, no-c-format +msgid "" +"eg. jndi/composite/name" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:424 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#. Tag: entry +#: configuration.xml:426 +#, fuzzy, no-c-format +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"Estabelece a \"profundidade\" máxima para árvore outer join fetch para " +"associações finais únicas(one-to-one,many-to-one). Um " +"desativa por default a busca outer join. " + +#. Tag: para +#: configuration.xml:430 +#, no-c-format +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"eg. Valores recomendados " +"entre0 e 3" + +#. Tag: literal +#: configuration.xml:439 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#. Tag: entry +#: configuration.xml:441 +#, fuzzy, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "" +"Determina um tamanho default para busca de associações em lotes do Hibernate " +"" + +#. Tag: para +#: configuration.xml:443 +#, no-c-format +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"eg. Valores recomendados 4, 8, 16" + +#. Tag: literal +#: configuration.xml:452 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#. Tag: entry +#: configuration.xml:454 +#, fuzzy, no-c-format +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +"Determina um modo default para representação de entidades para todas as " +"sessões abertas desta " + +#. Tag: para +#: configuration.xml:457 +#, no-c-format +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"dynamic-map, dom4j, pojo" + +#. Tag: literal +#: configuration.xml:465 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#. Tag: entry +#: configuration.xml:467 +#, fuzzy, no-c-format +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"Força o Hibernate a ordenar os updates SQL pelo valor da chave primária dos " +"itens a serem atualizados. Isto resultará em menos deadlocks nas transações " +"em sistemas altamente concorrente. " + +#. Tag: literal +#: configuration.xml:479 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#. Tag: entry +#: configuration.xml:481 +#, fuzzy, no-c-format +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "" +"If enabled, Hibernate will collect statistics useful for performance tuning. " +"Se habilitado, o Hibernate coletará estatísticas úties para performance " +"tuning dos bancos. " + +#. Tag: literal +#: configuration.xml:492 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#. Tag: entry +#: configuration.xml:494 +#, fuzzy, no-c-format +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"Se habilitado, propriedades identificadoras geradas serão zeradas para os " +"valores default quando os objetos forem apagados. " + +#. Tag: literal +#: configuration.xml:505 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#. Tag: entry +#: configuration.xml:507 +#, fuzzy, no-c-format +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"Se ligado, o Hibernate irá gerar comentários dentro do SQL, para facilitar o " +"debugging, o valor default é . " + +#. Tag: title +#: configuration.xml:521 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "JDBC Hibernate e Propriedades de Conexão" + +#. Tag: literal +#: configuration.xml:536 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#. Tag: entry +#: configuration.xml:538 +#, fuzzy, no-c-format +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "" +"Um valor maior que zero determina o tamanho do fetch do JDBC( chamadas " +")." + +#. Tag: literal +#: configuration.xml:545 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#. Tag: entry +#: configuration.xml:547 +#, fuzzy, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "" +"Um valor maior que zero habilita uso de batch updates JDBC2 pelo Hibernate. " +"" + +#. Tag: para +#: configuration.xml:549 +#, no-c-format +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"Ex. valores recomentados entre " +"5 e 30" + +#. Tag: literal +#: configuration.xml:557 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#. Tag: entry +#: configuration.xml:559 +#, fuzzy, no-c-format +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"Sete esta propriedade como se seu driver JDBC retorna o " +"número correto de linhas no ( É usualmente seguro tornar " +"esta opção ligada). O Hibernate então irá usar betched DML para " +"automaticamente versionar dados. por default. " + +#. Tag: literal +#: configuration.xml:572 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#. Tag: entry +#: configuration.xml:574 +#, fuzzy, no-c-format +msgid "" +"Select a custom Batcher. Most applications will not need " +"this configuration property." +msgstr "" +"Escolher um customizado. Muitas aplicações não irão " +"necessitar desta propriedade de configuração " + +#. Tag: para +#: configuration.xml:577 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:585 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#. Tag: entry +#: configuration.xml:587 +#, fuzzy, no-c-format +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"Habilita o uso de JDBC2 scrollable resultsets pelo Hibernate. Essa " +"propriedade somente é necessaria quando se usa Conexeções JDBC providas pelo " +"usuário, caso contrário o Hibernate os os metadados da conexão. " + +#. Tag: literal +#: configuration.xml:599 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#. Tag: entry +#: configuration.xml:601 +#, fuzzy, no-c-format +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC (system-level property)." +msgstr "" +"Use streams para escrever/ler tipos ou " +"para/a o JDBC( propriedade a nível de sistema). " + +#. Tag: literal +#: configuration.xml:613 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#. Tag: entry +#: configuration.xml:615 +#, fuzzy, no-c-format +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"Possibilita o uso do JDBC3 para recuperar chaves geradas " +"nativamente depois da inserçãp. Requer driver JDBC3+ e JRE1.4+, determine " +"para false se seu driver tem problemas com gerador de indentificadores " +"Hibernate. Por default, tente determinar o driver capaz de usar metadados da " +"conexão. " + +#. Tag: para +#: configuration.xml:621 configuration.xml:751 configuration.xml:763 +#: configuration.xml:777 configuration.xml:815 +#, fuzzy, no-c-format +msgid "eg. true|false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:629 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#. Tag: entry +#: configuration.xml:631 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom ConnectionProvider which " +"provides JDBC connections to Hibernate." +msgstr "" +"O nome da classe de um personalizado o qual proverá " +"conexões JDBC para o Hibernate. " + +#. Tag: para +#: configuration.xml:634 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:642 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#. Tag: entry +#: configuration.xml:644 +#, fuzzy, no-c-format +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most databases do " +"not support all isolation levels." +msgstr "" +"Determina o nível de isolamento de uma transação JDBC. Verifique " +" para valores siginificativos mas note que a maior parte dos " +"bancos de dados não suportam todos os níveis de isolamento. " + +#. Tag: para +#: configuration.xml:648 +#, fuzzy, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:656 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#. Tag: entry +#: configuration.xml:658 +#, fuzzy, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"Habilita autocommit para conexões no pool JDBC( não recomendado). " +"" + +#. Tag: literal +#: configuration.xml:668 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#. Tag: entry +#: configuration.xml:670 +#, fuzzy, no-c-format +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"Especifica quando o Hibernate deve liberar conexões JDBC. Por default, uma " +"conexão JDBC é retida até a sessão está explicitamente fechada ou " +"desconectada. Para um datasource JTA do servidor de aplicação, você deve " +"usar para forçar s liberação da conexões depois de todas as " +"chamadas JDBC. Para uma conexão não-JTA, freqüentemente faz sentido liberar " +"a conexão ao fim de cada transação, usando . escolheremos para as estratégias de transaçãoes JTA e CMT " +"e para as estratégias de transação JDBC " + +#. Tag: para +#: configuration.xml:681 +#, fuzzy, no-c-format +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"Ex.auto (default) | " +"on_close | after_transaction | " +"after_statement" + +#. Tag: para +#: configuration.xml:686 +#, fuzzy, no-c-format +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See " + +#. Tag: entry +#: configuration.xml:697 +#, no-c-format +msgid "" +"hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:700 +#, no-c-format +msgid "" +"Pass the JDBC property <propertyName> to " +"DriverManager.getConnection()." +msgstr "" + +#. Tag: entry +#: configuration.xml:706 +#, no-c-format +msgid "" +"hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:709 +#, no-c-format +msgid "" +"Pass the property <propertyName> to the JNDI " +"InitialContextFactory." +msgstr "" + +#. Tag: title +#: configuration.xml:719 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "Propriedades de Cachê do Hibernate" + +#. Tag: literal +#: configuration.xml:732 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#. Tag: entry +#: configuration.xml:734 +#, fuzzy, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "O nome da classe de um customizado. " + +#. Tag: para +#: configuration.xml:736 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:744 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#. Tag: entry +#: configuration.xml:746 +#, fuzzy, no-c-format +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"Otimizar operação de cachê de segundo nível para minimizar escritas, ao " +"custo de leituras mais frequantes. Esta configuração é mais útil para cachês " +"clusterizados e, no Hibernate3, é habilitado por default para implementações " +"de cachê clusterizar. " + +#. Tag: literal +#: configuration.xml:759 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#. Tag: entry +#: configuration.xml:761 +#, fuzzy, no-c-format +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "" +"Habilita a cache de consultas, Mesmo assim, consultas individuais ainda tem " +"que ser habilitadas para o cache. " + +#. Tag: literal +#: configuration.xml:771 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#. Tag: entry +#: configuration.xml:773 +#, fuzzy, no-c-format +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"Pode ser usada para desabilitar completamente ocache de segundo nível, o " +"qual está habilitado por default para classes que especificam um mapeamento " +". " + +#. Tag: literal +#: configuration.xml:785 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#. Tag: entry +#: configuration.xml:787 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"O nome de uma classe que implementa a interface " +"personalizada, por default, um criado automaticamente. " +"" + +#. Tag: para +#: configuration.xml:790 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:798 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#. Tag: entry +#: configuration.xml:800 +#, fuzzy, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "" +"Um prefixo para usar nos nomes da área especial do cachê de segundo nível. " +"" + +#. Tag: para +#: configuration.xml:802 +#, fuzzy, no-c-format +msgid "eg. prefix" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:810 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#. Tag: entry +#: configuration.xml:812 +#, fuzzy, no-c-format +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format. Força o Hibernate armazenar dados no cachê se segundo nível " +"em um formato mais legivel. " + +#. Tag: title +#: configuration.xml:826 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "Propriedades de Transação do Hibernate" + +#. Tag: literal +#: configuration.xml:839 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#. Tag: entry +#: configuration.xml:841 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"O nome da clase de um a para usar com API " +"( por default ). " + +#. Tag: para +#: configuration.xml:845 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:853 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#. Tag: entry +#: configuration.xml:855 +#, fuzzy, no-c-format +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"Um nome JNDI usado pelo para obter uma JTA " +"a partir do servidor de aplicação. " + +#. Tag: literal +#: configuration.xml:867 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#: configuration.xml:869 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +"O nome da classe de um – requerido quando caching a nível " +"JVM esta habilitado ou quando estivermos usando um generator hilo em um " +"ambiente JTA. " + +#. Tag: para +#: configuration.xml:873 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:881 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#. Tag: entry +#: configuration.xml:883 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"Se habilitado, a sessão será automaticamente limpa antes da fase de " +"conclusão da transação. É preferivel a gerência interna e automática do " +"contexto da sessão, veja " + +#. Tag: literal +#: configuration.xml:896 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#. Tag: entry +#: configuration.xml:898 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"Se habilitado, a sessão será automaticamente fechada após a fase de " +"conclusão da transação. É preferivel a gerência interna e automática do " +"contexto da sessão, veja " + +#. Tag: title +#: configuration.xml:914 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "Propriedades Variadas" + +#. Tag: literal +#: configuration.xml:927 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#. Tag: entry +#: configuration.xml:929 +#, fuzzy, no-c-format +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"Forneçe uma estratégia (personalizada) para extensão da " +"\"corrente\". Veja para " +"mais informação sobre estratégias internas. " + +#. Tag: para +#: configuration.xml:934 +#, fuzzy, no-c-format +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"Ex.jta | " +"thread | managed | custom." +"Class" + +#. Tag: literal +#: configuration.xml:943 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#. Tag: entry +#: configuration.xml:945 +#, fuzzy, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "Escolha a implementação de análise HQL. " + +#. Tag: para +#: configuration.xml:947 +#, fuzzy, no-c-format +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"eg.org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#. Tag: literal +#: configuration.xml:956 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#. Tag: entry +#: configuration.xml:958 +#, fuzzy, no-c-format +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"Mapeamento a partir de símbolos em consultas HQL para símbolos SQL( símbolos " +"devem ser funções ou nome literais , por exemplo). " + +#. Tag: para +#: configuration.xml:961 +#, fuzzy, no-c-format +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Ex.true | " +"false" + +#. Tag: literal +#: configuration.xml:969 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#. Tag: entry +#: configuration.xml:971 +#, fuzzy, no-c-format +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +"Automaticamente valida ou exporta schema DDL para o banco de dados quando o " +" é criads. Com , o schema do banco de dados " +"será excluido quando a for fechada esplicitamente. " +"" + +#. Tag: para +#: configuration.xml:977 +#, fuzzy, no-c-format +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"Ex.validate | " +"update | create | create-" +"drop" + +#. Tag: literal +#: configuration.xml:986 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#: configuration.xml:988 +#, fuzzy, no-c-format +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"Habilita o uso de CGLIB em vez de reflexão em tempo de execução " +"( propriedade a nível de sistema). Reflexão pode algumas vezes ser ú til " +"quando controlar erros, note que o Hibernate sempre irá requerer a CGLIB " +"mesmo se você desligar o otimizador. Você não pode determinar esta " +"propriedade no . " + +#. Tag: title +#: configuration.xml:1004 +#, no-c-format +msgid "SQL Dialects" +msgstr "Dialetos SQL" + +#. Tag: para +#: configuration.xml:1006 +#, no-c-format +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"Você deve sempre determinar a propriedade hibernate.dialect para a subclasse de org.hibernate.dialect.Dialect correta de seu banco de dados. Se você especificar um dialeto, " +"Hibernate usará defaults lógicos para qualquer um das outras propriedades " +"listadas abaixo, reduzindo o esforço de especificá-los manualmente." + +#. Tag: title +#: configuration.xml:1014 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Hibernate SQL Dialects (hibernate.dialect)" + +#. Tag: entry +#: configuration.xml:1022 +#, no-c-format +msgid "RDBMS" +msgstr "RDBMS" + +#. Tag: entry +#: configuration.xml:1023 +#, fuzzy, no-c-format +msgid "Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Dialeto\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Dialect" + +#. Tag: entry +#: configuration.xml:1028 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1028 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#. Tag: entry +#: configuration.xml:1031 +#, no-c-format +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#. Tag: literal +#: configuration.xml:1031 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#. Tag: entry +#: configuration.xml:1034 +#, no-c-format +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#. Tag: literal +#: configuration.xml:1034 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#. Tag: entry +#: configuration.xml:1037 +#, no-c-format +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#. Tag: literal +#: configuration.xml:1037 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "MySQL" +msgstr "MySQL" + +#. Tag: literal +#: configuration.xml:1040 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#. Tag: entry +#: configuration.xml:1043 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "MySQL with InnoDB" + +#. Tag: literal +#: configuration.xml:1043 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "MySQL with MyISAM" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "Oracle (any version)" +msgstr "Oracle (any version)" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "Sybase" +msgstr "Sybase" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "SAP DB" +msgstr "SAP DB" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Informix" +msgstr "Informix" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Ingres" +msgstr "Ingres" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Progress" +msgstr "Progress" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "Interbase" +msgstr "Interbase" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Pointbase" +msgstr "Pointbase" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "FrontBase" +msgstr "FrontBase" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Firebird" +msgstr "Firebird" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#. Tag: title +#: configuration.xml:1100 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "Recuperação por união externa (Outer Join Fetching)" + +#. Tag: para +#: configuration.xml:1102 +#, no-c-format +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"Se seu banco de dados suporta Recuperação por união externa (Outer Join " +"Fetching) no estilo ANSI, Oracle ou Sybase, A recuperação por união externa " +"(Outer Join Fetching) frequentemente aumentará o desempenho limitando o " +"número de chamadas (round trips) ao banco de dados( ao custo de " +"possivelmente mais trabalho desempenhado pelo próprio banco de dados). A " +"recuperação por união externa (Outer Join Fetching)permite um gráfico " +"completo de objetos conectados por muitos-para-um, um-para-muitos, muitos-" +"para-muitos e associações um-para-um para ser recuperadas em um simples " +"instrução SQL SELECT ." + +#. Tag: para +#: configuration.xml:1111 +#, no-c-format +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"A recuperação por união externa (Outer Join Fetching) pode ser desabilitado " +"globalmente setando a propriedade hibernate." +"max_fetch_depth para 0. Uma valor 1 ou maior " +"habilita o outer join fetching para associações um-para-um e muitos-para-" +"umos cujos quais tem sido mapeado com fetch=\"join\"." + +#. Tag: para +#: configuration.xml:1119 +#, no-c-format +msgid "See for more information." +msgstr "Veja para mais informações." + +#. Tag: title +#: configuration.xml:1126 +#, no-c-format +msgid "Binary Streams" +msgstr "Fluxos Binários (Binary Streams)" + +#. Tag: para +#: configuration.xml:1128 +#, no-c-format +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"O Oracle limita o tamanho de arrays de byte que pode ser " +"passado para/de o driver JDBC. Se você desejar usar grandes instâncias de " +"tipos binary ou serializable, você " +"deve habilitar hibernate.jdbc.use_streams_for_binary. " +"Essa é uma configuração que só pode ser feita a nível de sistema." + +#. Tag: title +#: configuration.xml:1139 +#, no-c-format +msgid "Second-level and query cache" +msgstr "Cachê de segundo nível e query" + +#. Tag: para +#: configuration.xml:1141 +#, no-c-format +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"As propriedades prefixadas pelo hibernate.cache permite " +"você usar um sistema de cachê de segundo nível em um processo executado em " +"clustercom Hibernate. Veja para mais " +"detalhes." + +#. Tag: title +#: configuration.xml:1151 +#, no-c-format +msgid "Query Language Substitution" +msgstr "Substituições na Linguagem de Consulta" + +#. Tag: para +#: configuration.xml:1153 +#, no-c-format +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"Você pode definir novos símbolos de consulta Hibernate usando " +"hibernate.query.substitutions. Por exemplo:" + +#. Tag: programlisting +#: configuration.xml:1158 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions true=1, false=0" + +#. Tag: para +#: configuration.xml:1160 +#, no-c-format +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"Faria com que os símbolos true e false " +"passasem a ser traduzidos para literais inteiro no SQL gerado." + +#. Tag: programlisting +#: configuration.xml:1165 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#. Tag: para +#: configuration.xml:1167 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "permitirá você renomear a função LOWER no SQL." + +#. Tag: title +#: configuration.xml:1174 +#, no-c-format +msgid "Hibernate statistics" +msgstr "Estatísticas do Hibernate" + +#. Tag: para +#: configuration.xml:1176 +#, no-c-format +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information. " +"Se você habilitar hibernate.generate_statistics, o " +"Hibernate exibirá um número de métricas bastante útil ao ajustar um sistema " +"via SessionFactory.getStatistics(). O Hibernate pode até " +"ser configurado para exibir essas estatísticas via JMX. Leia o Javadoc da " +"interface org.hibernate.stats para mais informações." + +#. Tag: title +#: configuration.xml:1188 +#, no-c-format +msgid "Logging" +msgstr "Logging" + +#. Tag: para +#: configuration.xml:1190 +#, no-c-format +msgid "Hibernate logs various events using Apache commons-logging." +msgstr "Hibernate registra vários eventos usando Apache commons-logging." + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "" +"The commons-logging service will direct output to either Apache Log4j (if " +"you include log4j.jar in your classpath) or JDK1.4 " +"logging (if running under JDK1.4 or above). You may download Log4j from " +"http://jakarta.apache.org. To use Log4j you will need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" +"O serviço commons-logging direcionará a saída para o Apache Log4j ( se você " +"incluir log4j.jarr no seu classpath) ou JDK1.4 logging" +"( se estiver em uso JDK1.4 ou maior). Você pode fazer o download do Log4j a " +"partir de http://jakarta.apache.org. Para usar Log4j você " +"necessitará colocar um arquivo log4j.properties no seu " +"classpath, um exemplo de arquivo de propriedades é distribuído com o " +"Hibernate no diretório src/." + +#. Tag: para +#: configuration.xml:1204 +#, no-c-format +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following: Nós recomendamos enfaticamente que você se familiarize-se com " +"mensagens de log do Hibernate. Uma parte do trabalho tem sido posto em fazer " +"o log Hibernate tão detalhado quanto possível, sem fazê-lo ilegível. É um " +"essencial dispositivos de controle de erros. As categorias de log mais " +"interessantes são as seguintes:" + +#. Tag: title +#: configuration.xml:1213 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "Categorias de Log do Hibernate" + +#. Tag: entry +#: configuration.xml:1219 +#, no-c-format +msgid "Category" +msgstr "Categoria" + +#. Tag: entry +#: configuration.xml:1220 +#, no-c-format +msgid "Function" +msgstr "Função" + +#. Tag: literal +#: configuration.xml:1225 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#. Tag: entry +#: configuration.xml:1226 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "Registra todas as instruções SQL DML a medida que elas são executadas" + +#. Tag: literal +#: configuration.xml:1229 +#, no-c-format +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#. Tag: entry +#: configuration.xml:1230 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "Registra todos os parâmetros JDBC" + +#. Tag: literal +#: configuration.xml:1233 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "Registra todas as instruções SQL DDL a medida que elas são executadas" + +#. Tag: literal +#: configuration.xml:1237 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#. Tag: entry +#: configuration.xml:1238 +#, no-c-format +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time Registra o estado de todas as entidades (máximo 20 entidades) " +"associadas a session no momento da limpeza (flush)." + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "Registra todas as atividades de cachê de segundo nível" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log transaction related activity" +msgstr "Registra atividades relacionada a transação" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "Registra todas as requisições de recursos JDBC" + +#. Tag: literal +#: configuration.xml:1256 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.ast.AST" + +#. Tag: entry +#: configuration.xml:1257 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "Registra instruções SQL e HQL durante a análise da consultas" + +#. Tag: literal +#: configuration.xml:1262 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#. Tag: entry +#: configuration.xml:1263 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "Registra todas as requisições de autorização JAAS" + +#. Tag: literal +#: configuration.xml:1266 +#, no-c-format +msgid "org.hibernate" +msgstr "org.hibernate" + +#. Tag: entry +#: configuration.xml:1267 +#, no-c-format +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "" +"Registra tudo ( uma parte das informações, mas muito útil para controle de " +"erros )" + +#. Tag: para +#: configuration.xml:1276 +#, no-c-format +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"Quando desenvolver aplicações com Hibernate, você deve quase sempre " +"trabalhar com debug debug para a categoria org." +"hibernate.SQL, ou, alternativamente, a com a propriedade " +"hibernate.show_sql habilitada." + +#. Tag: title +#: configuration.xml:1286 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "Implementado uma NamingStrategy" + +#. Tag: para +#: configuration.xml:1288 +#, no-c-format +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"A interface org.hibernate.cfg.NamingStrategy permite você " +"especificar um \"padrão de nomeação\" para objetos do banco de dados e " +"elementos schema." + +#. Tag: para +#: configuration.xml:1293 +#, no-c-format +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"Você deve criar regras para a geração automaticamente de identificadores do " +"banco de dados a partir de identificadores Java ou para processar colunas " +"\"computadas\" e nomes de tabelas dado o arquivo de mapeamento para nomes " +"\"físicos\" de tabelas e colunas. Esta característica ajuda a reduzir a " +"verbosidade do documento de mapeamento, eliminando interferências repetitivas" +"( TBL_prefixos, por exemplo). A estratégia default usada " +"pelo Hibernate é completamente mínima." + +#. Tag: para +#: configuration.xml:1302 +#, no-c-format +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"Você pode especificar uma estratégia diferente ao chamar " +"Configuration.setNamingStrategy() antes de adicionar os " +"mapeamentos:" + +#. Tag: programlisting +#: configuration.xml:1307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1309 +#, no-c-format +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"org.hibernate.cfg.ImprovedNamingStrategy é uma estratégia " +"interna que pode ser um ponto de começo útil para algumas aplicações." + +#. Tag: title +#: configuration.xml:1317 +#, no-c-format +msgid "XML configuration file" +msgstr "Arquivo de configuração XML" + +#. Tag: para +#: configuration.xml:1319 +#, no-c-format +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"Uma maneira alternativa de configuração é especificar uma configuração " +"completa em um arquivo chamado hibernate.cfg.xml. Este " +"arquivo pode ser usado como um substituto para o arquivo hibernate." +"properties ou, se ambos estão presentes, sobrescrever propriedades." + +#. Tag: para +#: configuration.xml:1326 +#, no-c-format +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example: O arquivo XML de " +"configuração é por default esperado para estar na raiz do seu " +"CLASSPATH. Veja um exemplo:" + +#. Tag: programlisting +#: configuration.xml:1331 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1333 +#, no-c-format +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"Como você pode ver, a vantagem deste enfoque é a externalização dos nomes " +"dos arquivos de mapeamento para configuração. O hibernate.cfg.xml também é mais conveniente caso você tenha que ajustar o cache do " +"Hibernate. Note que a escolha é sua em usar hibernate.properties ou hibernate.cfg.xml, ambos são equivalente, à " +"exceção dos benefícios acima mencionados de usar a sintaxe de XML." + +#. Tag: para +#: configuration.xml:1342 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "" +"Com a configuração do XML, iniciar o Hibernate é então tão simples como" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "You can pick a different XML configuration file using" + +#. Tag: programlisting +#: configuration.xml:1352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: configuration.xml:1357 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "Integração com servidores de aplicação J2EE" + +#. Tag: para +#: configuration.xml:1359 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "" +"O Hibernate tem os seguintes pontos da integração para o infraestrutura de " +"J2EE:" + +#. Tag: para +#: configuration.xml:1365 +#, no-c-format +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"DataSources gerenciados pelo container: O Hibernate " +"pode usar conexões JDBC gerenciadas pelo Container e fornecidas pela JNDI. " +"Geralmente, um TransactionManager compatível com JTA e um " +"ResourceManager cuidam do gerenciamento da transação " +"( CMT ), especialmente em transações distribuídas manipuladas através de " +"vários DataSources. Naturalmente, você também pode demarcar os limites das " +"transações programaticamente (BMT) ou você poderia querer usar a API " +"opcional do Hibernate Transaction para esta manter seu " +"código portável." + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"Ligação (binding) automática a JNDI: O Hibernate pode " +"associar sua SessionFactory a JNDI depois de iniciado." + +#. Tag: para +#: configuration.xml:1389 +#, no-c-format +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"Ligação (binding) Session na JTA: A Session do Hibernate pode automaticamente ser ligada ao escopo da " +"transações JTA. Simplesmente localizando a SessionFactory " +"da JNDI e obtendo aSession corrente. Deixe o Hibernate " +"cuidar da limpeza e encerramento da Session quando as " +"transações JTA terminarem. A Demarcação de transação pode ser declarativa " +"(CMT) ou programática(BMT/Transação do usuário)." + +#. Tag: para +#: configuration.xml:1402 +#, no-c-format +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"JMX deployment: Se você usa um JMX servidor de " +"aplicações capaz (ex. Jboss AS), você pode fazer a instação do Hibernate " +"como um Mbean controlado. Isto evita ter que iniciar uma linha de código " +"para construir sua SessionFactory de uma " +"Configuration. O container iniciará seu " +"HibernateService, e idealmente também cuidará das " +"dependências de serviços (DataSources, têm que estar disponíveis antes do " +"Hibernate iniciar, etc.)." + +#. Tag: para +#: configuration.xml:1413 +#, no-c-format +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"Dependendo em seu ambiente, você poderia ter que ajustar a opção de " +"configuração hibernate.connection.aggressive_release para " +"verdadeiro ( true ), se seu servidor de aplicações lançar exeções \"retenção " +"de conecção\"." + +#. Tag: title +#: configuration.xml:1420 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "Configuração de estratégia de transação" + +#. Tag: para +#: configuration.xml:1422 +#, no-c-format +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"A API Hibernate Session é independente de qualquer " +"sistema de demarcação de transação em sua arquitetura. Se você deixar o " +"Hibernate usar a JDBC diretamente, através de um pool de conexões, você pode " +"inicializar e encerrar suas transações chamando a API JDBC. Se você rodar em " +"um servidor de aplicações J2EE, você poderá usar transações controladas por " +"beans e chamar a API JTA e UserTransaction quando " +"necessário." + +#. Tag: para +#: configuration.xml:1430 +#, no-c-format +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"Para manter seu código portável entre estes dois ( e outros ) ambientes, " +"recomendamos a API Hibernate Transaction, que envolve e " +"esconde o sistema subjacente. Você tem que especificar um classe construtora " +"para Transaction instanciar ajustando a propriedade de " +"configuração do hibernate.transaction.factory_class." + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "Existem três escolhas (internas) padrões:" + +#. Tag: literal +#: configuration.xml:1443 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "org.hibernate.transaction.JDBCTransactionFactory" + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "delegada as transações (JDBC)a bases de dados (Padrão)" + +#. Tag: literal +#: configuration.xml:1449 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#. Tag: para +#: configuration.xml:1451 +#, no-c-format +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"delegada a transação a um container gerenciador se a transação existente " +"estiver de acordo neste contexto (ex: método bean sessão EJB), se não uma " +"nova transação é iniciada e uma transação controlado por um bean é usada." + +#. Tag: literal +#: configuration.xml:1459 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#. Tag: para +#: configuration.xml:1461 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "delega para um container gerenciador de transações JTA" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "" +"Você também pode definir suas próprias estratégias de transação ( para um " +"serviço de transação CORBA por exemplo)." + +#. Tag: para +#: configuration.xml:1471 +#, no-c-format +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Algumas características no Hibernate (ex., o cache de segundo nível, sessões " +"contextuais com JTA, etc.) requerem acesso a JTA " +"TransactionManager em um ambiente controlado. Em um " +"servidor de aplicação você tem que especificar como o Hibernate pode obter " +"uma referência para a TransactionManager, pois o J2EE não " +"padronize um mecanismo simples :" + +#. Tag: title +#: configuration.xml:1479 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "Gerenciadores de transações JTA" + +#. Tag: entry +#: configuration.xml:1485 +#, no-c-format +msgid "Transaction Factory" +msgstr "Transaction Factory" + +#. Tag: entry +#: configuration.xml:1486 +#, no-c-format +msgid "Application Server" +msgstr "Application Server" + +#. Tag: literal +#: configuration.xml:1491 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1492 +#, no-c-format +msgid "JBoss" +msgstr "JBoss" + +#. Tag: literal +#: configuration.xml:1495 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1496 +#, no-c-format +msgid "Weblogic" +msgstr "Weblogic" + +#. Tag: literal +#: configuration.xml:1499 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "WebSphere" +msgstr "WebSphere" + +#. Tag: literal +#: configuration.xml:1503 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#. Tag: entry +#: configuration.xml:1504 +#, no-c-format +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#. Tag: literal +#: configuration.xml:1507 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1508 +#, no-c-format +msgid "Orion" +msgstr "Orion" + +#. Tag: literal +#: configuration.xml:1511 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1512 +#, no-c-format +msgid "Resin" +msgstr "Resin" + +#. Tag: literal +#: configuration.xml:1515 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1516 +#, no-c-format +msgid "JOTM" +msgstr "JOTM" + +#. Tag: literal +#: configuration.xml:1519 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1520 +#, no-c-format +msgid "JOnAS" +msgstr "JOnAS" + +#. Tag: literal +#: configuration.xml:1523 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1524 +#, no-c-format +msgid "JRun4" +msgstr "JRun4" + +#. Tag: literal +#: configuration.xml:1527 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1528 +#, no-c-format +msgid "Borland ES" +msgstr "Borland ES" + +#. Tag: title +#: configuration.xml:1537 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "SessionFactory ligada a JNDI" + +#. Tag: para +#: configuration.xml:1539 +#, no-c-format +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"Uma SessionFactory de Hibernate ligada a JNDI pode " +"simplificar a localização da fabrica e a criação de novas Sessions. Observe que isto não relacionado a um Datasource ligado a JNDI, simplemente ambos usam o mesmo registro!" + +#. Tag: para +#: configuration.xml:1546 +#, no-c-format +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." + +#. Tag: para +#: configuration.xml:1568 +#, no-c-format +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." + +#. Tag: para +#: configuration.xml:1573 +#, no-c-format +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managend environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." + +#. Tag: title +#: configuration.xml:1585 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "Current Session context management with JTA" + +#. Tag: para +#: configuration.xml:1587 +#, no-c-format +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if " +"there is no Hibernate Session associated with the current " +"JTA transaction, one will be started and associated with that JTA " +"transaction the first time you call sessionFactory.getCurrentSession" +"(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." + +#. Tag: title +#: configuration.xml:1610 +#, no-c-format +msgid "JMX deployment" +msgstr "JMX deployment" + +#. Tag: para +#: configuration.xml:1612 +#, no-c-format +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." + +#. Tag: para +#: configuration.xml:1620 +#, no-c-format +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" + +#. Tag: programlisting +#: configuration.xml:1627 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1629 +#, no-c-format +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." + +#~ msgid " (optional)" +#~ msgstr " (opcional)" + +#~ msgid "InitialContextFactory" +#~ msgstr "InitialContextFactory" + +#~ msgid "class of the JNDI " +#~ msgstr "Classe do JNDI " + +#, fuzzy +#~ msgid "eg." +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "Ex.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "eg." + +#~ msgid "full.classname.of.Dialect" +#~ msgstr "full.classname.of.Dialect" + +#~ msgid "debug" +#~ msgstr "debug" + +#~ msgid "SCHEMA_NAME" +#~ msgstr "SCHEMA_NAME" + +#~ msgid "CATALOG_NAME" +#~ msgstr "CATALOG_NAME" + +#, fuzzy +#~ msgid "SessionFactory" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "SessionFactory\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "SessionFactory\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "SessionFactory\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "create-drop" + +#~ msgid "jndi/composite/name" +#~ msgstr "jndi/composite/name" + +#~ msgid "0" +#~ msgstr "0" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "Statement.setFetchSize()" +#~ msgstr "Statement.setFetchSize()" + +#~ msgid "true" +#~ msgstr "true" + +#~ msgid "executeBatch()" +#~ msgstr "executeBatch()" + +#~ msgid "Batcher" +#~ msgstr "Batcher" + +#~ msgid "classname.of.BatcherFactory" +#~ msgstr "classname.of.BatcherFactory" + +#~ msgid "binary" +#~ msgstr "binary" + +#~ msgid "serializable" +#~ msgstr "serializable" + +#~ msgid "PreparedStatement.getGeneratedKeys()" +#~ msgstr "PreparedStatement.getGeneratedKeys()" + +#~ msgid "true|false" +#~ msgstr "true|false" + +#~ msgid "ConnectionProvider" +#~ msgstr "ConnectionProvider" + +#~ msgid "classname.of.ConnectionProvider" +#~ msgstr "classname.of.ConnectionProvider" + +#~ msgid "java.sql.Connection" +#~ msgstr "java.sql.Connection" + +#~ msgid "1, 2, 4, 8" +#~ msgstr "1, 2, 4, 8" + +#~ msgid "after_statement" +#~ msgstr "after_statement" + +#~ msgid "after_transaction" +#~ msgstr "after_transaction" + +#~ msgid "auto" +#~ msgstr "auto" + +#~ msgid "hibernate.connection." +#~ msgstr "<propertyName>" + +#, fuzzy +#~ msgid "<propertyName>" +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.connection.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "hibernate.jndi.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "propertyName" + +#~ msgid "DriverManager.getConnection()" +#~ msgstr "DriverManager.getConnection()" + +#~ msgid "Pass the JDBC property to ." +#~ msgstr "Passa a propriedade JDBC para ." + +#~ msgid "hibernate.jndi." +#~ msgstr "<propertyName>" + +#~ msgid "Pass the property to the JNDI ." +#~ msgstr "Passar a propriedade para o JNDI." + +#~ msgid "CacheProvider" +#~ msgstr "CacheProvider" + +#~ msgid "classname.of.CacheProvider" +#~ msgstr "classname.of.CacheProvider" + +#~ msgid "<cache>" +#~ msgstr "<cache>" + +#~ msgid "QueryCache" +#~ msgstr "QueryCache" + +#~ msgid "StandardQueryCache" +#~ msgstr "StandardQueryCache" + +#~ msgid "classname.of.QueryCache" +#~ msgstr "classname.of.QueryCache" + +#~ msgid "prefix" +#~ msgstr "prefix" + +#~ msgid "TransactionFactory" +#~ msgstr "TransactionFactory" + +#~ msgid "Transaction" +#~ msgstr "Transaction" + +#~ msgid "JDBCTransactionFactory" +#~ msgstr "JDBCTransactionFactory" + +#~ msgid "classname.of.TransactionFactory" +#~ msgstr "classname.of.TransactionFactory" + +#~ msgid "JTATransactionFactory" +#~ msgstr "JTATransactionFactory" + +#~ msgid "UserTransaction" +#~ msgstr "UserTransaction" + +#~ msgid "TransactionManagerLookup" +#~ msgstr "TransactionManagerLookup" + +#~ msgid "classname.of.TransactionManagerLookup" +#~ msgstr "classname.of.TransactionManagerLookup" + +#~ msgid "Session" +#~ msgstr "Session" + +#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" + +#~ msgid "create-drop" +#~ msgstr "create-drop" + +#~ msgid "hibernate.cfg.xml" +#~ msgstr "hibernate.cfg.xml" + +#~ msgid "DB2" +#~ msgstr "DB2" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/events.po b/documentation/envers/src/main/docbook/pt-BR/content/events.po new file mode 100644 index 0000000000..63a068eda7 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/events.po @@ -0,0 +1,481 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:5 +#, no-c-format +msgid "Interceptors and events" +msgstr "Interceptadores e Eventos" + +#. Tag: para +#: events.xml:7 +#, no-c-format +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"É muito útil quando a aplicação precisa executar alguma \"coisa\" no momento " +"em que o Hibernate executa uma de suas ações. Isso permite a implementação " +"de certas funções genéricas, assim como permite estender as funcionalidades " +"do Hibernate" + +#. Tag: title +#: events.xml:14 +#, no-c-format +msgid "Interceptors" +msgstr "Interceptadores" + +#. Tag: para +#: events.xml:16 +#, no-c-format +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"A interface Interceptor permite fornecer informações da " +"session para o aplicativo, permitindo ao aplicativo inspecionar e/ou " +"manipular as propriedades de um objeto persistente antes de ser salvo, " +"atualizado, excluído ou salvo. Um dos possíveis usos é gerar informações de " +"auditoria. Por exemplo, o seguinte Interceptor seta " +"automaticamente o atributo createTimestamp quando um " +"Auditable é criada e atualiza o atributo " +"lastUpdateTimestamp quando um Auditable é atualizado." + +#. Tag: para +#: events.xml:27 +#, no-c-format +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"Você pode implementar Auditable diretamente ou pode " +"estender EmptyInterceptor, sendo que a segunda é " +"considerada a melhor opção." + +#. Tag: programlisting +#: events.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:34 +#, no-c-format +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"Os interceptadores podem ser aplicados em dois diferentes escopos: No escopo " +"da Session e no escopo SessionFactory." + +#. Tag: para +#: events.xml:39 +#, no-c-format +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"Um interceptador no escopo da Session é definido quando " +"uma sessão é aberta usando o método sobrecarregado da SessionFactory." +"openSession() que aceita um Interceptor como parâmetro." + +#. Tag: programlisting +#: events.xml:45 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:47 +#, no-c-format +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"Um interceptador no escopo da SessionFactory é definido " +"no objeto Configuration antes da SessionFactory ser instanciada. Nesse caso, o interceptador fornecido será " +"aplicado para todas as sessões abertas por aquela SessionFactory; Isso apenas não ocorrerá caso seja especificado um interceptador " +"no momento em que a sessão for aberta. Um interceptador no escopo de " +"SessionFactory deve ser thread safe, tomando-se o cuidado " +"de não armazenar atributos de estado específicos da sessão, pois, " +"provavelmente, múltiplas sessões irão utilizar esse interceptador " +"simultaneamente." + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: events.xml:61 +#, no-c-format +msgid "Event system" +msgstr "Sistema de Eventos" + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"Se você precisa executar uma ação em determinados eventos da camada de " +"persistência, você também pode usar a arquitetura de event do Hibernate3. Um evento do sistema pode ser utilizado como " +"complemento ou em substituição a um interceptador." + +#. Tag: para +#: events.xml:69 +#, no-c-format +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"Essencialmente todos os métodos da interface Session " +"possuem um evento correlacionado. Se você tiver um LoadEvent, um LoadEvent, etc (consulte o DTD do XML de " +"configuração ou o pacote org.hibernate.event para a lista " +"completa dos tipos de eventos). Quando uma requisição é feita em um desses " +"métodos, a Session do hibernate gera um evento apropriado " +"e o envia para o listener de evento correspondente àquele tipo de evento. " +"Esses listeners implementam a mesma lógica que aqueles métodos, trazendo os " +"mesmos resultados. Entretanto, você é livre para implementar uma " +"customização de um desses listeners (isto é, o LoadEvent " +"é processado pela implementação registrada da interface " +"LoadEventListener), então sua implementação vai ficar " +"responsável por processar qualquer requisição load() " +"feita pela Session." + +#. Tag: para +#: events.xml:84 +#, no-c-format +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"Para todos os efeitos esses listeners deve ser considerados singletons; ou " +"seja, eles são compartilhados entre as requisições, e assim sendo, não devem " +"salvar nenhum estado das variáveis instanciadas." + +#. Tag: para +#: events.xml:89 +#, no-c-format +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"Um listener personalizado deve implementar a interface referente ao evento a " +"ser processado e/ou deve estender a classes base equivalente (ou mesmo os " +"listeners padrões usados pelo Hibernate, eles não são declarados como finais " +"com esse objetivo). O listener personalizado pode ser registrado " +"programaticamente no objeto Configuration, ou " +"declarativamente no XML de configuração do Hibernate (o registro do listener " +"no propertie de configuração não é suportado). Aqui temos um exemplo de como " +"carregar um listener personalizado:" + +#. Tag: programlisting +#: events.xml:99 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:101 +#, no-c-format +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "" +"Você também precisa adicionar uma entrada no XML de configuração do " +"Hibernate para registrar declarativamente qual listener deve se utilizado em " +"conjunto com o listener padrão:" + +#. Tag: programlisting +#: events.xml:106 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "Ou, você pode registrar o listener programaticamente:" + +#. Tag: programlisting +#: events.xml:112 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:114 +#, no-c-format +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"Listeners registrados declarativamente não compartilham da mesma instancia. " +"Se o mesmo nome da classe é utilizado em vários elementos e <" +"listener/>, cada um vai resultar em uma instancia separada " +"dessa classe. Se você tem a necessidade de compartilhar uma instancia de um " +"listener entre diversos tipos de listeners você deve registrar o listener " +"programaticamente." + +#. Tag: para +#: events.xml:122 +#, no-c-format +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"Mas porque implementar uma interface e definir o tipo específico durante a " +"configuração? Bem, um listener pode implementar vários listeners de evento. " +"Com o tipo sendo definido durante o registro, fica fácil ligar ou desligar " +"listeners personalizados durante a configuração." + +#. Tag: title +#: events.xml:132 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "Hibernate declarative security" + +#. Tag: para +#: events.xml:133 +#, no-c-format +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." + +#. Tag: para +#: events.xml:139 +#, no-c-format +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." + +#. Tag: programlisting +#: events.xml:144 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." + +#. Tag: para +#: events.xml:152 +#, no-c-format +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" + +#. Tag: programlisting +#: events.xml:156 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:158 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "The role names are the roles understood by your JACC provider." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/example_mappings.po b/documentation/envers/src/main/docbook/pt-BR/content/example_mappings.po new file mode 100644 index 0000000000..c9d2d93abe --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/example_mappings.po @@ -0,0 +1,802 @@ +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 \n" +"Language-Team: LANGUAGE \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-format +msgid "Example: Various Mappings" +msgstr "Exemplo: Vários Mapeamentos" + +#. Tag: para +#: example_mappings.xml:22 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "Este capitulo mostra algums mapeamentos de associações mais complexos." + +#. Tag: title +#: example_mappings.xml:27 +#, no-c-format +msgid "Employer/Employee" +msgstr "Employer/Employee" + +#. Tag: para +#: example_mappings.xml:29 +#, no-c-format +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"O modelo de seguinte relacionamento entre Employer e " +"Employee utiliza uma entidade de classe atual " +"(Employment) para representar a associação. Isto é feito " +"porque pode-ser ter mais do que um período de trabalho para as duas partes " +"envolvidas. Outros Componentes são usados para modelar valores monetários e " +"os nomes do empregado." + +#. Tag: para +#: example_mappings.xml:46 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "Abaixo o código de um possível mapeamento:" + +#. Tag: programlisting +#: example_mappings.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:52 +#, no-c-format +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "" +"E abaixo o esquema da tabela gerado pelo SchemaExport." + +#. Tag: programlisting +#: example_mappings.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:61 +#, no-c-format +msgid "Author/Work" +msgstr "Author/Work" + +#. Tag: para +#: example_mappings.xml:63 +#, no-c-format +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"Considere o seguinte modelo de relacionamento entre Work, " +"Author e Person. Nós representamos o " +"relacionamento entre Work e Author " +"como uma associação muitos-para-muitos. Nós escolhemos representar o " +"relacionamento entre Author e Person " +"como uma associação um-para-um. Outra possibilidade seria ter " +"Author extendendo Person." + +#. Tag: para +#: example_mappings.xml:81 +#, no-c-format +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "" +"O mapeamento do código seguinte representa corretamente estes " +"relacionamentos:" + +#. Tag: programlisting +#: example_mappings.xml:85 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:87 +#, no-c-format +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport. Existem quatro tabelas neste " +"mapeamento. works, authors e " +"persons recebem os dados de work, author e person, " +"respectivamente. author_work é uma tabela de associação " +"que liga authors à works. Abaixo o esquema das tabelas, gerados pelo " +"SchemaExport." + +#. Tag: programlisting +#: example_mappings.xml:95 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:100 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "Customer/Order/Product" + +#. Tag: para +#: example_mappings.xml:102 +#, no-c-format +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"Agora considere um modelo de relacionamento entre Customer, Order e LineItem e " +"Product. Existe uma associação um-para-muitos entre " +"Customer e Order, mas como devemos " +"representar Order / LineItem / " +"Product? Eu escolhi mapear LineItem como uma classe de " +"associação representando a associação muitos-para-muitos entre " +"Order and Product. No Hibernate, isto " +"é conhecido como um elemento composto." + +#. Tag: para +#: example_mappings.xml:122 +#, no-c-format +msgid "The mapping document:" +msgstr "O código do mapeamento:" + +#. Tag: programlisting +#: example_mappings.xml:126 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:128 +#, no-c-format +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers, orders, " +"line_items e products recebem os dados " +"de customer, order, line_item e product, respectivamente. " +"line_items também atua como uma tabela de associação " +"ligando orders com products." + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:140 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "Exemplos variados de mapeamento" + +#. Tag: para +#: example_mappings.xml:142 +#, no-c-format +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"Todos estes exemplos são retirados do conjunto de testes do Hibernate. Lá, " +"você encontrará vários outros exemplos úteis de mapeamentos. Verifique o " +"diretorio test da distribuição do Hibernate." + +#. Tag: para +#: example_mappings.xml:148 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "TODO: put words around this stuff" + +#. Tag: title +#: example_mappings.xml:151 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "Associação um-para-um \"Tipadas\"" + +#. Tag: programlisting +#: example_mappings.xml:152 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:156 +#, no-c-format +msgid "Composite key example" +msgstr "Exemplo de chave composta" + +#. Tag: programlisting +#: example_mappings.xml:157 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:161 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "Mmuitos-para-muitos com atributo de chave composta compartilhada" + +#. Tag: programlisting +#: example_mappings.xml:162 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:166 +#, no-c-format +msgid "Content based discrimination" +msgstr "Conteúdo baseado em descriminação" + +#. Tag: programlisting +#: example_mappings.xml:167 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:171 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "Associações em chaves alternativas" + +#. Tag: programlisting +#: example_mappings.xml:172 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/example_parentchild.po b/documentation/envers/src/main/docbook/pt-BR/content/example_parentchild.po new file mode 100644 index 0000000000..7ab4c460cb --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/example_parentchild.po @@ -0,0 +1,605 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:5 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "Example: Parent/Child" + +#. Tag: para +#: example_parentchild.xml:7 +#, no-c-format +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" + +#. Tag: title +#: example_parentchild.xml:21 +#, no-c-format +msgid "A note about collections" +msgstr "A note about collections" + +#. Tag: para +#: example_parentchild.xml:23 +#, no-c-format +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" + +#. Tag: para +#: example_parentchild.xml:30 +#, no-c-format +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." + +#. Tag: para +#: example_parentchild.xml:36 +#, no-c-format +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." + +#. Tag: para +#: example_parentchild.xml:44 +#, no-c-format +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." + +#. Tag: title +#: example_parentchild.xml:64 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "Bidirectional one-to-many" + +#. Tag: para +#: example_parentchild.xml:66 +#, no-c-format +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." + +#. Tag: programlisting +#: example_parentchild.xml:71 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:73 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "If we were to execute the following code" + +#. Tag: programlisting +#: example_parentchild.xml:77 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:79 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernate would issue two SQL statements:" + +#. Tag: para +#: example_parentchild.xml:85 +#, no-c-format +msgid "" +"an INSERT to create the record for c" +msgstr "" +"an INSERT to create the record for c" + +#. Tag: para +#: example_parentchild.xml:88 +#, no-c-format +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"an UPDATE to create the link from p to " +"c" + +#. Tag: para +#: example_parentchild.xml:95 +#, no-c-format +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "However, this is not the recommended solution." + +#. Tag: para +#: example_parentchild.xml:106 +#, no-c-format +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." + +#. Tag: programlisting +#: example_parentchild.xml:113 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:115 +#, no-c-format +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(We also need to add the parent property to the " +"Child class.)" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." + +#. Tag: programlisting +#: example_parentchild.xml:124 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:126 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "The following code would be used to add a new Child" + +#. Tag: programlisting +#: example_parentchild.xml:130 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:132 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "And now, only one SQL INSERT would be issued!" + +#. Tag: para +#: example_parentchild.xml:136 +#, no-c-format +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." + +#. Tag: programlisting +#: example_parentchild.xml:141 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "Now, the code to add a Child looks like" + +#. Tag: programlisting +#: example_parentchild.xml:147 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:152 +#, no-c-format +msgid "Cascading life cycle" +msgstr "Cascading life cycle" + +#. Tag: para +#: example_parentchild.xml:154 +#, no-c-format +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." + +#. Tag: programlisting +#: example_parentchild.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:161 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "This simplifies the code above to" + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." + +#. Tag: programlisting +#: example_parentchild.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:174 +#, no-c-format +msgid "However, this code" +msgstr "However, this code" + +#. Tag: programlisting +#: example_parentchild.xml:178 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:180 +#, no-c-format +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." + +#. Tag: programlisting +#: example_parentchild.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:188 +#, no-c-format +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." + +#. Tag: programlisting +#: example_parentchild.xml:194 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:196 +#, no-c-format +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." + +#. Tag: title +#: example_parentchild.xml:206 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "Cascades and unsaved-value" + +#. Tag: para +#: example_parentchild.xml:208 +#, no-c-format +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"The following code will update parent and child and insert newChild." + +#. Tag: programlisting +#: example_parentchild.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:227 +#, no-c-format +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." + +#. Tag: title +#: example_parentchild.xml:260 +#, no-c-format +msgid "Conclusion" +msgstr "Conclusion" + +#. Tag: para +#: example_parentchild.xml:262 +#, no-c-format +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." + +#. Tag: para +#: example_parentchild.xml:267 +#, no-c-format +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/example_weblog.po b/documentation/envers/src/main/docbook/pt-BR/content/example_weblog.po new file mode 100644 index 0000000000..461cc0f761 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/example_weblog.po @@ -0,0 +1,484 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:5 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "Example: Weblog Application" + +#. Tag: title +#: example_weblog.xml:8 +#, no-c-format +msgid "Persistent Classes" +msgstr "Persistent Classes" + +#. Tag: para +#: example_weblog.xml:10 +#, no-c-format +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." + +#. Tag: programlisting +#: example_weblog.xml:16 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:18 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_weblog.xml:23 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "Hibernate Mappings" + +#. Tag: para +#: example_weblog.xml:25 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "The XML mappings should now be quite straightforward." + +#. Tag: programlisting +#: example_weblog.xml:29 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:31 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:36 +#, no-c-format +msgid "Hibernate Code" +msgstr "Hibernate Code" + +#. Tag: para +#: example_weblog.xml:38 +#, no-c-format +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." + +#. Tag: programlisting +#: example_weblog.xml:43 +#, no-c-format +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/filters.po b/documentation/envers/src/main/docbook/pt-BR/content/filters.po new file mode 100644 index 0000000000..ef913d6724 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/filters.po @@ -0,0 +1,290 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:5 +#, no-c-format +msgid "Filtering data" +msgstr "Filtrando dados" + +#. Tag: para +#: filters.xml:7 +#, no-c-format +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"O Hibernate3 provê um novo método inovador para manusear dados com regras de " +"\"visibilidade\". Um Filtro do Hibernate é um filtro " +"global, nomeado e parametrizado que pode se habilitado ou não dentro de um " +"Session do Hibernate." + +#. Tag: title +#: filters.xml:14 +#, no-c-format +msgid "Hibernate filters" +msgstr "Filtros do Hibernate" + +#. Tag: para +#: filters.xml:16 +#, no-c-format +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"O Hibernate tem a habilidade de pré definir os critérios do filtro e anexar " +"esses filtros no nível da classe e no nível da coleção. Um critério do " +"filtro é a habilidade de definir uma cláusula restritiva muito semelhante ao " +"atributo \"where\" disponível para a classe e várias coleções. A não ser que " +"essas condições de filtros podem ser parametrizadas. A aplicação pode, " +"então, fazer uma decisão em tempo de execução se os filtros definidos devem " +"estar habilitados e quais valores seus parâmetros devem ter. Os filtros " +"podem ser usados como Views de bancos de dados, mas com parametros internos " +"à aplicação." + +#. Tag: para +#: filters.xml:26 +#, no-c-format +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"Para usar esses filtros, eles primeiramente devem ser definidos e anexados " +"aos elementos do mapeamento apropriados. Para definir um filtro, use o " +"elemento <filter-def/> dentro do elemento " +"<hibernate-mapping/>:" + +#. Tag: programlisting +#: filters.xml:32 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:34 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "Então esse filtro pode ser anexo à uma classe:" + +#. Tag: programlisting +#: filters.xml:38 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "or, to a collection:" +msgstr "ou em uma coleção:" + +#. Tag: programlisting +#: filters.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:46 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "ou mesmo para ambos (ou muitos de cada) ao mesmo tempo." + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enabledFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Os métodos na Session são: enableFilter(String " +"filterName), getEnabledFilter(String filterName), e disableFilter(String filterName). Por padrão, " +"os filtros não são habilitados dentro de qualquer session; Eles devem ser " +"explicitamente habilitados usando o método Session.enableFilter(), que retorna uma instância da interface Filter. " +"Usando o filtro simples definido acima, o código se pareceria com o seguinte:" + +#. Tag: programlisting +#: filters.xml:59 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: filters.xml:61 +#, no-c-format +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"Veja que os métodos da interface org.hibernate.Filter permite o encadeamento " +"de funções, comum à maioria das funções do Hibernate." + +#. Tag: para +#: filters.xml:65 +#, no-c-format +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "" +"Um exemplo completo, usando dados temporais com um padrão efetivo de " +"registro de datas:" + +#. Tag: programlisting +#: filters.xml:69 +#, no-c-format +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:71 +#, no-c-format +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"Para garantir que você sempre tenha registro efetivos, simplesmente habilite " +"o filtro na session antes de recuperar os dados dos empregados:" + +#. Tag: programlisting +#: filters.xml:76 +#, no-c-format +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:78 +#, no-c-format +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"No HQL acima, mesmo que mencionamos apenas uma restrição de salário nos " +"resultados, por causa do filtro habilitado, a consulta retornará apenas os " +"funcionários ativos cujo salário é maior que um milhão de dólares." + +#. Tag: para +#: filters.xml:84 +#, no-c-format +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"Nota: se você planeja usar filtros com outer join (por HQL ou por load " +"fetching) seja cuidadoso na direção da expressão de condição. É mais seguro " +"configura-lo com para um left outer join; geralmente, coloque o parâmetro " +"primeiro seguido pelo nome da coluna após o operador." + +#. Tag: para +#: filters.xml:91 +#, no-c-format +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "translator-credits" + +#. Tag: programlisting +#: filters.xml:98 +#, no-c-format +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:100 +#, no-c-format +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/pt-BR/content/inheritance_mapping.po new file mode 100644 index 0000000000..4ecea11601 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/inheritance_mapping.po @@ -0,0 +1,851 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:5 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "Mapeamento de Herança" + +#. Tag: title +#: inheritance_mapping.xml:8 +#, no-c-format +msgid "The Three Strategies" +msgstr "As três estratégias" + +#. Tag: para +#: inheritance_mapping.xml:10 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "" +"O Hibernate suporta as três estratégias básicas de mapeamento de herança:" + +#. Tag: para +#: inheritance_mapping.xml:16 +#, no-c-format +msgid "table per class hierarchy" +msgstr "tabela por hierarquia de classes" + +#. Tag: para +#: inheritance_mapping.xml:21 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"tabela por subclasse\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table per subclass" + +#. Tag: para +#: inheritance_mapping.xml:26 +#, no-c-format +msgid "table per concrete class" +msgstr "tabela por classe concreta" + +#. Tag: para +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "" +"Adicionalmente, o Hibernate suporta uma quarta, um tipo levemente diferente " +"de polimorfismo:" + +#. Tag: para +#: inheritance_mapping.xml:39 +#, no-c-format +msgid "implicit polymorphism" +msgstr "polimorfismo implícito" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, no-c-format +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"É possível usar diferentes estratégias de mapeamento para diferentes " +"ramificações da mesma hierarquia de herança, e então fazer uso do " +"polimorfismo implícito para alcançar polimorfismo através da hierarquia " +"completa. De qualquer forma, O Hibernate não suporta a mistura de " +"mapeamentos <subclass>, and <joined-" +"subclass> e <union-subclass> dentro do " +"mesmo elemento raiz <class>. É possível usar junto " +"às estratégias tabela por hierarquia e a tabela por subclasse, abaixo do " +"mesmo elemento <class>, combinando os elementos " +"<subclass> e <join> (veja " +"abaixo)." + +#. Tag: para +#: inheritance_mapping.xml:59 +#, no-c-format +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"É possível definir mapeamentos subclass, union-" +"subclass, e joined-subclass em documentos de " +"mapeamento separados, diretamente abaixo de hibernate-mapping. Isso permite a você estender uma hierarquia de classes apenas " +"adicionando um novo arquivo de mapeamento. Você deve especificar um atributo " +"extends no mapeamento da subclasse, nomeando uma " +"superclasse previamente mapeada. Nota: Anteriormente esta característica " +"fazia o ordenamento dos documentos de mapeamento importantes. Desde o " +"Hibernate3, o ordenamento dos arquivos de mapeamento não importa quando " +"usamos a palavra chave extends. O ordenamento dentro de um arquivo de " +"mapeamento simples ainda necessita ser definido como superclasse antes de " +"subclasse." + +#. Tag: programlisting +#: inheritance_mapping.xml:70 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:74 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "Tabela por hierarquia de classes" + +#. Tag: para +#: inheritance_mapping.xml:76 +#, no-c-format +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"Suponha que tenhamos uma interface Payment, com sua " +"implementação CreditCardPayment, CashPayment, ChequePayment. O mapeamento da tabela por " +"hierarquia seria parecido com:" + +#. Tag: programlisting +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:85 +#, no-c-format +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." + +#. Tag: title +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "Table per subclass" +msgstr "Tabela por subclasse" + +#. Tag: para +#: inheritance_mapping.xml:96 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "Um mapeamento de tabela por subclasse seria parecido com:" + +#. Tag: programlisting +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:102 +#, 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 "" +"Quatro tabelas são necessárias. As três tabelas subclasses possuem " +"associação de chave primária para a tabela de superclasse (então o modelo " +"relacional é atualmente uma associação de um-para-um)." + +#. Tag: title +#: inheritance_mapping.xml:111 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "Tabela por subclasse, usando um discriminador" + +#. Tag: para +#: inheritance_mapping.xml:113 +#, no-c-format +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"Note que a implementação de tabela por subclasse do Hibernate não necessita " +"de coluna de discriminador. Outro mapeador objeto/relacional usa uma " +"implementação diferente de tabela por subclasse, que necessita uma coluna " +"com o tipo discriminador na tabela da superclasse. A abordagem escolhida " +"pelo Hibernate é muito mais difícil de implementar, porém de forma " +"argumentável mais correto de um ponto de vista relacional. Se você deseja " +"utilizar uma coluna discriminadora com a estratégia tabela por subclasse, " +"você pode combinar o uso de <subclass> e " +"<join>, dessa maneira:" + +#. Tag: programlisting +#: inheritance_mapping.xml:125 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:127 +#, no-c-format +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass. A declaração opcional " +"fetch=”select” diz ao Hibernate para não buscar os dados da subclasse " +"ChequePayment, quando usar um outer join pesquisando pela superclasse." + +#. Tag: title +#: inheritance_mapping.xml:136 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr ". Misturando tabela por hierarquia de classes com tabela por subclasse" + +#. Tag: para +#: inheritance_mapping.xml:138 +#, no-c-format +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"Você pode até mesmo misturar a estratégia de tabela por hierarquia e tabela " +"por subclasse usando esta abordagem:" + +#. Tag: programlisting +#: inheritance_mapping.xml:143 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:145 +#, no-c-format +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"Para qualquer uma dessas estratégias de mapeamento, uma associação " +"polimórfica para a classe raiz Payment deve ser mapeada " +"usando <many-to-one>." + +#. Tag: programlisting +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:156 +#, no-c-format +msgid "Table per concrete class" +msgstr "Tabela por classe concreta" + +#. Tag: para +#: inheritance_mapping.xml:158 +#, no-c-format +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"Existem duas formas que poderíamos usar a respeito da estratégia de " +"mapeamento de tabela por classe concreta. A primeira é usar <" +"union-subclass>.." + +#. Tag: programlisting +#: inheritance_mapping.xml:163 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:165 +#, 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 "" +"Três tabelas estão envolvidas para as subclasses. Cada tabela define colunas " +"para todas as propriedades da classe, incluindo propriedades herdadas." + +#. Tag: para +#: inheritance_mapping.xml:170 +#, 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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"A limitação dessa abordagem é que se uma propriedade é mapeada na " +"superclasse, o nome da coluna deve ser o mesmo em todas as tabelas das " +"subclasses. (Nós devemos melhorar isto em um futuro release do Hibernate). A " +"estratégia do gerador de identidade não é permitida em união de subclasses" +"(union-subclass) herdadas, na verdade a fonte de chave primária deve ser " +"compartilhada através de todas subclasses unidas da hierarquia." + +#. Tag: para +#: inheritance_mapping.xml:179 +#, no-c-format +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"Se sua superclasse é abstrata, mapeie ela com abstract=\"true\". Claro, que se ela não for abstrata, uma tabela (padrão para " +"PAYMENT no exemplo acima) adicional é necessária para " +"segurar as instâncias da superclasse." + +#. Tag: title +#: inheritance_mapping.xml:189 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "Tabela por classe concreta, usando polimorfismo implícito" + +#. Tag: para +#: inheritance_mapping.xml:191 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "Uma abordagem alternativa é fazer uso de polimorfismo implícito:" + +#. Tag: programlisting +#: inheritance_mapping.xml:195 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:197 +#, no-c-format +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"Veja que em nenhum lugar mencionamos a interface Payment " +"explicitamente. Também preste atenção que propriedades de Payment são mapeadas em cada uma das subclasses. Se você quer evitar " +"duplicação, considere usar entidades de XML (ex. (e.g. [ <!" +"ENTITY allproperties SYSTEM \"allproperties.xml\"> ] na " +"declaração do DOCTYPE e &allproperties; no mapeamento)." + +#. Tag: para +#: inheritance_mapping.xml:207 +#, no-c-format +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"A desvantagem dessa abordagem é que o Hibernate não gera UNIONs SQL quando executa pesquisas polimórficas." + +#. Tag: para +#: inheritance_mapping.xml:212 +#, no-c-format +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"Para essa estratégia, uma associação polimórfica para Payment geralmente é mapeada usando <any>." + +#. Tag: programlisting +#: inheritance_mapping.xml:217 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:222 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "Misturando polimorfismo implícito com outros mapeamentos de herança" + +#. Tag: para +#: inheritance_mapping.xml:224 +#, no-c-format +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"Ainda existe uma coisa para ser observada com respeito a este mapeamento. " +"Desde que as subclasses sejam mapeadas em seu próprio elemento <" +"class> (e desde que Payment seja apenas uma " +"interface), cada uma das subclasses pode ser facilmente parte de uma outra " +"hierarquia de herança! (E você ainda pode usar pesquisas polimórficas em " +"cima da interface Payment.)" + +#. Tag: programlisting +#: inheritance_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:234 +#, no-c-format +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"Mais uma vez, nós não mencionamos Payment explicitamente. " +"Se nós executarmos uma pesquisa em cima da interface Payment – por exemplo, from Payment – o Hibernate " +"retorna automaticamente instâncias de CreditCardPayment " +"(e suas subclasses, desde que elas também implementem Payment), CashPayment e ChequePayment " +"mas não as instâncias de NonelectronicTransaction." + +#. Tag: title +#: inheritance_mapping.xml:249 +#, no-c-format +msgid "Limitations" +msgstr "Limitações" + +#. Tag: para +#: inheritance_mapping.xml:251 +#, no-c-format +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"Existem certas limitações para a abordagem do \"polimorfismo implícito\" " +"comparada com a estratégia de mapeamento da tabela por classe concreta. " +"Existe uma limitação um tanto menos restritiva para mapeamentos <" +"union-subclass>." + +#. Tag: para +#: inheritance_mapping.xml:258 +#, no-c-format +msgid "" +"The following table shows the limitations of table per concrete-class " +"mappings, and of implicit polymorphism, in Hibernate." +msgstr "" +"A tabela seguinte demonstra as limitações do mapeamento de tabela por classe " +"concreta e do polimorfismo implícito no Hibernate." + +#. Tag: title +#: inheritance_mapping.xml:264 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "Features of inheritance mappings" + +#. Tag: entry +#: inheritance_mapping.xml:276 +#, no-c-format +msgid "Inheritance strategy" +msgstr "Estratégia de Herança" + +#. Tag: entry +#: inheritance_mapping.xml:277 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "muitos-para-um Polimórfico" + +#. Tag: entry +#: inheritance_mapping.xml:278 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "um-para-um Polimórfico" + +#. Tag: entry +#: inheritance_mapping.xml:279 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "um-para-muitos Polimórfico" + +#. Tag: entry +#: inheritance_mapping.xml:280 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "muitos-para-muitos Polimórfico" + +#. Tag: entry +#: inheritance_mapping.xml:281 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "Polymorphic queries" +msgstr "Pesquisas Polimórficas" + +#. Tag: entry +#: inheritance_mapping.xml:283 +#, no-c-format +msgid "Polymorphic joins" +msgstr "Joins polimórficos" + +#. Tag: entry +#: inheritance_mapping.xml:284 +#, no-c-format +msgid "Outer join fetching" +msgstr "Outer join fetching" + +#. Tag: entry +#: inheritance_mapping.xml:289 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "table per class-hierarchy" + +#. Tag: literal +#: inheritance_mapping.xml:290 inheritance_mapping.xml:301 +#: inheritance_mapping.xml:312 +#, no-c-format +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:291 inheritance_mapping.xml:302 +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:292 inheritance_mapping.xml:303 +#, no-c-format +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:293 inheritance_mapping.xml:304 +#: inheritance_mapping.xml:315 +#, no-c-format +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:294 inheritance_mapping.xml:305 +#: inheritance_mapping.xml:316 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#. Tag: literal +#: inheritance_mapping.xml:295 inheritance_mapping.xml:306 +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 +#, no-c-format +msgid "from Payment p" +msgstr "from Payment p" + +#. Tag: literal +#: inheritance_mapping.xml:296 inheritance_mapping.xml:307 +#: inheritance_mapping.xml:318 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#. Tag: emphasis +#: inheritance_mapping.xml:297 inheritance_mapping.xml:308 +#: inheritance_mapping.xml:319 +#, no-c-format +msgid "supported" +msgstr "supported" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"tabela por subclasse\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table per subclass" + +#. Tag: entry +#: inheritance_mapping.xml:311 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "table per concrete-class (union-subclass)" + +#. Tag: entry +#: inheritance_mapping.xml:314 +#, no-c-format +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:322 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "table per concrete class (implicit polymorphism)" + +#. Tag: literal +#: inheritance_mapping.xml:323 +#, no-c-format +msgid "<any>" +msgstr "<any>" + +#. Tag: emphasis +#: inheritance_mapping.xml:324 inheritance_mapping.xml:325 +#: inheritance_mapping.xml:329 inheritance_mapping.xml:330 +#, no-c-format +msgid "not supported" +msgstr "not supported" + +#. Tag: literal +#: inheritance_mapping.xml:326 +#, no-c-format +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#. Tag: literal +#: inheritance_mapping.xml:327 +#, no-c-format +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +#~ msgid "load()/get()" +#~ msgstr "load()/get()" + +#~ msgid "Polymorphic " +#~ msgstr " Polimórfico" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid " (for only)" +#~ msgstr " (for only)" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/performance.po b/documentation/envers/src/main/docbook/pt-BR/content/performance.po new file mode 100644 index 0000000000..7c1a0185dd --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/performance.po @@ -0,0 +1,2584 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:5 +#, no-c-format +msgid "Improving performance" +msgstr "Aumentando a performance" + +#. Tag: title +#: performance.xml:8 +#, no-c-format +msgid "Fetching strategies" +msgstr "Estratégias de Fetching" + +#. Tag: para +#: performance.xml:10 +#, no-c-format +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"Uma estratégia de fetching é a estratégia que o " +"Hibernate irá usar para buscar objetos associados se a aplicação precisar " +"navegar pela associação. Estratégias de Fetch podem ser declaradas nos " +"metadados de mapeamento O/R, ou sobrescritos por uma query HQL ou query com " +"Criteria." + +#. Tag: para +#: performance.xml:17 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3 define as seguintes estratégias de fetching:" + +#. Tag: para +#: performance.xml:23 +#, no-c-format +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"Join fetching - o Hibernate busca o objeto ou coleção " +"associada no mesmo SELECT, usando um OUTER JOIN." + +#. Tag: para +#: performance.xml:30 +#, no-c-format +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"Select fetching - um segundo SELECT " +"é usado para buscar a entidade ou coleção associada. A menos que você " +"desabilite lazy fetching especificando lazy=\"false\", " +"esse segundo SELECT será executado apenas quando você acessar a associação." + +#. Tag: para +#: performance.xml:39 +#, no-c-format +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"Subselect fetching - um segundo SELECT será usado para buscar as coleções associadas de todas as entidades " +"buscadas na query ou fetch anterior. A menos que você desabilite lazy " +"fetching especificando lazy=\"false\", esse segundo " +"SELECT será executado apenas quando você acessar a associação." + +#. Tag: para +#: performance.xml:48 +#, no-c-format +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"Batch fetching - uma opção de otimização para o Select " +"Fetching – O Hibernate busca um lote de instâncias ou entidades usando um " +"único SELECT, especificando uma lista de chaves primárias " +"ou chaves estrangeiras." + +#. Tag: para +#: performance.xml:57 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "O Hibernate distingue também entre:" + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"Immediate fetching - uma associação, coleção ou " +"atributo é buscado como ela é carregada (Qual SQL é usado). Não se confuda " +"com eles! Nós usamos fetch para melhorar a performance. Nós podemos usar " +"lazy para definir um contrato para qual dado é sempre disponível em qualquer " +"instância desanexada de uma classe qualquer. imediatamente, quando o pai é " +"carregado." + +#. Tag: para +#: performance.xml:69 +#, no-c-format +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"Lazy collection fetching - a coleção é buscada quando a " +"aplicação invoca uma operação sobre aquela coleção (Esse é o padrão para " +"coleções)" + +#. Tag: para +#: performance.xml:76 +#, no-c-format +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"\"Extra-lazy\" collection fetching - elementos " +"individuais de uma coleção são acessados do banco de dados quando preciso. O " +"Hibernate tenta não buscar a coleção inteira dentro da memória ao menos que " +"seja absolutamente preciso. (indicado para coleções muito grandes)" + +#. Tag: para +#: performance.xml:84 +#, no-c-format +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"Proxy fetching - uma associação de um valor é carregada " +"quando um método diferente do getter do identificador é invocado sobre o " +"objeto associado." + +#. Tag: para +#: performance.xml:91 +#, no-c-format +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"\"No-proxy\" fetching - uma associação de um valor é " +"carregada quando a variável da instância é carregada. Comparada com a proxy " +"fetching, esse método é menos preguiçoso (lazy)(a associação é carregada " +"somente quando o identificador é acessada) mas é mais transparente, já que " +"não há proxies visíveis para a aplicação. Esse método requer instrumentação " +"de bytecodes em build-time e é raramente necessário." + +#. Tag: para +#: performance.xml:101 +#, no-c-format +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"Lazy attribute fetching - um atributo ou associação de " +"um valor é carregada quanto a varíavel da instância é acessada. Esse método " +"requer instrumentação de bytecodes em build-time e é raramente necessário." + +#. Tag: para +#: performance.xml:110 +#, no-c-format +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"Nós temos aqui duas noções ortogonais: quando a " +"associação é carregada e como ela é carregada (Qual " +"SQL é usado). Não se confuda com eles! Nós usamos fetch " +"para melhorar a performance. Nós podemos usar lazy para definir um contrato " +"para qual dado é sempre disponível em qualquer instância desconectada de uma " +"classe qualquer." + +#. Tag: title +#: performance.xml:119 +#, no-c-format +msgid "Working with lazy associations" +msgstr "Inicializando coleções e proxies" + +#. Tag: para +#: performance.xml:121 +#, no-c-format +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"Por padrão, o Hibernate3 usa busca preguiçosa para coleções e busca " +"preguiçosa com proxy para associações de um valor. Esses padrões fazem " +"sentido para quase todas as associações em quase todas a aplicações." + +#. Tag: para +#: performance.xml:127 +#, no-c-format +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"Veja: se voce setar hibernate." +"default_batch_fetch_size, O Hibernate irá usar otimização de " +"carregamento em lote para o carregamento preguiçoso(Essa otimização pode ser " +"também habilitada em um nível mais fino)." + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"Porém, a busca preguiçosa tem um problema que você precisar saber. Acesso a " +"associações preguiçosas fora do contexto de uma sessão aberta do Hibernate " +"irá resultar numa exceção. Por exemplo:" + +#. Tag: programlisting +#: performance.xml:140 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:142 +#, no-c-format +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"Como a coleção de permissões não foi inicializada quando a Session foi fechada, a coleção não poderá carregar o seu estado. O " +"Hibernate não suporta inicialização preguiçosa para objetos desconectados. " +"Para consertar isso, é necessário mover o código que carrega a coleção para " +"antes da transação ser comitada." + +#. Tag: para +#: performance.xml:150 +#, no-c-format +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"Alternativamente, nós podemos usar uma coleção ou associação não preguiçosa, " +"especificando lazy=\"false\" para o mapeamento da " +"associação. Porém, é pretendido que a inicialização preguiçosa seja usada " +"por quase todas as coleções e associações. Se você definir muitas " +"associações não preguiçosas em seu modelo de objetos, o Hibernate irá " +"precisar carregar o banco de dados inteiro na memória em cada transação!" + +#. Tag: para +#: performance.xml:159 +#, no-c-format +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"Por outro lado, nós geralmente escolhemos join fetching (que é não " +"preguiçosa por natureza) ao invés de select fetching em uma transação " +"particular. Nós iremos ver como customizar a estratégoa de busca. No " +"Hibernate3, os mecanismos para escolher a estratégia de fetching são " +"identicos para as associações simples e para coleções." + +#. Tag: title +#: performance.xml:170 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "Personalizando as estratégias de busca" + +#. Tag: para +#: performance.xml:172 +#, no-c-format +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"O select fetching (o padrão) é extremamente vunerável para N+1 problemas em " +"select, então nós iremos querer habilitar o join fetching no documento de " +"mapeamento:" + +#. Tag: programlisting +#: performance.xml:177 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:179 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:181 +#, no-c-format +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"A estratégia de fetch definida no documento de mapeamento " +"afeta:" + +#. Tag: para +#: performance.xml:187 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "recupera via get() ou load()" + +#. Tag: para +#: performance.xml:192 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "" +"Recuperações que acontecem implicitamente quando navegamos por uma associação" + +#. Tag: para +#: performance.xml:197 +#, no-c-format +msgid "Criteria queries" +msgstr "Criteria queries" + +#. Tag: para +#: performance.xml:202 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "buscas por HQL se buscar por subselect for usado" + +#. Tag: para +#: performance.xml:208 +#, no-c-format +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"Independentemente da estratégia de busca que você usar, o grafo não " +"preguiçoso definido será garantidamente carregado na memória. Note que isso " +"irá resultar em diversos selects imediatos sendo usados em um HQL em " +"particular." + +#. Tag: para +#: performance.xml:214 +#, no-c-format +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"Usualmente não usamos documentos de mapeamento para customizar as buscas. Ao " +"invés disso, nós deixamos o comportamento padrão e sobrescrevemos isso em " +"uma transação em particular, usando left join fetch no " +"HQL. Isso diz ao Hibernate para buscar a associação inteira no primeiro " +"select, usando um outer join. Na API de busca Criteria, " +"você irá usar setFetchMode(FetchMode.JOIN)." + +#. Tag: para +#: performance.xml:223 +#, no-c-format +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"Se você quiser mudar a estratégia de busca usada pelo get() ou load(), simplesmente use uma query " +"Criteria, por exemplo:" + +#. Tag: programlisting +#: performance.xml:229 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:231 +#, no-c-format +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(Isto é o equivalente do Hibernate para o que algumas soluções ORM chamam de " +"\"plano de busca\")" + +#. Tag: para +#: performance.xml:235 +#, no-c-format +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "" +"Um meio totalmente diferente de evitar problemas com selects N+1 é usar um " +"cache de segundo nível." + +#. Tag: title +#: performance.xml:243 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "Proxies de associação single-ended" + +#. Tag: para +#: performance.xml:245 +#, no-c-format +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"A recuperação preguiçosa para coleções é implementada usando uma " +"implementação própria do Hibernate para coleções persistentes. Porém, um " +"mecanismo diferente é necessário para comportamento preguiçoso para " +"associações de um lado só. A entidade alvo da associação precisa usar um " +"proxy. O Hibernate implementa proxies para inicialização preguiçosa em " +"objetos persistentes usando manipulação de bytecode (via a excelente " +"biblioteca CGLIB)." + +#. Tag: para +#: performance.xml:253 +#, no-c-format +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"Por padrão, o Hibernate3 gera proxies (na inicialização) para todas as " +"classes persistentes que usem eles para habilitar recuperaçãopreguiçosa de " +"associações many-to-one e one-to-one." + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"O arquivo de mapeamento deve declaram uma interface para usar como interface " +"de proxy para aquela classe, com o atributo proxy. Por " +"padrão, o Hibernate usa uma subclasse dessa classe. Note que a " +"classe a ser usada via proxy precisa implementar o construtor padrão com " +"pelo menos visibilidade de package. Nós recomendamos esse construtor para " +"todas as classes persistentes!" + +#. Tag: para +#: performance.xml:266 +#, no-c-format +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "" +"Existe alguns truques que você deve saber quando extender esse comportamento " +"para classes polimórficas, dessa maneira:" + +#. Tag: programlisting +#: performance.xml:271 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:273 +#, no-c-format +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"Primeiramente, instâncias de Cat nunca seráo convertidas " +"para DomesticCat, mesmo que a instância em questão seja " +"uma estância de DomesticCat:" + +#. Tag: programlisting +#: performance.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:281 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "É possível quebrar o proxy ==." + +#. Tag: programlisting +#: performance.xml:285 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:287 +#, no-c-format +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"Porém a situação não é tão ruim como parece. Mesmo quando temos duas " +"referências para objetos proxies diferentes, a instância deles será o mesmo " +"objeto" + +#. Tag: programlisting +#: performance.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:294 +#, no-c-format +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "" +"Terceiro, Você não pode usar um proxy CGLIB em uma classe final ou com qualquer método final." + +#. Tag: para +#: performance.xml:299 +#, no-c-format +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"Finalmente, se o seu objeto persistente adquirir qualquer recursto durante a " +"instanciação (em inicializadores ou construtor padrão), então esses recursos " +"serão adquiridos pelo proxy também. A classe de proxy é uma subclasse da " +"classe persistente." + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"Esses problemas são todos devido a limitação fundamental do modelo de " +"herança simples do Java. Se você quiser evitar esse problemas em suas " +"classes persistentes você deve imeplementar uma interface que declare seus " +"métodos de negócio. Você deve especificar essas interfaces no arquivo de " +"mapeamento. Ex:" + +#. Tag: programlisting +#: performance.xml:311 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:313 +#, no-c-format +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"onde CatImpl implementa a interface Cat e DomesticCatImpl implementa a interface " +"DomesticCat. Então proxies para instâncias de " +"Cat e DomesticCat serão retornadas por " +"load() ou iterate(). (Note que " +"list() geralmente não retorna proxies)." + +#. Tag: programlisting +#: performance.xml:321 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"Relacionamentos são também carregados preguiçosamente. Isso significa que " +"você precisa declarar qualquer propriedade como sendo do tipo Cat, e não CatImpl." + +#. Tag: para +#: performance.xml:328 +#, no-c-format +msgid "" +"Certain operations do not require proxy initialization" +msgstr "" +"Algumas operações não requerem inicialização por proxy:" + +#. Tag: para +#: performance.xml:334 +#, no-c-format +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals(), se a classe persistente não sobrescrever " +"equals()" + +#. Tag: para +#: performance.xml:340 +#, no-c-format +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode(), se a classe persistente não sobrescrever " +"hashCode()" + +#. Tag: para +#: performance.xml:346 +#, no-c-format +msgid "The identifier getter method" +msgstr "O método getter do identificador" + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"O Hibernate irá detectar classes persistentes que sobrescrevem " +"equals() ou hashCode()." + +#. Tag: para +#: performance.xml:357 +#, no-c-format +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"Escolhendo lazy=\"no-proxy\" ao invés do padrão " +"lazy=\"proxy\", podemos evitar problemas associados com " +"typecasting. Porém, iremos precisar de instrumentação de bytecode em tempo " +"de compilação e todas as operações irão resultar em iniciazações de proxy " +"imediatas." + +#. Tag: title +#: performance.xml:367 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "Inicializando coleções e proxies" + +#. Tag: para +#: performance.xml:369 +#, no-c-format +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"Será lançada uma LazyInitializationException se uma " +"coleção não inicializada ou proxy é acessado fora do escopo da " +"Session, isto é, quando a entidade que contém a coleção " +"ou tem a referência ao proxy estiver no estado destachado." + +#. Tag: para +#: performance.xml:375 +#, no-c-format +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"Algumas vezes precisamos garantir qie o proxy ou coleção é inicializado " +"antes de se fechar a Session. Claro que sempre podemos " +"forçar a inicialização chamando cat.getSex() ou " +"cat.getKittens().size(), por exemplo. Mas isto parece " +"confuso para quem lê o código e não é conveniente para códigos genéricos." + +#. Tag: para +#: performance.xml:382 +#, no-c-format +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"Os métodos estáticos Hibernate.initialize() e " +"Hibernate.isInitialized() possibilitam a aplicação uma " +"maneira conveniente de trabalhar com coleções inicializadas preguiçosamente " +"e proxies. Hibernate.initialize(cat) irá forçar a " +"inicialização de um proxy, cat, contanto que a " +"Session esteja ainda aberta. Hibernate.initialize" +"( cat.getKittens() ) tem um efeito similar para a coleção de " +"kittens." + +#. Tag: para +#: performance.xml:391 +#, no-c-format +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"Outra opção é manter a Session aberta até que todas as " +"coleções e proxies necessários sejam carregados. Em algumas arquiteturas de " +"aplicações, particularmente onde o código que acessa os dados usando " +"Hibernate e o código que usa os dados estão em diferentes camadas da " +"aplicação ou diferentes processos físicos, será um problema garantir que a " +"Session esteja aberta quando uma coleção for " +"inicializada. Existem dois caminhos básicos para lidar com esse problema:" + +#. Tag: para +#: performance.xml:402 +#, no-c-format +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"Em aplicações web, um filtro servlet pode ser usado para fechar a " +"Session somente no final da requisição do usuário, já que " +"a renderização da visão estará completa (o pattern Open Session In " +"View). Claro, que isto cria a necessidade de um correto manuseio " +"de exceções na infraestrutura de sua aplicação. É vitalmente importante que " +"a Session esteja fechada e a transação terminada antes de " +"retornar para o usuário, mesmo que uma exceção ocorra durante a renderização " +"da view. Veja o Wiki do Hibernate para exemplos do pattern \"Open Session In " +"View\"" + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"Em uma aplicação com uma camada de negócios separada, a lógica de negócios " +"deve \"preparar\" todas as coleções que serão usadas pela camada web antes " +"de retornar. Isto sgnifica que a camada de negócios deve carregar todos os " +"dados e retorná-los já inicializados para a camada de apresentação. " +"Usualmente a aplicação chama Hibernate.initialize() para " +"cada coleção que será usada pela camada web (essa chamada de método deve " +"ocorrer antes da sessão ser fechada ou retornar a coleção usando uma " +"consulta Hibernate com uma cláusula FETCH ou um " +"FetchMode.JOIN na Criteria. Fica muito " +"mais fácil se você adotar o pattern Command ao invés do " +"Session Facade." + +#. Tag: para +#: performance.xml:430 +#, no-c-format +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"Você também pode anexar um objeto prevaimente carregado em uma nova " +"Sessionmerge() or lock() antes de acessar coleções não inicializadas (ou outros proxies). O " +"Hibernate não faz e certamente não deve isso " +"automaticamente pois isso introduziria semantica em transações ad hoc." + +#. Tag: para +#: performance.xml:440 +#, no-c-format +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"As vezes você não quer inicializar uma coleção muito grande, mas precisa de " +"algumas informações (como o tamanho) ou alguns de seus dados." + +#. Tag: para +#: performance.xml:445 +#, no-c-format +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "" +"Você pode usar um filtro de coleção para saber seu tamanho sem a inicializar:" + +#. Tag: programlisting +#: performance.xml:449 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:451 +#, no-c-format +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"O método createFilter() é usado também para retornar " +"algus dados de uma coleção eficientemente sem precisar inicializar a coleção " +"inteira:" + +#. Tag: programlisting +#: performance.xml:456 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:461 +#, no-c-format +msgid "Using batch fetching" +msgstr "Usando busca em lote" + +#. Tag: para +#: performance.xml:463 +#, no-c-format +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"O Hibernate pode fazer uso eficiente de busca em lote, isto é, o Hibernate " +"pode carregar diversos proxies não inicializados se um proxy é acessado (ou " +"coleções. A busca em lote é uma otimização da estratégia de select " +"fetching). Existe duas maneiras em que você pode usar busca em lote: no " +"nível da classe ou no nível da coleção." + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"A recuperação em lote para classes/entidades é mais fácil de entender. " +"Imagine que você tem a seguinte situação em tempo de execução: Você tem 25 " +"instâncias de Cat carregadas em uma Session, cada Cat tem uma referência ao seu " +"owner, que é da classe Person. A " +"classe Person é mapeada com um proxy, lazy=\"true" +"\". Se você iterar sobre todos os Cat's e chamar getOwner" +"() em cada, o Hibernate irá por padrão executar 25 comandos " +"SELECT(), para buscar os proxies de owners. Você pode " +"melhorar esse comportamento especificando um batch-size " +"no mapeamento da classe Person:" + +#. Tag: programlisting +#: performance.xml:479 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:481 +#, no-c-format +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "" +"O Hibernate irá executar agora apenas três consultas, buscando por vez, 10, " +"10 e 5 Person." + +#. Tag: para +#: performance.xml:485 +#, no-c-format +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Sesssion, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"Você também pode habilitar busca em lote de uma coleção. Por exemplo, se " +"cada Person tem uma coleção preguiçosa de Cats, e 10 pessoas estão já carregados em uma Sesssion, serão gerados 10 SELECTs ao se iterar todas as " +"pessoas, um para cada chamada de getCats().. Se você " +"habilitar busca em lote para a coleção de cats no " +"mapeamento da classe Person, o Hibernate pode fazer uma " +"pré carga das coleções:" + +#. Tag: programlisting +#: performance.xml:494 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:496 +#, no-c-format +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"Com um batch-size de 3, o Hibernate irá carregar 3, 3, 3, " +"1 coleções em 4 SELECTs. Novamente, o valor do atributo " +"depende do número esperado de coleções não inicialiadas em determinada " +"Session." + +#. Tag: para +#: performance.xml:502 +#, no-c-format +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"A busca em lote de coleções é particularmente útil quando você tem uma " +"árvore encadeada de items, ex. o típico padrão bill-of-materials (Se bem que " +"um conjunto encadeado ou caminho " +"materializado pode ser uma opção melhor para árvores com mais " +"leitura)" + +#. Tag: title +#: performance.xml:511 +#, no-c-format +msgid "Using subselect fetching" +msgstr "Usando subselect fetching" + +#. Tag: para +#: performance.xml:513 +#, no-c-format +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"Se uma coleção ou proxy simples precisa ser recuperado, o Hibernate carrega " +"todos eles rodando novamente a query original em um subselect. Isso funciona " +"da mesma maneira que busca em lote, sem carregar tanto." + +#. Tag: title +#: performance.xml:524 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "Usando busca preguiçosa de propriedade" + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"O Hibernate3 suporta a carga posterior de propriedades individuais. Essa " +"técnica de otimização também conhecida como fetch groups. Veja que isso é mais uma funcionalidade de marketing já que na " +"prática, é mais importante otimização nas leituras dos registros do que na " +"leitura das colunas. Porém, carregar apenas algumas propriedades de uma " +"classe pode ser útil em casos extremos, onde tabelas legadas podem ter " +"centenas de colunas e o modelo de dados não pode ser melhorado." + +#. Tag: para +#: performance.xml:535 +#, no-c-format +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"Para habilitar a carga posterior de propriedade, é preciso setar o atributo " +"lazy no seu mapeamento de propriedade:" + +#. Tag: programlisting +#: performance.xml:540 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:542 +#, no-c-format +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"A carga posterior de propriedades requer instrumentação de bytecode! Se suas " +"classes persistentes não forem melhoradas, o Hibernate irá ignorar " +"silenciosamente essa configuração e usará busca imediatamente." + +#. Tag: para +#: performance.xml:548 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "Para instrumentação de bytecode, use a seguinte tarefa do Ant:" + +#. Tag: programlisting +#: performance.xml:552 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:554 +#, no-c-format +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a prefered solution." +msgstr "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a prefered solution." + +#. Tag: para +#: performance.xml:561 +#, no-c-format +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." + +#. Tag: title +#: performance.xml:571 +#, no-c-format +msgid "The Second Level Cache" +msgstr "The Second Level Cache" + +#. Tag: para +#: performance.xml:573 +#, no-c-format +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." + +#. Tag: para +#: performance.xml:581 +#, no-c-format +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." + +#. Tag: title +#: performance.xml:592 +#, no-c-format +msgid "Cache Providers" +msgstr "Cache Providers" + +#. Tag: entry +#: performance.xml:601 performance.xml:774 +#, no-c-format +msgid "Cache" +msgstr "Cache" + +#. Tag: entry +#: performance.xml:602 +#, no-c-format +msgid "Provider class" +msgstr "Provider class" + +#. Tag: entry +#: performance.xml:603 +#, no-c-format +msgid "Type" +msgstr "Type" + +#. Tag: entry +#: performance.xml:604 +#, no-c-format +msgid "Cluster Safe" +msgstr "Cluster Safe" + +#. Tag: entry +#: performance.xml:605 +#, no-c-format +msgid "Query Cache Supported" +msgstr "Query Cache Supported" + +#. Tag: entry +#: performance.xml:610 performance.xml:783 +#, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "Hashtable (not intended for production use)" + +#. Tag: literal +#: performance.xml:611 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#. Tag: entry +#: performance.xml:612 +#, no-c-format +msgid "memory" +msgstr "memory" + +#. Tag: entry +#: performance.xml:614 performance.xml:621 performance.xml:628 +#: performance.xml:784 performance.xml:785 performance.xml:786 +#: performance.xml:791 performance.xml:792 performance.xml:793 +#: performance.xml:798 performance.xml:799 performance.xml:800 +#: performance.xml:805 performance.xml:806 performance.xml:812 +#: performance.xml:815 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:617 performance.xml:790 +#, no-c-format +msgid "EHCache" +msgstr "EHCache" + +#. Tag: literal +#: performance.xml:618 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:619 performance.xml:626 +#, no-c-format +msgid "memory, disk" +msgstr "memory, disk" + +#. Tag: entry +#: performance.xml:624 performance.xml:797 +#, no-c-format +msgid "OSCache" +msgstr "OSCache" + +#. Tag: literal +#: performance.xml:625 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#. Tag: entry +#: performance.xml:631 performance.xml:804 +#, no-c-format +msgid "SwarmCache" +msgstr "SwarmCache" + +#. Tag: literal +#: performance.xml:632 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#. Tag: entry +#: performance.xml:633 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "clustered (ip multicast)" + +#. Tag: entry +#: performance.xml:634 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "yes (clustered invalidation)" + +#. Tag: entry +#: performance.xml:638 performance.xml:811 +#, no-c-format +msgid "JBoss TreeCache" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:639 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#. Tag: entry +#: performance.xml:640 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "clustered (ip multicast), transactional" + +#. Tag: entry +#: performance.xml:641 +#, no-c-format +msgid "yes (replication)" +msgstr "yes (replication)" + +#. Tag: entry +#: performance.xml:642 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "yes (clock sync req.)" + +#. Tag: title +#: performance.xml:649 +#, no-c-format +msgid "Cache mappings" +msgstr "Cache mappings" + +#. Tag: para +#: performance.xml:651 +#, no-c-format +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "" +"The <cache> element of a class or collection " +"mapping has the following form:" + +#. Tag: programlisting +#: performance.xml:662 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:665 +#, no-c-format +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" + +#. Tag: para +#: performance.xml:674 +#, no-c-format +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" + +#. Tag: para +#: performance.xml:681 +#, no-c-format +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" + +#. Tag: para +#: performance.xml:691 +#, no-c-format +msgid "" +"Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"Alternatively (preferrably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"The usage attribute specifies a cache " +"concurrency strategy." + +#. Tag: title +#: performance.xml:703 +#, no-c-format +msgid "Strategy: read only" +msgstr "Strategy: read only" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." + +#. Tag: programlisting +#: performance.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:717 +#, no-c-format +msgid "Strategy: read/write" +msgstr "Strategy: read/write" + +#. Tag: para +#: performance.xml:719 +#, no-c-format +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." + +#. Tag: programlisting +#: performance.xml:730 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:735 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "Strategy: nonstrict read/write" + +#. Tag: para +#: performance.xml:737 +#, no-c-format +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." + +#. Tag: title +#: performance.xml:749 +#, no-c-format +msgid "Strategy: transactional" +msgstr "Strategy: transactional" + +#. Tag: para +#: performance.xml:751 +#, no-c-format +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." + +#. Tag: para +#: performance.xml:759 +#, no-c-format +msgid "" +"None of the cache providers support all of the cache concurrency strategies. " +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"None of the cache providers support all of the cache concurrency strategies. " +"The following table shows which providers are compatible with which " +"concurrency strategies." + +#. Tag: title +#: performance.xml:765 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "Cache Concurrency Strategy Support" + +#. Tag: entry +#: performance.xml:775 +#, no-c-format +msgid "read-only" +msgstr "read-only" + +#. Tag: entry +#: performance.xml:776 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "nonstrict-read-write" + +#. Tag: entry +#: performance.xml:777 +#, no-c-format +msgid "read-write" +msgstr "read-write" + +#. Tag: entry +#: performance.xml:778 +#, no-c-format +msgid "transactional" +msgstr "transactional" + +#. Tag: title +#: performance.xml:824 +#, no-c-format +msgid "Managing the caches" +msgstr "Managing the caches" + +#. Tag: para +#: performance.xml:826 +#, no-c-format +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." + +#. Tag: para +#: performance.xml:833 +#, no-c-format +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." + +#. Tag: programlisting +#: performance.xml:841 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:843 +#, no-c-format +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." + +#. Tag: para +#: performance.xml:848 +#, no-c-format +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"To completely evict all objects from the session cache, call " +"Session.clear()" + +#. Tag: para +#: performance.xml:852 +#, no-c-format +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." + +#. Tag: programlisting +#: performance.xml:858 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:860 +#, no-c-format +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." + +#. Tag: para +#: performance.xml:867 +#, no-c-format +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" + +#. Tag: para +#: performance.xml:872 +#, no-c-format +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" + +#. Tag: para +#: performance.xml:878 +#, no-c-format +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" + +#. Tag: para +#: performance.xml:884 +#, no-c-format +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" + +#. Tag: para +#: performance.xml:892 +#, no-c-format +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" + +#. Tag: programlisting +#: performance.xml:897 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:899 +#, no-c-format +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" + +#. Tag: programlisting +#: performance.xml:904 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:909 +#, no-c-format +msgid "The Query Cache" +msgstr "The Query Cache" + +#. Tag: para +#: performance.xml:911 +#, no-c-format +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" + +#. Tag: programlisting +#: performance.xml:916 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:918 +#, no-c-format +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." + +#. Tag: para +#: performance.xml:928 +#, no-c-format +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." + +#. Tag: para +#: performance.xml:935 +#, no-c-format +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." + +#. Tag: programlisting +#: performance.xml:941 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:943 +#, no-c-format +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." + +#. Tag: title +#: performance.xml:955 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "Understanding Collection performance" + +#. Tag: para +#: performance.xml:957 +#, no-c-format +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." + +#. Tag: title +#: performance.xml:964 +#, no-c-format +msgid "Taxonomy" +msgstr "Taxonomy" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernate defines three basic kinds of collections:" + +#. Tag: para +#: performance.xml:970 +#, no-c-format +msgid "collections of values" +msgstr "collections of values" + +#. Tag: para +#: performance.xml:973 +#, no-c-format +msgid "one to many associations" +msgstr "one to many associations" + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "many to many associations" +msgstr "many to many associations" + +#. Tag: para +#: performance.xml:980 +#, no-c-format +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "indexed collections" +msgstr "indexed collections" + +#. Tag: para +#: performance.xml:994 +#, no-c-format +msgid "sets" +msgstr "sets" + +#. Tag: para +#: performance.xml:997 +#, no-c-format +msgid "bags" +msgstr "bags" + +#. Tag: para +#: performance.xml:1001 +#, no-c-format +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." + +#. Tag: para +#: performance.xml:1009 +#, no-c-format +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" + +#. Tag: para +#: performance.xml:1020 +#, no-c-format +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." + +#. Tag: para +#: performance.xml:1025 +#, no-c-format +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." + +#. Tag: para +#: performance.xml:1033 +#, no-c-format +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" + +#. Tag: title +#: performance.xml:1043 +#, no-c-format +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "" +"Lists, maps, idbags and sets are the most efficient collections to update" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." + +#. Tag: para +#: performance.xml:1051 +#, no-c-format +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." + +#. Tag: para +#: performance.xml:1060 +#, no-c-format +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." + +#. Tag: title +#: performance.xml:1078 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "Bags and lists are the most efficient inverse collections" + +#. Tag: para +#: performance.xml:1080 +#, no-c-format +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." + +#. Tag: programlisting +#: performance.xml:1090 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:1095 +#, no-c-format +msgid "One shot delete" +msgstr "One shot delete" + +#. Tag: para +#: performance.xml:1097 +#, no-c-format +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" + +#. Tag: para +#: performance.xml:1104 +#, no-c-format +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." + +#. Tag: para +#: performance.xml:1110 +#, no-c-format +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" + +#. Tag: para +#: performance.xml:1117 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "delete eighteen rows one by one and then insert three rows" + +#. Tag: para +#: performance.xml:1120 +#, no-c-format +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" + +#. Tag: para +#: performance.xml:1125 +#, no-c-format +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" + +#. Tag: para +#: performance.xml:1131 +#, no-c-format +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." + +#. Tag: para +#: performance.xml:1137 +#, no-c-format +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." + +#. Tag: title +#: performance.xml:1146 +#, no-c-format +msgid "Monitoring performance" +msgstr "Monitoring performance" + +#. Tag: para +#: performance.xml:1148 +#, no-c-format +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." + +#. Tag: title +#: performance.xml:1155 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "Monitoring a SessionFactory" + +#. Tag: para +#: performance.xml:1157 +#, no-c-format +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." + +#. Tag: para +#: performance.xml:1163 +#, no-c-format +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" + +#. Tag: programlisting +#: performance.xml:1170 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1173 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1175 +#, no-c-format +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" + +#. Tag: para +#: performance.xml:1180 +#, no-c-format +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"You can (de)activate the monitoring for a SessionFactory" + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"at configuration time, set hibernate.generate_statistics " +"to false" + +#. Tag: para +#: performance.xml:1192 +#, no-c-format +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" + +#. Tag: para +#: performance.xml:1199 +#, no-c-format +msgid "" +"Statistics can be reset programatically using the clear() " +"method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"Statistics can be reset programatically using the clear() " +"method. A summary can be sent to a logger (info level) using the " +"logSummary() method." + +#. Tag: title +#: performance.xml:1208 +#, no-c-format +msgid "Metrics" +msgstr "Metrics" + +#. Tag: para +#: performance.xml:1210 +#, no-c-format +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" + +#. Tag: para +#: performance.xml:1217 +#, no-c-format +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," + +#. Tag: para +#: performance.xml:1229 +#, no-c-format +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." + +#. Tag: para +#: performance.xml:1236 +#, no-c-format +msgid "" +"For exampl,e you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"For exampl,e you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." + +#. Tag: para +#: performance.xml:1243 +#, no-c-format +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" + +#. Tag: programlisting +#: performance.xml:1253 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1255 +#, no-c-format +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." + +#~ msgid "yes" +#~ msgstr "yes" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/persistent_classes.po b/documentation/envers/src/main/docbook/pt-BR/content/persistent_classes.po new file mode 100644 index 0000000000..2af8756869 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/persistent_classes.po @@ -0,0 +1,858 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:5 +#, no-c-format +msgid "Persistent Classes" +msgstr "Persistent Classes" + +#. Tag: para +#: persistent_classes.xml:7 +#, no-c-format +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." + +#. Tag: para +#: persistent_classes.xml:14 +#, no-c-format +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." + +#. Tag: title +#: persistent_classes.xml:23 +#, no-c-format +msgid "A simple POJO example" +msgstr "A simple POJO example" + +#. Tag: para +#: persistent_classes.xml:25 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "" +"Most Java applications require a persistent class representing felines." + +#. Tag: programlisting +#: persistent_classes.xml:29 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "There are four main rules to follow here:" + +#. Tag: title +#: persistent_classes.xml:37 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "Implement a no-argument constructor" + +#. Tag: para +#: persistent_classes.xml:39 +#, no-c-format +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." + +#. Tag: title +#: persistent_classes.xml:49 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "Provide an identifier property (optional)" + +#. Tag: para +#: persistent_classes.xml:51 +#, no-c-format +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" + +#. Tag: para +#: persistent_classes.xml:60 +#, no-c-format +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." + +#. Tag: para +#: persistent_classes.xml:65 +#, no-c-format +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" + +#. Tag: para +#: persistent_classes.xml:72 +#, fuzzy, no-c-format +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see " + +#. Tag: literal +#: persistent_classes.xml:79 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#. Tag: literal +#: persistent_classes.xml:84 +#, no-c-format +msgid "Session.merge()" +msgstr "Session.merge()" + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." + +#. Tag: title +#: persistent_classes.xml:96 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "Prefer non-final classes (optional)" + +#. Tag: para +#: persistent_classes.xml:97 +#, no-c-format +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." + +#. Tag: para +#: persistent_classes.xml:102 +#, no-c-format +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." + +#. Tag: para +#: persistent_classes.xml:107 +#, no-c-format +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proying by setting " +"lazy=\"false\"." + +#. Tag: title +#: persistent_classes.xml:115 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "Declare accessors and mutators for persistent fields (optional)" + +#. Tag: para +#: persistent_classes.xml:117 +#, no-c-format +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." + +#. Tag: para +#: persistent_classes.xml:127 +#, no-c-format +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." + +#. Tag: title +#: persistent_classes.xml:138 +#, no-c-format +msgid "Implementing inheritance" +msgstr "Implementing inheritance" + +#. Tag: para +#: persistent_classes.xml:140 +#, no-c-format +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." + +#. Tag: programlisting +#: persistent_classes.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:149 +#, no-c-format +msgid "" +"Implementing equals() and hashCode()" +msgstr "" +"Implementing equals() and hashCode()" + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"You have to override the equals() and hashCode()" +" methods if you" + +#. Tag: para +#: persistent_classes.xml:157 +#, no-c-format +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "intend to use reattachment of detached instances" + +#. Tag: para +#: persistent_classes.xml:170 +#, no-c-format +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." + +#. Tag: para +#: persistent_classes.xml:178 +#, no-c-format +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." + +#. Tag: para +#: persistent_classes.xml:192 +#, no-c-format +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" + +#. Tag: programlisting +#: persistent_classes.xml:200 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." + +#. Tag: title +#: persistent_classes.xml:212 +#, no-c-format +msgid "Dynamic models" +msgstr "Dynamic models" + +#. Tag: emphasis +#: persistent_classes.xml:215 +#, no-c-format +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "" +"Note that the following features are currently considered experimental and " +"may change in the near future." + +#. Tag: para +#: persistent_classes.xml:219 +#, no-c-format +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." + +#. Tag: para +#: persistent_classes.xml:227 +#, no-c-format +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." + +#. Tag: para +#: persistent_classes.xml:234 +#, no-c-format +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" + +#. Tag: programlisting +#: persistent_classes.xml:240 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:242 +#, no-c-format +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." + +#. Tag: para +#: persistent_classes.xml:249 +#, no-c-format +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" + +#. Tag: programlisting +#: persistent_classes.xml:255 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:257 +#, no-c-format +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." + +#. Tag: para +#: persistent_classes.xml:265 +#, no-c-format +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "" +"Entity representation modes can also be set on a per Session basis:" + +#. Tag: programlisting +#: persistent_classes.xml:270 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." + +#. Tag: para +#: persistent_classes.xml:283 +#, no-c-format +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "" +"More information about the XML representation capabilities can be found in " +"." + +#. Tag: title +#: persistent_classes.xml:291 +#, no-c-format +msgid "Tuplizers" +msgstr "Tuplizers" + +#. Tag: para +#: persistent_classes.xml:293 +#, no-c-format +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.EntityTuplizer and " +"org.hibernate.tuple.ComponentTuplizer interfaces. " +"EntityTuplizers are responsible for managing the above " +"mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." + +#. Tag: para +#: persistent_classes.xml:308 +#, no-c-format +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" + +#. Tag: programlisting +#: persistent_classes.xml:317 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:322 +#, no-c-format +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "" +"TODO: Document user-extension framework in the property and proxy packages" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/preface.po b/documentation/envers/src/main/docbook/pt-BR/content/preface.po new file mode 100644 index 0000000000..ad52aeefd5 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/preface.po @@ -0,0 +1,204 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:21 +#, no-c-format +msgid "Preface" +msgstr "Prefácio" + +#. Tag: para +#: preface.xml:23 +#, no-c-format +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"Trabalhando com software orientado a objetos e banco de dados relacional, " +"podemos ter alguns incômodos hoje em dia em ambientes empresariais. " +"Hibernate é uma ferramenta que mapeia o objeto/relacional para o ambiente " +"Java. O termo de mapeamento de objeto/relacional (ou ORM – Object/Relational " +"Mapping) se refere a técnica de mapear uma representação de dados de um " +"modelo de objeto para dados de modelo relacional com o esquema baseado em SQL" + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"O Hibernate não somente cuida do mapeamento de classes em Java para tabelas " +"de banco de dados (e de tipos de dados em Java para tipos de dados em SQL), " +"como também fornece facilidade de consultas e recuperação de dados, podendo " +"também reduzir significantemente o tempo de desenvolvimento gasto com a " +"manipulação manual de dados no SQL e JDBC." + +#. Tag: para +#: preface.xml:38 +#, no-c-format +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"O objetivo do Hibernate é de aliviar o desenvolvedor de 95 por cento das " +"tarefas de programação relacionadas aos dados comuns de persistência. O " +"Hibernate talvez não seja a melhor solução para aplicações de dados-data-" +"centric que somente usa stored-procedures para implementar a lógica de " +"negócio no banco de dados, isto é muito utilizado com o domínio de modelos " +"orientado a objetos e lógicas de negócio em camadas do meio (middle-tier) " +"baseadas em Java. Porém, o Hibernate poderá certamente ajuda-lo a remover ou " +"encapsular o código SQL de um vendedor específico, ajudando também com a " +"tarefa comum da tradução do resultado ajustado de uma representação para um " +"gráfico de objetos." + +#. Tag: para +#: preface.xml:48 +#, no-c-format +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"Se você for novo no Hibernate e no mapeamento Objeto/Relacional, ou até " +"mesmo em Java, por favor, siga os seguintes passos." + +#. Tag: para +#: preface.xml:55 +#, no-c-format +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +"Leia para um tutorial com instruções passo-a-" +"passo. O código fonte para do tutorial está incluído na distribuição no " +"diretório doc/reference/tutorial/." + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "" +"Leia o para entender o ambiente onde o " +"Hibernate pode ser utilizado." + +#. Tag: para +#: preface.xml:69 +#, no-c-format +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"Dê uma olhada no diretório de exemplo eg/ da distribuição " +"do Hibernate, ele contém uma simples aplicação standalone. Copie seu driver " +"JDBC para o diretório lib/ e edite o arquivo etc/" +"hibernate.properties, especificando corretamente os valores para " +"seu banco de dados. Usando o prompt de commando no diretorio de " +"distribuicao, digite ant eg (usando Ant), ou no Windows, " +"digite build eg." + +#. Tag: para +#: preface.xml:80 +#, no-c-format +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "" +"Use esta documentação de referencia como sua fonte primaria de informação. " +"Considere ler também o livro Java Persistence with Hibernate (http://www.manning.com/bauer2) caso você precise de mais ajuda " +"com o desenvolvimento de aplicações ou caso prefira um tutorial passo-a-" +"passo. Também visite o site http://caveatemptor.hibernate.org e faça o " +"download da aplicação de exemplo do Java Persistence with Hibernate." + +#. Tag: para +#: preface.xml:90 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "" +"FAQs (perguntas feitas com mais freqüência) estão respondidas no site do " +"Hibernate" + +#. Tag: para +#: preface.xml:95 +#, no-c-format +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "" +"Demonstrações, exemplos e tutorials estão disponíveis no site do Hibernate." + +#. Tag: para +#: preface.xml:101 +#, no-c-format +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"A Área da comunidade no site do Hibernate é uma boa fonte de recursos para " +"padrões de projeto e várias soluções de integração (Tomcat, JBoss AS, " +"Struts, EJB, etc.)." + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"Caso você tenha dúvidas, use o fórum dos usuários encontrado no site do " +"Hibernate. Nós também fornecemos um sistema para controle de bug’s (JIRA) " +"para relatórios de erros e requisições de features. Se você está interessado " +"no desenvolvimento do Hibernate, junte-se a lista de e-mail dos " +"desenvolvedores." + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"Suporte comercial de desenvolvimento, suporte de produção e treinamento para " +"o Hibernate está disponível através do JBoss Inc. (veja http://www.hibernate." +"org/SupportTraining). O Hibernate é um Projeto Profissional de Código Aberto " +"e um componente crítico da suíte de produtos JBoss Enterprise Middleware " +"System (JEMS)." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/query_criteria.po b/documentation/envers/src/main/docbook/pt-BR/content/query_criteria.po new file mode 100644 index 0000000000..dd143a0185 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/query_criteria.po @@ -0,0 +1,772 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:5 +#, no-c-format +msgid "Criteria Queries" +msgstr "Consultas por critérios" + +#. Tag: para +#: query_criteria.xml:7 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "O Hibernate provê uma intuitiva e extensível API de critério de query." + +#. Tag: title +#: query_criteria.xml:12 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "Criando uma instancia Criteria" + +#. Tag: para +#: query_criteria.xml:14 +#, no-c-format +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"A interface org.hibernate.Criteria representa a query ao " +"invés de uma classe persistente particular. A sessão é uma fábrica para " +"intancias de Criteria ." + +#. Tag: programlisting +#: query_criteria.xml:20 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:25 +#, no-c-format +msgid "Narrowing the result set" +msgstr "Limitando o result set" + +#. Tag: para +#: query_criteria.xml:27 +#, no-c-format +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"Um critério individual de query é uma instancia da interface org." +"hibernate.criterion.Criterion. A classe org.hibernate." +"criterion.Restrictions define os métodos da fábrica para obter " +"certos tipos pré fabricados de Criterion." + +#. Tag: programlisting +#: query_criteria.xml:35 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:37 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "Restrições podem ser logicamente agrupadas." + +#. Tag: programlisting +#: query_criteria.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:43 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:45 +#, no-c-format +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"Existe um grande número de critérios pré fabricados (subclasses de " +"Restrictions), mas um é especialmente útil pois permite " +"especificar o SQL diretamente." + +#. Tag: programlisting +#: query_criteria.xml:50 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:52 +#, no-c-format +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "" +"O parametro {alias} será substituido pelo alias da " +"entidade procurada." + +#. Tag: para +#: query_criteria.xml:57 +#, no-c-format +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"Uma maneira alternativa de obter um critério é pegá-lo de uma instancia de " +"Property. Você pode criar uma Property " +"chamando Property.forName()." + +#. Tag: programlisting +#: query_criteria.xml:63 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:68 +#, no-c-format +msgid "Ordering the results" +msgstr "Ordering the results" + +#. Tag: para +#: query_criteria.xml:70 +#, no-c-format +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"You may order the results using org.hibernate.criterion.Order." + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:76 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:81 +#, no-c-format +msgid "Associations" +msgstr "Associations" + +#. Tag: para +#: query_criteria.xml:83 +#, no-c-format +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." + +#. Tag: programlisting +#: query_criteria.xml:88 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:90 +#, no-c-format +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." + +#. Tag: para +#: query_criteria.xml:96 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "The following, alternate form is useful in certain circumstances." + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:102 +#, no-c-format +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias() does not create a new instance of " +"Criteria.)" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." + +#. Tag: programlisting +#: query_criteria.xml:114 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:119 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "Dynamic association fetching" + +#. Tag: para +#: query_criteria.xml:121 +#, no-c-format +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." + +#. Tag: programlisting +#: query_criteria.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:128 +#, no-c-format +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." + +#. Tag: title +#: query_criteria.xml:136 +#, no-c-format +msgid "Example queries" +msgstr "Example queries" + +#. Tag: para +#: query_criteria.xml:138 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." + +#. Tag: programlisting +#: query_criteria.xml:143 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." + +#. Tag: para +#: query_criteria.xml:150 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "You can adjust how the Example is applied." + +#. Tag: programlisting +#: query_criteria.xml:154 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:156 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "You can even use examples to place criteria upon associated objects." + +#. Tag: programlisting +#: query_criteria.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:165 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "Projections, aggregation and grouping" + +#. Tag: para +#: query_criteria.xml:166 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." + +#. Tag: programlisting +#: query_criteria.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:176 +#, no-c-format +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." + +#. Tag: para +#: query_criteria.xml:182 +#, no-c-format +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" + +#. Tag: programlisting +#: query_criteria.xml:188 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:190 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:192 +#, no-c-format +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" + +#. Tag: programlisting +#: query_criteria.xml:199 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:203 +#, no-c-format +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "" +"You can also use Property.forName() to express " +"projections:" + +#. Tag: programlisting +#: query_criteria.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:209 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:214 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "Detached queries and subqueries" + +#. Tag: para +#: query_criteria.xml:215 +#, no-c-format +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." + +#. Tag: programlisting +#: query_criteria.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:222 +#, no-c-format +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." + +#. Tag: programlisting +#: query_criteria.xml:228 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:230 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:232 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "Even correlated subqueries are possible:" + +#. Tag: programlisting +#: query_criteria.xml:236 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:245 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "Queries by natural identifier" + +#. Tag: para +#: query_criteria.xml:247 +#, no-c-format +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." + +#. Tag: para +#: query_criteria.xml:255 +#, no-c-format +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:262 +#, no-c-format +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." + +#. Tag: para +#: query_criteria.xml:267 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "Next, enable the Hibernate query cache." + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." + +#. Tag: programlisting +#: query_criteria.xml:276 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/query_hql.po b/documentation/envers/src/main/docbook/pt-BR/content/query_hql.po new file mode 100644 index 0000000000..7c3f268ba4 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/query_hql.po @@ -0,0 +1,2437 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:5 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: A linguagem de Queries do Hibernate" + +#. Tag: para +#: query_hql.xml:7 +#, no-c-format +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"O Hibernate vem com uma poderosa linguagem que é (intencionalmente) muito " +"parecida com o SQL. Mas não seja enganado pela sintaxe; a HQL é totalmente " +"orientada à objetos, requer conhecimentos de herança, polimorfismo e " +"associações." + +#. Tag: title +#: query_hql.xml:14 +#, no-c-format +msgid "Case Sensitivity" +msgstr "Case Sensitíve" + +#. Tag: para +#: query_hql.xml:16 +#, no-c-format +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"As Queries não são case-sensitive, exceto pelo nomes das classes e " +"propriedades Java. sELEct e o mesmo que SELECT mas org.hibernate.eg.FOO não é org." +"hibernate.eg.Foo e foo.barSet não é " +"foo.BARSET." + +#. Tag: para +#: query_hql.xml:27 +#, no-c-format +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"Esse manual usa as palavras chave HQL em letras minúsculas. Alguns usuários " +"acham que com letras maiúsculas as queries ficam mais legíveis, mas nós " +"achamos essa convenção feia dentro do código Java." + +#. Tag: title +#: query_hql.xml:35 +#, no-c-format +msgid "The from clause" +msgstr "A clausula from" + +#. Tag: para +#: query_hql.xml:37 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "A mais simples query possível do Hibernate é a assim:" + +#. Tag: programlisting +#: query_hql.xml:41 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:43 +#, no-c-format +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"Ela irá retornar todas as instancias da classe eg.Cat. " +"Necessariamente não precisamos qualificar o nome da classe, pois é realizado " +"auto-import por padrão. Por isso na maior parte do tempos " +"nós simplesmente escrevemos:" + +#. Tag: programlisting +#: query_hql.xml:49 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"Na maior parte do tempo, você precisará atribuir um alias, desde que você queira se referia ao Cat em " +"outras partes da query." + +#. Tag: programlisting +#: query_hql.xml:57 query_hql.xml:372 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:59 +#, no-c-format +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"Essa query atribui um alias a cat para as instancias de " +"Cat, então nós podemos usar esse alias depois na query. A " +"palavra chave as é opcional; poderíamos escrever assim:" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "" +"Múltiplas classes pode ser envolvidas, resultando em um produto cartesiano " +"ou \"cross\" join." + +#. Tag: programlisting +#: query_hql.xml:71 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:72 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:74 +#, no-c-format +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"É considerada uma boa prática os nomes dos aliases começarem com letra " +"minúscula, aderente com os padrões Java para variáveis locais (ex: " +"domesticCat)." + +#. Tag: title +#: query_hql.xml:83 +#, no-c-format +msgid "Associations and joins" +msgstr "Associações e joins" + +#. Tag: para +#: query_hql.xml:85 +#, no-c-format +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"Nós também podemos querer atribuir aliases em uma entidade associada, ou " +"mesmo em elementos de uma coleção de valores, usando um join." + +#. Tag: programlisting +#: query_hql.xml:90 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:92 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:94 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:96 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "Os tipos de joins suportados foram inspirados no SQL ANSI:" + +#. Tag: literal +#: query_hql.xml:103 +#, no-c-format +msgid "inner join" +msgstr "inner join" + +#. Tag: literal +#: query_hql.xml:108 +#, no-c-format +msgid "left outer join" +msgstr "left outer join" + +#. Tag: literal +#: query_hql.xml:113 +#, no-c-format +msgid "right outer join" +msgstr "right outer join" + +#. Tag: para +#: query_hql.xml:117 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "full join (geralmente não é útil)" + +#. Tag: para +#: query_hql.xml:123 +#, no-c-format +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated. As " +"construções inner join, left outer join e right outer join podem ser abreviadas." + +#. Tag: programlisting +#: query_hql.xml:128 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:130 +#, no-c-format +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "" +"Você pode fornecer condições extras de join usando a palavra chave do HQL " +"with." + +#. Tag: programlisting +#: query_hql.xml:135 +#, no-c-format +msgid "" +" 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:137 +#, no-c-format +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"Adicionalmente, um \"fetch\" join permite que associações ou coleções de " +"valores sejam inicializadas junto com o objeto pai, usando apenas um select. " +"Isso é muito útil no caso das coleções. Isso efetivamente sobre escreve as " +"declarações outer join e lazy do arquivo mapeamento para associações e " +"coleções. Veja a seção para mais " +"informações." + +#. Tag: programlisting +#: query_hql.xml:145 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"Usualmente, um fetchjoin não precisa atribuir um alias, " +"pois o objeto associado não deve ser usado na clausula where (ou em qualquer outra clausula). Também, os objetos associados não " +"são retornados diretamente nos resultados da query. Ao invés disso, eles " +"devem ser acessados usando o objeto pai. A única razão que nós podemos " +"necessitar de um alias é quando fazemos um fech join recursivamente em uma " +"coleção adicional:" + +#. Tag: programlisting +#: query_hql.xml:155 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:157 +#, no-c-format +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"Observe que a construção fetch não deve ser usada em " +"queries invocadas usando iterate() (embora possa ser " +"usado com scroll()). O fetch também " +"não deve ser usado junto com o setMaxResults() ou " +"setFirstResult() pois essas operações são baseadas nas " +"linhas retornadas, que normalmente contem duplicidade devido ao fetching das " +"coleções, então o número de linhas pode não ser o que você espera. O " +"fetch não deve ser usado junto com uma condição " +"with em uma condição with ad hoc. É " +"possível que seja criado um produto cartesiano pelo join fetching em mais do " +"que uma coleção em uma query, então tome cuidado nesses casos. Um join " +"fetching em varias coleções pode trazer resultados inesperados para " +"mapeamentos do tipo bag, tome cuidado na hora de formular queries como " +"essas. Finalmente, observe o seguinte, o full join fetch " +"e right join fetch não são significativos." + +#. Tag: para +#: query_hql.xml:172 +#, no-c-format +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"Se está usando o nível de propriedade lazy (com " +"instrumentação de bytecode), é possível forçar o Hibernate a " +"buscar as propriedades lazy imediatamente (na primeira " +"query), usando fetch all properties ." + +#. Tag: programlisting +#: query_hql.xml:178 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:184 +#, no-c-format +msgid "Forms of join syntax" +msgstr "Formas e sintaxe de joins" + +#. Tag: para +#: query_hql.xml:186 +#, no-c-format +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"O HQL suporta duas formas de associação para união: implícita e explicita." + +#. Tag: para +#: query_hql.xml:190 +#, no-c-format +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"As queries apresentadas na seção anterior usam a forma explicita, onde a palavra chave \"join\" é explicitamente usada na clausula " +"\"from\". Essa é a forma recomendada." + +#. Tag: para +#: query_hql.xml:195 +#, no-c-format +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"A forma implícita não usa a palavra chave \"join\". " +"Entretanto, as associações são diferenciadas usando pontuação (\".\" - " +"dotnation). Uniões implícitas podem aparecer em qualquer das clausulas HQL. " +"A união implícita resulta em declarações SQL que contem " +"inner joins." + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:206 +#, no-c-format +msgid "Refering to identifier property" +msgstr "Refering to identifier property" + +#. Tag: para +#: query_hql.xml:208 +#, no-c-format +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" + +#. Tag: para +#: query_hql.xml:213 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." + +#. Tag: para +#: query_hql.xml:220 +#, no-c-format +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"If the entity defines a named identifier property, you may use that property " +"name." + +#. Tag: para +#: query_hql.xml:226 +#, no-c-format +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." + +#. Tag: para +#: query_hql.xml:233 +#, fuzzy, no-c-format +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, idalways referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." + +#. Tag: title +#: query_hql.xml:242 +#, no-c-format +msgid "The select clause" +msgstr "Clausula select" + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"A clausula select seleciona quais obetos e propriedades " +"retornam no resultado da query. Considere:" + +#. Tag: programlisting +#: query_hql.xml:249 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:251 +#, no-c-format +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"A query selecionará mates (companheiros), de outros " +"Cats. Atualmente, podemos expressar a query de forma mais " +"compacta como:" + +#. Tag: programlisting +#: query_hql.xml:256 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:258 +#, no-c-format +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"Queries podem retornar propriedades de qualquer tipo de valor, incluindo " +"propriedades de tipo de componente:" + +#. Tag: programlisting +#: query_hql.xml:262 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:264 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:266 +#, no-c-format +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"Queries podem retornar múltiplos objetos e/ou propriedades como um array do " +"tipo Object[]," + +#. Tag: programlisting +#: query_hql.xml:271 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:273 +#, no-c-format +msgid "or as a List," +msgstr "ou como um List," + +#. Tag: programlisting +#: query_hql.xml:277 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:279 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "ou como um objeto Java typesafe," + +#. Tag: programlisting +#: query_hql.xml:283 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:285 +#, no-c-format +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "" +"assumindo que a classe Family tenha um construtor " +"apropriado." + +#. Tag: para +#: query_hql.xml:289 +#, no-c-format +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "" +"Pode-se designar referencias a expressões selecionadas, as:" + +#. Tag: programlisting +#: query_hql.xml:293 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:295 +#, no-c-format +msgid "" +"This is most useful when used together with select new map:" +msgstr "" +"Isto é bem mais útil quando usado junto comselect new map:" + +#. Tag: programlisting +#: query_hql.xml:299 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:301 +#, no-c-format +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "" +"Esta query retorna um Map de referencias para valores " +"selecionados." + +#. Tag: title +#: query_hql.xml:308 +#, no-c-format +msgid "Aggregate functions" +msgstr "Funções de agregação" + +#. Tag: para +#: query_hql.xml:310 +#, no-c-format +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "" +"As queries HQL podem retornar o resultado de funções agregadas nas " +"propriedades." + +#. Tag: programlisting +#: query_hql.xml:314 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "As funções agregadas suportadas são:" + +#. Tag: literal +#: query_hql.xml:332 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#. Tag: literal +#: query_hql.xml:337 +#, no-c-format +msgid "count(*)" +msgstr "count(*)" + +#. Tag: literal +#: query_hql.xml:342 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#. Tag: para +#: query_hql.xml:347 +#, no-c-format +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "" +"Pode-se usar operadores aritiméticos, concatenação e funções SQL " +"reconhecidas na clausula select:" + +#. Tag: programlisting +#: query_hql.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:354 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:356 +#, no-c-format +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"As palavras distinct e all podem ser " +"usadas e têm a mesma semântica como no SQL." + +#. Tag: programlisting +#: query_hql.xml:361 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:366 +#, no-c-format +msgid "Polymorphic queries" +msgstr "Queries polimórficas" + +#. Tag: para +#: query_hql.xml:368 +#, no-c-format +msgid "A query like:" +msgstr "A query:" + +#. Tag: para +#: query_hql.xml:374 +#, no-c-format +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"retorna instancias não só de Cat, mas também de " +"subclasses como DomesticCat. As queries do Hibernate " +"podem nomear qualquer classe Java ou interface na clausula from. A query retornará instancias de toda classe persistente que " +"extenda a determinada classe ou implemente a determinada interface. A " +"query , a seguir, pode retornar todo objeto persistente:" + +#. Tag: programlisting +#: query_hql.xml:382 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:384 +#, no-c-format +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "" +"A interface Named pode ser implementada por várias " +"classes persistentes:" + +#. Tag: programlisting +#: query_hql.xml:389 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:391 +#, no-c-format +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"Note que as duas últimas queries requerem mais de um SQL SELECT . Isto " +"significa que a clausula order by não ordena corretamente " +"todo o resultado. (Isso também significa que você não pode chamar essas " +"queries usando Query.scroll().)" + +#. Tag: title +#: query_hql.xml:400 +#, no-c-format +msgid "The where clause" +msgstr "A clausula where" + +#. Tag: para +#: query_hql.xml:402 +#, no-c-format +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"A clausula where permite estreitar a lista de instancias " +"retornada. Se não houver referencia alguma, pode-se referir a propriedades " +"pelo nome:" + +#. Tag: programlisting +#: query_hql.xml:407 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:409 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "Se houver uma referência, use o nome da propriedade qualificada:" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "retorna instancias de Cat com nome ‘Fritz’." + +#. Tag: programlisting +#: query_hql.xml:419 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:421 +#, no-c-format +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"retornará todas as instancias de Foo, para cada um que " +"tiver uma instancia de bar com a propriedade " +"date igual a propriedade startDate de " +"Foo. Expressões de filtro compostas fazem da clausula " +"where, extremamente poderosa. Consideremos:" + +#. Tag: programlisting +#: query_hql.xml:430 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:432 +#, no-c-format +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"Esta query traduzida para uma query SQL com uma tabela " +"(inner) join. Se fosse escrever algo como:" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "" +"Poderia-se terminar com uma query que necessitasse de " +"join de quatro tabelas, no SQL." + +#. Tag: para +#: query_hql.xml:443 +#, no-c-format +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"O operador = pode ser uasdo para comparar não apenas " +"propriedades, mas também instancias:" + +#. Tag: programlisting +#: query_hql.xml:448 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:450 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:452 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"A propriedade especial (lowercase) id pode ser usada para " +"referenciar o identificador único de um objeto. (Pode-se usar também o nome " +"de sua propriedade)" + +#. Tag: programlisting +#: query_hql.xml:458 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:460 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "A Segunda query é eficiente. Nenhuma união de tabelas é necessária!" + +#. Tag: para +#: query_hql.xml:464 +#, no-c-format +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"As propriedades de identificadores compostas também podem ser usadas. " +"Suponha que Person tenha um identificador composto que " +"consiste de country e medicareNumber." + +#. Tag: programlisting +#: query_hql.xml:471 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:473 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:475 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "Mais uma vez, a Segunda query não precisa de nenhum join de tabela." + +#. Tag: para +#: query_hql.xml:479 +#, no-c-format +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"Assim mesmo, a propriedade especial class acessa o valor " +"discriminador da instancia, no caso de persistência polimórfica. O nome de " +"uma classe Java inclusa em uma clausula \"where\", será traduzida para seu " +"valor descriminante." + +#. Tag: programlisting +#: query_hql.xml:485 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:487 +#, no-c-format +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"Pode-se também especificar as propriedades dos components ou tipos de " +"usuário composto (e de componentes de componentes). Nunca tente usar uma " +"expressão de filtro que termine na propriedade de um tipo de componente (ao " +"contrário de uma propriedade de um componente). Por exemplo, se store.owner " +"é uma entidade com um componente address." + +#. Tag: para +#: query_hql.xml:492 +#, no-c-format +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"Um tipo \"any\" tem as propriedades id e class especiais, nôs permitindo expressar um join da seguinte forma (onde " +"AuditLog.item é uma propriedade mapeada com<any>)" + +#. Tag: programlisting +#: query_hql.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:500 +#, no-c-format +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"Veja que log.item.class e payment.class podem referir-se a valores de colunas de banco de dados " +"completamente diferentes, na query acima." + +#. Tag: title +#: query_hql.xml:508 +#, no-c-format +msgid "Expressions" +msgstr "Expressões" + +#. Tag: para +#: query_hql.xml:510 +#, no-c-format +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"As expressões permitidas na cláusula where inclui a " +"maioria das coisas que você poderia escrever no SQL:" + +#. Tag: para +#: query_hql.xml:517 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "operadores matemáticos +, -, *, /" + +#. Tag: para +#: query_hql.xml:522 +#, no-c-format +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "" +"operadores de comparação binários =, >=, <=, <>, !=, " +"like" + +#. Tag: para +#: query_hql.xml:527 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "operadores lógicos and, or, not" + +#. Tag: para +#: query_hql.xml:532 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "parenteses ( ), indicating grouping" + +#. Tag: para +#: query_hql.xml:537 +#, no-c-format +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" + +#. Tag: para +#: query_hql.xml:550 +#, no-c-format +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"case \"simples\" , case ... when ... then ... else ... end, and \"searched\" case, case when ... then ... else ... " +"end" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"concatenação de string ...||... ou concat" +"(...,...)" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#. Tag: para +#: query_hql.xml:567 +#, no-c-format +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"qualquer funcao ou operador definida pela EJB-QL 3.0: substring(), " +"trim(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), " +"mod()" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "coalesce() and nullif()" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "" +"str() para converter valores numericos ou temporais para " +"string" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"cast(... as ...), onde o segundo argumento é o nome do " +"tipo hibernate, eextract(... from ...) se ANSI " +"cast() e extract() é suportado pele " +"banco de dados usado" + +#. Tag: para +#: query_hql.xml:599 +#, no-c-format +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "" +"A função HQL index() , que se aplicam a referencias de " +"coleçôes associadas e indexadas" + +#. Tag: para +#: query_hql.xml:605 +#, no-c-format +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"As funções hql que retornam expressões de coleções de valores: size" +"(), minelement(), maxelement(), minindex(), maxindex(), " +"junto com o elemento especial, elements(), e funções de índice que podem ser quantificadas " +"usando some, all, exists, any, in." + +#. Tag: para +#: query_hql.xml:613 +#, no-c-format +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"Qualquer funçâo escalar pelo bando de dados como sign(), " +"trunc(), rtrim(), sin()" + +#. Tag: para +#: query_hql.xml:619 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "Parametros posicionais ao estilo JDBC ?" + +#. Tag: para +#: query_hql.xml:624 +#, no-c-format +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"Parametros nomeados :name, :start_date, :x1" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"Literais SQL 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" + +#. Tag: para +#: query_hql.xml:635 +#, no-c-format +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"Constantes Java public static finalex: Color." +"TABBY" + +#. Tag: para +#: query_hql.xml:641 +#, no-c-format +msgid "" +"in and between may be used as follows:" +msgstr "" +"in e between podem ser usadas da " +"seguinte maneira:" + +#. Tag: programlisting +#: query_hql.xml:645 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:647 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:649 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "e as formas negativas podem ser escritas" + +#. Tag: programlisting +#: query_hql.xml:653 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:655 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:657 +#, no-c-format +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"Likewise, is null and is not null may " +"be used to test for null values. Assim mesmo, , is null e " +"is not null podem ser usados para testar valores nulos." + +#. Tag: para +#: query_hql.xml:662 +#, no-c-format +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"Booleanos podem ser facilmente usados em expressões, declarando as " +"substituições da HQL query, na configuração do Hibernate" + +#. Tag: programlisting +#: query_hql.xml:667 +#, no-c-format +msgid "" +"true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:669 +#, no-c-format +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"Isso irá substituir as palavras chave true e " +"falsepelos literais 1 e 0 na tradução do HQL para SQL." + +#. Tag: programlisting +#: query_hql.xml:674 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:676 +#, no-c-format +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"Pode-se testar o tamanho de uma coleção com a propriedade " +"especial size, ou a função especial size()." + +#. Tag: programlisting +#: query_hql.xml:681 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:683 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:685 +#, no-c-format +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"Para coleções indexadas, você pode se referir aos índices máximo e mínimo, " +"usando as funções minindex e maxindex. " +"Similarmente, pode-se referir aos elementos máximo e mínimo de uma coleção " +"de tipos básicos usando as funções minelement e " +"maxelement." + +#. Tag: programlisting +#: query_hql.xml:693 +#, no-c-format +msgid "" +" current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:695 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:697 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:699 +#, no-c-format +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"As funções SQL any, some, all, exists, in são suportadas " +"quando passado o elemento ou o conjunto de índices de uma coleção " +"(elements e indices de funções), ou o " +"resultado de uma subquery (veja abaixo)." + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:709 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:711 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:713 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:715 +#, no-c-format +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"Note que essas construções - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement– só podem ser usados na clausula where do " +"Hibernate3." + +#. Tag: para +#: query_hql.xml:722 +#, no-c-format +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"Elementos de coleções com índice (arrays, lists, maps), podem ser " +"referenciadas pelo índice (apenas na clausula where):" + +#. Tag: programlisting +#: query_hql.xml:727 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:735 +#, no-c-format +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "" +"A expressão entre colchetes [], pode ser até uma " +"expressão aritimética." + +#. Tag: programlisting +#: query_hql.xml:739 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:741 +#, no-c-format +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"O HQL também provê a função interna index(), para " +"elementos de associação um-pra-muitos ou coleção de valores." + +#. Tag: programlisting +#: query_hql.xml:746 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:748 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "Funções escalares SQL, suportadas pelo banco de dados subjacente." + +#. Tag: programlisting +#: query_hql.xml:752 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:754 +#, no-c-format +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"Se ainda ainda não está totalmente convencido, pense o quão maior e menos " +"legível poderia ser a query a seguir, em SQL:" + +#. Tag: programlisting +#: query_hql.xml:759 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:761 +#, no-c-format +msgid "Hint: something like" +msgstr "Hint: something like" + +#. Tag: programlisting +#: query_hql.xml:765 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:770 +#, no-c-format +msgid "The order by clause" +msgstr "A clausula order by" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"A lista retornada pela query pode ser ordenada por qualquer propriedade da " +"classe ou componente retornado:" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"As opções asc ou desc indicam ordem " +"crescente ou decrescente, respectivamente." + +#. Tag: title +#: query_hql.xml:785 +#, no-c-format +msgid "The group by clause" +msgstr "A clausula group by" + +#. Tag: para +#: query_hql.xml:787 +#, no-c-format +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"Uma query que retorne valores agregados, podem ser agrupados por qualquer " +"propriedade de uma classe ou componente retornado:" + +#. Tag: programlisting +#: query_hql.xml:791 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:793 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:795 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "Uma clausula having também é permitida." + +#. Tag: programlisting +#: query_hql.xml:799 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:801 +#, no-c-format +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"Funções SQL e funções agregadas são permitidas nas clausulas " +"having e order by, se suportadas pelo " +"banco de dados subjacente (ex: não no MySQL)." + +#. Tag: programlisting +#: query_hql.xml:807 +#, no-c-format +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:809 +#, no-c-format +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"Note que, nem a clausula group by ou order by, podem conter expressões aritiméticas." + +#. Tag: title +#: query_hql.xml:821 +#, no-c-format +msgid "Subqueries" +msgstr "Subqueries" + +#. Tag: para +#: query_hql.xml:823 +#, no-c-format +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"Para bancos de dados que suportem subselects, o Hibernate suporta subqueries " +"dentro de queries. Uma subquery precisa estar entre parênteses (normalmente " +"uma chamada de função agregada SQL). Mesmo subqueries co-relacionadas " +"(subqueries que fazem referência à alias de outras queries), são aceitas." + +#. Tag: programlisting +#: query_hql.xml:829 +#, no-c-format +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:833 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:835 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:837 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:839 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "" +"Note que HQL subqueries podem aparecer apenas dentro de clausulas select ou " +"where." + +#. Tag: para +#: query_hql.xml:843 +#, no-c-format +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." + +#. Tag: title +#: query_hql.xml:851 +#, no-c-format +msgid "HQL examples" +msgstr "Exemplos de HQL" + +#. Tag: para +#: query_hql.xml:853 +#, no-c-format +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"As queries do Hibernate, podem ser muito poderosas e complexas. De fato, o " +"poder da linguagem de querie é um dos pontos principais na distribuição do " +"Hibernate. Aqui temos algumas queries de exemplo, muito similares a queries " +"que usei em um projeto recente. Note que a maioria das queries que você irá " +"escrever, são mais simples que estas." + +#. Tag: para +#: query_hql.xml:859 +#, no-c-format +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"A query a seguir retorna o id de order, numero de itens e o valor total do " +"order para todos os orders não pagos para um freguês particular e valor " +"total mínimo dado, ordenando os resultados por valor total. Ao determinar os " +"preços, é usado o catalogo corrente. A query SQL resultante, usando tabelas " +"ORDER, ORDER_LINE, PRODUCT, CATALOG e PRICE, tem quatro " +"inner joins e um (não correlacionado) subselect." + +#. Tag: programlisting +#: query_hql.xml:868 +#, no-c-format +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:870 +#, no-c-format +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"Que monstro! Atualmente, na vida real, eu não sou muito afeiçoado a " +"subqueries, então minha query seria mais parecida com isto:" + +#. Tag: programlisting +#: query_hql.xml:875 +#, no-c-format +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"A próxima query conta o número de pagamentos em cada status, tirando todos " +"os pagamentos com status AWAITING_APPROVAL, onde a mais " +"recente mudança de status foi feita pelo usuário corrente. Traduz-se para " +"uma query SQL com dois inner joins e um subselect " +"correlacionado, nas tabelas PAYMENT, " +"PAYMENT_STATUS e PAYMENT_STATUS_CHANGE ." + +#. Tag: programlisting +#: query_hql.xml:885 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:887 +#, no-c-format +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"Se eu tivesse mapeado a Collection statusChanges como um " +"List, ao invés de um Set, a query teria sido muito mais simples de escrever." + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"A próxima query usa a função isNull() do MS SQL Server, " +"para retornar todas as contas e pagamentos não pagos para a organização, " +"para cada usuário corrente pertencente. Traduz-se para uma query SQL " +"com três inner joins, um outer join e um subselect nas " +"tabelas ACCOUNT, PAYMENT, " +"PAYMENT_STATUS,ACCOUNT_TYPE, " +"ORGANIZATION e ORG_USER ." + +#. Tag: programlisting +#: query_hql.xml:903 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:905 +#, no-c-format +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "" +"Para alguns bancos de dados, precisaremos eleminar o subselect " +"(correlacionado)." + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:914 +#, no-c-format +msgid "Bulk update and delete" +msgstr "update e delete em lote" + +#. Tag: para +#: query_hql.xml:916 +#, no-c-format +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"Agora o HQL suporta declarações, update, delete e insert ... select ... Veja , para mais detalhes." + +#. Tag: title +#: query_hql.xml:924 +#, no-c-format +msgid "Tips & Tricks" +msgstr "Dicas e Truques" + +#. Tag: para +#: query_hql.xml:926 +#, no-c-format +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "" +"Pode-se contar o número de resultados da query, sem realmente retorna-los." + +#. Tag: programlisting +#: query_hql.xml:930 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:932 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "" +"Para ordenar um resultado pelo tamanho de uma Collection, use a query a " +"seguir." + +#. Tag: programlisting +#: query_hql.xml:936 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:938 +#, no-c-format +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"Se seu banco de dados suporta subselects, pode-se colocar uma condição sobre " +"tamanho de seleção na cláusula where da sua query:" + +#. Tag: programlisting +#: query_hql.xml:943 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:945 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "Se seu banco de dados não suporta subselects, use a query a seguir:" + +#. Tag: programlisting +#: query_hql.xml:949 +#, no-c-format +msgid "" +"= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:951 +#, no-c-format +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"Com essa solução não se pode retornar um Usercom sem nenhuma menssagem, por causa do \"inner " +"join\", a forma a seguir também é útil." + +#. Tag: programlisting +#: query_hql.xml:956 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:958 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "" +"As propriedades de um JavaBean podem ser limitadas à parâmetros nomeados da " +"query:" + +#. Tag: programlisting +#: query_hql.xml:962 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:964 +#, no-c-format +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"As Collections são paginaveis, usando a interface Querycom um filtro:" + +#. Tag: programlisting +#: query_hql.xml:968 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:970 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"Os elementos da Collection podem ser ordenados ou agrupados usando um filtro " +"de query:" + +#. Tag: programlisting +#: query_hql.xml:974 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:976 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "Pode-se achar o tamanho de uma Collection sem inicializa-la:" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:985 +#, no-c-format +msgid "Components" +msgstr "translator-credits" + +#. Tag: para +#: query_hql.xml:987 +#, no-c-format +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:992 query_hql.xml:1038 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:993 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:995 +#, no-c-format +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1000 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1001 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1003 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1007 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1008 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1010 +#, no-c-format +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1016 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:1018 +#, no-c-format +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" + +#. Tag: para +#: query_hql.xml:1040 +#, no-c-format +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1045 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1047 +#, no-c-format +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/query_sql.po b/documentation/envers/src/main/docbook/pt-BR/content/query_sql.po new file mode 100644 index 0000000000..ec64d826b4 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/query_sql.po @@ -0,0 +1,1485 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:5 +#, no-c-format +msgid "Native SQL" +msgstr "Native SQL" + +#. Tag: para +#: query_sql.xml:7 +#, no-c-format +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." + +#. Tag: para +#: query_sql.xml:13 +#, no-c-format +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." + +#. Tag: title +#: query_sql.xml:17 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "Using a SQLQuery" + +#. Tag: para +#: query_sql.xml:19 +#, no-c-format +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." + +#. Tag: title +#: query_sql.xml:25 +#, no-c-format +msgid "Scalar queries" +msgstr "Scalar queries" + +#. Tag: para +#: query_sql.xml:27 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "The most basic SQL query is to get a list of scalars (values)." + +#. Tag: programlisting +#: query_sql.xml:30 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:32 +#, no-c-format +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." + +#. Tag: programlisting +#: query_sql.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:43 query_sql.xml:89 query_sql.xml:170 query_sql.xml:321 +#, no-c-format +msgid "This query specified:" +msgstr "This query specified:" + +#. Tag: para +#: query_sql.xml:47 query_sql.xml:93 query_sql.xml:325 +#, no-c-format +msgid "the SQL query string" +msgstr "the SQL query string" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "the columns and types to return" +msgstr "the columns and types to return" + +#. Tag: para +#: query_sql.xml:55 +#, no-c-format +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." + +#. Tag: para +#: query_sql.xml:63 +#, no-c-format +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "" +"It is possible to leave out the type information for all or some of the " +"scalars." + +#. Tag: programlisting +#: query_sql.xml:66 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:68 +#, no-c-format +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." + +#. Tag: para +#: query_sql.xml:72 +#, no-c-format +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." + +#. Tag: title +#: query_sql.xml:80 +#, no-c-format +msgid "Entity queries" +msgstr "Entity queries" + +#. Tag: para +#: query_sql.xml:82 +#, no-c-format +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." + +#. Tag: programlisting +#: query_sql.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:97 +#, no-c-format +msgid "the entity returned by the query" +msgstr "the entity returned by the query" + +#. Tag: para +#: query_sql.xml:101 +#, no-c-format +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." + +#. Tag: para +#: query_sql.xml:105 +#, no-c-format +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" + +#. Tag: programlisting +#: query_sql.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:115 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "This will allow cat.getDog() to function properly." + +#. Tag: title +#: query_sql.xml:119 +#, no-c-format +msgid "Handling associations and collections" +msgstr "Handling associations and collections" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." + +#. Tag: programlisting +#: query_sql.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:128 +#, no-c-format +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." + +#. Tag: programlisting +#: query_sql.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:138 +#, no-c-format +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." + +#. Tag: title +#: query_sql.xml:146 +#, no-c-format +msgid "Returning multiple entities" +msgstr "Returning multiple entities" + +#. Tag: para +#: query_sql.xml:148 +#, no-c-format +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." + +#. Tag: para +#: query_sql.xml:153 +#, no-c-format +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" + +#. Tag: programlisting +#: query_sql.xml:156 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:158 +#, no-c-format +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." + +#. Tag: para +#: query_sql.xml:165 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "The following form is not vulnerable to column name duplication:" + +#. Tag: programlisting +#: query_sql.xml:168 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:174 +#, no-c-format +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" + +#. Tag: para +#: query_sql.xml:179 +#, no-c-format +msgid "the entities returned by the query" +msgstr "the entities returned by the query" + +#. Tag: para +#: query_sql.xml:183 +#, no-c-format +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." +msgstr "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:195 +#, no-c-format +msgid "Alias and property references" +msgstr "Alias and property references" + +#. Tag: para +#: query_sql.xml:197 +#, no-c-format +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." + +#. Tag: para +#: query_sql.xml:202 +#, no-c-format +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." + +#. Tag: title +#: query_sql.xml:208 +#, no-c-format +msgid "Alias injection names" +msgstr "Alias injection names" + +#. Tag: entry +#: query_sql.xml:219 +#, no-c-format +msgid "Description" +msgstr "Description" + +#. Tag: entry +#: query_sql.xml:221 +#, no-c-format +msgid "Syntax" +msgstr "Syntax" + +#. Tag: entry +#: query_sql.xml:223 +#, no-c-format +msgid "Example" +msgstr "Example" + +#. Tag: entry +#: query_sql.xml:229 +#, no-c-format +msgid "A simple property" +msgstr "A simple property" + +#. Tag: literal +#: query_sql.xml:231 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]" + +#. Tag: literal +#: query_sql.xml:233 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#. Tag: entry +#: query_sql.xml:237 +#, no-c-format +msgid "A composite property" +msgstr "A composite property" + +#. Tag: literal +#: query_sql.xml:239 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:241 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#. Tag: entry +#: query_sql.xml:246 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "Discriminator of an entity" + +#. Tag: literal +#: query_sql.xml:248 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#. Tag: literal +#: query_sql.xml:250 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#. Tag: entry +#: query_sql.xml:254 +#, no-c-format +msgid "All properties of an entity" +msgstr "All properties of an entity" + +#. Tag: literal +#: query_sql.xml:256 query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#. Tag: literal +#: query_sql.xml:258 +#, no-c-format +msgid "{item.*}" +msgstr "{item.*}" + +#. Tag: entry +#: query_sql.xml:262 +#, no-c-format +msgid "A collection key" +msgstr "A collection key" + +#. Tag: literal +#: query_sql.xml:264 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#. Tag: literal +#: query_sql.xml:266 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "The id of an collection" +msgstr "The id of an collection" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "The element of an collection" +msgstr "The element of an collection" + +#. Tag: literal +#: query_sql.xml:280 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "roperty of the element in the collection" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "All properties of the element in the collection" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "All properties of the the collection" +msgstr "All properties of the the collection" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "{coll.*}" +msgstr "{coll.*}" + +#. Tag: title +#: query_sql.xml:315 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "Returning non-managed entities" + +#. Tag: para +#: query_sql.xml:317 +#, no-c-format +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." + +#. Tag: programlisting +#: query_sql.xml:319 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:329 +#, no-c-format +msgid "a result transformer" +msgstr "a result transformer" + +#. Tag: para +#: query_sql.xml:333 +#, no-c-format +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." + +#. Tag: title +#: query_sql.xml:340 +#, no-c-format +msgid "Handling inheritance" +msgstr "Handling inheritance" + +#. Tag: para +#: query_sql.xml:342 +#, no-c-format +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." + +#. Tag: title +#: query_sql.xml:348 +#, no-c-format +msgid "Parameters" +msgstr "Parameters" + +#. Tag: para +#: query_sql.xml:350 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "Native sql queries support positional as well as named parameters:" + +#. Tag: programlisting +#: query_sql.xml:353 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:361 +#, no-c-format +msgid "Named SQL queries" +msgstr "Named SQL queries" + +#. Tag: para +#: query_sql.xml:363 +#, no-c-format +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." + +#. Tag: programlisting +#: query_sql.xml:368 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:370 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:372 +#, no-c-format +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:379 +#, no-c-format +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" + +#. Tag: programlisting +#: query_sql.xml:383 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:385 +#, no-c-format +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." + +#. Tag: programlisting +#: query_sql.xml:390 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:392 +#, no-c-format +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." + +#. Tag: programlisting +#: query_sql.xml:395 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:398 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "Using return-property to explicitly specify column/alias names" + +#. Tag: para +#: query_sql.xml:401 +#, no-c-format +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." + +#. Tag: programlisting +#: query_sql.xml:406 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:408 +#, no-c-format +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." + +#. Tag: programlisting +#: query_sql.xml:413 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:415 +#, no-c-format +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." + +#. Tag: para +#: query_sql.xml:420 +#, no-c-format +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." + +#. Tag: title +#: query_sql.xml:426 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "Using stored procedures for querying" + +#. Tag: para +#: query_sql.xml:428 +#, no-c-format +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" + +#. Tag: programlisting +#: query_sql.xml:434 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:436 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "To use this query in Hibernate you need to map it via a named query." + +#. Tag: programlisting +#: query_sql.xml:439 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:441 +#, no-c-format +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." + +#. Tag: title +#: query_sql.xml:446 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "Rules/limitations for using stored procedures" + +#. Tag: para +#: query_sql.xml:448 +#, no-c-format +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." + +#. Tag: para +#: query_sql.xml:455 +#, no-c-format +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." + +#. Tag: para +#: query_sql.xml:458 +#, no-c-format +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." + +#. Tag: para +#: query_sql.xml:463 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "For Oracle the following rules apply:" + +#. Tag: para +#: query_sql.xml:467 +#, no-c-format +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"A funçãp deve retornar um result set. O primeiro parâmetro da procedure " +"dever ser uma SAÍDA que retorne um result set. Isto é " +"feito usando o tipo a SYS_REFCURSOR no Oracle 9 ou 10. No " +"Oracle é necessário definir o tipo REF CURSOR, veja a " +"documentação do Oracle." + +#. Tag: para +#: query_sql.xml:476 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "For Sybase or MS SQL server the following rules apply:" + +#. Tag: para +#: query_sql.xml:480 +#, no-c-format +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"A procedure deve retornar um result set. Veja que este servidor pode " +"retornar múltiplos result sets e update counts. O Hibernate ira iterar os " +"resultados e pegar o primeiro resultado que é o valor de retorno do result " +"set. O resto será descartado." + +#. Tag: para +#: query_sql.xml:488 +#, no-c-format +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"Se você habilitar SET NOCOUNT ON na sua procedure, ela " +"provavelmente será mais eficiente. Mas, isto não é obrigatório" + +#. Tag: title +#: query_sql.xml:498 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "SQL customizado para create, update e delete" + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings: Hibernate3 pode usar SQL customizado para " +"operações de create, update e delete. A persistência de classe e collection " +"no hibernate já contem alguma strings de configurações (insertsql, " +"deletesql, updatesql etc.). O mapaemento das tags <sql-insert>" +", <sql-delete>, e <sql-" +"update> sobreecreve essas strings:" + +#. Tag: programlisting +#: query_sql.xml:508 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:510 +#, no-c-format +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"O SQL é executado diretamente no seu banco de dados, então você pode usar " +"qualquer linguagem que quiser. Isto com certeza reduzira a portabilidade do " +"seu mapeamento se você utilizar um SQL para um banco de dados especifico." + +#. Tag: para +#: query_sql.xml:514 +#, no-c-format +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "" +"Stored Procedures são suportadas se o atributo the callable estiver ativado:" + +#. Tag: programlisting +#: query_sql.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:519 +#, no-c-format +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "" +"A ordem de posições dos parâmetros são vitais, pois eles devem estar na " +"mesma seqüência esperada pelo Hibernate." + +#. Tag: para +#: query_sql.xml:522 +#, no-c-format +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"Você pode ver a ordem esperada ativando o debug logging no nível " +"org.hibernate.persister.entity. Com este nível ativado, o " +"Hibernate irá imprimir o SQL estático que foi usado para create, update, " +"delete, etc. Entidades. (Para ver a seqüência esperada, lembre-se de não " +"incluir seu SQL customizado no arquivo de mapeamento, pois ele irá " +"sobreecreve o SQL estático gerado pelo Hibernate)." + +#. Tag: para +#: query_sql.xml:529 +#, no-c-format +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"As stored procedures são na maioria dos casos (leia: melhor não fazer) " +"requeridas para retornar o numero de linhas inseridas/atualizadas/deletadas. " +"O hibernate tem algumas verificações em tempo de execução para o sucesso da " +"declaração. Hibernate sempre registra o primeiro parâmetro da declaração " +"como uma saída numérica para operações CRUD." + +#. Tag: programlisting +#: query_sql.xml:535 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:539 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "SQL customizado para carga" + +#. Tag: para +#: query_sql.xml:541 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "" +"Você pode declarar sua própria query SQL (ou HQL) para iniciar entidades:" + +#. Tag: programlisting +#: query_sql.xml:544 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "" +"Este é apenas uma declaração de query com nome, como discutido " +"anteriormente. Você pode referenciar esta query com nome em um mapeamento de " +"classe:" + +#. Tag: programlisting +#: query_sql.xml:549 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:551 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "Isto também funciona com stored procedures." + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "Você pode tembém definir uma query para iniciar collection:" + +#. Tag: programlisting +#: query_sql.xml:555 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:557 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:559 +#, no-c-format +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "" +"You could even define an entity loader that loads a collection by join " +"fetching:" + +#. Tag: programlisting +#: query_sql.xml:562 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/quickstart.po b/documentation/envers/src/main/docbook/pt-BR/content/quickstart.po new file mode 100644 index 0000000000..cd14d33057 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/quickstart.po @@ -0,0 +1,12 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/pt-BR/content/session_api.po b/documentation/envers/src/main/docbook/pt-BR/content/session_api.po new file mode 100644 index 0000000000..f40b2b6835 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/session_api.po @@ -0,0 +1,2231 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:5 +#, no-c-format +msgid "Working with objects" +msgstr "Trabalhando com objetos" + +#. Tag: para +#: session_api.xml:7 +#, no-c-format +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"O Hibernate é uma solução completa de mapeamento objeto/relacional que não " +"apenas poupa o desenvolvedor dos detalhes de baixo nível do sistema de " +"gerenciamento do banco de dados, mas também oferece um " +"gerenciamento de estado para objetos. Isto é, ao " +"contrário do gerenciamento de instruções SQL em camadas " +"de persistência JDBC/SQL comuns, uma visão natural da persistência orientada " +"a objetos em aplicações Java." + +#. Tag: para +#: session_api.xml:16 +#, no-c-format +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"Em outras palavras, desenvolvedores de aplicações Hibernate podem sempre " +"pensar em relação ao estado de seus objetos, e não " +"necessariamente em relação a execução de instruções SQL. Este parte é " +"responsabilidade do Hibernate e é relevante aos desenvolvedores de " +"aplicações apenas quando estão ajustando a performance do sistema." + +#. Tag: title +#: session_api.xml:24 +#, no-c-format +msgid "Hibernate object states" +msgstr "Estado dos objetos no Hibernate" + +#. Tag: para +#: session_api.xml:26 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "O Hibernate define e suporta os seguintes estados de um objetos:" + +#. Tag: para +#: session_api.xml:32 +#, no-c-format +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +"Transient - um objeto é transiente se ele foi " +"instanciando usando apenas o operador new, e não foi " +"associado com uma Session do Hibernate. Ele não terá uma " +"representação persistente no banco de dados e nenhum identificador será " +"atribuído para ele. Instâncias transientes serão destruídas pelo coletor de " +"lixo se a aplicação não manter sua referência. Use uma Session do Hibernate para tornar o objeto persistente ( e deixe o Hibernate " +"gerenciar as instruções SQL que serão necessárias para executar esta " +"transição)." + +#. Tag: para +#: session_api.xml:44 +#, no-c-format +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"Persistent -– uma instância persistente possui uma " +"representação no banco de dados e um identificador. Ele pode ter sido salvo " +"ou carregado, assim, ele está por definição no escopo de uma " +"Session. O Hibernate irá detectar qualquer mudança feita " +"a um objeto persistente e sincronizar o seu estado com o banco de dados " +"quando completar a unidade de trabalho. Desenvolvedores não executam " +"instruções manuais de UPDATE, ou instruções de " +"DELETE quando o objeto deve ser passado para transiente." + +#. Tag: para +#: session_api.xml:55 +#, no-c-format +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"Detached – uma instância desaclopada é um objeto que " +"foi persistido, mas sua Session foi fechada. A referência " +"ao objeto continua válida, é claro, e a instância destacada desaclopada pode " +"ser acoplada a uma nova Session no futuro, fazendo-o ( e " +"todas as modificações sofridas) persistente novamente. Essa característica " +"possibilita um modelo de programação para unidades de trabalho que rodam " +"durante muito tempo que requer um pensamento por tempo do usuário. Podemos " +"chamar-las de transações da aplicação, i.e. uma unidade " +"de trabalho do ponto de vista do usuário." + +#. Tag: para +#: session_api.xml:69 +#, no-c-format +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"Agora iremos discutir os estados e suas transições ( e os métodos do " +"Hibernate que disparam uma transição) em mais detalhes." + +#. Tag: title +#: session_api.xml:77 +#, no-c-format +msgid "Making objects persistent" +msgstr "Tornando os objetos persistentes" + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"Instâncias recentemente instanciadas de uma classe persistente são " +"consideradas transientes pelo Hibernate. Podemos " +"tornar uma instância transiente em persistente " +"associando-a a uma sessão:" + +#. Tag: programlisting +#: session_api.xml:86 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:88 +#, no-c-format +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"Se Cat possui um identificador gerado, o identificador é " +"gerado e atribuído a cat quando save() " +"for chamada. Se Cat possuir um identificador " +"Associado, ou uma chave composta, o identificador deve " +"ser atribuído à instância de cat antes que save()" +" seja chamado. Pode-se usar também persist() ao " +"invés de save(), com a semântica definada no novo esboço " +"do EJB3." + +#. Tag: para +#: session_api.xml:100 +#, no-c-format +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." + +#. Tag: para +#: session_api.xml:111 +#, no-c-format +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#. Tag: para +#: session_api.xml:121 +#, no-c-format +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "" +"Alternativamente, pode-se atribuir o identificador usando uma versão " +"sobrecarregada de save()." + +#. Tag: programlisting +#: session_api.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:128 +#, no-c-format +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"Se o objeto persistido possuir objetos associados (e.g. a coleção " +"kittens no exemplo anterior), esses objetos podem ser " +"tornar persistente em qualquer ordem que se queira ao menos que se tenha uma " +"restrição NOT NULL em uma coluna de chave estrangeira. " +"Nunca há risco de violação de restrições de chave estrangeira. Assim, pode-" +"se violar uma restrição NOT NULL se save() for usada nos objetos em uma ordem errada." + +#. Tag: para +#: session_api.xml:138 +#, no-c-format +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"Geralmente você não deve se importar com esses detalhes, muito provavelmente " +"se usará a característica de persistência transitiva " +"do Hibernate para salvar os objetos associados automaticamente. Então, " +"enquanto uma restrição NOT NULL não ocorrer – Hibernate " +"tomará conta de tudo. Persistência transitiva será discutida futuramente " +"nesse capítulo." + +#. Tag: title +#: session_api.xml:149 +#, no-c-format +msgid "Loading an object" +msgstr "Carregando o objetos" + +#. Tag: para +#: session_api.xml:151 +#, no-c-format +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"O método load() de uma Session nos " +"fornece um meio para recuperar uma instância persistente se o identificador " +"for conhecido. load() recebe uma classe do objeto e " +"carregará o estado em uma instância mais recente dessa classe, no estado " +"persistente." + +#. Tag: programlisting +#: session_api.xml:158 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:160 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "" +"Alternatively, you can load state into a given instance: Alternativamente, " +"pode-se carregar um estado em uma instância dada:" + +#. Tag: programlisting +#: session_api.xml:166 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:168 +#, no-c-format +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"Repare que load() irá lançar uma exceção irrecuperável se " +"não houver na tabela no banco de dados um registro que combine. Se a classe " +"for mapeada com um proxy, load() simplesmente retorna um " +"proxy não inicializado e realmente não chamará o banco de dados até que um " +"método do proxy seja invocado. Esse comportamento é muito útil se deseja-se " +"criar uma associação com um objeto sem que realmente o carregue do bando de " +"dados. Isto também permite que sejam carregadas múltiplas instâncias como um " +"grupo se batch-size estiver para o mapeamento da classe." + +#. Tag: para +#: session_api.xml:179 +#, no-c-format +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"Se você não tiver certeza da existencia do registro no banco, você deve usar " +"o metodo get(), que consulta o banco imediantamente e " +"retorna um null se não existir o registro." + +#. Tag: programlisting +#: session_api.xml:185 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:187 +#, no-c-format +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"Também pode-se carregar um objeto usando SELECT ... FOR UPDATE, usando um LockMode. Veja a documentação da API " +"para maiores informações." + +#. Tag: programlisting +#: session_api.xml:192 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:194 +#, no-c-format +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." + +#. Tag: para +#: session_api.xml:201 +#, no-c-format +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"O recarregamento de um objeto e todas as suas coleções é possível a qualquer " +"momento, usando o método refresh(). Util quando as " +"triggers do banco de dados são usados para inicializar algumas propriedades " +"do objeto." + +#. Tag: programlisting +#: session_api.xml:207 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:209 +#, no-c-format +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"Uma importante questão geralmente aparece neste ponto: O quanto Hibernate " +"carrega do banco de dados e quantos SQL SELECT ele irá " +"usar? Isto depende da estratégia de recuperaçãousada e " +"explicada na ." + +#. Tag: title +#: session_api.xml:219 +#, no-c-format +msgid "Querying" +msgstr "Consultando" + +#. Tag: para +#: session_api.xml:221 +#, no-c-format +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"Se o identificador do objeto que se está buscando não for conhecido, uma " +"consulta será necessária. O Hibernate suporta uma linguagem de consulta " +"(HQL) orientada a objetos fácil mas poderosa. Para criação via programação " +"de consultas, o Hibernate suporta características sofisticadas de consulta " +"por Critério e Exemplo (QBCe QBE). Pode-se também expressar a consulta por " +"meio de SQL nativa do banco de dados, com suporte opcional do Hibernate para " +"conversão do conjunto de reultados em objetos." + +#. Tag: title +#: session_api.xml:231 +#, no-c-format +msgid "Executing queries" +msgstr "Executando consultas" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"Consultas HQL e SQL nativa são representadas por uma instância de " +"org.hibernate.Query. Esta interface oferece métodos para " +"associação de parâmetros, tratamento de conjunto de resultados, e para a " +"execução de consultas reais. Você pode obter uma Query " +"usando a Session atual:" + +#. Tag: programlisting +#: session_api.xml:240 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:242 +#, no-c-format +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"Geralmente uma consulta é executada ao invocar list(), o " +"resultado da consulta será carregado completamente em uma coleção na " +"memória. Instâncias de entidades recuperadas por uma consulta estão no " +"estado persistente. O uniqueResult() oferece um atalho se " +"você souber de previamente que a consulta retornará apenas um único objeto. " +"Repare que consultas que fazem uso de buscas de coleções de forma ansiosa " +"(eager) geralmente retornam duplicatas dos objetos raiz ( mas com suas " +"coleções inicializadas ). Pode-se filtrar estas duplicatas através de um " +"simples Set." + +#. Tag: title +#: session_api.xml:254 +#, no-c-format +msgid "Iterating results" +msgstr "Interagindo com resultados" + +#. Tag: para +#: session_api.xml:256 +#, no-c-format +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"Ocasionalmente, deves-se ser capaz de atingir performances melhores com a " +"execução de consultas usando o método iterate(). " +"Geralmente isso será o caso esperado apenas se as instâncias dos entidades " +"reais retornadas pela consulta já estiverem na sessão ou no caché de segundo " +"nível. Caso elas ainda não tenham sido armazenadas, iterate() será mais devagar do que list() e pode ser " +"necessário vários acessos ao banco de dados para um simples consulta, " +"geralmente 1 para a seleção inicial que retorna apenas " +"identificadores, e n consultas adicionais para " +"inicializar as instâncias reais." + +#. Tag: programlisting +#: session_api.xml:268 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:272 +#, no-c-format +msgid "Queries that return tuples" +msgstr "Consultas que retornam tuplas" + +#. Tag: para +#: session_api.xml:274 +#, no-c-format +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"Algumas vezes as consultas do Hibernate retornam tuplas de objetos, nesse " +"caso cada tupla é retornada como um array:" + +#. Tag: programlisting +#: session_api.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:284 +#, no-c-format +msgid "Scalar results" +msgstr "Resultados escalares" + +#. Tag: para +#: session_api.xml:286 +#, no-c-format +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"Consultas devem especificar uma propriedade da classe na clausula " +"select. Elas também podem chamar funções SQL de " +"agregaçãos. Propriedades ou agregações são considerados resultados agregados " +"( e não entidades no estado persistente)." + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:297 +#, no-c-format +msgid "Bind parameters" +msgstr "Bind parameters" + +#. Tag: para +#: session_api.xml:299 +#, no-c-format +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" + +#. Tag: para +#: session_api.xml:309 +#, no-c-format +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "" +"named parameters are insensitive to the order they occur in the query string" + +#. Tag: para +#: session_api.xml:315 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "they may occur multiple times in the same query" + +#. Tag: para +#: session_api.xml:320 +#, no-c-format +msgid "they are self-documenting" +msgstr "they are self-documenting" + +#. Tag: programlisting +#: session_api.xml:326 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:328 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:330 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:335 +#, no-c-format +msgid "Pagination" +msgstr "Pagination" + +#. Tag: para +#: session_api.xml:337 +#, no-c-format +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" + +#. Tag: programlisting +#: session_api.xml:343 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:345 +#, no-c-format +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." + +#. Tag: title +#: session_api.xml:353 +#, no-c-format +msgid "Scrollable iteration" +msgstr "Scrollable iteration" + +#. Tag: para +#: session_api.xml:355 +#, no-c-format +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." + +#. Tag: programlisting +#: session_api.xml:362 +#, no-c-format +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:364 +#, no-c-format +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." + +#. Tag: title +#: session_api.xml:373 +#, no-c-format +msgid "Externalizing named queries" +msgstr "Externalizing named queries" + +#. Tag: para +#: session_api.xml:375 +#, no-c-format +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" + +#. Tag: programlisting +#: session_api.xml:381 +#, no-c-format +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:383 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "Parameter binding and executing is done programatically:" + +#. Tag: programlisting +#: session_api.xml:387 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:389 +#, no-c-format +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." + +#. Tag: para +#: session_api.xml:395 +#, no-c-format +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." + +#. Tag: title +#: session_api.xml:408 +#, no-c-format +msgid "Filtering collections" +msgstr "Filtering collections" + +#. Tag: para +#: session_api.xml:409 +#, no-c-format +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." + +#. Tag: programlisting +#: session_api.xml:415 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:417 +#, no-c-format +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." + +#. Tag: para +#: session_api.xml:423 +#, no-c-format +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." + +#. Tag: programlisting +#: session_api.xml:428 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:430 +#, no-c-format +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" + +#. Tag: programlisting +#: session_api.xml:435 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:440 +#, no-c-format +msgid "Criteria queries" +msgstr "Criteria queries" + +#. Tag: para +#: session_api.xml:442 +#, no-c-format +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" + +#. Tag: programlisting +#: session_api.xml:448 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:450 +#, no-c-format +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"The Criteria and the associated Example API are discussed in more detail in ." + +#. Tag: title +#: session_api.xml:458 +#, no-c-format +msgid "Queries in native SQL" +msgstr "Queries in native SQL" + +#. Tag: para +#: session_api.xml:460 +#, no-c-format +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" + +#. Tag: programlisting +#: session_api.xml:468 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:470 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:472 +#, no-c-format +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." + +#. Tag: title +#: session_api.xml:483 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "Modifying persistent objects" + +#. Tag: para +#: session_api.xml:485 +#, no-c-format +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" + +#. Tag: programlisting +#: session_api.xml:496 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:498 +#, no-c-format +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." + +#. Tag: emphasis +#: session_api.xml:506 +#, fuzzy, no-c-format +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"Note that Hibernate does not offer its own API for direct execution of " +" or statements. Hibernate is a service, you don't have to think in to use it. JDBC is " +"a perfect API for executing SQL statements, you can get a JDBC at any time by calling . Furthermore, the notion of mass " +"operations conflicts with object/relational mapping for online transaction " +"processing-oriented applications. Future versions of Hibernate may however " +"provide special mass operation functions. See for " +"some possible batch operation tricks." + +#. Tag: title +#: session_api.xml:521 +#, no-c-format +msgid "Modifying detached objects" +msgstr "Modifying detached objects" + +#. Tag: para +#: session_api.xml:523 +#, no-c-format +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." + +#. Tag: para +#: session_api.xml:530 +#, no-c-format +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" + +#. Tag: programlisting +#: session_api.xml:536 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:538 +#, no-c-format +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." + +#. Tag: para +#: session_api.xml:544 +#, no-c-format +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." + +#. Tag: para +#: session_api.xml:553 +#, no-c-format +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." + +#. Tag: para +#: session_api.xml:560 +#, no-c-format +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" + +#. Tag: programlisting +#: session_api.xml:565 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:567 +#, no-c-format +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." + +#. Tag: para +#: session_api.xml:574 +#, no-c-format +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"Other models for long units of work are discussed in ." + +#. Tag: title +#: session_api.xml:581 +#, no-c-format +msgid "Automatic state detection" +msgstr "Automatic state detection" + +#. Tag: para +#: session_api.xml:583 +#, no-c-format +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." + +#. Tag: programlisting +#: session_api.xml:590 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:592 +#, no-c-format +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." + +#. Tag: para +#: session_api.xml:600 +#, no-c-format +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "the application loads an object in the first session" + +#. Tag: para +#: session_api.xml:612 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "the object is passed up to the UI tier" + +#. Tag: para +#: session_api.xml:617 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "some modifications are made to the object" + +#. Tag: para +#: session_api.xml:622 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "the object is passed back down to the business logic tier" + +#. Tag: para +#: session_api.xml:627 +#, no-c-format +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "" +"the application persists these modifications by calling update() in a second session" + +#. Tag: para +#: session_api.xml:634 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate() does the following:" + +#. Tag: para +#: session_api.xml:640 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "if the object is already persistent in this session, do nothing" + +#. Tag: para +#: session_api.xml:645 +#, no-c-format +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"if another object associated with the session has the same identifier, throw " +"an exception" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "if the object has no identifier property, save() it" + +#. Tag: para +#: session_api.xml:656 +#, no-c-format +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" + +#. Tag: para +#: session_api.xml:662 +#, no-c-format +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" + +#. Tag: para +#: session_api.xml:670 +#, no-c-format +msgid "otherwise update() the object" +msgstr "otherwise update() the object" + +#. Tag: para +#: session_api.xml:676 +#, no-c-format +msgid "and merge() is very different:" +msgstr "and merge() is very different:" + +#. Tag: para +#: session_api.xml:682 +#, no-c-format +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" + +#. Tag: para +#: session_api.xml:689 +#, no-c-format +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" + +#. Tag: para +#: session_api.xml:695 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "the persistent instance is returned" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "" +"the given instance does not become associated with the session, it remains " +"detached" + +#. Tag: title +#: session_api.xml:710 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "Deleting persistent objects" + +#. Tag: para +#: session_api.xml:712 +#, no-c-format +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." + +#. Tag: programlisting +#: session_api.xml:719 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:721 +#, no-c-format +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." + +#. Tag: title +#: session_api.xml:732 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "Replicating object between two different datastores" + +#. Tag: para +#: session_api.xml:734 +#, no-c-format +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." + +#. Tag: programlisting +#: session_api.xml:740 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:742 +#, no-c-format +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." + +#. Tag: para +#: session_api.xml:749 +#, no-c-format +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" + +#. Tag: para +#: session_api.xml:755 +#, no-c-format +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" + +#. Tag: para +#: session_api.xml:761 +#, no-c-format +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" + +#. Tag: para +#: session_api.xml:767 +#, no-c-format +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" + +#. Tag: para +#: session_api.xml:775 +#, no-c-format +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." + +#. Tag: title +#: session_api.xml:784 +#, no-c-format +msgid "Flushing the Session" +msgstr "Flushing the Session" + +#. Tag: para +#: session_api.xml:786 +#, no-c-format +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" + +#. Tag: para +#: session_api.xml:795 +#, no-c-format +msgid "before some query executions" +msgstr "before some query executions" + +#. Tag: para +#: session_api.xml:800 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "from org.hibernate.Transaction.commit()" + +#. Tag: para +#: session_api.xml:805 +#, no-c-format +msgid "from Session.flush()" +msgstr "from Session.flush()" + +#. Tag: para +#: session_api.xml:811 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "The SQL statements are issued in the following order" + +#. Tag: para +#: session_api.xml:817 +#, no-c-format +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" + +#. Tag: para +#: session_api.xml:823 +#, no-c-format +msgid "all entity updates" +msgstr "all entity updates" + +#. Tag: para +#: session_api.xml:828 +#, no-c-format +msgid "all collection deletions" +msgstr "all collection deletions" + +#. Tag: para +#: session_api.xml:833 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "all collection element deletions, updates and insertions" + +#. Tag: para +#: session_api.xml:838 +#, no-c-format +msgid "all collection insertions" +msgstr "all collection insertions" + +#. Tag: para +#: session_api.xml:843 +#, no-c-format +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" + +#. Tag: para +#: session_api.xml:850 +#, no-c-format +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" + +#. Tag: para +#: session_api.xml:855 +#, no-c-format +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." + +#. Tag: para +#: session_api.xml:863 +#, no-c-format +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." + +#. Tag: programlisting +#: session_api.xml:873 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:875 +#, no-c-format +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." + +#. Tag: title +#: session_api.xml:884 +#, no-c-format +msgid "Transitive persistence" +msgstr "Transitive persistence" + +#. Tag: para +#: session_api.xml:886 +#, no-c-format +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" + +#. Tag: para +#: session_api.xml:892 +#, no-c-format +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." + +#. Tag: para +#: session_api.xml:903 +#, no-c-format +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." + +#. Tag: para +#: session_api.xml:912 +#, no-c-format +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" + +#. Tag: programlisting +#: session_api.xml:921 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:923 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "Cascade styles my be combined:" + +#. Tag: programlisting +#: session_api.xml:927 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:929 +#, no-c-format +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." + +#. Tag: para +#: session_api.xml:935 +#, no-c-format +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." + +#. Tag: para +#: session_api.xml:942 +#, no-c-format +msgid "Recommendations:" +msgstr "Recommendations:" + +#. Tag: para +#: session_api.xml:948 +#, no-c-format +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." + +#. Tag: para +#: session_api.xml:956 +#, no-c-format +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." + +#. Tag: para +#: session_api.xml:963 +#, no-c-format +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." + +#. Tag: para +#: session_api.xml:971 +#, no-c-format +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." + +#. Tag: para +#: session_api.xml:977 +#, no-c-format +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" + +#. Tag: para +#: session_api.xml:988 +#, no-c-format +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"If a parent is passed to persist(), all children are " +"passed to persist()" + +#. Tag: para +#: session_api.xml:994 +#, no-c-format +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"If a parent is passed to merge(), all children are passed " +"to merge()" + +#. Tag: para +#: session_api.xml:1000 +#, no-c-format +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" + +#. Tag: para +#: session_api.xml:1006 +#, no-c-format +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "" +"If a parent is deleted, all children are passed to delete()" + +#. Tag: para +#: session_api.xml:1017 +#, no-c-format +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." + +#. Tag: para +#: session_api.xml:1026 +#, no-c-format +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." + +#. Tag: title +#: session_api.xml:1038 +#, no-c-format +msgid "Using metadata" +msgstr "Usando metadados" + +#. Tag: para +#: session_api.xml:1040 +#, no-c-format +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"O Hibernate requer um modelo muito rico a nível de metadados de todas as " +"entidades e tipos de valores. De tempos em tempos, este modelo é muito útil " +"à própria aplicação. Por exemplo, a aplicação pode usar o metadados do " +"Hibernate que executa um algoritmo \"inteligente\" que compreende quais " +"objetos podem ser copiados (por exemplo, tipos de valores mutáveis) ou não " +"(por exemplo, tipos de valores imutáveis e, possivelmente, entidades " +"associadas)." + +#. Tag: para +#: session_api.xml:1047 +#, no-c-format +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"O Hibernate expõe o metadados via interfaces ClassMetadata e CollectionMetadata e pela hierarquia " +"Type. Instâncias das interfaces de metadados podem ser " +"obtidas a partir do SessionFactory." + +#. Tag: programlisting +#: session_api.xml:1054 +#, no-c-format +msgid "" +"" +msgstr "" + +#~ msgid "UPDATE" +#~ msgstr "UPDATE" + +#~ msgid "DELETE" +#~ msgstr "DELETE" + +#~ msgid "state management" +#~ msgstr "state management" + +#~ msgid "statements" +#~ msgstr "statements" + +#~ msgid "Connection" +#~ msgstr "Connection" + +#~ msgid "session.connection()" +#~ msgstr "session.connection()" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/toolset_guide.po b/documentation/envers/src/main/docbook/pt-BR/content/toolset_guide.po new file mode 100644 index 0000000000..e8e852b602 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/toolset_guide.po @@ -0,0 +1,1179 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:5 +#, no-c-format +msgid "Toolset Guide" +msgstr "Toolset Guide" + +#. Tag: para +#: toolset_guide.xml:7 +#, no-c-format +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." + +#. Tag: para +#: toolset_guide.xml:12 +#, no-c-format +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" + +#. Tag: para +#: toolset_guide.xml:18 +#, no-c-format +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." + +#. Tag: para +#: toolset_guide.xml:23 +#, no-c-format +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." + +#. Tag: para +#: toolset_guide.xml:30 +#, no-c-format +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." + +#. Tag: emphasis +#: toolset_guide.xml:38 +#, no-c-format +msgid "Ant Tasks:" +msgstr "Ant Tasks:" + +#. Tag: para +#: toolset_guide.xml:43 +#, no-c-format +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." + +#. Tag: para +#: toolset_guide.xml:48 +#, no-c-format +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." + +#. Tag: title +#: toolset_guide.xml:55 +#, no-c-format +msgid "Automatic schema generation" +msgstr "Automatic schema generation" + +#. Tag: para +#: toolset_guide.xml:57 +#, no-c-format +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." + +#. Tag: para +#: toolset_guide.xml:64 +#, no-c-format +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." + +#. Tag: para +#: toolset_guide.xml:70 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "First, customize your mapping files to improve the generated schema." + +#. Tag: title +#: toolset_guide.xml:75 +#, no-c-format +msgid "Customizing the schema" +msgstr "Customizing the schema" + +#. Tag: para +#: toolset_guide.xml:77 +#, no-c-format +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." + +#. Tag: programlisting +#: toolset_guide.xml:84 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:85 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:87 +#, no-c-format +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." + +#. Tag: programlisting +#: toolset_guide.xml:93 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:95 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:97 +#, no-c-format +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." + +#. Tag: programlisting +#: toolset_guide.xml:105 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:107 +#, no-c-format +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." + +#. Tag: programlisting +#: toolset_guide.xml:113 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:115 +#, no-c-format +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." + +#. Tag: programlisting +#: toolset_guide.xml:120 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:122 +#, no-c-format +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" + +#. Tag: programlisting +#: toolset_guide.xml:127 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:129 +#, no-c-format +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." + +#. Tag: programlisting +#: toolset_guide.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "" +"The check attribute allows you to specify a check " +"constraint." + +#. Tag: programlisting +#: toolset_guide.xml:150 +#, no-c-format +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:152 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:156 +#, no-c-format +msgid "Summary" +msgstr "Summary" + +#. Tag: entry +#: toolset_guide.xml:163 +#, no-c-format +msgid "Attribute" +msgstr "Attribute" + +#. Tag: entry +#: toolset_guide.xml:164 +#, no-c-format +msgid "Values" +msgstr "Values" + +#. Tag: entry +#: toolset_guide.xml:165 +#, no-c-format +msgid "Interpretation" +msgstr "Interpretation" + +#. Tag: literal +#: toolset_guide.xml:170 +#, no-c-format +msgid "length" +msgstr "length" + +#. Tag: entry +#: toolset_guide.xml:171 toolset_guide.xml:176 toolset_guide.xml:181 +#, no-c-format +msgid "number" +msgstr "number" + +#. Tag: entry +#: toolset_guide.xml:172 +#, no-c-format +msgid "column length" +msgstr "column length" + +#. Tag: literal +#: toolset_guide.xml:175 +#, no-c-format +msgid "precision" +msgstr "precision" + +#. Tag: entry +#: toolset_guide.xml:177 +#, no-c-format +msgid "column decimal precision" +msgstr "column decimal precision" + +#. Tag: literal +#: toolset_guide.xml:180 +#, no-c-format +msgid "scale" +msgstr "scale" + +#. Tag: entry +#: toolset_guide.xml:182 +#, no-c-format +msgid "column decimal scale" +msgstr "column decimal scale" + +#. Tag: literal +#: toolset_guide.xml:185 +#, no-c-format +msgid "not-null" +msgstr "not-null" + +#. Tag: literal +#: toolset_guide.xml:186 toolset_guide.xml:191 +#, no-c-format +msgid "true|false" +msgstr "true|false" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "specfies that the column should be non-nullable" + +#. Tag: literal +#: toolset_guide.xml:190 +#, no-c-format +msgid "unique" +msgstr "unique" + +#. Tag: entry +#: toolset_guide.xml:192 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "specifies that the column should have a unique constraint" + +#. Tag: literal +#: toolset_guide.xml:195 +#, no-c-format +msgid "index" +msgstr "index" + +#. Tag: literal +#: toolset_guide.xml:196 +#, no-c-format +msgid "index_name" +msgstr "index_name" + +#. Tag: entry +#: toolset_guide.xml:197 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "specifies the name of a (multi-column) index" + +#. Tag: literal +#: toolset_guide.xml:200 +#, no-c-format +msgid "unique-key" +msgstr "unique-key" + +#. Tag: literal +#: toolset_guide.xml:201 +#, no-c-format +msgid "unique_key_name" +msgstr "unique_key_name" + +#. Tag: entry +#: toolset_guide.xml:202 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "specifies the name of a multi-column unique constraint" + +#. Tag: literal +#: toolset_guide.xml:205 +#, no-c-format +msgid "foreign-key" +msgstr "foreign-key" + +#. Tag: literal +#: toolset_guide.xml:206 +#, no-c-format +msgid "foreign_key_name" +msgstr "foreign_key_name" + +#. Tag: entry +#: toolset_guide.xml:207 +#, fuzzy, no-c-format +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"specifies the name of the foreign key constraint generated for an " +"association, for a , , , or " +" mapping element. Note that sides will not " +"be considered by ." + +#. Tag: literal +#: toolset_guide.xml:217 +#, no-c-format +msgid "sql-type" +msgstr "sql-type" + +#. Tag: literal +#: toolset_guide.xml:218 +#, no-c-format +msgid "SQL column type" +msgstr "SQL column type" + +#. Tag: entry +#: toolset_guide.xml:219 +#, fuzzy, no-c-format +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "" +"overrides the default column type (attribute of element " +"only)" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "default" +msgstr "default" + +#. Tag: entry +#: toolset_guide.xml:226 toolset_guide.xml:233 +#, no-c-format +msgid "SQL expression" +msgstr "SQL expression" + +#. Tag: entry +#: toolset_guide.xml:227 +#, no-c-format +msgid "specify a default value for the column" +msgstr "specify a default value for the column" + +#. Tag: literal +#: toolset_guide.xml:232 +#, no-c-format +msgid "check" +msgstr "check" + +#. Tag: entry +#: toolset_guide.xml:234 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "create an SQL check constraint on either column or table" + +#. Tag: para +#: toolset_guide.xml:242 +#, no-c-format +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"The <comment> element allows you to specify " +"comments for the generated schema." + +#. Tag: programlisting +#: toolset_guide.xml:247 +#, no-c-format +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:249 +#, no-c-format +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:251 +#, no-c-format +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." + +#. Tag: title +#: toolset_guide.xml:260 +#, no-c-format +msgid "Running the tool" +msgstr "Running the tool" + +#. Tag: para +#: toolset_guide.xml:262 +#, no-c-format +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." + +#. Tag: para +#: toolset_guide.xml:267 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:273 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "SchemaExport Command Line Options" + +#. Tag: entry +#: toolset_guide.xml:279 toolset_guide.xml:429 toolset_guide.xml:498 +#, no-c-format +msgid "Option" +msgstr "Option" + +#. Tag: entry +#: toolset_guide.xml:280 toolset_guide.xml:367 toolset_guide.xml:430 +#: toolset_guide.xml:499 +#, no-c-format +msgid "Description" +msgstr "Description" + +#. Tag: literal +#: toolset_guide.xml:285 toolset_guide.xml:435 +#, no-c-format +msgid "--quiet" +msgstr "--quiet" + +#. Tag: entry +#: toolset_guide.xml:286 toolset_guide.xml:436 +#, no-c-format +msgid "don't output the script to stdout" +msgstr "don't output the script to stdout" + +#. Tag: literal +#: toolset_guide.xml:289 +#, no-c-format +msgid "--drop" +msgstr "--drop" + +#. Tag: entry +#: toolset_guide.xml:290 +#, no-c-format +msgid "only drop the tables" +msgstr "only drop the tables" + +#. Tag: literal +#: toolset_guide.xml:293 +#, no-c-format +msgid "--create" +msgstr "--create" + +#. Tag: entry +#: toolset_guide.xml:294 +#, no-c-format +msgid "only create the tables" +msgstr "only create the tables" + +#. Tag: literal +#: toolset_guide.xml:297 toolset_guide.xml:439 +#, no-c-format +msgid "--text" +msgstr "--text" + +#. Tag: entry +#: toolset_guide.xml:298 +#, no-c-format +msgid "don't export to the database" +msgstr "don't export to the database" + +#. Tag: literal +#: toolset_guide.xml:301 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#. Tag: entry +#: toolset_guide.xml:302 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "output the ddl script to a file" + +#. Tag: literal +#: toolset_guide.xml:305 toolset_guide.xml:443 toolset_guide.xml:504 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#. Tag: entry +#: toolset_guide.xml:306 toolset_guide.xml:444 toolset_guide.xml:505 +#, fuzzy, no-c-format +msgid "select a NamingStrategy" +msgstr "in hibernate.properties" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:451 toolset_guide.xml:512 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#. Tag: entry +#: toolset_guide.xml:310 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "read Hibernate configuration from an XML file" + +#. Tag: literal +#: toolset_guide.xml:313 toolset_guide.xml:447 toolset_guide.xml:508 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#. Tag: entry +#: toolset_guide.xml:314 toolset_guide.xml:448 toolset_guide.xml:509 +#, no-c-format +msgid "read database properties from a file" +msgstr "read database properties from a file" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--format" +msgstr "--format" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "format the generated SQL nicely in the script" + +#. Tag: literal +#: toolset_guide.xml:321 +#, no-c-format +msgid "--delimiter=;" +msgstr "--delimiter=;" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "set an end of line delimiter for the script" + +#. Tag: para +#: toolset_guide.xml:328 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "" +"You may even embed SchemaExport in your application:" + +#. Tag: programlisting +#: toolset_guide.xml:332 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:337 +#, no-c-format +msgid "Properties" +msgstr "Properties" + +#. Tag: para +#: toolset_guide.xml:339 +#, no-c-format +msgid "Database properties may be specified" +msgstr "Database properties may be specified" + +#. Tag: para +#: toolset_guide.xml:345 +#, no-c-format +msgid "" +"as system properties with -D<property>" +msgstr "" +"as system properties with -D<property>" + +#. Tag: para +#: toolset_guide.xml:348 +#, no-c-format +msgid "in hibernate.properties" +msgstr "in hibernate.properties" + +#. Tag: para +#: toolset_guide.xml:351 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "in a named properties file with --properties" + +#. Tag: para +#: toolset_guide.xml:355 +#, no-c-format +msgid "The needed properties are:" +msgstr "The needed properties are:" + +#. Tag: title +#: toolset_guide.xml:360 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "SchemaExport Connection Properties" + +#. Tag: entry +#: toolset_guide.xml:366 +#, no-c-format +msgid "Property Name" +msgstr "Property Name" + +#. Tag: literal +#: toolset_guide.xml:372 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: entry +#: toolset_guide.xml:373 +#, no-c-format +msgid "jdbc driver class" +msgstr "jdbc driver class" + +#. Tag: literal +#: toolset_guide.xml:376 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: entry +#: toolset_guide.xml:377 +#, no-c-format +msgid "jdbc url" +msgstr "jdbc url" + +#. Tag: literal +#: toolset_guide.xml:380 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: entry +#: toolset_guide.xml:381 +#, no-c-format +msgid "database user" +msgstr "database user" + +#. Tag: literal +#: toolset_guide.xml:384 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: entry +#: toolset_guide.xml:385 +#, no-c-format +msgid "user password" +msgstr "user password" + +#. Tag: literal +#: toolset_guide.xml:388 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: toolset_guide.xml:389 +#, no-c-format +msgid "dialect" +msgstr "dialect" + +#. Tag: title +#: toolset_guide.xml:398 +#, no-c-format +msgid "Using Ant" +msgstr "Using Ant" + +#. Tag: para +#: toolset_guide.xml:400 +#, no-c-format +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "" +"You can call SchemaExport from your Ant build script:" + +#. Tag: programlisting +#: toolset_guide.xml:404 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:409 +#, no-c-format +msgid "Incremental schema updates" +msgstr "Incremental schema updates" + +#. Tag: para +#: toolset_guide.xml:411 +#, no-c-format +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." + +#. Tag: para +#: toolset_guide.xml:417 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:423 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "SchemaUpdate Command Line Options" + +#. Tag: entry +#: toolset_guide.xml:440 +#, no-c-format +msgid "don't export the script to the database" +msgstr "don't export the script to the database" + +#. Tag: entry +#: toolset_guide.xml:452 toolset_guide.xml:513 +#, fuzzy, no-c-format +msgid "specify a .cfg.xml file" +msgstr "specify a file" + +#. Tag: para +#: toolset_guide.xml:458 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "You may embed SchemaUpdate in your application:" + +#. Tag: programlisting +#: toolset_guide.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:467 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "Using Ant for incremental schema updates" + +#. Tag: para +#: toolset_guide.xml:469 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "You can call SchemaUpdate from the Ant script:" + +#. Tag: programlisting +#: toolset_guide.xml:473 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:478 +#, no-c-format +msgid "Schema validation" +msgstr "Schema validation" + +#. Tag: para +#: toolset_guide.xml:480 +#, no-c-format +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." + +#. Tag: para +#: toolset_guide.xml:486 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:492 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator Command Line Options" + +#. Tag: para +#: toolset_guide.xml:519 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "You may embed SchemaValidator in your application:" + +#. Tag: programlisting +#: toolset_guide.xml:523 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:528 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "Using Ant for schema validation" + +#. Tag: para +#: toolset_guide.xml:530 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "You can call SchemaValidator from the Ant script:" + +#. Tag: programlisting +#: toolset_guide.xml:534 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "<one-to-one>" +#~ msgstr "<one-to-one>" + +#~ msgid "<many-to-one>" +#~ msgstr "<many-to-one>" + +#~ msgid "<key>" +#~ msgstr "<key>" + +#~ msgid "<many-to-many>" +#~ msgstr "<many-to-many>" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid "SchemaExport" +#~ msgstr "SchemaExport" + +#~ msgid "<column>" +#~ msgstr "<column>" + +#~ msgid "java -cp" +#~ msgstr "java -cp" + +#~ msgid "hibernate_classpaths" +#~ msgstr "hibernate_classpaths" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport" + +#~ msgid "options mapping_files" +#~ msgstr "options mapping_files" + +#~ msgid "NamingStrategy" +#~ msgstr "NamingStrategy" + +#~ msgid "select a " +#~ msgstr "select a " + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate" + +#~ msgid ".cfg.xml" +#~ msgstr ".cfg.xml" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator" diff --git a/documentation/envers/src/main/docbook/pt-BR/content/transactions.po b/documentation/envers/src/main/docbook/pt-BR/content/transactions.po new file mode 100644 index 0000000000..1de742067d --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/transactions.po @@ -0,0 +1,2126 @@ +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 \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:5 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "Transações e Concorrência" + +#. Tag: para +#: transactions.xml:7 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"O ponto o mais importante sobre o Hibernate e o controle de concorrência é " +"que é muito fácil de ser compreendido. O Hibernate usa diretamente conexões " +"de JDBC e recursos de JTA sem adicionar nenhum comportamento de bloqueio a " +"mais. Nós altamente recomendamos que você gaste algum tempo com o JDBC, o " +"ANSI e a especificação de isolamento de transação de seu sistema de gerência " +"da base de dados." + +#. Tag: para +#: transactions.xml:14 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"O Hibernate não bloqueia objetos na memória. Sua aplicação pode esperar o " +"comportamento tal qual definido pelo nível de isolamento de suas transações " +"de banco de dados. Note que graças ao Session, que também " +"é um cache de escopo de transação, o Hibernate fornece leituras repetíveis " +"para procurar por identificadores e consultas de entidade (não pesquisas de " +"relatórios que retornam valores escalares)." + +#. Tag: para +#: transactions.xml:22 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"Além do versionamento para o controle automático de concorrência otimista, o " +"Hibernate oferece também uma API (menor) para bloqueio pessimista de linhas " +"usando a sintaxe SELECT FOR UPDATE. O controle de " +"concorrência otimista e esta API são discutidos mais tarde neste capítulo." + +#. Tag: para +#: transactions.xml:29 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"Nós começamos a discussão do controle de concorrência no Hibernate com a " +"granularidade do Configuration, SessionFactory, e Session, além de transações de base de dados " +"e conversações longas." + +#. Tag: title +#: transactions.xml:36 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "Session e escopos de transações" + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"Um SessionFactory é objeto threadsafe compartilhado por " +"todas as threads da aplicação que consome muitos recursos na sua criação. É " +"criado uma unica vez no inicio da execução da aplicação a partir da " +"instância de uma Configuration." + +#. Tag: para +#: transactions.xml:44 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Uma Session é um objeto de baixo custo de criação, não é " +"threadsafe, deve ser usado uma vez, para uma única requisição, uma " +"conversação, uma única unidade do trabalho e então deve ser descartado. Um " +"Session não obterá um JDBC Connection " +"(ou um Datasource) a menos que necessite, " +"conseqüentemente não consome nenhum recurso até ser usado." + +#. Tag: para +#: transactions.xml:52 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"Para completar, você também tem que pensar sobre as transações de base de " +"dados. Uma transação tem que ser tão curta quanto possível, para reduzir a " +"disputa pelo bloqueio na base de dados. Transações longas impedirão que sua " +"aplicação escale a carga altamente concorrente. Por isso, em um projeto " +"raramente é para manter uma transação de base de dados aberta durante o " +"tempo que o usuário pensa, até que a unidade do trabalho esteja completa." + +#. Tag: para +#: transactions.xml:61 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"Qual é o escopo de uma unidade de trabalho? Pode uma únicoa " +"Session do Hibernate gerenciar diversas transações ou é " +"esta um o relacionamento um-para-um dos escopos? Quando deve você abrir e " +"fechar uma Session e como você demarca os limites da " +"transação?" + +#. Tag: title +#: transactions.xml:69 +#, no-c-format +msgid "Unit of work" +msgstr "Unidade de trabalho" + +#. Tag: para +#: transactions.xml:71 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"Primeiro, não use o antipattern sessão-por-operação, " +"isto é, não abra e não feche uma Session para cada " +"simples chamada ao banco de de dados em uma única thread! Naturalmente, o " +"mesmo é verdadeiro para transações. As chamadas a banco de dados em uma " +"aplicação são feitas usando uma seqüência planejada, elas são agrupadas em " +"unidades de trabalho atômicas. (Veja que isso também significa que um auto-" +"commit depois de cada sentença SQL é inútil em uma aplicação, esta " +"modalidade é ideal para o trabalho ad hoc do console do SQL. O Hibernate " +"impede, ou espera que o servidor de aplicação impessa isso, o uso da " +"modalidade de auto-commit.) As transações nunca são opcionais, toda a " +"comunicação com um banco de dados tem que ocorrer dentro de uma transação, " +"não importa se você vai ler ou escrever dados. Como explicado, o " +"comportamento auto-commit para leitura de dados deve ser evitado, como " +"muitas transações pequenas são improváveis de executar melhor do que uma " +"unidade claramente definida do trabalho. A última opção também muito mais " +"manutenível e extensível." + +#. Tag: para +#: transactions.xml:87 +#, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is send to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"O pattern mais comum em uma aplicação multi-usuário cliente/servidor é " +"sessão-por-requisição. Neste modelo, uma requisição do " +"cliente é enviada ao servidor (onde a camada de persistência do Hibernate " +"roda), uma Session nova do Hibernate é aberta, e todas as " +"operações da base de dados são executadas nesta unidade do trabalho. Logo " +"que o trabalho for completado (e a resposta para o cliente for preparada), a " +"sessão é descarregad e fechada. Você usaria também uma única transação de " +"base de dados para servir às requisições dos clientes, começando e " +"commitando-o quando você abre e fecha a Session. O " +"relacionamento entre os dois é um-para-um e este modelo é um ajuste perfeito " +"para muitas aplicações." + +#. Tag: para +#: transactions.xml:99 +#, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is send to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"O desafio encontra-se na implementação. O Hibernate fornece gerência " +"integrada da \"sessão atual\" para simplificar este pattern. Tudo que você " +"tem que fazer é iniciar uma transação quando uma requisição tem que ser " +"processada e termina a transação antes que a resposta seja enviada ao " +"cliente. Você pode fazer onde quiser, soluções comuns são " +"ServletFilter, interceptador AOP com um pointcut (ponto " +"de corte) nos métodos de serviço ou em um container de proxy/interceptação. " +"Um container de EJB é uma maneira padronizada para implementar aspectos " +"cross-cutting tais como a demarcação da transação em EJB session beans, " +"declarativamente com CMT. Se você se decidir usar demarcação programática de " +"transação, de preferencia a API Transaction do Hibernate " +"mostrada mais adiante neste capítulo, para fácilidade no uso e portabilidade " +"de código." + +#. Tag: para +#: transactions.xml:112 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"Seu código de aplicação pode acessar a \"sessão atual\" para processar a " +"requisição fazendo uma chamada simples a sessionFactory." +"getCurrentSession() em qualquer lugar e com a frequencia " +"necessária. Você sempre conseguirá uma Session limitada a " +"transação atual. Isto tem que ser configurado para recurso local ou os " +"ambientes JTA. Veja ." + +#. Tag: para +#: transactions.xml:120 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"Às vezes é conveniente estender o escopo de uma Session e " +"de uma transação do banco de dados até que a \"visão esteja renderizada\". É " +"especialmente útil em aplicações servlet que utilizam uma fase de " +"rendenderização separada depois que a requisição ter sido processada. " +"Estendendo a transação até que renderização da visão esteja completa é fácil " +"de fazer se você implementar seu próprio interceptador. Entretanto, não se " +"pode fazer facilmente se você confiar em EJBs com transações gerenciadas por " +"contêiner, porque uma transação será terminada quando um método de EJB " +"retornar, antes da renderização de toda visão puder começar. Veja o website " +"e o fórum do Hibernate para dicas e exemplos em torno deste pattern " +"Open Session in View." + +#. Tag: title +#: transactions.xml:135 +#, no-c-format +msgid "Long conversations" +msgstr "Longas conversações" + +#. Tag: para +#: transactions.xml:137 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"O pattern sessão-por-requisição não é o único conceito útil que você pode " +"usar ao projetar unidades de trabalho. Muitos processos de negócio requerem " +"uma totalidade de séries de interações com o usuário intercaladas com " +"acessos a uma base de dados. Em aplicações web e corporativas não é " +"aceitável para uma transação atrapalhe uma interação do usuário. Considere o " +"seguinte exemplo:" + +#. Tag: para +#: transactions.xml:147 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"A primeira tela de um diálogo abre os dados carregado pelo usuário em " +"através de Session e transação particulares. O usuário " +"está livre modificar os objetos." + +#. Tag: para +#: transactions.xml:154 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"O usuário clica em \"Salvar\" após 5 minutos e espera suas modificações " +"serem persistidas; espera também que ele era a única pessoa que edita esta " +"informação e que nenhuma modificação conflitante possa ocorrer." + +#. Tag: para +#: transactions.xml:162 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"Nós chamamos esta unidade de trabalho, do ponto da visão do usuário, " +"executando uma longa conversação (ou " +"transação da aplicação). Há muitas maneiras de você " +"pode implementar em sua aplicação." + +#. Tag: para +#: transactions.xml:168 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"Uma primeira implementação simples pode manter aSession e " +"a transação aberta durante o tempo de interação do usuário, com bloqueios na " +"base de dados para impedir a modificação concorrente e para garantir o " +"isolamento e a atomicidade. Esse é naturalmente um anti-pattern, desde que a " +"disputa do bloqueio não permitiria o escalonameneto da aplicação com o " +"número de usuários concorrentes." + +#. Tag: para +#: transactions.xml:176 +#, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"converastion. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"Claramente, nós temos que usar diversas transações para implementar a " +"conversação. Neste caso, Manter o isolamento dos processos de negócio torna-" +"se responsabilidade parcial da camada da aplicação. Uma única conversação " +"geralmente usa diversas transações. Ela será atômica se somente uma destas " +"transações (a última) armazenar os dados atualizados, todas as outras " +"simplesmente leram os dados (por exemplo em um diálogo do estilo wizard que " +"mede diversos ciclos de requisição/resposta). Isto é mais fácil de " +"implementar do que pode parecer, especialmente se você usar as " +"características do Hibernate:" + +#. Tag: para +#: transactions.xml:189 +#, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occured during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"Versionamento automático - O Hibernate pode fazer o " +"controle automático de concorrência otimista para você, ele pode " +"automaticamente detectar se uma modificação concorrente ocorreu durante o " +"tempo de interação do usuário. Geralmente nós verificamos somente no fim da " +"conversação." + +#. Tag: para +#: transactions.xml:197 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"Detached Objects- se você se decidir usar o já " +"discutido pattern session-per-request, todas as " +"instâncias carregadas estarão no estado destacado durante o tempo em que o " +"usuário estiver pensando. O Hibernate permite que você reatache os objetos e " +"persita as modificações, esse pattern é chamado session-per-" +"request-with-detached-objects. É usado versionamento automatico " +"para isolar as modificações concorrentes." + +#. Tag: para +#: transactions.xml:207 +#, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitely." +msgstr "" +"Extended (or Long) Session A Session " +"do Hibernate pode ser desligada da conexão básica do JDBC depois que a " +"transação foi commitada e ser reconectado quando uma nova requisição do " +"cliente ocorrer. Este pattern é conhecido como session-per-" +"conversation e faz o reatamento uniforme desnecessário. " +"Versionamento automático é usado para isolar modificações concorrentes e a " +"session-per-conversation usualmente não é permitido " +"para ser nivelado automaticamente, e sim explicitamente." + +#. Tag: para +#: transactions.xml:220 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"Ambos session-per-request-with-detached-objects e " +"session-per-conversation possuem vantagens e " +"desvantagens, nos discutiremos mais tarde neste capítulo no contexto do " +"controle de concorrência otimista." + +#. Tag: title +#: transactions.xml:229 +#, no-c-format +msgid "Considering object identity" +msgstr "Considerando a identidade do objeto" + +#. Tag: para +#: transactions.xml:231 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"Uma aplicação pode acessar concorrentemente o mesmo estado persistente em " +"duas Sessions diferentes. Entretanto, uma instância de " +"uma classe persistente nunca é compartilhada entre duas instâncias " +"Session. Por tanto, há duas noções diferentes da " +"identidade:" + +#. Tag: term +#: transactions.xml:240 +#, no-c-format +msgid "Database Identity" +msgstr "Identidade da base de dados" + +#. Tag: literal +#: transactions.xml:243 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:248 +#, no-c-format +msgid "JVM Identity" +msgstr "Identidade da JVM" + +#. Tag: literal +#: transactions.xml:251 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:257 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"Então para os objetos acoplados a um Session em " +"particular (isto é no escopo de um Session), as duas noções são equivalentes e a identidade da JVM para a " +"identidade da base de dados é garantida pelo Hibernate. Entretanto, quando a " +"aplicação pode acessar concorrentemente o \"mesmo\" objeto do negócio " +"(identidade persistente) em duas sessões diferentes, as duas instâncias " +"serão realmente \"diferentes\" (identidade de JVM). Os conflitos são " +"resolvidos usando (versionamento automático) no flush/commit, usando " +"abordagem otimista." + +#. Tag: para +#: transactions.xml:266 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"Este caminho deixa o Hibernate e o banco dedados se preocuparem com a " +"concorrência; também fornece uma escalabilidade melhor, garantindo que a " +"identidade em unidades de trabalho único-encadeadas não necessite de " +"bloqueio dispendioso ou de outros meios de sincronização. A aplicação nunca " +"necessita sincronizar qualquer objeto de negócio tão longo que transpasse " +"uma única thread por Session. Dentro de uma " +"Session a aplicação pode usar com segurança o " +"== para comparar objetos." + +#. Tag: para +#: transactions.xml:275 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"Com tudo, uma aplicação que usa == fora de uma " +"Session, pode ver resultados inesperados. Isto pode " +"ocorrer mesmo em alguns lugares inesperados, por exemplo, se você colocar " +"duas instâncias desacopladas em um mesmo Set. Ambos podem " +"ter a mesma identidade na base de dados (isto é eles representam a mesma " +"linha em uma tabela), mas a identidade da JVM pela definição não garantida " +"para instâncias em estado desacoplado. O desenvolvedor tem que sobrescrever " +"os métodos equals() e hashCode() em " +"classes persistentes e implementar sua própria noção da igualdade do objeto. " +"Advertência: nunca use o identificador da base de dados para implementar a " +"igualdade, use atributos de negócio, uma combinação única, geralmente " +"imutável. O identificador da base de dados mudará se um objeto transiente " +"passar para o estado persistente. Se a instância transiente (geralmente " +"junto com instâncias desacopladas) for inserida em um Set, mudar o hashcode quebra o contrato do Set. " +"Atributos para chaves de negócio não têm que ser tão estável quanto às " +"chaves primárias da base de dados, você somente tem que garantir a " +"estabilidade durante o tempo que os objetos estiverem no mesmo Set. Veja o " +"website do Hibernate para uma discussão mais completa sobre o assunto. Note " +"também que esta não é uma caracteristica do Hibernate, mas simplesmente como " +"a identidade e a igualdade do objeto de Java têm que ser implementadas." + +#. Tag: title +#: transactions.xml:296 +#, no-c-format +msgid "Common issues" +msgstr "Edições comuns" + +#. Tag: para +#: transactions.xml:298 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"Nunca use o anti-patterns session-per-user-session ou " +"session-per-application (naturalmente, há umas exceções " +"raras a essa regra). Note que algumas das seguintes edições podem também " +"aparecer com patterns recomendados, certifique-se que tenha compreendido as " +"implicações antes de fazer uma decisão de projeto:" + +#. Tag: para +#: transactions.xml:307 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"Uma Session não é threadsafe. As coisas que são supostas " +"para trabalhar concorrentemente, como requisições HTTP, session beans, ou " +"Swing, causarão condições de disputa se uma instância Session for compartilhada. Se você mantiver sua Session " +"do Hibernate em seu HttpSession (discutido mais tarde), " +"você deve considerar sincronizar o acesso a sua sessão do HTTP. Caso " +"contrário, um usuário que clica em reload várias muito rapidamente pode usar " +"o mesmo Session em duas threads executando " +"concorrentemente." + +#. Tag: para +#: transactions.xml:318 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"Uma exceção lançada pelo Hibernate significa que você tem que dar rollback " +"na sua transação no banco de dados e fechar a Session " +"imediatamente (discutido mais tarde em maiores detalhes). Se sua " +"Session é limitado pela aplicação, você tem que parar a " +"aplicação. Dando rollback na transação no banco de dados não põe seus " +"objetos do negócio em um estado anterior que estavam no início da transação. " +"Isto significa que o estado da base de dados e os objetos de negócio perdem " +"a sincronização. Geralmente não é um problema porque as exceções não são " +"recuperáveis e você tem que iniciar após o rollback de qualquer maneira." + +#. Tag: para +#: transactions.xml:330 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"O Session guarda em cache cada objeto que está no estado " +"persistente (guardado e checado para estado \"sujo\" pelo Hibernate). Isto " +"significa que ele cresce infinitamente até que você obtenha uma " +"OutOfMemoryException, se você o mantiver aberto por muito tempo ou " +"simplesmente carregar dados demais. Uma solução é chamar clear() e evict() para controlar o cache da " +"Session, mas você deve considerar uma Store Procedure se " +"precisar de operações que envolvam grande volume de dados. Algumas soluções " +"são mostradas no . Manter uma Session aberta durante uma sessão do usuário significa também uma " +"probabilidade elevada de se acabar com dados velhos." + +#. Tag: title +#: transactions.xml:348 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "Demarcação de transações de bancos de dados" + +#. Tag: para +#: transactions.xml:350 +#, no-c-format +msgid "" +"Datatabase (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"Os limites de uma transação de banco de dados (ou sistema) são sempre " +"necessários. Nenhuma comunicação com o banco de dados pode ocorrer fora de " +"uma transação de banco de dados (isto parece confundir muitos " +"desenvolvedores que estão usados modo auto-commit). Sempre use os limites " +"desobstruídos da transação, até mesmo para operações somente leitura. " +"Dependendo de seu nível de isolamento e capacidade da base de dados isto " +"pode não ser requerido, mas não há nenhum aspecto negativo se você demarca " +"sempre transações explicitamente. Certamente, uma única transação será " +"melhor executada do que muitas transações pequenas, até mesmo para dados de " +"leitura." + +#. Tag: para +#: transactions.xml:360 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"Uma aplicação do Hibernate pode funcionar em ambientes não gerenciados (isto " +"é aplicações standalone, Web simples ou Swing) e ambientes gerenciados J2EE. " +"Em um ambiente não gerenciado, o Hibernate é geralmente responsável pelo seu " +"próprio pool de conexões. O desenvolvedor tem que manualmente ajustar " +"limites das transaçãos, ou seja, começar, commitar, ou dar rollback nas " +"transações ele mesmo. Um ambiente gerenciado fornece transações gerenciadas " +"por contêiner (CMT - container-managed transactions), com um conjunto da " +"transações definido declarativamente em descritores de deployment de EJB " +"session beans, por exemplo. A demarcação programática é então já não é " +"necessário." + +#. Tag: para +#: transactions.xml:370 +#, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demaracation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"Entretanto, é freqüentemente desejável manter sua camada de persistência " +"portável entre ambientes de recurso locais não gerenciados e sistemas que " +"podem confiar em JTA, mas usar BMT em vez de CMT. Em ambos os casos você " +"usaria demarcação de transação programática. O Hibernate oferece uma API " +"chamada Transaction que traduz dentro do sistema de transação nativa de seu " +"ambiente de deployment. Esta API é realmente opcional, mas nós encorajamos " +"fortemente seu uso a menos que você estiver em um CMT session bean." + +#. Tag: para +#: transactions.xml:379 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "" +"Geralmente, finalizar um Sessionenvolve quatro fases " +"distintas:" + +#. Tag: para +#: transactions.xml:385 +#, no-c-format +msgid "flush the session" +msgstr "flush da sessão" + +#. Tag: para +#: transactions.xml:390 +#, no-c-format +msgid "commit the transaction" +msgstr "commitar a transação" + +#. Tag: para +#: transactions.xml:395 +#, no-c-format +msgid "close the session" +msgstr "fechar a sessão" + +#. Tag: para +#: transactions.xml:400 +#, no-c-format +msgid "handle exceptions" +msgstr "tratar as exceções" + +#. Tag: para +#: transactions.xml:406 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"A limpeza da sessão já foi bem discutida, agora nós daremos uma olhada na " +"demarcação da transação e na manipulação de exceção em ambientes controlados " +"e não controlados." + +#. Tag: title +#: transactions.xml:413 +#, no-c-format +msgid "Non-managed environment" +msgstr "Ambiente não gerenciado" + +#. Tag: para +#: transactions.xml:415 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"Se uma camada de persistência do Hibernate roda em um ambiente não " +"gerenciado, as conexões do banco de dados são geralmente tratadas pelos " +"pools de conexões simples (isto é, não baseados em DataSource) dos quais o " +"Hibernate obtém as conexões assim que necessita. A maneira de se manipular " +"uma sessão/transação é mais ou menos assim:" + +#. Tag: programlisting +#: transactions.xml:422 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"Você não pode chamar flush() do Session() explicitamente - a chamada ao commit() dispara " +"automaticamente a sincronização para a sessão (dependendo do FlushMode). Uma chamada ao close()" +" marca o fim de uma sessão. A principal implicação do " +"close() é que a conexão JDBC será abandonada pela sessão. " +"Este código Java é portável e funciona em ambientes não gerenciado e de JTA." + +#. Tag: para +#: transactions.xml:433 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"Uma solução muito mais flexível é gerência integrada de contexto da \"sessão " +"atual\" do Hibernate, como descrito anteriormente:" + +#. Tag: programlisting +#: transactions.xml:438 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:440 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"Você muito provavelmente nunca verá estes fragmentos de código em uma " +"aplicação regular; as exceções fatais (do sistema) devem sempre ser pegas no " +"\"alto\". Ou seja, o código que executa chamadas do Hibernate (na camada de " +"persistência) e o código que trata RuntimeException (e " +"geralmente pode somente limpar acima e na saída) estão em camadas " +"diferentes. O gerenciamento do contexto atual feito pelo Hibernate pode " +"significativamente simplificar este projeto, como tudo que você necessita é " +"do acesso a um SessionFactory. A manipulação de exceção é " +"discutida mais tarde neste capítulo." + +#. Tag: para +#: transactions.xml:450 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"Note que você deve selecionar org.hibernate.transaction." +"JDBCTransactionFactory (que é o padrão) e para o segundo exemplo " +"\"thread\" como seu hibernate." +"current_session_context_class." + +#. Tag: title +#: transactions.xml:459 +#, no-c-format +msgid "Using JTA" +msgstr "Usando JTA" + +#. Tag: para +#: transactions.xml:461 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"Se sua camada de persistência funcionar em um servidor de aplicação (por " +"exemplo, dentro dos EJB session beans), cada conexão do datasource obtida " +"pelo Hibernate automaticamente fará parte da transação global de JTA. Você " +"pode também instalar uma implementação standalone de JTA e usá-la sem EJB. O " +"Hibernate oferece duas estratégias para a integração de JTA." + +#. Tag: para +#: transactions.xml:468 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"Se você usar bean-managed transactions (BMT - transações gerenciadas por " +"bean) o Hibernate dirá ao servidor de aplicação para começar e para terminar " +"uma transação de BMT se você usar a API Transaction. Assim, o código de " +"gerência de transação é idêntico ao ambiente não gerenciado." + +#. Tag: programlisting +#: transactions.xml:474 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:476 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "" +"Se você quiser usar um Session limitada por transação, " +"isto é, a funcionalidade do getCurrentSession() para a " +"propagação fácil do contexto, você terá que usar diretamente a API JTA " +"UserTransaction:" + +#. Tag: programlisting +#: transactions.xml:482 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:484 +#, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programatically, hence, the code is reduced to:" +msgstr "" +"Com CMT, a demarcação da transação é feita em descritores de deployment do " +"session beans, não programaticamente, conseqüentemente, o código é reduzido " +"a:" + +#. Tag: programlisting +#: transactions.xml:489 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:491 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"Em um CMT/EJB mesmo um rollback acontece automaticamente, desde que uma " +"exeção RuntimeException não tratável seja lançada por um " +"método de um session bean que informa ao contêiner ajustar a transação " +"global ao rollback. Isto significa que você não necessita usar a " +"API Transaction do Hibernate em tudo com BMT ou CMT e " +"você obtém a propagação automática do Session \"atual\" limitada à transação." +"" + +#. Tag: para +#: transactions.xml:499 +#, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatiblity), or set to \"jta\"." +msgstr "" +"Veja que você deverá escolher org.hibernate.transaction." +"JTATransactionFactory se você usar o JTA diretamente (BMT) e " +"org.hibernate.transaction.CMTTransactionFactory em um CMT " +"session bean, quando você configura a fábrica de transação do Hibernate. " +"Lembre-se também de configurar o hibernate.transaction." +"manager_lookup_class. Além disso, certifique-se que seu " +"hibernate.current_session_context_class ou não é " +"configurado (compatibilidade com o legado) ou é definido para \"jta" +"\"." + +#. Tag: para +#: transactions.xml:508 +#, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicity " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"A operação getCurrentSession() tem um aspecto negativo em " +"um ambiente JTA. Há uma advertência para o uso do método liberado de conexão " +"after_statement, o qual é usado então por padrão. Devido " +"a uma limitação simples da especificação JTA, não é possível para o " +"Hibernate automaticamente limpar quaisquer instâncias " +"ScrollableResults ou Iterator abertas " +"retornadas pelo scroll() ou iterate(). " +"Você deve liberar o cursor subjacente da base de dados " +"chamando ScrollableResults.close() ou Hibernate." +"close(Iterator) explicitamente de um bloco finally. (Claro que a maioria de aplicações podem facilmente evitar o uso " +"do scroll() ou do iterate() em todo " +"código provindo do JTA ou do CMT.)" + +#. Tag: title +#: transactions.xml:524 +#, no-c-format +msgid "Exception handling" +msgstr "Tratamento de Exceção" + +#. Tag: para +#: transactions.xml:526 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"Se a Session levantar uma exceção (incluindo qualquer " +"SQLException), você deve imediatamente dar um rollback na " +"transação do banco, chamando Session.close() e " +"descartando a instância da Session. Certos métodos da " +"Sessionnão deixarão a sessão em um " +"estado inconsistente. Nenhuma exceção lançada pelo Hibernate pode ser " +"recuperada. Certifique-se que a Session será fechada " +"chamando close() no bloco finally." + +#. Tag: para +#: transactions.xml:537 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"A exceção HibernateException, a qual envolve a maioria " +"dos erros que podem ocorrer em uma camada de persistência do Hibernate, é " +"uma exceção unchecked ( não estava em umas versões mais antigas de " +"Hibernate). Em nossa opinião, nós não devemos forçar o desenvolvedor a " +"tratar uma exceção irrecuperável em uma camada mais baixa. Na maioria dos " +"sistemas, as exceções unchecked e fatais são tratadas em um dos primeiros " +"frames da pilha da chamada do método (isto é, em umas camadas mais elevadas) " +"e uma mensagem de erro é apresentada ao usuário da aplicação (ou a alguma " +"outra ação apropriada é feita). Note que Hibernate pode também lançar outras " +"exceções unchecked que não são um HibernateException. " +"Estas, também são, irrecuperáveis e uma ação apropriada deve ser tomada." + +#. Tag: para +#: transactions.xml:549 +#, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the eexception into a more meningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"O Hibernate envolve SQLExceptions lançadas ao interagir " +"com a base de dados em um JDBCException. Na realidade, o " +"Hibernate tentará converter a exceção em em uma sub classe mais " +"significativa da JDBCException. A SQLException subjacente está sempre disponível através de JDBCException." +"getCause(). O Hibernate converte a SQLException " +"em uma sub classe JDBCException apropriada usando " +"SQLExceptionConverter associado ao SessionFactory. Por " +"padrão, o SQLExceptionConverter é definido pelo dialeto " +"configurado; entretanto, é também possível conectar em uma implementação " +"customizada (veja o javadoc para mais detalhes da classe " +"SQLExceptionConverterFactory). Os subtipos padrão de " +"JDBCException são:" + +#. Tag: para +#: transactions.xml:565 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - indica um erro com a " +"comunicação subjacente de JDBC." + +#. Tag: para +#: transactions.xml:571 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - indica um problema da gramática ou " +"da sintaxe com o SQL emitido." + +#. Tag: para +#: transactions.xml:577 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - indica algum forma de " +"violação de confinamento de integridade." + +#. Tag: para +#: transactions.xml:583 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - indica um erro ao adquirir um " +"nível de bloqueio necessário para realizar a operação de requisição." + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "" +"GenericJDBCException - uma exceção genérica que não cai " +"em algumas das outras categorias." + +#. Tag: title +#: transactions.xml:599 +#, no-c-format +msgid "Transaction timeout" +msgstr "Timeout de Transação" + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functioanlity is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"Uma característica extremamente importante fornecida por um ambiente " +"gerenciado como EJB e que nunca é fornecido pelo código não gerenciado é o " +"timeout de transação. Timeouts de transação asseguram que nenhuma transação " +"possa reter indefinidamente recursos enquanto não retorna nenhuma resposta " +"ao usuário. Fora de um ambiente controlado (JTA), o Hibernate não pode " +"fornecer inteiramente esta funcionalidade. Entretanto, o Hibernate pode " +"afinal controlar as operações do acesso a dados, assegurando que o nível de " +"deadlocks e queries do banco de dados com imensos resultados definidos sejam " +"limitados pelo timeout. Em um ambiente gerenciado, o Hibernate pode delegar " +"o timeout da transação ao JTA. Esta funcionalidade é abstraída pelo objeto " +"Transaction do Hibernate." + +#. Tag: programlisting +#: transactions.xml:614 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:616 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"Veja que setTimeout() não pode ser chamado em um CMT " +"bean, onde os timeouts das transações devem ser definidos declarativamente." + +#. Tag: title +#: transactions.xml:626 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "Controle de concorrência otimista" + +#. Tag: para +#: transactions.xml:628 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"O único caminho que é consistente com a elevada concorrência e " +"escalabilidade é controle de concorrência otimista com versionamento. " +"Checagem de versão usa número de versão, ou timestamps, para detectar " +"conflitos de atualizações (e para impedir atualizações perdidas). O " +"Hibernate fornece três caminhos possíveis para escrever aplicações que usam " +"concorrência otimista. Os casos de uso que nós mostramos estão no contexto " +"de conversações longas, mas a checagem de versão também tem o benefício de " +"impedir atualizações perdidas em únicas transações." + +#. Tag: title +#: transactions.xml:639 +#, no-c-format +msgid "Application version checking" +msgstr "Checagem de versão da aplicação" + +#. Tag: para +#: transactions.xml:641 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"Em uma implementação sem muita ajuda do Hibernate, cada interação com o " +"banco de dados ocorre em uma nova Session e o " +"desenvolvedor é responsável para recarregar todas as instâncias persistentes " +"da base de dados antes de manipulá-las. Este caminho força a aplicação a " +"realizar sua própria checagem de versão para assegurar a conversação do " +"isolamento da transação. Este caminho é menos eficiente em termos de acesso " +"ao banco de dados. É a caminho mais similar a EJBs entity." + +#. Tag: programlisting +#: transactions.xml:650 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"A propriedade version é mapeada usando <" +"version>, e o Hibernate vai incrementá-lo-á automaticamente " +"durante o flush se a entidade estiver alterada." + +#. Tag: para +#: transactions.xml:658 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"Claro, se você se estiver operando em um ambiente de baixa concorrência de " +"dados e não requerer a checagem de versão, você pode usar este caminho e " +"apenas saltar a checagem de versão. Nesse caso, o ultimo commit " +"realizdo é a estratégia padrão para suas conversações longas. " +"Mantenha em mente que isto pode confundir os usuários da aplicação, assim " +"como eles podem experimentar atualizações perdidas sem mensagens de erro ou " +"uma possibilidade ajustar mudanças de conflito." + +#. Tag: para +#: transactions.xml:667 +#, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified ojects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"Claro que, checagem manual da versão é somente praticável em circunstâncias " +"triviais e não para a maioria de aplicações. Freqüentemente, os grafos " +"completos de objetos modificados têm que ser verificados, não somente únicas " +"instâncias. O Hibernate oferece checagem de versão automática com uma " +"Session estendida ou instâncias desatachadas como o " +"paradigma do projeto." + +#. Tag: title +#: transactions.xml:678 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "Sessão estendida e versionamento automático" + +#. Tag: para +#: transactions.xml:680 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"Uma única instância de Session e suas instâncias " +"persistentes são usadas para a conversação inteira, isto é conhecido como " +"session-per-conversation. O Hibernate verifica versões " +"da instância no momento dio flush, lançando uma exceção se a modificação " +"concorrente for detectada. Até o desenvolvedor pegar e tratar essa exceção " +"(as opções comuns são a oportunidade para que o usuário intercale as " +"mudanças ou reinicie a conversação do negócio com dados não antigos)." + +#. Tag: para +#: transactions.xml:689 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction. A " +"Session é desconectada de toda a conexão JDBC subjacente " +"enquanto espera a interação do usuário. Este caminho é a mais eficiente em " +"termos de acesso a bancos de dados. A aplicação não necessita concernir-se " +"com a checagem de versão ou com as instâncias destacadas reatadas, nem tem " +"que recarregar instâncias em cada transação." + +#. Tag: programlisting +#: transactions.xml:697 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:698 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"O objeto foo sabe que Session já foi " +"carregada. Começando uma nova transação em uma sessão velha obtém uma " +"conexão nova e recomeça a sessão. Commitando uma transação desconecta uma " +"sessão da conexão JDBC e retorna a conexão ao pool. Após a reconexão, forçar " +"uma checagem de versão em dados que você não está atualizando, você pode " +"chamar Session.lock() com o LockMode.READ em todos os objetos que possam ter sido atualizados por uma outra " +"transação. Você não necessita bloquear nenhum dado para atualizar. " +"Geralmente você configuraria FlushMode.MANUAL em uma " +"Session estendida, de modo que somente o último ciclo da " +"transação tenha permissão de persistir todas as modificações feitas nesta " +"conversação. Disso, somente esta última transação incluiria a operação " +"flush() e então chamar também close() " +"da sessão para terminar a conversação." + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"Este pattern é problemático se a Session for " +"demasiadamente grande para ser armazenado durante o tempo que usuário " +"pensar, por exemplo um HttpSession estiver mantido tão " +"pequeno quanto possível. Como o Session é também cache de " +"primeiro nível (imperativo) e contém todos os objetos carregados, nós " +"podemos provavelmente usar esta estratégia somente para alguns ciclos de " +"requisição/resposta. Você deve usar a Session somente " +"para uma única conversação, porque ela logo também estará com dados velhos." + +#. Tag: para +#: transactions.xml:723 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"(Note que versões mais atuais de Hibernate requerem a desconexão e o " +"reconexão explícitas de uma Session. Estes métodos são " +"desatualizados, como o início e término de uma transação tem o mesmo efeito.)" + +#. Tag: para +#: transactions.xml:729 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"Note também que você deve manter a Session desconectada " +"fechada para a camada de persistência. Ou seja, use um EJB stateful session " +"bean para prender a Session em um ambiente do três " +"camadas e não o transferir à camada web (ou até serializá-lo para uma camada " +"separada) para armazená-lo no HttpSession." + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"O pattern sessão estendida, ou session-per-conversation, é mais difícil de implementar com gerenciamento automático de " +"sessão atual. Você precisa fornecer sua própria implementação do " +"CurrentSessionContext para isto (veja o Hibernate Wiki " +"para exemplos)." + +#. Tag: title +#: transactions.xml:747 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "Objetos destacados e versionamento automático" + +#. Tag: para +#: transactions.xml:749 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"Cada interação com o armazenamento persistente ocorre em uma " +"Session nova. Entretanto, as mesmas instâncias " +"persistentes são reusadas para cada interação com o banco de dados. A " +"aplicação manipula o estado das instâncias desatachadas originalmente " +"carregadas em um outro Session e reata-os então usando " +"Session.update(), Session.saveOrUpdate() ou Session.merge()." + +#. Tag: programlisting +#: transactions.xml:757 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:759 +#, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occured." +msgstr "" +"Outra vez, o Hibernate verificará versões da instância durante o flush, " +"lançando uma exceção se ocorrer conflitos de atualizações." + +#. Tag: para +#: transactions.xml:764 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"Você pode também chamar o lock() em vez de update" +"() e usar LockMode.READ (executando uma " +"checagem de versão, ignorando todos os caches) se você estiver certo de que " +"o objeto não foi modificado." + +#. Tag: title +#: transactions.xml:773 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "Versionamento automático customizado" + +#. Tag: para +#: transactions.xml:775 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"Você pode desabilitar o incremento da versão automática de Hibernate para " +"propriedades e coleções particulares configurando o mapeamento do atributo " +"optimistic-lock para false. O Hibernate então não irá " +"incrementa versões se a propriedade estiver modificada." + +#. Tag: para +#: transactions.xml:782 +#, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this concepetually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"Os esquemas da base de dados legada são freqüentemente estáticos e não podem " +"ser modificados. Ou outras aplicações puderam também acessar a mesma base de " +"dados e não sabem tratar a versão dos números ou timestamps. Em ambos os " +"casos, o versionamento não pode confiar em uma coluna particular em uma " +"tabela. Para forçar uma checagem de versão sem uma versão ou mapeamento da " +"propriedade do timestamp com uma comparação do estado de todos os campos em " +"uma linha, configure optimistic-lock=\"all\" no " +"mapeamento <class>. Note que isto conceitualmente é " +"somente feito em trabalhos se Hibernate puder comparar o estado velho e " +"novo, isto é, se você usa um único Session longo e não " +"session-per-request-with-detached-objects." + +#. Tag: para +#: transactions.xml:793 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"Às vezes a modificação concorrente pode ser permitida tão longa quanto às " +"mudanças que tiveram sido feitas que não sobrepuseram. Se você configurar " +"optimistic-lock=\"dirty\" ao mapear o <" +"class>, o Hibernate comparará somente campos modificados " +"durante o flush." + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute uneccessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"Em ambos os casos, com as colunas dedicadas da versão/timestamp ou com " +"comparação do campo cheio/modificados, o Hibernate usa uma única declaração " +"UPDATE (com uma cláusula WHERE apropriada ) por entidade para executar a " +"checagem da versão e atualizar a informação. Se você usa a persistência " +"transitiva para cascatear o reatamento das entidades associadas, o Hibernate " +"pode executar atualizações desnecessárias. Isso não é geralmente um " +"problema, mas triggers on update em um banco de dados " +"podem ser executados mesmo quando nenhuma mudança foi feita nas instâncias " +"destacadas. Você pode customizar este comportamento configurando " +"select-before-update=\"true\" no mapeamento <" +"class>, forçando o Hibernate a dá um SELECT nas instâncias para " +"assegurar-se esse as mudanças ocorreram realmente, antes de atualizar a " +"linha." + +#. Tag: title +#: transactions.xml:817 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "Locking pessimista" + +#. Tag: para +#: transactions.xml:819 +#, no-c-format +msgid "" +"It is not intended that users spend much time worring about locking " +"strategies. Its usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"Não se pretende que os usuários gastam muitas horas se preocupando com suas " +"estratégias de locking. Geralmente é o bastante para especificar um nível de " +"isolamento para as conexões JDBC e então deixar simplesmente o banco de " +"dados fazer todo o trabalho. Entretanto, os usuários avançados podem às " +"vezes desejar obter locks pessimistas exclusivos, ou re-obter locks no " +"início de uma nova transação." + +#. Tag: para +#: transactions.xml:826 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "" +"O Hibernate usará sempre o mecanismo de lock da base de dados, nunca trava " +"objetos na memória!" + +#. Tag: para +#: transactions.xml:831 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"A classe LockMode define os diferentes níveis de lock que " +"o Hibernate pode adquirir. Um lock é obtido pelos seguintes mecanismos:" + +#. Tag: para +#: transactions.xml:838 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"LockMode.WRITE é adquirido automaticamente quando o " +"Hibernate atualiza ou insere uma linha." + +#. Tag: para +#: transactions.xml:844 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"LockMode.UPGRADE pode ser adquirido explicitamente pelo " +"usuário usando SELECT ... FOR UPDATE em um banco de dados " +"que suporte esse sintaxe." + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"LockMode.UPGRADE_NOWAIT pode ser adquirido explicitamente " +"pelo usuário usando SELECT ... FOR UPDATE NOWAIT no " +"Oracle." + +#. Tag: para +#: transactions.xml:856 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"LockMode.READ é adquirido automaticamente quando o " +"Hibernate lê dados em um nível Repeatable Read ou Serializable isolation. " +"Pode ser readquirido explicitamente pelo usuário." + +#. Tag: para +#: transactions.xml:863 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE representa a ausência do lock. Todos os " +"objetos mudam para esse estado de lock no final da Transaction. Objetos associados com a sessão através do método update()" +" ou saveOrUpdate() também são inicializados com " +"esse lock mode." + +#. Tag: para +#: transactions.xml:872 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "" +"O lock obtido \"explicitamente pelo usuário\" se dá em uma das seguintes " +"maneiras:" + +#. Tag: para +#: transactions.xml:878 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"Uma chamada a Session.load(), especificando o " +"LockMode." + +#. Tag: para +#: transactions.xml:883 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "Uma chamada a Session.lock()." + +#. Tag: para +#: transactions.xml:888 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "Uma chamada a Query.setLockMode()." + +#. Tag: para +#: transactions.xml:894 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"Se uma Session.load() é invocada com UPGRADE ou UPGRADE_NOWAIT, e o objeto requisitado ainda " +"não foi carregado pela sessão, o objeto é carregado usando " +"SELECT ... FOR UPDATE. Se load() for " +"chamado para um objeto que já foi carregado com um lock menos restritivo que " +"o novo lock solicitado, o Hibernate invoca o método lock() para aquele objeto." + +#. Tag: para +#: transactions.xml:903 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"O método Session.lock() executa uma verificação no número " +"da versão se o modo de lock especificado for READ, " +"UPGRADE ou UPGRADE_NOWAIT.. (No caso " +"do UPGRADE ou UPGRADE_NOWAIT, é usado " +"SELECT ... FOR UPDATE.)" + +#. Tag: para +#: transactions.xml:910 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"Se o banco de dados não suportar o lock mode solicitado, o Hibernate vai " +"usar um modo alternativo apropriado (ao invés de lançar uma exceção). Isso " +"garante que a aplicação vai ser portável." + +#. Tag: title +#: transactions.xml:919 +#, no-c-format +msgid "Connection Release Modes" +msgstr "Modos de liberar a Connection" + +#. Tag: para +#: transactions.xml:921 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" +"O comportamento legado do Hibernate (2.x) em consideração ao gerenciamento " +"da conexão via JDBC fez com que a Session precisasse " +"obter uma conexão quando ela precisasse pela primeira vez e depois manter a " +"conexão enquanto a sessão não fosse fechada. O Hibernate 3.x introduz a " +"idéia de modos de liberar a sessão, para informar a sessão a forma como deve " +"manusear a sua conexão JDBC. Veja que essa discussão só é pertinente para " +"conexões fornecidas com um ConnectionProvider " +"configurado; conexões fornecidas pelo usuário estão fora do escopo dessa " +"discussão. Os diferentes modos de liberação estão definidos pelos valores da " +"enumeração org.hibernate.ConnectionReleaseMode:" + +#. Tag: para +#: transactions.xml:935 +#, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obatins a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" +"ON_CLOSE - essencialmente é o modo legado descrito acima. " +"A sessão do Hibernate obtêm a conexão quando precisar executar alguma " +"operação JDBC pela primeira vez e mantem enquanto a conexão não for fechada." + +#. Tag: para +#: transactions.xml:942 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" +"AFTER_TRANSACTION – informa que a conexão deve ser " +"liberada após a conclusão de uma org.hibernate.Transaction." + +#. Tag: para +#: transactions.xml:948 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" +"AFTER_STATEMENT (também conhecida com liberação " +"agressiva) – informa que a conexão deve ser liberada após a execução de cada " +"statement. A liberação agressiva não ocorre se o statement deixa pra trás " +"algum recurso aberto associado com a sessão obtida; atualmente, a única " +"situação em que isso é possível é com o uso de org.hibernate." +"ScrollableResults." + +#. Tag: para +#: transactions.xml:958 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" +"O parâmetro de configuração hibernate.connection.release_mode é usado para especificar qual modo de liberação deve ser usado. " +"Opções disponíveis:" + +#. Tag: para +#: transactions.xml:965 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" +"auto (padrão) – essa opção delega ao modo de liberação " +"retornado pelo método org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode(). Para JTATransactionFactory, ele retorna " +"ConnectionReleaseMode.AFTER_STATEMENT; para JDBCTransactionFactory, ele " +"retorna ConnectionReleaseMode.AFTER_TRANSACTION. Raramente é uma boa idéia " +"alterar padrão, como frequencia ao se fazer isso temos falhas que parecem " +"bugs e/ou suposições inválidas no código do usuário." + +#. Tag: para +#: transactions.xml:975 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" +"on_close - indica o uso da ConnectionReleaseMode." +"ON_CLOSE. Essa opção foi deixada para manter a compatibilidade, mas seu uso " +"é fortemente desencorajado." + +#. Tag: para +#: transactions.xml:981 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" +"after_transaction – indica o uso da ConnectionReleaseMode." +"AFTER_TRANSACTION. Essa opção nada deve ser usada com ambientes JTA. Também " +"note que no caso da ConnectionReleaseMode.AFTER_TRANSACTION, se a sessão foi " +"colocada no modo auto-commit a conexão vai ser liberada de forma similar ao " +"modo AFTER_STATEMENT." + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" +"after_statement – indica o uso ConnectionReleaseMode." +"AFTER_STATEMENT. Adicionalmente, o ConnectionProvider " +"configurado é consultado para verificar se suporta essa configuração " +"((supportsAggressiveRelease()). Se não suportar, o modo " +"de liberação é redefinido como ConnectionRelease-Mode.AFTER_TRANSACTION. " +"Essa configuração só é segura em ambientes onde podemos readquirir a mesma " +"conexão JDBC toda vez que o método ConnectionProvider.getConnection" +"() for chamado ou em um ambiente auto-commit onde não importa se " +"nós recuperamos a mesma conexão." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/tutorial.po b/documentation/envers/src/main/docbook/pt-BR/content/tutorial.po new file mode 100644 index 0000000000..e3bf7303c9 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/tutorial.po @@ -0,0 +1,2829 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:7 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "Introdução ao Hibernate" + +#. Tag: title +#: tutorial.xml:10 +#, no-c-format +msgid "Preface" +msgstr "Prefácio" + +#. Tag: para +#: tutorial.xml:12 +#, no-c-format +msgid "" +"This chapter is an introductory tutorial for new users of Hibernate. We " +"start with a simple command line application using an in-memory database and " +"develop it in easy to understand steps." +msgstr "" +"Este capítulo é um tutorial introdutório para novos usuários do Hibernate. " +"Nós iniciaremos com uma simples linha de comando em uma aplicação usando uma " +"base de dados em memória tornando isto um passo de fácil de compreender." + +#. Tag: para +#: tutorial.xml:18 +#, no-c-format +msgid "" +"This tutorial is intended for new users of Hibernate but requires Java and " +"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party " +"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3." +msgstr "" +"Este tutorial é voltado para novos usuários do Hibernate, mas requer um " +"conhecimento de Java e SQL. Este tutorial é baseado no tutorial de Michael " +"Gloegl, as bibliotecas Third Party foram nomeadas para JDK 1.4 e 5.0. Você " +"pode precisar de outras bibliotecas para JDK 1.3." + +#. Tag: para +#: tutorial.xml:24 +#, no-c-format +msgid "" +"The source code for the tutorial is included in the distribution in the " +"doc/reference/tutorial/ directory." +msgstr "" +"O código fonte para o tutorial está incluído no diretório da distribuição " +"doc/reference/tutorial/." + +#. Tag: title +#: tutorial.xml:32 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "Parte 1 – A primeira aplicação Hibernate" + +#. Tag: para +#: tutorial.xml:34 +#, no-c-format +msgid "" +"First, we'll create a simple console-based Hibernate application. We use an " +"Java database (HSQL DB), so we do not have to install any database server." +msgstr "" +"Primeiro, iremos criar uma simples aplicação Hibernate baseada em console. " +"Usaremos uma base de dados Java (HSQL DB), então não teremos que instalar " +"nenhum servidor de base de dados." + +#. Tag: para +#: tutorial.xml:39 +#, no-c-format +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the hosts of these events." +msgstr "" +"Vamos supor que precisemos de uma aplicação com um banco de dados pequeno " +"que possa armazenar e atender os eventos que queremos, e as informaççes " +"sobre os hosts destes eventos." + +#. Tag: para +#: tutorial.xml:44 +#, no-c-format +msgid "" +"The first thing we do, is set up our development directory and put all the " +"Java libraries we need into it. Download the Hibernate distribution from the " +"Hibernate website. Extract the package and place all required libraries " +"found in /lib into into the /lib " +"directory of your new development working directory. It should look like " +"this:" +msgstr "" +"A primeira coisa que devemos fazer é configurar nosso diretório de " +"desenvolvimento, e colocar todas as bibliotecas Java que precisamos dentro " +"dele. Faça o download da distribuição do Hibernate no site do Hibernate. " +"Descompacte o pacote e coloque todas as bibliotecas necessárias encontradas " +"no diretório /lib, dentro do diretório /lib do seu novo projeto. Você deverá ter algo parecido com isso:" + +#. Tag: programlisting +#: tutorial.xml:52 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:54 +#, no-c-format +msgid "" +"This is the minimum set of required libraries (note that we also copied " +"hibernate3.jar, the main archive) for Hibernate at the time of " +"writing. The Hibernate release you are using might require more " +"or less libraries. See the README.txt file in the " +"lib/ directory of the Hibernate distribution for more " +"information about required and optional third-party libraries. (Actually, " +"Log4j is not required but preferred by many developers.)" +msgstr "" +"Esta é a configuração mínima requerida das bibliotecas (observe que também " +"foi copiado o hibernate3.jar da pasta principal do Hibernate) para o " +"Hibernate na hora do desenvolvimento. O Hibernate " +"permite que você utilize mais ou menos bibliotecas. Veja o arquivo " +"README.txt no diretório lib/ da " +"distribuição do Hibernate para maiores informaççes sobre bibliotecas " +"requeridas e opcionais. (Atualmente, a biblioteca Log4j não é requerida, mas " +"é preferida por muitos desenvolvedores.)" + +#. Tag: para +#: tutorial.xml:63 +#, no-c-format +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "" +"Agora, iremos criar uma classe que representa o evento que queremos " +"armazenar na base de dados.." + +#. Tag: title +#: tutorial.xml:68 +#, no-c-format +msgid "The first class" +msgstr "A primeira Classe" + +#. Tag: para +#: tutorial.xml:70 +#, no-c-format +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "" +"Nossa primeira classe de persistência é uma simples classe JavaBean com " +"algumas propriedades:" + +#. Tag: programlisting +#: tutorial.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:76 +#, no-c-format +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"Você pode ver que esta classe usa o padrão JavaBean para o nomeamento " +"convencional da propriedade getter e dos métodos setter, como também a " +"visibilidade private dos campos. Este é um padrão de projeto recomendado, " +"mas não requerido. O Hibernate pode também acessar campos diretamente, o " +"benefício para os métodos de acesso é a robustez para o Refactoring. O " +"construtor sem argumento é requerido para instanciar um objeto desta classe " +"com a reflexão." + +#. Tag: para +#: tutorial.xml:84 +#, no-c-format +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"A propriedade id mantém um único valor de identificação " +"para um evento particular. Todas as classes persistentes da entidade (bem " +"como aquelas classes dependentes de menos importância) precisam de uma " +"propriedade de identificação, caso nós queiramos usar o conjunto completo de " +"características do Hibernate. De fato, a maioria das aplicações (esp. " +"aplicações web) precisam destinguir os objetos pelo identificador, então " +"você deverá considerar esta, uma característica em lugar de uma limitação. " +"Porém, nós normalmente não manipulamos a identidade de um objeto, " +"consequentemente o método setter deverá ser privado. O Hibernate somente " +"nomeará os identificadores quando um objeto for salvo. Você pode ver como o " +"Hibernate pode acessar métodos públicos, privados, e protegidos, como também " +"campos (públicos, privados, protegidos) diretamente. A escolha está até " +"você, e você pode combinar isso para adaptar seu projeto de aplicação" + +#. Tag: para +#: tutorial.xml:96 +#, no-c-format +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"O construtor sem argumentos é um requerimento para todas as classes " +"persistentes; O Hibernate tem que criar para você os objetos usando Java " +"Reflection. O construtor pode ser privado, porém, a visibilidade do pacote é " +"requerida para a procuração da geração em tempo de execução e recuperação " +"eficiente dos dados sem a instrumentação de bytecode" + +#. Tag: para +#: tutorial.xml:103 +#, no-c-format +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"Coloque este fonte Java no diretório chamado src na pasta " +"de desenvolvimento, e em seu pacote correto. O diretório deverá ser parecido " +"como este:" + +#. Tag: programlisting +#: tutorial.xml:108 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:110 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "" +"No próximo passo, iremos falar sobre as classes de persistência do " +"Hibernate.." + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The mapping file" +msgstr "O mapeamento do arquivo" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"O Hibernate precisa saber como carregar e armazenar objetos da classe de " +"persistência. Isto será onde o mapeamento do arquivo do Hibernate entrará em " +"jogo. O arquivo mapeado informa ao Hibernate, qual tabela no banco de dados " +"ele deverá acessar, e quais as colunas na tabela ele deverá usar." + +#. Tag: para +#: tutorial.xml:126 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "A estrutura básica de um arquivo de mapeamento é parecida com:" + +#. Tag: programlisting +#: tutorial.xml:130 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:132 +#, no-c-format +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"Note que o Hibernate DTD é muito sofisticado. Você pode usar isso para auto-" +"conclusão no mapeamento XML dos elementos e atributos no seu editor ou IDE. " +"Você também pode abrir o arquivo DTD no seu editor – é a maneira mais fácil " +"de ter uma visão geral de todos os elementos e atributos e dos padrões, como " +"também alguns comentários. Note que o Hibernate não irá carregar o arquivo " +"DTD da web, e sim do diretório da aplicação (classpath). O arquivo DTD está " +"incluído no hibernate3.jar como também no diretório " +"src/ da distribuição do Hibernate." + +#. Tag: para +#: tutorial.xml:143 +#, no-c-format +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"Nós omitiremos a declaração do DTD nos exemplos futuros para encurtar o " +"código. Isto, é claro, não é opcional." + +#. Tag: para +#: tutorial.xml:148 +#, no-c-format +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"Entre os dois tags hibernate-mapping, inclua um elemento " +"class. Todas as classes persistentes da entidade " +"(novamente, poderá haver mais tarde, dependências sobre as classes que não " +"são classes-primárias de entidades) necessitam do tal mapeamento, para uma " +"tabela na base de dados SQL" + +#. Tag: programlisting +#: tutorial.xml:155 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:157 +#, no-c-format +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"Mais adiante iremos dizer ao Hibernate como fazer para persistir e carregar " +"objetos da classe Event da tabela EVENTS, cada instancia representada por uma coluna na tabela. Agora, " +"continuaremos com o mapeamento de uma única propriedade identificadora para " +"as chaves primárias da tabela. Além disso, nós não iremos se importar com " +"esta propriedade identificadora, nós iremos configurar uma estratégia de " +"geração de id’s para uma chave primária de uma surrogate key:" + +#. Tag: programlisting +#: tutorial.xml:165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:167 +#, no-c-format +msgid "" +"The id element is the declaration of the identifer " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"O elemento id é a declaração da propriedade " +"identificadora, o name=\"id\" declara o nome da " +"propriedade Java – o Hibernate irá usar os métodos getter e setter para " +"acessar a propriedade. O atributo da coluna informa ao Hibernate qual coluna " +"da tabela EVENTS nós iremos usar como chave primária. O " +"elemento generator especifica a estratégia de geração do " +"identificador, neste caso usaremos native, que escolhe a " +"melhor estratégia dependendo da base de dados (dialeto) configurada. O " +"Hibernate suporta a base de dados gerada, globalmente única, bem como a " +"atribuição aos identificadores da aplicação (ou toda estratégia escrita para " +"uma extensão)." + +#. Tag: para +#: tutorial.xml:180 +#, no-c-format +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"Finalmente incluiremos as declarações para as propriedades persistentes da " +"classe no arquivo mapeado. Por default, nenhuma das propriedades da classe é " +"considerada persistente:" + +#. Tag: programlisting +#: tutorial.xml:186 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:188 +#, no-c-format +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"Da mesma maneira que com o elemento id, o atributo " +"name do elemento property informa ao " +"Hibernate qual método getter e setter deverá usar. Assim, neste caso, o " +"Hibernate irá procurar pelo getDate()/setDate(), como " +"também pelo getTitle()/setTitle()." + +#. Tag: para +#: tutorial.xml:195 +#, no-c-format +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"Porque fazer o mapeamento da propriedade date incluído no " +"atributo column, e no title não fazer? Sem o atributo " +"column o Hibernate por padrão usa o nome da propriedade " +"como o nome da coluna. Isto trabalha muito bem para o title. Entretanto o date é uma palavra-chave reservada " +"na maioria dos bancos de dados, assim nós melhoramos o mapeamentos disto com " +"um nome diferente." + +#. Tag: para +#: tutorial.xml:204 +#, no-c-format +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"A próxima coisa interessante é que mapemanto do title " +"também falta o atributo type. O tipo que declaramos e o " +"uso nos arquivos mapeados, não são como você pôde esperar, atributos de " +"dados Java. Eles não são como os tipos de base de dados SQL. Esses tipos " +"podem ser chamados de Tipos de mapeamento Hibernate, " +"que são conversores que podem traduzir tipos de dados do Java para os tipos " +"de dados SQL e vice-versa. Novamente, o Hibernate irá tentar determinar a " +"conversão correta e mapeará o type próprio, caso o tipo " +"do atributo não estiver presente no mapeamento. Em alguns casos, esta " +"detecção automática (que usa Reflection sobre as classes Java) poderá não " +"ter padrão que você espera ou necessita. Este é o caso com a propriedade " +"date. O Hibernate não pode saber se a propriedade (que é " +"do java.util.Date) pode mapear para uma coluna do tipo " +"date do SQL, timestamp, ou " +"time . Nós preservamos a informação cheia de datas e " +"horas pelo mapeamento da propriedade com um conversor timestamp." + +#. Tag: para +#: tutorial.xml:220 +#, no-c-format +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"Este arquivo de mapeamento deve ser salvo como Event.hbm.xml, corretamente no diretório próximo ao arquivo fonte da Classe Java " +"Event. O nomeamento dos arquivos de mapeamento podem ser " +"arbitrários, porém o sufixo hbm.xml é uma convenção da " +"comunidade dos desenvolvedores do Hibernate. Esta estrutura do diretório " +"deve agora se parecer com isso:" + +#. Tag: programlisting +#: tutorial.xml:228 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:230 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "Nós iremos continuar com a configuração principal do Hibernate." + +#. Tag: title +#: tutorial.xml:237 +#, no-c-format +msgid "Hibernate configuration" +msgstr "Configuração do Hibernate" + +#. Tag: para +#: tutorial.xml:239 +#, no-c-format +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"Agora nós temos uma classe persistente e este arquivo de mapeamento no " +"lugar. Está na hora de configurar o Hibernate. Antes de fazermos isso, " +"iremos precisar de uma base de dados. O HSQL DB, um SQL DBMS feito em java, " +"pode ser baixado através do site do HSQL DB(http://hsqldb.org/). Atualmente, " +"você só precisa baixar o hsqldb.jar. Coloque este arquivo " +"no diretório da pasta de desenvolvimento lib/." + +#. Tag: para +#: tutorial.xml:247 +#, no-c-format +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"Crie um diretório chamado data no diretório root de " +"desenvolvimento – Isto será onde o HSQL DB irá armazenar arquivos de dados. " +"Agora iremos iniciar o banco de dados executando java -classpath ../" +"lib/hsqldb.jar org.hsqldb.Server neste diretório de dados. Você " +"pode ver ele iniciando e conectando ao socket TCP/IP, isto será onde nossa " +"aplicação irá se conectar depois. Se você deseja iniciar uma nova base de " +"dados durante este tutorial, finalize o HSQL DB(pressionando o CTRL " +"+ C na janela), delete todos os arquivos no diretório " +"data/, e inicie o HSQL BD novamente." + +#. Tag: para +#: tutorial.xml:257 +#, no-c-format +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"O Hibernate é uma camada na sua aplicação na qual se conecta com a base de " +"dados, para isso necessita de informação da conexão. As conexões são feitas " +"através de um pool de conexão JDBC, na qual teremos que configurar. A " +"distribuição do Hibernate contém diversas ferramentas de pooling da conexão " +"JDBC de fonte aberta, mas iremos usar o pool de conexão interna para este " +"tutorial. Note que você tem que copiar a biblioteca necessária em seu " +"classpath e use configurações diferentes para pooling de conexão caso você " +"deseje utilizar um software de pooling JDBC terceirizado para qualidade de " +"produção." + +#. Tag: para +#: tutorial.xml:267 +#, no-c-format +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"Para as configurações do Hibernate, nós podemos usar um arquivo simples " +"hibernate.properties, um arquivo mais ligeiramente " +"sofisticado hibernate.cfg.xml ou até mesmo uma instalação " +"programática completa. A maioria dos usuários preferem utilizar o arquivo de " +"configuração XML" + +#. Tag: programlisting +#: tutorial.xml:273 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:275 +#, no-c-format +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"Note que esta configuração XML usa um diferente DTD. Nós configuraremos as " +"SessionFactory do Hibernate – uma factory global " +"responsável por uma base de dedados particular. Se você tiver diversas bases " +"de dados, use diversas configurações <session-factory>, geralmente em diversos arquivos de configuração (para uma partida " +"mais fácil)." + +#. Tag: para +#: tutorial.xml:283 +#, no-c-format +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"As primeiras quatro propriedades do elemento contém a " +"configuração necessária para a conexão ao JDBC. A propriedade " +"propriedade dialect do elemento especifica a variante " +"particular do SQL que o Hibernate gera. O gerenciamento automático de sessão " +"do Hibernate para contextos de persistência estará disponível em breve. A " +"opção hbm2ddl.auto habilita a geração automática de " +"schemas da base de dados – diretamente na base de dados. Isto também pode " +"ser naturalmente desligado (removendo a opção de configuração) ou " +"redirecionando para um arquivo com ajuda do SchemaExport " +"nas tarefas do Ant. Finalmente, iremos adicionar os arquivos das classes de " +"persistência mapeadas na configuração." + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"Copie este arquivo no diretório fonte, assim isto irá terminar na raiz " +"(root) do classpath. O Hibernate automaticamente procura por um arquivo " +"chamado hibernate.cfg.xml na raiz do classpath, no " +"startup." + +#. Tag: title +#: tutorial.xml:305 +#, no-c-format +msgid "Building with Ant" +msgstr "Construindo com o Ant" + +#. Tag: para +#: tutorial.xml:307 +#, no-c-format +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"Nos iremos, agora, construir o tutorial com Ant. Você ira precisar o Ant " +"instalado – se encontra disponível na página de download do Ant. Como instalar o Ant, " +"não será abordado aqui. Caso tenha alguma dúvida, por favor, vá ao Ant manual. Depois " +"que tiver instalado o Ant, podemos começar a criar o arquivo de construção " +"build.xml. Este arquivo será chamado de build." +"xml e posto diretamente no diretório de desenvolvimento." + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "Um arquivo básico de build, se parece com isto:" + +#. Tag: programlisting +#: tutorial.xml:320 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:322 +#, no-c-format +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" +"Isto irá avisar ao Ant para adicionar todos os arquivos no diretório lib " +"terminando com .jar, para o classpath usado para " +"compilação. Irá também copiar todos os arquivos não-java para o diretório " +"alvo (arquivos de configuração, mapeamento). Se você rodar o ant agora, " +"deverá ter esta saída." + +#. Tag: programlisting +#: tutorial.xml:329 +#, no-c-format +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:334 +#, no-c-format +msgid "Startup and helpers" +msgstr "Startup and helpers" + +#. Tag: para +#: tutorial.xml:336 +#, no-c-format +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"É hora de carregar e arquivar alguns objetos Event, mas " +"primeiro nós temos de completar o setup com algum código de infraestrutura. " +"Este startup inclui a construção de um objeto SessionFactory global e armazenar isto em algum lugar de fácil acesso para o " +"código da aplicação. Uma SessionFactory pode abrir novas " +"Session's. Uma Session representa uma " +"unidade single-theaded do trabalho, a SessionFactory é um " +"objeto global thread-safe, instanciado uma vez." + +#. Tag: para +#: tutorial.xml:346 +#, no-c-format +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "" +"Nos iremos criar uma classe de ajuda HibernateUtil, que " +"toma conta do startup e faz acesso a uma SessionFactory " +"conveniente. Vamos dar uma olhada na implementação:" + +#. Tag: programlisting +#: tutorial.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:354 +#, no-c-format +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"Esta classe não só produz a global SessionFactory no seu " +"static initializer (chamado uma vez pela JVM quando a classe é carregada), " +"mas também esconde o fato de que isto usa um static singleton. Ela pode " +"muito bem, enxergar a SessionFactory do JNDI em um " +"application server." + +#. Tag: para +#: tutorial.xml:361 +#, no-c-format +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"Se você der à SessionFactory um nome, no seu arquivo de " +"configuração. O Hibernate irá, de fato, tentar uni-lo ao JNDI depois que " +"estiver construído. Para evitar este completamente este código, você também " +"poderia usar JMX deployment e deixar o contêiner JMX capaz, instanciar e " +"unir um HibernateService no JNDI. Essas opções avançadas " +"são discutidas no documento de referência do Hibernate." + +#. Tag: para +#: tutorial.xml:370 +#, no-c-format +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"Coloque o HibernateUtil.java no diretório de arquivos de " +"desenvolvimento(source), em um pacote após o events:" + +#. Tag: programlisting +#: tutorial.xml:375 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:377 +#, no-c-format +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"Novamente, isto deve compilar sem problemas. Finalmente, nós precisamos " +"configurar um sistema de logging – o Hibernate usa commons logging e deixa " +"você escolher entre o Log4j e o logging do JDK 1.4 . A maioria dos " +"desenvolvedores preferem o Log4j: copie log4j.properties " +"da distribuição do Hibernate (está no diretório etc/), " +"para seu diretório src, depois vá em hibernate.cfg.xml. " +"Dê uma olhada no exemplo de configuração e mude as configurações se você " +"quizer ter uma saída mais detalhada. Por default, apenas as mensagems de " +"startup e shwwn do Hibernate é mostrada no stdout." + +#. Tag: para +#: tutorial.xml:387 +#, no-c-format +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "" +"O tutorial de infra-estrutura está completo - e nós já estamos preparados " +"para algum trabalho de verdade com o Hibernate." + +#. Tag: title +#: tutorial.xml:395 +#, no-c-format +msgid "Loading and storing objects" +msgstr "Carregando e salvando objetos" + +#. Tag: para +#: tutorial.xml:397 +#, no-c-format +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"Finalmente, nós podemos usar o Hibernate para carregar e armazenar objetos. " +"Nós escrevemos uma classe EventManager com um método main" +"():" + +#. Tag: programlisting +#: tutorial.xml:402 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:404 +#, no-c-format +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"Nós criamos um novo objeto Event, e passamos para o " +"Hibernate. O Hibernate sabe como tomar conta do SQL e executa " +"INSERTs no banco de dados. Vamos dar uma olhada na " +"Session e no código Transaction-" +"handling antes de executarmos." + +#. Tag: para +#: tutorial.xml:411 +#, no-c-format +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"Um Session é uma unidade simples de trabalho. Por agora " +"nós iremos pegar coisas simples e assumir uma granularidade de um-pra-um " +"entre uma Session do Hibernate e uma transação de banco " +"de dados. Para proteger nosso código de um atual sistema subjacente de " +"transação (nesse caso puro JDBC, mas também poderia rodar com JTA), nos " +"usamos a API Transaction, que está disponível na " +"Session do Hibernate." + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"O que a sessionFactory.getCurrentSession() faz? Primeiro, " +"você pode chamar quantas vezes e de onde quiser, uma vez você recebe sua " +"SessionFactory (fácil graças ao HibernateUtil). O método getCurrentSession() sempre retorna a " +"unidade de trabalho \"corrente\". Lembra de que nós mudamos a opção de " +"configuração desse mecanismo para thread no hibernate.cfg.xml? Daqui em diante, o escopo da unidade de trabalho corrente é a " +"thread Java corrente que executa nossa aplicação. Entretanto, esta não é " +"toda a verdade. Uma" + +#. Tag: para +#: tutorial.xml:430 +#, no-c-format +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"Session começa quando é primeiramente necessária, quando " +"é feita a primeira chamada à getCurrentSession(). É então " +"limitado pelo Hibernate para thread corrente. Quando a transação termina, " +"tanto com commit quanto rollback, o Hibernate também desune a " +"Session da thread e fecha isso pra você. Se você chamar " +"getCurrentSession() novamente, você receberá uma nova " +"Session e pode começar uma nova unidade de trabalho. Esse " +"modelo de programação de limite de thread thread-bound, " +"é o modo mais popular de se usar o Hibernate." + +#. Tag: para +#: tutorial.xml:441 +#, no-c-format +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." + +#. Tag: para +#: tutorial.xml:452 +#, no-c-format +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"Dê uma olhada no para mais informações a " +"respeito de manipulação de transação e demarcação. Nós também pulamos " +"qualquer manipulação de erro e rollback no exemplo anterior." + +#. Tag: para +#: tutorial.xml:458 +#, no-c-format +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"Para executar esta primeira rotina, nos teremos que adicionar um ponto de " +"chamada para o arquivo de build do Ant:" + +#. Tag: programlisting +#: tutorial.xml:462 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:464 +#, no-c-format +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"O valor do argumento action, é setado na linha de comando " +"quando chamando esse ponto:" + +#. Tag: programlisting +#: tutorial.xml:469 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:471 +#, no-c-format +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "" +"Você deverá ver, após a compilação, o startup do Hibernate e, dependendo da " +"sua configuração, muito log de saída. No final você verá a seguinte linha:" + +#. Tag: programlisting +#: tutorial.xml:476 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:478 +#, no-c-format +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"Este é o INSERT executado pelo Hibernate, os pontos de " +"interrogação representam parêmetros de união do JDBC. Para ver os valores " +"substituídos, ou para diminuir a verbalidade do log, check seu " +"llog4j.properties." + +#. Tag: para +#: tutorial.xml:484 +#, no-c-format +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"Agora nós gostaríamos de listar os eventos arquivados, então nós adicionamos " +"uma opção para o método main:" + +#. Tag: programlisting +#: tutorial.xml:488 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "Nos também adicionamos um novo método listEvents():" + +#. Tag: programlisting +#: tutorial.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:496 +#, no-c-format +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"O que nós fazemos aqui, é usar uma query HQL (Hibernate Query Language), " +"para carregar todos os objetos Event exitentes no banco " +"de dados. O Hibernate irá gerar o SQL apropriado, enviar para o banco de " +"dados e popular objetos Event com os dados. Você pode " +"criar queries mais complexas com HQL, claro." + +#. Tag: para +#: tutorial.xml:503 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "Agora, para executar e testar tudo isso, siga os passos a seguir:" + +#. Tag: para +#: tutorial.xml:509 +#, no-c-format +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "" +"Execute ant run -Daction=store para armazenar algo no " +"banco de dados e, claro, gerar o esquema do banco de dados antes pelo " +"hbm2ddl." + +#. Tag: para +#: tutorial.xml:515 +#, no-c-format +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"Agora desabilite hbm2ddl comentando a propriedade no seu arquivo " +"hibernate.cfg.xml. Normalmente só se deixa habilitado em " +"teste unitários contínuos, mas outra carga de hbm2ddl pode " +"remover tudo que você já tenha arquivado. Sa " +"configuração create, atualmente são traduzidas para " +"\"apague todas as tabelas do esquema, então recrie todas quando a " +"SessionFactory estiver pronta\"." + +#. Tag: para +#: tutorial.xml:525 +#, no-c-format +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"Se você agora chamar o Ant com -Daction=list, você deverá " +"ver os eventos que você acabou de criar. Você pode também chamar a ação " +"store mais algumas vezes." + +#. Tag: para +#: tutorial.xml:531 +#, no-c-format +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"Nota: A maioria dos novos usuários do Hibernate falha nesse ponto e nós " +"regularmente, vemos questões sobre mensagens de erro de tabela não " +"encontrada . Entretanto, se você seguir os passos marcados " +"acima, você não terá esse problema, com o hbm2ddl criando o esquema do banco " +"de dados na primeira execução, e restarts subsequentes da aplicação irão " +"usar este esquema. Se você mudar o mapeamento e/ou o esquema do banco de " +"dados, terá de re-habilitar o hbm2ddl mais uma vez." + +#. Tag: title +#: tutorial.xml:544 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "Part 2 - Mapeando associações" + +#. Tag: para +#: tutorial.xml:546 +#, no-c-format +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "" +"Nós mapeamos uma classe de entidade de persistência para uma tabela. Agora " +"vamos continuar e adicionar algumas associações de classe. Primeiro nos " +"iremos adicionar pessoas a nossa aplicação, e armazenar os eventos de que " +"elas participam." + +#. Tag: title +#: tutorial.xml:552 +#, no-c-format +msgid "Mapping the Person class" +msgstr "Mapeando a classe Person" + +#. Tag: para +#: tutorial.xml:554 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "O primeiro código da classe Person é simples:" + +#. Tag: programlisting +#: tutorial.xml:558 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:560 +#, no-c-format +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"Crie um novo arquivo de mapeamento, chamado Person.hbm.xml (não esqueça a referencia ao DTD no topo)" + +#. Tag: programlisting +#: tutorial.xml:565 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:567 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "Finalmente, adicione o novo mapeamento a configuração do Hibernate:" + +#. Tag: programlisting +#: tutorial.xml:571 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:573 +#, no-c-format +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"Nos iremos agora criar uma associação entre estas duas entidades. " +"Obviamente, pessoas (Person) podem participar de eventos, e eventos possuem " +"participantes. As questões de design com que teremos de lidar são: " +"direcionalidade, multiplicidade e comportamento de coleção." + +#. Tag: title +#: tutorial.xml:583 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "Uma associação Set-based unidirectional" + +#. Tag: para +#: tutorial.xml:585 +#, no-c-format +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "" +"Nos iremos adicionar uma coleção de eventos na classe Person. Desse jeito poderemos navegar pelos eventos de uma pessoa em " +"particular, sem executar uma query explicitamente – apenas chamando " +"aPerson.getEvents(). Nos usaremos uma coleção Java, um " +"Set, porquê a coleção não conterá elementos duplicados e " +"a ordem não é relevante para nós." + +#. Tag: para +#: tutorial.xml:592 +#, no-c-format +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "Vamos escrever o código para isto nas classes Java e então mapear:" + +#. Tag: programlisting +#: tutorial.xml:597 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:599 +#, no-c-format +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"Antes de mapearmos esta associação, pense no outro lado. Claramente, " +"poderíamos apenas fazer isto de forma unidirecional. Ou poderíamos criar " +"outra coleção no Event, se quisermos ser capaz de navegar " +"bidirecionalmente, i.e. um - anEvent.getParticipants(). " +"Isto não é necessário, de perspectiva funcional. Você poderia sempre " +"executar uma query explicita que retornasse os participantes de um evento em " +"particular. Esta é uma escolha de design que cabe a você, mas o que é claro " +"nessa discussão é a multiplicidade da associação: \"muitos\" valores em " +"ambos os lados, nós chamamos isto uma associação muitos-para-" +"muitos. Daqui pra frente, nos usaremos o mapeamento muitos-para-" +"muitos do Hibernate:" + +#. Tag: programlisting +#: tutorial.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:612 +#, no-c-format +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"O Hibernate suporta todo tipo de mapeamento de coleção , sendo um " +"<set> mais comum. Para uma associação muitos-para-" +"muitos (ou relacionamento de entidade n:m ), uma tabela " +"de associação é necessária. Cada linha nessa tabela representa um link entre " +"uma pessoa e um evento. O nome da tabela é configurado com o atributo " +"table do elemento set. O nome da " +"coluna identificadora na associção, peloo lado da pessoa, é definido com o " +"elemento <key> , o nome da coluna pelo lado dos " +"eventos, e definido com o atributo column do <" +"many-to-many>. Você também precisa dizer para o Hibernate a " +"classe dos objetos na sua coleção (a classe do outro lado das coleções de " +"referência)." + +#. Tag: para +#: tutorial.xml:624 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "O esquema de mapeamento para o banco de dados está a seguir:" + +#. Tag: programlisting +#: tutorial.xml:628 +#, no-c-format +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:633 +#, no-c-format +msgid "Working the association" +msgstr "Trabalhando a associação" + +#. Tag: para +#: tutorial.xml:635 +#, no-c-format +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "" +"Vamos trazer juntos algumas pessoas e eventos em um novo método na classe " +"EventManager::" + +#. Tag: programlisting +#: tutorial.xml:639 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"Após carregar um Person e um Event, " +"simplesmente modifique a coleção usando os métodos normais de uma coleção. " +"Como você pode ver, não há chamada explícita para update() ou save(), o Hibernate detecta automaticamente " +"que a coleção foi modificada e necessita ser atualizada. Isso é chamado de " +"checagem suja automática, e você também pode usá-la " +"modificando o nome ou a data de qualquer um dos seus objetos. Assim que eles " +"estiverem no estado persistent, ou seja, limitado por " +"uma Session do Hibernate em particular (i.e. eles foram " +"carregados ou salvos dentro de uma unidade de trabalho), o Hibernate " +"monitora qualquer alteração e executa o SQL em modo de escrita em segundo " +"plano. O processo de sincronização do estado da memória com o banco de " +"dados, geralmente apenas no final de uma unidade de trabalho, é chamado de " +"flushing. No nosso código, a unidade de trabalho " +"termina com o commit da transação do banco de dados – como definido pela " +"opção de configuração da thread da classe " +"CurrentSessionContext." + +#. Tag: para +#: tutorial.xml:656 +#, no-c-format +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"Você pode também querer carregar pessoas e eventos em diferentes unidades de " +"trabalho. Ou você modifica um objeto fora de uma Session, " +"quando não se encontra no estado persistent (se já esteve neste estado " +"anteriormente, chamamos esse estado de detached). Você " +"pode até mesmo modificar uma coleção quando esta se encontrar no estado " +"detached." + +#. Tag: programlisting +#: tutorial.xml:663 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:665 +#, no-c-format +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"A chamada update cria um objeto persistent novamente, " +"você poderia dizer que ele liga o objeto a uma nova unidade de trabalho, " +"assim qualquer modificação que você faça neste objeto enquanto estiver no " +"estado detached pode ser salvo no banco de dados. Isso inclui qualquer " +"modificação (adição/exclusão) que você faça em uma coleção da entidade deste " +"objeto." + +#. Tag: para +#: tutorial.xml:672 +#, no-c-format +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"Bom, isso não foi muito usado na nossa situação, porém, é um importante " +"conceito que você pode aplicar em seus aplicativos. Agora, complete este " +"exercício adicionando uma nova ação ao método main( ) da classe " +"EventManager e chame-o pela linha de comando. Se você " +"precisar dos identificadores de uma pessoa ou evento – o método save" +"() retorna estes identificadores (você poderá modificar alguns dos " +"métodos anteriores para retornar aquele identificador):" + +#. Tag: programlisting +#: tutorial.xml:680 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:682 +#, no-c-format +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"Este foi um exemplo de uma associação entre duas classes igualmente " +"importantes, duas entidades. Como mencionado anteriormente, há outras " +"classes e tipos dentro de um modelo típico, geralmente \"menos importante\". " +"Alguns você já viu, como um int ou uma String. Nós chamamos essas classes de value types, e " +"suas instâncias depend de uma entidade particular. As " +"instâncias desses tipos não possuem sua própria identidade, nem são " +"compartilhados entre entidades (duas pessoas não referenciam o mesmo objeto " +"firstname mesmo se elas tiverem o mesmo objeto " +"firstname). Naturalmente, os value types não são apenas encontrados dentro " +"da JDK (de fato, em um aplicativo Hibernate todas as classes JDK são " +"consideradas como value types), mas você pode também criar suas classes " +"como, por exemplo, Address ou MonetaryAmount." + +#. Tag: para +#: tutorial.xml:695 +#, no-c-format +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"Você também pode criar uma coleção de value types. Isso é conceitualmente " +"muito diferente de uma coleção de referências para outras entidades, mas em " +"Java parece ser quase a mesma coisa." + +#. Tag: title +#: tutorial.xml:703 +#, no-c-format +msgid "Collection of values" +msgstr "Coleção de valores" + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"Nós adicionamos uma coleção de objetos de tipo de valores à entidade " +"Person. Nós querermos armazenar endereços de e-mail, para " +"isso utilizamos o tipo String, e a coleção novamente será " +"um Set:" + +#. Tag: programlisting +#: tutorial.xml:710 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:712 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "O mapeamento deste Set:" + +#. Tag: programlisting +#: tutorial.xml:716 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:718 +#, no-c-format +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"A diferença comparada com o mapeamento anterior se encontra na parte " +"element, que indica ao Hibernate que a coleção não contém " +"referências à outra entidade, mas uma coleção de elementos do tipo " +"String (a tag name em miniscula indica que se trata de um " +"mapeamento do Hibernate para conversão de tipos). Mais uma vez, o atributo " +"table do elemento set determina o nome " +"da tabela para a coleção. O elemento key define o nome da " +"coluna de chave estrangeira na tabela de coleção. O atributo " +"column dentro do elemento element " +"define o nome da coluna onde os valores da String serão " +"armazenados." + +#. Tag: para +#: tutorial.xml:728 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "Dê uma olhada no esquema atualizado:" + +#. Tag: programlisting +#: tutorial.xml:732 +#, no-c-format +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:734 +#, no-c-format +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"Você pode observar que a chave primária da tabela da coleção é de na verdade " +"uma chave composta, usando ambas colunas. Isso também implica que cada " +"pessoa não pode ter endereços de e-mail duplicados, o que é exatamente a " +"semântica que precisamos para um set em Java." + +#. Tag: para +#: tutorial.xml:740 +#, no-c-format +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"Você pode agora tentar adicionar elementos a essa coleção, do mesmo modo que " +"fizemos anteriormente ligando pessoas e eventos. È o mesmo código em Java:" + +#. Tag: programlisting +#: tutorial.xml:745 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:747 +#, no-c-format +msgid "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." + +#. Tag: title +#: tutorial.xml:757 +#, no-c-format +msgid "Bi-directional associations" +msgstr "Associações bidirecionais" + +#. Tag: para +#: tutorial.xml:759 +#, no-c-format +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"Agora iremos mapear uma associação bidirecional – fazendo a associação entre " +"pessoas e eventos, de ambos os lados, em Java. Logicamente, o esquema do " +"banco de dados não muda, nós continuamos tendo multiplicidades muitos-para-" +"muitos. Um banco de dados é mais flexível do que uma linguagem de " +"programação para redes, ele não precisa de nenhuma direção de navegação – os " +"dados podem ser acessados em qualquer caminho possível." + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "" +"Primeiramente, adicione uma coleção de participantes à classe " +"Event:" + +#. Tag: programlisting +#: tutorial.xml:771 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:773 +#, no-c-format +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "" +"Agora mapeie este lado da associação em Event.hbm.xml." + +#. Tag: programlisting +#: tutorial.xml:777 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:779 +#, no-c-format +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"Como você pode ver, esses é uma mapeamento normal usando set em ambos documenentos de mapeamento. Observe que o nome das colunas " +"em key e many-to-many estão trocados " +"em ambos os documentos de mapeamento. A adição mais importante feita está no " +"atributo inverse=\"true\" no elemento set do mapeamento " +"da coleção da classe Event." + +#. Tag: para +#: tutorial.xml:787 +#, no-c-format +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"Isso significa que o Hibernate deve pegar o outro lado – a classe " +"Person – quando necessitar encontrar informação sobre a " +"relação entre as duas entidades. Isso será muito mais facilmente " +"compreendido quando você analisar como a relação bidirecional entre as " +"entidades é criada." + +#. Tag: title +#: tutorial.xml:796 +#, no-c-format +msgid "Working bi-directional links" +msgstr "Trabalhando com links bidirecionais" + +#. Tag: para +#: tutorial.xml:798 +#, no-c-format +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"Primeiro tenha em mente que o Hibernate não afeta a semântica normal do " +"Java. Como nós criamos um link entre uma Person e um " +"Event no exemplo unidirecional? Nós adicionamos uma " +"instância de Event, da coleção de referências de eventos, " +"a uma instância de Person. Então, obviamente, se nós " +"queremos que este link funcione bidirecionalmente, nós devemos fazer a mesma " +"coisa para o outro lado – adicionando uma referência de Person na coleção de um Event. Esse acerto de link de " +"ambos os lados é absolutamente necessário e você nunca deve esquecer de faze-" +"lo." + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "" +"Many developers program defensive and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"Muitos desenvolvedores programam de maneira defensiva e criam métodos " +"gerenciador de associações que ajusta corretamente ambos os lados:" + +#. Tag: programlisting +#: tutorial.xml:813 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:815 +#, no-c-format +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"Observe que os métodos set e get da a coleção estão protegidos – isso " +"permite que classes e subclasses do mesmo pacote continuem acessando os " +"métodos, mas previne que qualquer outra classe, que não esteja no mesmo " +"pacote, acesse a coleção diretamente. Você provavelmente deve fazer a mesma " +"coisa para a coleção do outro lado." + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"E sobre o mapeamento do atributo inverse? Pra você, e " +"para o Java, um link bidirecional é simplesmente o fato de ajustar " +"corretamente as referências de ambos os lados. O Hibernate, entretanto não " +"possui informação necessária para corretamente adaptar os estados " +"INSERT e UPDATE do SQL, e precisa de " +"ajuda para manipular as propriedades das associações bidirecionais. Fazer um " +"lado da associação com o atributo inverse instrui o " +"Hibernate para basicamente ignora-lo, considerando-o uma cópia do outro lado. Isso é todo o necessário para o Hibernate trabalhar " +"com todas as possibilidades quando transformando um modelo de navegação " +"bidirecional em esquema de banco de dados do SQL. As regras que você possui " +"para lembrar são diretas: Todas associações bidirecionais necessitam que um " +"lado possua o atributo inverse. Em uma associação de um-para-muitos, o lado " +"de \"muitos\" deve conter o atributo inverse, já em uma " +"associação de muitos-para-muitos você pode pegar qualquer lado, não há " +"diferença." + +#. Tag: para +#: tutorial.xml:837 +#, no-c-format +msgid "Let's turn this into a small web application." +msgstr "" +"Agora, vamos portar este exemplo para um pequeno aplicativo para internet." + +#. Tag: title +#: tutorial.xml:844 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "EventManager um aplicativo para internet" + +#. Tag: para +#: tutorial.xml:846 +#, no-c-format +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"Um aplicativo para internet do Hibernate usa uma Session " +"e uma Transaction quase do mesmo modo que um aplicativo " +"standalone. Entretanto, alguns patterns comuns são úteis. Nós agora " +"criaremos um EventManagerServlet. Esse servlet lista " +"todos os eventos salvos no banco de dados, e cria um formulário HTML para " +"entrada de novos eventos." + +#. Tag: title +#: tutorial.xml:854 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "Criando um servlet básico" + +#. Tag: para +#: tutorial.xml:856 +#, no-c-format +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "" +"Crie uma nova classe no seu diretório fonte, no pacote events:" + +#. Tag: programlisting +#: tutorial.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:863 +#, no-c-format +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"O servlet manuseia somente requisições GET do HTTP, " +"portanto o método que iremos implementar é doGet():" + +#. Tag: programlisting +#: tutorial.xml:868 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:870 +#, fuzzy, no-c-format +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"O pattern que estamos aplicando neste código é chamado session-per-" +"request. Quando uma requisição chega ao servlet, uma nova " +"Session do Hibernate é aberta através da primeira chamada " +"para getCurrentSession() em SessionFactory. Então uma transação do banco de dados é inicializada - todo acesso " +"a dados deve ocorrer dentro de uma transação, não importando se o dado é de " +"leitura ou escrita. (nós não devemos usar o modo auto-commit em aplicações)." + +#. Tag: para +#: tutorial.xml:879 +#, no-c-format +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." + +#. Tag: para +#: tutorial.xml:886 +#, no-c-format +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"Agora, as possibilidades de ações de uma requisição serão processadas e uma " +"resposta HTML será renderizada. Nós já iremos chegar nesta parte." + +#. Tag: para +#: tutorial.xml:891 +#, fuzzy, no-c-format +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"Finalmente, a unidade de trabalho termina quando o processamento e a " +"restituição são completados. Se ocorrer algum erro durante o processamento " +"ou a restituição, uma exceção será lançada e a transação do banco de dados " +"encerrada. Isso completa o pattern session-per-request. " +"Em vez de usar código de demarcação de transação em todo servlet você pode " +"também criar um filtro servlet. Dê uma olhada no site do Hibernate e do Wiki " +"para maiores informações sobre esse pattern, chamado Open Session " +"in View." + +#. Tag: title +#: tutorial.xml:905 +#, no-c-format +msgid "Processing and rendering" +msgstr "Processando e renderizando" + +#. Tag: para +#: tutorial.xml:907 +#, no-c-format +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "" +"Vamos implementar o processamento da requisição e a restituição da página " +"HTML." + +#. Tag: programlisting +#: tutorial.xml:911 +#, no-c-format +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:913 +#, fuzzy, no-c-format +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "" +"O estilo de código acima, misturando linguagem HTML e Java não será " +"funcional em um aplicativo mais complexo—tenha em mente que neste " +"manual nós estamos apenas ilustrando conceitos básicos do Hibernate. O " +"código imprime um cabeçalho HTML e um rodapé. Dentro desta página, é " +"mostrado um formulário em HTML, para entrada de novos eventos, e uma lista " +"de todos os eventos contidos no banco de dados. O primeiro método é trivial " +"e apenas imprime uma página HTML:" + +#. Tag: programlisting +#: tutorial.xml:922 +#, no-c-format +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:924 +#, no-c-format +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"O método listEvents() usa a Session do " +"Hibernate associada a thread atual para executar um query:" + +#. Tag: programlisting +#: tutorial.xml:930 +#, no-c-format +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:932 +#, no-c-format +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"Finalmente, a action store é passada pra o método " +"createAndStoreEvent(), que também usa a Session da thread atual:" + +#. Tag: programlisting +#: tutorial.xml:938 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:940 +#, no-c-format +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"Pronto, o servlet está completo. Uma requisição para o servlet será " +"processada em uma Session e uma Transaction simples. Como anteriormente, no aplicativo standalone, o Hibernate " +"pode automaticamente associar esses objetos a thread atual em execução. Isso " +"possibilita a liberdade de você modelar seu código e acessar o método " +"SessionFactory do jeito que achar melhor. Geralmente você " +"irá usar um design mais sofisticado e mover o código de acesso a dados para " +"dentro de objetos de acesso a dados (o patter DAO). Leia o Hibernate Wiki " +"para maiores exemplos." + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Deploying and testing" +msgstr "Instalando e testando" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"Para fazer o deploy desta aplicação você tem que criar um arquivo para web, " +"um WAR. Adicione o alvo Ant abaixo em seu build.xml:" + +#. Tag: programlisting +#: tutorial.xml:961 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:963 +#, no-c-format +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"Esta target cria um arquivo chamado hibernate-tutorial.war no diretório do seu projeto. Ele empacota todas as bibliotecas e o " +"arquivo de descrição web.xml, o qual é esperado no " +"diretório base do seu projeto:" + +#. Tag: programlisting +#: tutorial.xml:969 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:971 +#, no-c-format +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." +msgstr "" +"Antes de você compilar e fazer o deploy desta aplicação web, note que uma " +"biblioteca adicional é requerida: jsdk.jar. Esse é o Java " +"servlet development kit, se você não possui esta biblioteca, faça seu " +"download na página da Sun e copie-a para seu diretório de bibliotecas. " +"Entretanto, será usado somente para a compilação e excluído do pacote WAR." + +#. Tag: para +#: tutorial.xml:979 +#, no-c-format +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"Para compilar e instalar execute ant war no seu diretório " +"do projeto e copie o arquivo hibernate-tutorial.war para " +"o diretório webapp do Tomcat. Se você não possui o Tomcat " +"instalado faça o download e siga as instruções de instalação. Você não " +"precisa modificar nenhuma configuração do Tomcat para rodar este aplicativo." + +#. Tag: para +#: tutorial.xml:987 +#, no-c-format +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"Uma vez feito o deploy e com Tomcat rodando, acesse o aplicativo em " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Veja o log do Tomcat para observar a inicialização do Hibernate quando a " +"primeira requisição chega ao servlet (o inicializador estático dentro de " +"HibernateUtil é chamado) e para ter uma depuração " +"detalhada se ocorrer alguma exceção." + +#. Tag: title +#: tutorial.xml:1000 +#, no-c-format +msgid "Summary" +msgstr "Sumário" + +#. Tag: para +#: tutorial.xml:1002 +#, no-c-format +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"Este manual cobriu os princípios básicos para criação de uma aplicação " +"simples do Hibernate e uma pequena aplicação web." + +#. Tag: para +#: tutorial.xml:1007 +#, no-c-format +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"Se você já se sente seguro com o Hibernate, continue navegando na " +"documentação de referência por tópicos que você acha interessante – os " +"tópicos mais questionados são: processo de transação (), uso da API () e " +"características de consulta ()." + +#. Tag: para +#: tutorial.xml:1015 +#, no-c-format +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "" +"Não esqueça de visitar o site do Hibernate para obter mais tutoriais " +"especializados." diff --git a/documentation/envers/src/main/docbook/pt-BR/content/xml.po b/documentation/envers/src/main/docbook/pt-BR/content/xml.po new file mode 100644 index 0000000000..f16f240617 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/content/xml.po @@ -0,0 +1,456 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 07:48+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:5 +#, no-c-format +msgid "XML Mapping" +msgstr "Mapeamento XML" + +#. Tag: emphasis +#: xml.xml:7 +#, no-c-format +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development. Veja que essa é uma feature experimental no " +"Hibernate 3.0 e o desenvolvimento esta bastante ativo." + +#. Tag: title +#: xml.xml:13 +#, no-c-format +msgid "Working with XML data" +msgstr "Trabalhando com dados em XML" + +#. Tag: para +#: xml.xml:15 +#, no-c-format +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"O Hibernate permite que se trabalhe com dados persistentes em XML quase da " +"mesma maneira como você trabalhar com POJOs persistentes. Uma árvore XML " +"parseada, pode ser imaginada como apenas uma maneira de representar os dados " +"relacionais como objetos, ao invés dos POJOs." + +#. Tag: para +#: xml.xml:22 +#, no-c-format +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"O Hibernate suporta a API dom4j para manipular árvores XML. Você pode " +"escrever queries que retornem árvores dom4j do banco de dados e " +"automaticamente sincronizar com o banco de dados qualquer modificação feita " +"nessas árvores. Você pode até mesmo pegar um documento XML, parsear usando o " +"dom4j, e escrever as alterações no banco de dados usando quaisquer operações " +"básicas do Hibernate: persist(), saveOrUpdate(),merge(), delete(), " +"replicate() (merging ainda não é suportado)" + +#. Tag: para +#: xml.xml:32 +#, no-c-format +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"Essa funcionalidade tem várias aplicações incluindo importação/exportação de " +"dados, externalização de dados de entidade via JMS or SOAP e relatórios " +"usando XSLT." + +#. Tag: para +#: xml.xml:37 +#, no-c-format +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"Um mapeamento simples pode ser usado para simultaneamente mapear " +"propriedades da classe e nós de um documento XML para um banco de dados ou, " +"se não houver classe para mapear, pode ser usado simplesmente para mapear o " +"XML." + +#. Tag: title +#: xml.xml:44 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "" +"Especificando o mapeamento de uma classe e de um arquivo XML simultaneamente" + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "Segue um exemplo de como mapear um POJO e um XML ao mesmo tempo:" + +#. Tag: programlisting +#: xml.xml:50 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:54 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "Especificando somente um mapeamento XML" + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "Segue um exemplo que não contém uma classe POJO:" + +#. Tag: programlisting +#: xml.xml:60 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:62 +#, no-c-format +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"Esse mapeamento permite que você acesse os dados como uma árvore dom4j ou um " +"grafo de de pares nome de propriedade/valor (Maps do " +"Java). Os nomes de propriedades são somente construções lógicas que podem " +"ser referenciadas em consultas HQL." + +#. Tag: title +#: xml.xml:73 +#, no-c-format +msgid "XML mapping metadata" +msgstr "Mapeando metadados com XML" + +#. Tag: para +#: xml.xml:75 +#, no-c-format +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"Muitos elementos do mapeamento do Hibernate aceitam o atributo " +"node. Por meio dele, você pode especificar o nome de um " +"atributo ou elemento XML que contém a propriedade ou os dados da entidade. O " +"formato do atributo node deve ser o seguinte:" + +#. Tag: para +#: xml.xml:84 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "" +"\"element-name\" - mapeia para o elemento XML com " +"determinado nome" + +#. Tag: para +#: xml.xml:87 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "" +"\"@attribute-name\" - mapeia para o atributo XML com " +"determinado nome" + +#. Tag: para +#: xml.xml:90 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "\".\" - mapeia para o elemento pai" + +#. Tag: para +#: xml.xml:93 +#, no-c-format +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - mapeia para para o " +"atributo com determinado nome do elemento com determinado nome" + +#. Tag: para +#: xml.xml:100 +#, no-c-format +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"Para coleções e associações simples, existe o atributo adicional " +"embed-xml. Se o atributo embed-xml=\"true\", que é o valor padrão, a árvore XML para a entidade associada (ou " +"coleção de determinado tipo de valor) será embutida diretamente na árvore " +"XML que contém a associação. Por outro lado, se embed-xml=\"false" +"\", então apenas o valor do identificador referenciado irá " +"aparecer no XML para associações simples e coleções simplesmentenão irão " +"aparecer." + +#. Tag: para +#: xml.xml:110 +#, no-c-format +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"Você precisa tomar cuidado em não deixar oembed-xml=\"true\" para muitas associações, pois o XML não suporta bem referências " +"circulares." + +#. Tag: programlisting +#: xml.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"Nesse caso, decidimos embutir a colenção de account ids, e não os dados de " +"accounts. A query HQL a seguir:" + +#. Tag: programlisting +#: xml.xml:122 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "Retornaria um conjunto de dados como esse:" + +#. Tag: programlisting +#: xml.xml:128 +#, no-c-format +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:130 +#, no-c-format +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"Se você setar embed-xml=\"true\" em um mapeamento " +"<one-to-many>, os dados se pareceriam com o " +"seguinte:" + +#. Tag: programlisting +#: xml.xml:135 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:141 +#, no-c-format +msgid "Manipulating XML data" +msgstr "Manipulando dados em XML" + +#. Tag: para +#: xml.xml:143 +#, no-c-format +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"Vamos reler e atualizar documentos em XML em nossa aplicação. Nós fazemos " +"isso obtendo uma session do dom4j:" + +#. Tag: programlisting +#: xml.xml:148 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: xml.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:152 +#, no-c-format +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"É extremamente útil combinar essa funcionalidade com a operação " +"replicate() do Hibernate para implementar importação/" +"exportação baseadas em XML." diff --git a/documentation/envers/src/main/docbook/pt-BR/legal_notice.po b/documentation/envers/src/main/docbook/pt-BR/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/pt-BR/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/zh-CN/Hibernate_Reference.po b/documentation/envers/src/main/docbook/zh-CN/Hibernate_Reference.po new file mode 100644 index 0000000000..60f09571d1 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/Hibernate_Reference.po @@ -0,0 +1,24 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:26 +msgid "HIBERNATE - Relational Persistence for Idiomatic Java" +msgstr "HIBERNATE - 符合Java习惯的关系数据库持久化" + +#: index.docbook:27 +msgid "Hibernate Reference Documentation" +msgstr "Hibernate参考文档" + +#: index.docbook:41 +msgid "©rightHolder;" +msgstr "©rightHolder;" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/zh-CN/content/architecture.po b/documentation/envers/src/main/docbook/zh-CN/content/architecture.po new file mode 100644 index 0000000000..ff6f71971d --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/architecture.po @@ -0,0 +1,594 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: architecture.xml:30 +#, no-c-format +msgid "Architecture" +msgstr "体系结构(Architecture)" + +#. Tag: title +#: architecture.xml:33 +#, no-c-format +msgid "Overview" +msgstr "概况(Overview)" + +#. Tag: para +#: architecture.xml:35 +#, no-c-format +msgid "A (very) high-level view of the Hibernate architecture:" +msgstr "一个非常简要的Hibernate体系结构的概要图:" + +#. Tag: para +#: architecture.xml:48 +#, no-c-format +msgid "" +"This diagram shows Hibernate using the database and configuration data to " +"provide persistence services (and persistent objects) to the application." +msgstr "" +"从这个图可以看出,Hibernate使用数据库和配置信息来为应用程序提供持久化服务(以" +"及持久的对象)。" + +#. Tag: para +#: architecture.xml:53 +#, no-c-format +msgid "" +"We would like to show a more detailed view of the runtime architecture. " +"Unfortunately, Hibernate is flexible and supports several approaches. We " +"will show the two extremes. The \"lite\" architecture has the application " +"provide its own JDBC connections and manage its own transactions. This " +"approach uses a minimal subset of Hibernate's APIs:" +msgstr "" +"我们来更详细地看一下Hibernate运行时体系结构。由于Hibernate非常灵活,且支持多" +"种应用方案, 所以我们这只描述一下两种极端的情况。“轻型”的体系结构方案,要求应" +"用程序提供自己的JDBC 连接并管理自己的事务。这种方案使用了Hibernate API的最小" +"子集:" + +#. Tag: para +#: architecture.xml:70 +#, no-c-format +msgid "" +"The \"full cream\" architecture abstracts the application away from the " +"underlying JDBC/JTA APIs and lets Hibernate take care of the details." +msgstr "" +"“全面解决”的体系结构方案,将应用层从底层的JDBC/JTA API中抽象出来,而让" +"Hibernate来处理这些细节。" + +#. Tag: para +#: architecture.xml:84 +#, fuzzy, no-c-format +msgid "Heres some definitions of the objects in the diagrams:" +msgstr "图中各个对象的定义如下: " + +#. Tag: term +#: architecture.xml:89 +#, no-c-format +msgid "SessionFactory (org.hibernate.SessionFactory)" +msgstr "SessionFactory (org.hibernate.SessionFactory)" + +#. Tag: para +#: architecture.xml:91 +#, no-c-format +msgid "" +"A threadsafe (immutable) cache of compiled mappings for a single database. A " +"factory for Session and a client of " +"ConnectionProvider. Might hold an optional (second-level) " +"cache of data that is reusable between transactions, at a process- or " +"cluster-level." +msgstr "" +"针对单个数据库映射关系经过编译后的内存镜像,是线程安全的(不可变)。 它是生成" +"Session的工厂,本身要用到ConnectionProvider。 该对象可以在进程或集群的级别上,为那些事务之间可以重用的数据提供可" +"选的二级缓存。" + +#. Tag: term +#: architecture.xml:101 +#, no-c-format +msgid "Session (org.hibernate.Session)" +msgstr "Session (org.hibernate.Session)" + +#. Tag: para +#: architecture.xml:103 +#, no-c-format +msgid "" +"A single-threaded, short-lived object representing a conversation between " +"the application and the persistent store. Wraps a JDBC connection. Factory " +"for Transaction. Holds a mandatory (first-level) cache of " +"persistent objects, used when navigating the object graph or looking up " +"objects by identifier." +msgstr "" +"表示应用程序与持久储存层之间交互操作的一个单线程对象,此对象生存期很短。 其隐" +"藏了JDBC连接,也是Transaction的工厂。 其会持有一个针对持久" +"化对象的必选(第一级)缓存,在遍历对象图或者根据持久化标识查找对象时会用到。" + +#. Tag: term +#: architecture.xml:113 +#, no-c-format +msgid "Persistent objects and collections" +msgstr "持久的对象及其集合" + +#. Tag: para +#: architecture.xml:115 +#, no-c-format +msgid "" +"Short-lived, single threaded objects containing persistent state and " +"business function. These might be ordinary JavaBeans/POJOs, the only special " +"thing about them is that they are currently associated with (exactly one) " +"Session. As soon as the Session is " +"closed, they will be detached and free to use in any application layer (e.g. " +"directly as data transfer objects to and from presentation)." +msgstr "" +"带有持久化状态的、具有业务功能的单线程对象,此对象生存期很短。 这些对象可能是" +"普通的JavaBeans/POJO,唯一特殊的是他们正与(仅仅一个)Session相关联。 一旦这个Session被关闭,这些对象就会脱离持" +"久化状态,这样就可被应用程序的任何层自由使用。 (例如,用作跟表示层打交道的数" +"据传输对象。)" + +#. Tag: term +#: architecture.xml:126 +#, no-c-format +msgid "Transient and detached objects and collections" +msgstr "瞬态(transient)和脱管(detached)的对象及其集合" + +#. Tag: para +#: architecture.xml:128 +#, no-c-format +msgid "" +"Instances of persistent classes that are not currently associated with a " +"Session. They may have been instantiated by the " +"application and not (yet) persisted or they may have been instantiated by a " +"closed Session." +msgstr "" +"那些目前没有与session关联的持久化类实例。 他们可能是在被应用程序实例化后,尚" +"未进行持久化的对象。 也可能是因为实例化他们的Session已经被" +"关闭而脱离持久化的对象。" + +#. Tag: term +#: architecture.xml:137 +#, no-c-format +msgid "Transaction (org.hibernate.Transaction)" +msgstr "事务Transaction (org.hibernate.Transaction)" + +#. Tag: para +#: architecture.xml:139 +#, no-c-format +msgid "" +"(Optional) A single-threaded, short-lived object used by the application to " +"specify atomic units of work. Abstracts application from underlying JDBC, " +"JTA or CORBA transaction. A Session might span several " +"Transactions in some cases. However, transaction " +"demarcation, either using the underlying API or Transaction, is never optional!" +msgstr "" +"(可选的)应用程序用来指定原子操作单元范围的对象,它是单线程的,生命周期很" +"短。 它通过抽象将应用从底层具体的JDBC、JTA以及CORBA事务隔离开。 某些情况下," +"一个Session之内可能包含多个Transaction" +"对象。 尽管是否使用该对象是可选的,但无论是使用底层的API还是使用" +"Transaction对象,事务边界的开启与关闭是必不可少的。" + +#. Tag: term +#: architecture.xml:150 +#, no-c-format +msgid "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" +msgstr "" +"ConnectionProvider (org.hibernate.connection.ConnectionProvider)" + +#. Tag: para +#: architecture.xml:152 +#, no-c-format +msgid "" +"(Optional) A factory for (and pool of) JDBC connections. Abstracts " +"application from underlying Datasource or " +"DriverManager. Not exposed to application, but can be " +"extended/implemented by the developer." +msgstr "" +"(可选的)生成JDBC连接的工厂(同时也起到连接池的作用)。 它通过抽象将应用从底" +"层的DatasourceDriverManager隔离开。 " +"仅供开发者扩展/实现用,并不暴露给应用程序使用。" + +#. Tag: term +#: architecture.xml:160 +#, no-c-format +msgid "" +"TransactionFactory (org.hibernate.TransactionFactory)" +msgstr "" +"TransactionFactory (org.hibernate.TransactionFactory)" + +#. Tag: para +#: architecture.xml:162 +#, no-c-format +msgid "" +"(Optional) A factory for Transaction instances. Not " +"exposed to the application, but can be extended/implemented by the developer." +msgstr "" +"(可选的)生成Transaction对象实例的工厂。 仅供开发者扩展/" +"实现用,并不暴露给应用程序使用。" + +#. Tag: emphasis +#: architecture.xml:169 +#, no-c-format +msgid "Extension Interfaces" +msgstr "扩展接口" + +#. Tag: para +#: architecture.xml:171 +#, no-c-format +msgid "" +"Hibernate offers many optional extension interfaces you can implement to " +"customize the behavior of your persistence layer. See the API documentation " +"for details." +msgstr "" +"Hibernate提供了很多可选的扩展接口,你可以通过实现它们来定制你的持久层的行" +"为。 具体请参考API文档。" + +#. Tag: para +#: architecture.xml:180 +#, no-c-format +msgid "" +"Given a \"lite\" architecture, the application bypasses the " +"Transaction/TransactionFactory and/or " +"ConnectionProvider APIs to talk to JTA or JDBC directly." +msgstr "" +"在特定“轻型”的体系结构中,应用程序可能绕过 Transaction/" +"TransactionFactory 以及 ConnectionProvider 等API直接跟JTA或JDBC打交道。" + +#. Tag: title +#: architecture.xml:188 +#, no-c-format +msgid "Instance states" +msgstr "实例状态" + +#. Tag: para +#: architecture.xml:189 +#, no-c-format +msgid "" +"An instance of a persistent classes may be in one of three different states, " +"which are defined with respect to a persistence context. The Hibernate Session object is the " +"persistence context:" +msgstr "" +"一个持久化类的实例可能处于三种不同状态中的某一种。 这三种状态的定义则与所谓的" +"持久化上下文(persistence context)有关。 Hibernate的" +"Session对象就是这个所谓的持久化上下文:" + +#. Tag: term +#: architecture.xml:197 +#, no-c-format +msgid "transient" +msgstr "瞬态(transient)" + +#. Tag: para +#: architecture.xml:199 +#, no-c-format +msgid "" +"The instance is not, and has never been associated with any persistence " +"context. It has no persistent identity (primary key value)." +msgstr "该实例从未与任何持久化上下文关联过。它没有持久化标识(相当于主键值)。" + +#. Tag: term +#: architecture.xml:207 +#, no-c-format +msgid "persistent" +msgstr "持久化(persistent)" + +#. Tag: para +#: architecture.xml:209 +#, no-c-format +msgid "" +"The instance is currently associated with a persistence context. It has a " +"persistent identity (primary key value) and, perhaps, a corresponding row in " +"the database. For a particular persistence context, Hibernate " +"guarantees that persistent identity is equivalent to " +"Java identity (in-memory location of the object)." +msgstr "" +"实例目前与某个持久化上下文有关联。 它拥有持久化标识(相当于主键值),并且可能" +"在数据库中有一个对应的行。 对于某一个特定的持久化上下文,Hibernate" +"保证持久化标识与Java标识(其值代表对象在内存中的位置)等价。" + +#. Tag: term +#: architecture.xml:221 +#, no-c-format +msgid "detached" +msgstr "脱管(detached)" + +#. Tag: para +#: architecture.xml:223 +#, fuzzy, no-c-format +msgid "" +"The instance was once associated with a persistence context, but that " +"context was closed, or the instance was serialized to another process. It " +"has a persistent identity and, perhaps, a corresponding row in the database. " +"For detached instances, Hibernate makes no guarantees about the relationship " +"between persistent identity and Java identity." +msgstr "" +"实例曾经与某个持久化上下文发生过关联,不过那个上下文被关闭了, 或者这个实例是" +"被序列化(serialize)到另外的进程。 它拥有持久化标识,并且在数据库中可能存在一" +"个对应的行。 对于脱管状态的实例,Hibernate不保证任何持久化标识和Java标识的关" +"系。" + +#. Tag: title +#: architecture.xml:238 +#, no-c-format +msgid "JMX Integration" +msgstr "JMX整合" + +#. Tag: para +#: architecture.xml:240 +#, no-c-format +msgid "" +"JMX is the J2EE standard for management of Java components. Hibernate may be " +"managed via a JMX standard service. We provide an MBean implementation in " +"the distribution, org.hibernate.jmx.HibernateService." +msgstr "" +"JMX是管理Java组件(Java components)的J2EE标准。 Hibernate 可以通过一个JMX标准" +"服务来管理。 在这个发行版本中,我们提供了一个MBean接口的实现,即 org." +"hibernate.jmx.HibernateService。" + +#. Tag: para +#: architecture.xml:246 +#, no-c-format +msgid "" +"For an example how to deploy Hibernate as a JMX service on the JBoss " +"Application Server, please see the JBoss User Guide. On JBoss AS, you also " +"get these benefits if you deploy using JMX:" +msgstr "" +"想要看如何在JBoss应用服务器上将Hibernate部署为一个JMX服务的例子,您可以参考" +"JBoss用户指南。 我们现在说一下在Jboss应用服务器上,使用JMX来部署Hibernate的好" +"处:" + +#. Tag: para +#: architecture.xml:254 +#, no-c-format +msgid "" +"Session Management: The Hibernate Session's life cycle can be automatically bound to the scope of a JTA " +"transaction. This means you no longer have to manually open and close the " +"Session, this becomes the job of a JBoss EJB interceptor. " +"You also don't have to worry about transaction demarcation in your code " +"anymore (unless you'd like to write a portable persistence layer of course, " +"use the optional Hibernate Transaction API for this). You " +"call the HibernateContext to access a Session." +msgstr "" +"Session管理: Hibernate的Session对象" +"的生命周期可以 自动跟一个JTA事务边界绑定。这意味着你无需手工开关" +"Session了, 这项 工作会由JBoss EJB 拦截器来完成。你再也不用" +"担心你的代码中的事务边界了(除非你想利用Hibernate提供可选 的" +"Transaction API来自己写一个便于移植的的持久层)。 你通过调" +"用HibernateContext来访问Session。" + +#. Tag: para +#: architecture.xml:266 +#, no-c-format +msgid "" +"HAR deployment: Usually you deploy the Hibernate JMX " +"service using a JBoss service deployment descriptor (in an EAR and/or SAR " +"file), it supports all the usual configuration options of a Hibernate " +"SessionFactory. However, you still have to name all your " +"mapping files in the deployment descriptor. If you decide to use the " +"optional HAR deployment, JBoss will automatically detect all mapping files " +"in your HAR file." +msgstr "" +"HAR 部署: 通常情况下,你会使用JBoss的服务部署描述符(在" +"EAR或/和SAR文件中)来部署Hibernate JMX服务。 这种部署方式支持所有常见的" +"Hibernate SessionFactory的配置选项。 不过,你仍需在部署描" +"述符中,列出你所有的映射文件的名字。如果你使用HAR部署方式, JBoss 会自动探测出" +"你的HAR文件中所有的映射文件。" + +#. Tag: para +#: architecture.xml:277 +#, no-c-format +msgid "" +"Consult the JBoss AS user guide for more information about these options." +msgstr "这些选项更多的描述,请参考JBoss 应用程序用户指南。" + +#. Tag: para +#: architecture.xml:281 +#, no-c-format +msgid "" +"Another feature available as a JMX service are runtime Hibernate statistics. " +"See ." +msgstr "" +"将Hibernate以部署为JMX服务的另一个好处,是可以查看Hibernate的运行时统计信息。" +"参看 ." + +#. Tag: title +#: architecture.xml:288 +#, no-c-format +msgid "JCA Support" +msgstr "对JCA的支持" + +#. Tag: para +#: architecture.xml:289 +#, no-c-format +msgid "" +"Hibernate may also be configured as a JCA connector. Please see the website " +"for more details. Please note that Hibernate JCA support is still considered " +"experimental." +msgstr "" +"Hibernate也可以被配置为一个JCA连接器(JCA connector)。更多信息请参看网站。 " +"请注意,Hibernate对JCA的支持,仍处于实验性阶段。" + +#. Tag: title +#: architecture.xml:296 +#, no-c-format +msgid "Contextual Sessions" +msgstr "上下文相关的(Contextual)Session" + +#. Tag: para +#: architecture.xml:297 +#, no-c-format +msgid "" +"Most applications using Hibernate need some form of \"contextual\" sessions, " +"where a given session is in effect throughout the scope of a given context. " +"However, across applications the definition of what constitutes a context is " +"typically different; and different contexts define different scopes to the " +"notion of current. Applications using Hibernate prior to version 3.0 tended " +"to utilize either home-grown ThreadLocal-based contextual " +"sessions, helper classes such as HibernateUtil, or " +"utilized third-party frameworks (such as Spring or Pico) which provided " +"proxy/interception-based contextual sessions." +msgstr "" +"使用Hibernate的大多数应用程序需要某种形式的“上下文相关的” session,特定的" +"session在整个特定的上下文范围内始终有效。然而,对不同类型的应用程序而言,要为" +"什么是组成这种“上下文”下一个定义通常是困难的;不同的上下文对“当前”这个概念定" +"义了不同的范围。在3.0版本之前,使用Hibernate的程序要么采用自行编写的基于" +"ThreadLocal的上下文session,要么采用" +"HibernateUtil这样的辅助类,要么采用第三方框架(比如Spring" +"或Pico),它们提供了基于代理(proxy)或者基于拦截器(interception)的上下文相关" +"session。" + +#. Tag: para +#: architecture.xml:306 +#, no-c-format +msgid "" +"Starting with version 3.0.1, Hibernate added the SessionFactory." +"getCurrentSession() method. Initially, this assumed usage of " +"JTA transactions, where the JTA " +"transaction defined both the scope and context of a current session. The " +"Hibernate team maintains that, given the maturity of the numerous stand-" +"alone JTA TransactionManager implementations out there, " +"most (if not all) applications should be using JTA " +"transaction management whether or not they are deployed into a " +"J2EE container. Based on that, the JTA-" +"based contextual sessions is all you should ever need to use." +msgstr "" +"从3.0.1版本开始,Hibernate增加了SessionFactory.getCurrentSession()方法。一开始,它假定了采用JTA事务,JTA事务定义了当前session的范围和上下文(scope and context)。Hibernate开发" +"团队坚信,因为有好几个独立的JTA TransactionManager实现稳定" +"可用,不论是否被部署到一个J2EE容器中,大多数(假若不是所有" +"的)应用程序都应该采用JTA事务管理。基于这一点,采用" +"JTA的上下文相关session可以满足你一切需要。" + +#. Tag: para +#: architecture.xml:316 +#, no-c-format +msgid "" +"However, as of version 3.1, the processing behind SessionFactory." +"getCurrentSession() is now pluggable. To that end, a new extension " +"interface (org.hibernate.context.CurrentSessionContext) " +"and a new configuration parameter (hibernate." +"current_session_context_class) have been added to allow " +"pluggability of the scope and context of defining current sessions." +msgstr "" +"更好的是,从3.1开始,SessionFactory.getCurrentSession()的" +"后台实现是可拔插的。因此,我们引入了新的扩展接口(org.hibernate." +"context.CurrentSessionContext)和新的配置参数(hibernate." +"current_session_context_class),以便对什么是“当前session”的范围和上" +"下文(scope and context)的定义进行拔插。" + +#. Tag: para +#: architecture.xml:323 +#, no-c-format +msgid "" +"See the Javadocs for the org.hibernate.context." +"CurrentSessionContext interface for a detailed discussion of its " +"contract. It defines a single method, currentSession(), " +"by which the implementation is responsible for tracking the current " +"contextual session. Out-of-the-box, Hibernate comes with three " +"implementations of this interface." +msgstr "" +"请参阅org.hibernate.context.CurrentSessionContext接口的" +"Javadoc,那里有关于它的契约的详细讨论。它定义了单一的方法," +"currentSession(),特定的实现用它来负责跟踪当前的上下文" +"session。Hibernate内置了此接口的三种实现。" + +#. Tag: para +#: architecture.xml:333 +#, no-c-format +msgid "" +"org.hibernate.context.JTASessionContext - current " +"sessions are tracked and scoped by a JTA transaction. The " +"processing here is exactly the same as in the older JTA-only approach. See " +"the Javadocs for details." +msgstr "" +"org.hibernate.context.JTASessionContext - 当前session根据" +"JTA来跟踪和界定。这和以前的仅支持JTA的方法是完全一样的。详" +"情请参阅Javadoc。" + +#. Tag: para +#: architecture.xml:341 +#, no-c-format +msgid "" +"org.hibernate.context.ThreadLocalSessionContext - current " +"sessions are tracked by thread of execution. Again, see the Javadocs for " +"details." +msgstr "" +"org.hibernate.context.ThreadLocalSessionContext - 当前" +"session通过当前执行的线程来跟踪和界定。详情也请参阅Javadoc。" + +#. Tag: para +#: architecture.xml:347 +#, no-c-format +msgid "" +"org.hibernate.context.ManagedSessionContext - current " +"sessions are tracked by thread of execution. However, you are responsible to " +"bind and unbind a Session instance with static methods on " +"this class, it does never open, flush, or close a Session." +msgstr "" +"org.hibernate.context.ManagedSessionContext - 当前session" +"通过当前执行的线程来跟踪和界定。但是,你需要负责使用这个类的静态方法将" +"Session实例绑定、或者取消绑定,它并不会打开(open)、flush或" +"者关闭(close)任何Session。" + +#. Tag: para +#: architecture.xml:356 +#, fuzzy, no-c-format +msgid "" +"The first two implementations provide a \"one session - one database " +"transaction\" programming model, also known and used as session-" +"per-request. The beginning and end of a Hibernate session is " +"defined by the duration of a database transaction. If you use programmatic " +"transaction demarcation in plain JSE without JTA, you are advised to use the " +"Hibernate Transaction API to hide the underlying " +"transaction system from your code. If you use JTA, use the JTA interfaces to " +"demarcate transactions. If you execute in an EJB container that supports " +"CMT, transaction boundaries are defined declaratively and you don't need any " +"transaction or session demarcation operations in your code. Refer to for more information and code examples." +msgstr "" +"前两种实现都提供了“每数据库事务对应一个session”的编程模型,也称作每" +"次请求一个session。Hibernate session的起始和终结由数据库事务的生存" +"来控制。假若你在纯粹的 Java SE之上采用自行编写代码来管理事务,而不使用JTA,建" +"议你使用Hibernate Transaction API来把底层事务实现从你的代" +"码中隐藏掉。如果你使用JTA,请使用JTA借口来管理Transaction。如果你在支持CMT的" +"EJB容器中执行代码,事务边界是声明式定义的,你不需要在代码中进行任何事务或" +"session管理操作。请参阅一节来阅读更多的内容和" +"示例代码。" + +#. Tag: para +#: architecture.xml:368 +#, no-c-format +msgid "" +"The hibernate.current_session_context_class configuration " +"parameter defines which org.hibernate.context." +"CurrentSessionContext implementation should be used. Note that for " +"backwards compatibility, if this config param is not set but a org." +"hibernate.transaction.TransactionManagerLookup is configured, " +"Hibernate will use the org.hibernate.context.JTASessionContext. Typically, the value of this parameter would just name the " +"implementation class to use; for the three out-of-the-box implementations, " +"however, there are three corresponding short names, \"jta\", \"thread\", and " +"\"managed\"." +msgstr "" +"hibernate.current_session_context_class配置参数定义了应该" +"采用哪个org.hibernate.context.CurrentSessionContext实现。" +"注意,为了向下兼容,如果未配置此参数,但是存在org.hibernate." +"transaction.TransactionManagerLookup的配置,Hibernate会采用" +"org.hibernate.context.JTASessionContext。一般而言,此参数" +"的值指明了要使用的实现类的全名,但那三种内置的实现可以使用简写,即\"jta\"、" +"\"thread\"和\"managed\"。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/association_mapping.po b/documentation/envers/src/main/docbook/zh-CN/content/association_mapping.po new file mode 100644 index 0000000000..4682f44b95 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/association_mapping.po @@ -0,0 +1,871 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: association_mapping.xml:6 +#, no-c-format +msgid "Association Mappings" +msgstr "关联关系映射" + +#. Tag: title +#: association_mapping.xml:9 +#, no-c-format +msgid "Introduction" +msgstr "介绍" + +#. Tag: para +#: association_mapping.xml:11 +#, no-c-format +msgid "" +"Association mappings are the often most difficult thing to get right. In " +"this section we'll go through the canonical cases one by one, starting with " +"unidirectional mappings, and then considering the bidirectional cases. We'll " +"use Person and Address in all the " +"examples." +msgstr "" +"关联关系映射通常情况是最难配置正确的。在这个部分中,我们从单向关系映射开始," +"然后考虑双向关系映射,由浅至深讲述一遍典型的案例。在所有的例子中,我们都使用 " +"PersonAddress。" + +#. Tag: para +#: association_mapping.xml:19 +#, no-c-format +msgid "" +"We'll classify associations by whether or not they map to an intervening " +"join table, and by multiplicity." +msgstr "我们根据映射关系是否涉及连接表以及多样性来划分关联类型。" + +#. Tag: para +#: association_mapping.xml:24 +#, no-c-format +msgid "" +"Nullable foreign keys are not considered good practice in traditional data " +"modelling, so all our examples use not null foreign keys. This is not a " +"requirement of Hibernate, and the mappings will all work if you drop the " +"nullability constraints." +msgstr "" +"在传统的数据建模中,允许为Null值的外键被认为是一种不好的实践,因此我们所有的" +"例子中都使用不允许为Null的外键。这并不是Hibernate的要求,即使你删除掉不允许为" +"Null的约束,Hibernate映射一样可以工作的很好。" + +#. Tag: title +#: association_mapping.xml:34 +#, no-c-format +msgid "Unidirectional associations" +msgstr "单向关联(Unidirectional associations)" + +#. Tag: title +#: association_mapping.xml:37 association_mapping.xml:108 +#, fuzzy, no-c-format +msgid "many to one" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"多对一(many to one)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"多对一(many to one)" + +#. Tag: para +#: association_mapping.xml:39 +#, no-c-format +msgid "" +"A unidirectional many-to-one association is the most " +"common kind of unidirectional association." +msgstr "单向many-to-one关联是最常见的单向关联关系。" + +#. Tag: programlisting +#: association_mapping.xml:44 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:45 association_mapping.xml:161 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:50 association_mapping.xml:121 +#: association_mapping.xml:185 association_mapping.xml:225 +#, no-c-format +msgid "one to one" +msgstr "一对一(one to one)" + +#. Tag: para +#: association_mapping.xml:52 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a foreign key is almost identical. The only difference is the column unique " +"constraint." +msgstr "" +"基于外键关联的单向一对一关联单向多对一关联几乎是一样的。唯一的不同就是单向一对一关联中的外键字段具有唯一性约" +"束。" + +#. Tag: programlisting +#: association_mapping.xml:57 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:58 association_mapping.xml:193 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:60 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a primary key usually uses a special id generator. (Notice that we've reversed " +"the direction of the association in this example.)" +msgstr "" +"基于主键关联的单向一对一关联通常使用一个特定的id生成器。" +"(请注意,在这个例子中我们掉换了关联的方向。)" + +#. Tag: programlisting +#: association_mapping.xml:66 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:67 association_mapping.xml:201 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:72 association_mapping.xml:94 +#, fuzzy, no-c-format +msgid "one to many" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"一对多(one to many)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"一对多(one to many)" + +#. Tag: para +#: association_mapping.xml:74 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a foreign key is a very unusual case, and is not really recommended." +msgstr "" +"基于外键关联的单向一对多关联是一种很少见的情况,并不推荐" +"使用。" + +#. Tag: programlisting +#: association_mapping.xml:79 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:82 +#, no-c-format +msgid "We think it's better to use a join table for this kind of association." +msgstr "我们认为对于这种关联关系最好使用连接表。" + +#. Tag: title +#: association_mapping.xml:91 +#, no-c-format +msgid "Unidirectional associations with join tables" +msgstr "使用连接表的单向关联(Unidirectional associations with join tables)" + +#. Tag: para +#: association_mapping.xml:96 +#, no-c-format +msgid "" +"A unidirectional one-to-many association on a join table is much preferred. Notice that by specifying unique=\"true" +"\", we have changed the multiplicity from many-to-many to one-to-" +"many." +msgstr "" +"基于连接表的单向一对多关联 应该优先被采用。请注意,通过" +"指定unique=\"true\",我们可以把多样性从多对多改变为一对" +"多。" + +#. Tag: programlisting +#: association_mapping.xml:102 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:103 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:110 +#, no-c-format +msgid "" +"A unidirectional many-to-one association on a join table is quite common when the association is optional." +msgstr "" +"基于连接表的单向多对一关联在关联关系可选的情况下应用也很" +"普遍。" + +#. Tag: programlisting +#: association_mapping.xml:115 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:116 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:123 +#, no-c-format +msgid "" +"A unidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"基于连接表的单向一对一关联非常少见,但也是可行的。" + +#. Tag: programlisting +#: association_mapping.xml:128 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:129 association_mapping.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:134 association_mapping.xml:238 +#, no-c-format +msgid "many to many" +msgstr "多对多(many to many)" + +#. Tag: para +#: association_mapping.xml:136 +#, no-c-format +msgid "" +"Finally, we have a unidirectional many-to-many association." +msgstr "最后,还有 单向多对多关联." + +#. Tag: programlisting +#: association_mapping.xml:140 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:141 association_mapping.xml:246 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: association_mapping.xml:148 +#, no-c-format +msgid "Bidirectional associations" +msgstr "双向关联(Bidirectional associations)" + +#. Tag: title +#: association_mapping.xml:151 association_mapping.xml:211 +#, fuzzy, no-c-format +msgid "one to many / many to one" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"一对多(one to many) / 多对一(many to one)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"一对多(one to many) /多对一( many to one)" + +#. Tag: para +#: association_mapping.xml:153 +#, no-c-format +msgid "" +"A bidirectional many-to-one association is the most " +"common kind of association. (This is the standard parent/child relationship.)" +msgstr "" +"双向多对一关联 是最常见的关联关系。(这也是标准的父/子关" +"联关系。)" + +#. Tag: programlisting +#: association_mapping.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:163 +#, no-c-format +msgid "" +"If you use a List (or other indexed collection) you need " +"to set the key column of the foreign key to not " +"null, and let Hibernate manage the association from the " +"collections side to maintain the index of each element (making the other " +"side virtually inverse by setting update=\"false\" and " +"insert=\"false\"):" +msgstr "" +"如果你使用List(或者其他有序集合类),你需要设置外键对应的" +"key列为 not null,让Hibernate来从集合端" +"管理关联,维护每个元素的索引(通过设置update=\"false\" " +"and insert=\"false\"来对另一端反向操作)。" + +#. Tag: programlisting +#: association_mapping.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:173 +#, no-c-format +msgid "" +"It is important that you define not-null=\"true\" on the " +"<key> element of the collection mapping if the " +"underlying foreign key column is NOT NULL. Don't only " +"declare not-null=\"true\" on a possible nested " +"<column> element, but on the <key> element." +msgstr "" +"假若集合映射的<key>元素对应的底层外键字段是" +"NOT NULL的,那么为这一key元素定义not-null=\"true" +"\"是很重要的。不要仅仅为可能的嵌套<column>" +"元素定义not-null=\"true\"<key>" +"元素也是需要的。" + +#. Tag: para +#: association_mapping.xml:187 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a foreign key " +"is quite common." +msgstr "基于外键关联的双向一对一关联也很常见。" + +#. Tag: programlisting +#: association_mapping.xml:192 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:195 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a primary key " +"uses the special id generator." +msgstr "基于主键关联的一对一关联需要使用特定的id生成器。" + +#. Tag: programlisting +#: association_mapping.xml:200 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" person\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:208 +#, no-c-format +msgid "Bidirectional associations with join tables" +msgstr "使用连接表的双向关联(Bidirectional associations with join tables)" + +#. Tag: para +#: association_mapping.xml:213 +#, no-c-format +msgid "" +"A bidirectional one-to-many association on a join table. Note that the inverse=\"true\" can go on " +"either end of the association, on the collection, or on the join." +msgstr "" +"基于连接表的双向一对多关联。注意inverse=\"true" +"\"可以出现在关联的任意一端,即collection端或者join端。" + +#. Tag: programlisting +#: association_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: association_mapping.xml:220 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: association_mapping.xml:227 +#, no-c-format +msgid "" +"A bidirectional one-to-one association on a join table " +"is extremely unusual, but possible." +msgstr "" +"基于连接表的双向一对一关联极为罕见,但也是可行的。" + +#. Tag: programlisting +#: association_mapping.xml:232 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:240 +#, no-c-format +msgid "" +"Finally, we have a bidirectional many-to-many association." +msgstr "最后,还有 双向多对多关联." + +#. Tag: programlisting +#: association_mapping.xml:244 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: association_mapping.xml:253 +#, no-c-format +msgid "More complex association mappings" +msgstr "更复杂的关联映射" + +#. Tag: para +#: association_mapping.xml:255 +#, no-c-format +msgid "" +"More complex association joins are extremely rare. " +"Hibernate makes it possible to handle more complex situations using SQL " +"fragments embedded in the mapping document. For example, if a table with " +"historical account information data defines accountNumber, effectiveEndDate and " +"effectiveStartDatecolumns, mapped as follows:" +msgstr "" +"更复杂的关联连接极为罕见。 通过在映射文档中嵌入SQL片断," +"Hibernate也可以处理更为复杂的情况。比如,假若包含历史帐户数据的表定义了" +"accountNumber, effectiveEndDate 和" +"effectiveStartDate字段,按照下面映射:" + +#. Tag: programlisting +#: association_mapping.xml:264 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" case when effectiveEndDate is null then 1 else 0 end\n" +" \n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:266 +#, no-c-format +msgid "" +"Then we can map an association to the current instance " +"(the one with null effectiveEndDate) using:" +msgstr "" +"那么我们可以对目前(current)实例(其" +"effectiveEndDate为null)使用这样的关联映射:" + +#. Tag: programlisting +#: association_mapping.xml:271 +#, no-c-format +msgid "" +"\n" +" \n" +" '1'\n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:273 +#, no-c-format +msgid "" +"In a more complex example, imagine that the association between " +"Employee and Organization is " +"maintained in an Employment table full of historical " +"employment data. Then an association to the employee's most " +"recent employer (the one with the most recent startDate) might be mapped this way:" +msgstr "" +"更复杂的例子,假想EmployeeOrganization" +"之间的关联是通过一个Employment中间表维护的,而中间表中填充" +"了很多历史雇员数据。那“雇员的最新雇主”这个关联(最新雇主" +"就是startDate最后的那个)可以这样映射:" + +#. Tag: programlisting +#: association_mapping.xml:281 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" select employeeId, orgId \n" +" from Employments \n" +" group by orgId \n" +" having startDate = max(startDate)\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: association_mapping.xml:283 +#, no-c-format +msgid "" +"You can get quite creative with this functionality, but it is usually more " +"practical to handle these kinds of cases using HQL or a criteria query." +msgstr "" +"使用这一功能时可以充满创意,但通常更加实用的是用HQL或条件查询来处理这些情形。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/basic_mapping.po b/documentation/envers/src/main/docbook/zh-CN/content/basic_mapping.po new file mode 100644 index 0000000000..0c3a1671e1 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/basic_mapping.po @@ -0,0 +1,5429 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: basic_mapping.xml:29 +#, no-c-format +msgid "Basic O/R Mapping" +msgstr "对象/关系数据库映射基础(Basic O/R Mapping)" + +#. Tag: title +#: basic_mapping.xml:32 +#, no-c-format +msgid "Mapping declaration" +msgstr "映射定义(Mapping declaration)" + +#. Tag: para +#: basic_mapping.xml:34 +#, no-c-format +msgid "" +"Object/relational mappings are usually defined in an XML document. The " +"mapping document is designed to be readable and hand-editable. The mapping " +"language is Java-centric, meaning that mappings are constructed around " +"persistent class declarations, not table declarations." +msgstr "" +"对象和关系数据库之间的映射通常是用一个XML文档(XML document)来定义的。这个映射" +"文档被设计为易读的, 并且可以手工修改。映射语言是以Java为中心,这意味着映射文" +"档是按照持久化类的定义来创建的, 而非表的定义。" + +#. Tag: para +#: basic_mapping.xml:41 +#, no-c-format +msgid "" +"Note that, even though many Hibernate users choose to write the XML by hand, " +"a number of tools exist to generate the mapping document, including XDoclet, " +"Middlegen and AndroMDA." +msgstr "" +"请注意,虽然很多Hibernate用户选择手写XML映射文档,但也有一些工具可以用来生成" +"映射文档, 包括XDoclet,Middlegen和AndroMDA。" + +#. Tag: para +#: basic_mapping.xml:47 +#, no-c-format +msgid "Lets kick off with an example mapping:" +msgstr "让我们从一个映射的例子开始:" + +#. Tag: programlisting +#: basic_mapping.xml:51 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:53 +#, no-c-format +msgid "" +"We will now discuss the content of the mapping document. We will only " +"describe the document elements and attributes that are used by Hibernate at " +"runtime. The mapping document also contains some extra optional attributes " +"and elements that affect the database schemas exported by the schema export " +"tool. (For example the not-null attribute.)" +msgstr "" +"我们现在开始讨论映射文档的内容。我们只描述Hibernate在运行时用到的文档元素和属" +"性。 映射文档还包括一些额外的可选属性和元素,它们在使用schema导出工具的时候会" +"影响导出的数据库schema结果。 (比如, not-null 属性。)" + +#. Tag: title +#: basic_mapping.xml:64 +#, no-c-format +msgid "Doctype" +msgstr "Doctype" + +#. Tag: para +#: basic_mapping.xml:66 +#, no-c-format +msgid "" +"All XML mappings should declare the doctype shown. The actual DTD may be " +"found at the URL above, in the directory hibernate-x.x.x/src/org/" +"hibernate or in hibernate3.jar. Hibernate will " +"always look for the DTD in its classpath first. If you experience lookups of " +"the DTD using an Internet connection, check your DTD declaration against the " +"contents of your claspath." +msgstr "" +"所有的XML映射都需要定义如上所示的doctype。DTD可以从上述URL中获取, 也可以从" +"hibernate-x.x.x/src/net/sf/hibernate目录中、 或" +"hibernate.jar文件中找到。Hibernate总是会首先在它的" +"classptah中搜索DTD文件。 如果你发现它是通过连接Internet查找DTD文件,就对照你" +"的classpath目录检查XML文件里的DTD声明。" + +#. Tag: title +#: basic_mapping.xml:76 +#, no-c-format +msgid "EntityResolver" +msgstr "EntityResolver" + +#. Tag: para +#: basic_mapping.xml:77 +#, no-c-format +msgid "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces." +msgstr "" +"As mentioned previously, Hibernate will first attempt to resolve DTDs in its " +"classpath. The manner in which it does this is by registering a custom " +"org.xml.sax.EntityResolver implementation with the " +"SAXReader it uses to read in the xml files. This custom " +"EntityResolver recognizes two different systemId " +"namespaces. 如前所述,Hibernate首先在其classpath中查找DTD。其行为是依靠在系统" +"中注册的org.xml.sax.EntityResolver的一个具体实现," +"SAXReader依靠它来读取xml文件。这一 EntityResolver 实现能辨" +"认两种不同的 systenId命名空间。" + +#. Tag: para +#: basic_mapping.xml:85 +#, no-c-format +msgid "" +"a hibernate namespace is recognized whenever the resolver " +"encounteres a systemId starting with http://hibernate.sourceforge." +"net/; the resolver attempts to resolve these entities via the " +"classlaoder which loaded the Hibernate classes." +msgstr "" +"若resolver遇到了一个以http://hibernate.sourceforge.net/为" +"开头的systemId,它会辨认出是hibernate namespace,resolver" +"就试图通过加载Hibernate类的classloader来查找这些实体。" + +#. Tag: para +#: basic_mapping.xml:94 +#, no-c-format +msgid "" +"a user namespace is recognized whenever the resolver " +"encounteres a systemId using a classpath:// URL protocol; " +"the resolver will attempt to resolve these entities via (1) the current " +"thread context classloader and (2) the classloader which loaded the " +"Hibernate classes." +msgstr "" +"若resolver遇到了一个使用classpath://URL协议的systemId,它" +"会辨认出这是user namespace,resolver试图通过(1)当前线程上下" +"文的classloader和(2)加载Hibernate class的classloader来查找这些实体。" + +#. Tag: para +#: basic_mapping.xml:103 +#, no-c-format +msgid "An example of utilizing user namespacing:" +msgstr "使用user namespace(用户命名空间)的例子:" + +#. Tag: programlisting +#: basic_mapping.xml:106 +#, no-c-format +msgid "" +"\n" +"\n" +"]>\n" +"\n" +"\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" &types;\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:107 +#, fuzzy, no-c-format +msgid "" +"Where types.xml is a resource in the your." +"domain package and contains a custom typedef." +msgstr "" +"types.xmlyour.domain包中的一个资源," +"它包含了一个定制的typedef。" + +#. Tag: title +#: basic_mapping.xml:115 +#, no-c-format +msgid "hibernate-mapping" +msgstr "hibernate-mapping" + +#. Tag: para +#: basic_mapping.xml:117 +#, no-c-format +msgid "" +"This element has several optional attributes. The schema " +"and catalog attributes specify that tables referred to in " +"this mapping belong to the named schema and/or catalog. If specified, " +"tablenames will be qualified by the given schema and catalog names. If " +"missing, tablenames will be unqualified. The default-cascade attribute specifies what cascade style should be assumed for " +"properties and collections which do not specify a cascade " +"attribute. The auto-import attribute lets us use " +"unqualified class names in the query language, by default." +msgstr "" +"这个元素包括一些可选的属性。schemacatalog属性, 指明了这个映射所连接(refer)的表所在的schema和/或catalog名" +"称。 假若指定了这个属性,表名会加上所指定的schema和catalog的名字扩展为全限定" +"名。假若没有指定,表名就不会使用全限定名。 default-cascade" +"指定了未明确注明cascade属性的Java属性和 集合类Hibernate会" +"采取什么样的默认级联风格。auto-import属性默认让我们在查询" +"语言中可以使用 非全限定名的类名。" + +#. Tag: programlisting +#: basic_mapping.xml:138 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:141 +#, no-c-format +msgid "schema (optional): The name of a database schema." +msgstr "schema (可选): 数据库schema的名称。" + +#. Tag: para +#: basic_mapping.xml:146 +#, no-c-format +msgid "catalog (optional): The name of a database catalog." +msgstr "catalog (可选): 数据库catalog的名称。" + +#. Tag: para +#: basic_mapping.xml:151 +#, no-c-format +msgid "" +"default-cascade (optional - defaults to none): A default cascade style." +msgstr "" +"default-cascade (可选 - 默认为 none): " +"默认的级联风格。" + +#. Tag: para +#: basic_mapping.xml:157 +#, no-c-format +msgid "" +"default-access (optional - defaults to property): The strategy Hibernate should use for accessing all properties. " +"Can be a custom implementation of PropertyAccessor." +msgstr "" +"default-access (可选 - 默认为 property): Hibernate用来访问所有属性的策略。可以通过实现" +"PropertyAccessor接口 自定义。" + +#. Tag: para +#: basic_mapping.xml:164 +#, no-c-format +msgid "" +"default-lazy (optional - defaults to true): The default value for unspecifed lazy " +"attributes of class and collection mappings." +msgstr "" +"default-lazy (可选 - 默认为 true): 指定" +"了未明确注明lazy属性的Java属性和集合类, Hibernate会采取什" +"么样的默认加载风格。" + +#. Tag: para +#: basic_mapping.xml:171 +#, no-c-format +msgid "" +"auto-import (optional - defaults to true): Specifies whether we can use unqualified class names (of classes " +"in this mapping) in the query language." +msgstr "" +"auto-import (可选 - 默认为 true): 指定" +"我们是否可以在查询语言中使用非全限定的类名(仅限于本映射文件中的类)。" + +#. Tag: para +#: basic_mapping.xml:178 +#, no-c-format +msgid "" +"package (optional): Specifies a package prefix to assume " +"for unqualified class names in the mapping document." +msgstr "" +"package (可选): 指定一个包前缀,如果在映射文档中没有指定全" +"限定的类名, 就使用这个作为包名。" + +#. Tag: para +#: basic_mapping.xml:186 +#, no-c-format +msgid "" +"If you have two persistent classes with the same (unqualified) name, you " +"should set auto-import=\"false\". Hibernate will throw an " +"exception if you attempt to assign two classes to the same \"imported\" name." +msgstr "" +"假若你有两个持久化类,它们的非全限定名是一样的(就是两个类的名字一样,所在的" +"包不一样--译者注), 你应该设置auto-import=\"false\"。如果" +"你把一个“import过”的名字同时对应两个类, Hibernate会抛出一个异常。" + +#. Tag: para +#: basic_mapping.xml:192 +#, no-c-format +msgid "" +"Note that the hibernate-mapping element allows you to " +"nest several persistent <class> mappings, as shown " +"above. It is however good practice (and expected by some tools) to map only " +"a single persistent class (or a single class hierarchy) in one mapping file " +"and name it after the persistent superclass, e.g. Cat.hbm.xml, Dog.hbm.xml, or if using inheritance, " +"Animal.hbm.xml." +msgstr "" +"注意hibernate-mapping 元素允许你嵌套多个如上所示的 " +"<class>映射。但是最好的做法(也许一些工具需要的)是" +"一个 持久化类(或一个类的继承层次)对应一个映射文件,并以持久化的超类名称命" +"名,例如: Cat.hbm.xmlDog.hbm.xml," +"或者如果使用继承,Animal.hbm.xml。" + +#. Tag: title +#: basic_mapping.xml:205 +#, no-c-format +msgid "class" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:207 +#, no-c-format +msgid "" +"You may declare a persistent class using the class " +"element:" +msgstr "你可以使用class元素来定义一个持久化类:" + +#. Tag: programlisting +#: basic_mapping.xml:235 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:238 +#, no-c-format +msgid "" +"name (optional): The fully qualified Java class name of " +"the persistent class (or interface). If this attribute is missing, it is " +"assumed that the mapping is for a non-POJO entity." +msgstr "" +"name (可选): 持久化类(或者接口)的Java全限定名。 如果这个" +"属性不存在,Hibernate将假定这是一个非POJO的实体映射。" + +#. Tag: para +#: basic_mapping.xml:245 +#, no-c-format +msgid "" +"table (optional - defaults to the unqualified class " +"name): The name of its database table." +msgstr "" +"table (可选 - 默认是类的非全限定名): 对应的数据库表名。" + +#. Tag: para +#: basic_mapping.xml:251 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses, used for polymorphic " +"behaviour. Acceptable values include null and " +"not null." +msgstr "" +"discriminator-value (可选 - 默认和类名一样): 一个用于区分" +"不同的子类的值,在多态行为时使用。它可以接受的值包括 null " +"和 not null。" + +#. Tag: para +#: basic_mapping.xml:258 +#, no-c-format +msgid "" +"mutable (optional, defaults to true): " +"Specifies that instances of the class are (not) mutable." +msgstr "" +"mutable (可选,默认值为true): 表明该类" +"的实例是可变的或者不可变的。" + +#. Tag: para +#: basic_mapping.xml:264 basic_mapping.xml:2228 +#, fuzzy, no-c-format +msgid "" +"schema (optional): Override the schema name specified by " +"the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (可选): 覆盖在根<hibernate-mapping>" +"元素中指定的schema名字。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"schema (可选):覆盖由根<hibernate-mapping>元素指定的模式名称。" + +#. Tag: para +#: basic_mapping.xml:270 basic_mapping.xml:2234 +#, fuzzy, no-c-format +msgid "" +"catalog (optional): Override the catalog name specified " +"by the root <hibernate-mapping> element." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (可选): 覆盖在根<hibernate-mapping>" +"元素中指定的catalog名字。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"catalog (可选): 覆盖由根 <hibernate-" +"mapping>元素指定的目录名称。" + +#. Tag: para +#: basic_mapping.xml:276 +#, no-c-format +msgid "" +"proxy (optional): Specifies an interface to use for lazy " +"initializing proxies. You may specify the name of the class itself." +msgstr "" +"proxy (可选): 指定一个接口,在延迟装载时作为代理使用。 你" +"可以在这里使用该类自己的名字。" + +#. Tag: para +#: basic_mapping.xml:282 +#, no-c-format +msgid "" +"dynamic-update (optional, defaults to false): Specifies that UPDATE SQL should be generated " +"at runtime and contain only those columns whose values have changed." +msgstr "" +"dynamic-update (可选, 默认为 false): 指" +"定用于UPDATE 的SQL将会在运行时动态生成,并且只更新那些改变" +"过的字段。" + +#. Tag: para +#: basic_mapping.xml:289 +#, no-c-format +msgid "" +"dynamic-insert (optional, defaults to false): Specifies that INSERT SQL should be generated " +"at runtime and contain only the columns whose values are not null." +msgstr "" +"dynamic-insert (可选, 默认为 false): 指" +"定用于INSERT的 SQL 将会在运行时动态生成,并且只包含那些非" +"空值字段。" + +#. Tag: para +#: basic_mapping.xml:296 +#, no-c-format +msgid "" +"select-before-update (optional, defaults to " +"false): Specifies that Hibernate should never perform an SQL UPDATE unless it is certain that " +"an object is actually modified. In certain cases (actually, only when a " +"transient object has been associated with a new session using update" +"()), this means that Hibernate will perform an extra SQL " +"SELECT to determine if an UPDATE is " +"actually required." +msgstr "" +"select-before-update (可选, 默认为 false): 指定Hibernate除非确定对象真正被修改了(如果该值为true-译注),否" +"则不会执行SQL UPDATE操作。在特定场合" +"(实际上,它只在一个瞬时对象(transient object)关联到一个 新的session中时执" +"行的update()中生效),这说明Hibernate会在UPDATE 之前执行一" +"次额外的SQL SELECT操作,来决定是否应该执行 " +"UPDATE。" + +#. Tag: para +#: basic_mapping.xml:306 +#, no-c-format +msgid "" +"polymorphism (optional, defaults to implicit): Determines whether implicit or explicit query polymorphism is " +"used." +msgstr "" +"polymorphism(多态) (可选, 默认值为 implicit (隐" +"式) ): 界定是隐式还是显式的使用多态查询(这只在Hibernate的具体表继" +"承策略中用到-译注)。" + +#. Tag: para +#: basic_mapping.xml:312 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving objects of this class" +msgstr "" +"where (可选) 指定一个附加的SQLWHERE 条" +"件, 在抓取这个类的对象时会一直增加这个条件。" + +#. Tag: para +#: basic_mapping.xml:318 +#, no-c-format +msgid "" +"persister (optional): Specifies a custom " +"ClassPersister." +msgstr "" +"persister (可选): 指定一个定制的ClassPersister。" + +#. Tag: para +#: basic_mapping.xml:323 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for fetching instances of this class by identifier." +msgstr "" +"batch-size (可选,默认是1) 指定一个用于 " +"根据标识符(identifier)抓取实例时使用的\"batch size\"(批次抓取数量)。" + +#. Tag: para +#: basic_mapping.xml:329 +#, no-c-format +msgid "" +"optimistic-lock (optional, defaults to version): Determines the optimistic locking strategy." +msgstr "" +"optimistic-lock(乐观锁定) (可选,默认是" +"version): 决定乐观锁定的策略。" + +#. Tag: para +#: basic_mapping.xml:335 +#, no-c-format +msgid "" +"lazy (optional): Lazy fetching may be completely disabled " +"by setting lazy=\"false\"." +msgstr "" +"lazy (可选): 通过设置lazy=\"false\", " +"所有的延迟加载(Lazy fetching)功能将被全部禁用(disabled)。" + +#. Tag: para +#: basic_mapping.xml:341 +#, no-c-format +msgid "" +"entity-name (optional, defaults to the class name): " +"Hibernate3 allows a class to be mapped multiple times (to different tables, " +"potentially), and allows entity mappings that are represented by Maps or XML " +"at the Java level. In these cases, you should provide an explicit arbitrary " +"name for the entity. See and for more information." +msgstr "" +"entity-name (可选,默认为类名): Hibernate3允许一个类进行多" +"次映射( 前提是映射到不同的表),并且允许使用Maps或XML代替Java层次的实体映射 " +"(也就是实现动态领域模型,不用写持久化类-译注)。 更多信息请看 and 。" + +#. Tag: para +#: basic_mapping.xml:351 +#, no-c-format +msgid "" +"check (optional): A SQL expression used to generate a " +"multi-row check constraint for automatic schema " +"generation." +msgstr "" +"check (可选): 这是一个SQL表达式, 用于为自动生成的schema添" +"加多行(multi-row)约束检查。" + +#. Tag: para +#: basic_mapping.xml:357 +#, no-c-format +msgid "" +"rowid (optional): Hibernate can use so called ROWIDs on " +"databases which support. E.g. on Oracle, Hibernate can use the " +"rowid extra column for fast updates if you set this " +"option to rowid. A ROWID is an implementation detail and " +"represents the physical location of a stored tuple." +msgstr "" +"rowid (可选): Hibernate可以使用数据库支持的所谓的ROWIDs," +"例如: Oracle数据库,如果你设置这个可选的rowid, Hibernate" +"可以使用额外的字段rowid实现快速更新。ROWID是这个功能实现的" +"重点, 它代表了一个存储元组(tuple)的物理位置。" + +#. Tag: para +#: basic_mapping.xml:365 +#, no-c-format +msgid "" +"subselect (optional): Maps an immutable and read-only " +"entity to a database subselect. Useful if you want to have a view instead of " +"a base table, but don't. See below for more information." +msgstr "" +"subselect (可选): 它将一个不可变(immutable)并且只读的实" +"体映射到一个数据库的 子查询中。当你想用视图代替一张基本表的时候,这是有用的," +"但最好不要这样做。更多的介绍请看下面内容。" + +#. Tag: para +#: basic_mapping.xml:372 +#, no-c-format +msgid "" +"abstract (optional): Used to mark abstract superclasses " +"in <union-subclass> hierarchies." +msgstr "" +"abstract (可选): 用于在<union-subclass>的继承结构 (hierarchies)中标识抽象超类。" + +#. Tag: para +#: basic_mapping.xml:380 +#, no-c-format +msgid "" +"It is perfectly acceptable for the named persistent class to be an " +"interface. You would then declare implementing classes of that interface " +"using the <subclass> element. You may persist any " +"static inner class. You should specify the class name " +"using the standard form ie. eg.Foo$Bar." +msgstr "" +"若指明的持久化类实际上是一个接口,这也是完全可以接受的。 之后你可以用元素" +"<subclass>来指定该接口的实际实现类。 你可以持久化任" +"何static(静态的)内部类。 你应该使用标准的类名格式来指" +"定类名,比如:Foo$Bar。" + +#. Tag: para +#: basic_mapping.xml:387 +#, no-c-format +msgid "" +"Immutable classes, mutable=\"false\", may not be updated " +"or deleted by the application. This allows Hibernate to make some minor " +"performance optimizations." +msgstr "" +"不可变类,mutable=\"false\"不可以被应用程序更新或者删除。 " +"这可以让Hibernate做一些小小的性能优化。" + +#. Tag: para +#: basic_mapping.xml:392 +#, no-c-format +msgid "" +"The optional proxy attribute enables lazy initialization " +"of persistent instances of the class. Hibernate will initially return CGLIB " +"proxies which implement the named interface. The actual persistent object " +"will be loaded when a method of the proxy is invoked. See \"Initializing " +"collections and proxies\" below." +msgstr "" +"可选的proxy属性允许延迟加载类的持久化实例。 Hibernate开始" +"会返回实现了这个命名接口的CGLIB代理。当代理的某个方法被实际调用的时候, 真实" +"的持久化对象才会被装载。参见下面的“用于延迟装载的代理”。" + +#. Tag: para +#: basic_mapping.xml:399 +#, no-c-format +msgid "" +"Implicit polymorphism means that instances of the class " +"will be returned by a query that names any superclass or implemented " +"interface or the class and that instances of any subclass of the class will " +"be returned by a query that names the class itself. Explicit polymorphism means that class instances will be returned only by " +"queries that explicitly name that class and that queries that name the class " +"will return only instances of subclasses mapped inside this <" +"class> declaration as a <subclass> or " +"<joined-subclass>. For most purposes the default, " +"polymorphism=\"implicit\", is appropriate. Explicit " +"polymorphism is useful when two different classes are mapped to the same " +"table (this allows a \"lightweight\" class that contains a subset of the " +"table columns)." +msgstr "" +"Implicit (隐式)的多态是指,如果查询时给出的是任何超类、" +"该类实现的接口或者该类的 名字,都会返回这个类的实例;如果查询中给出的是子类的" +"名字,则会返回子类的实例。 Explicit (显式)的多态是指," +"只有在查询时给出明确的该类名字时才会返回这个类的实例; 同时只有在这个" +"<class>的定义中作为<subclass> 或者<joined-subclass>出现的子类,才会可能返" +"回。 在大多数情况下,默认的polymorphism=\"implicit\"都是合" +"适的。 显式的多态在有两个不同的类映射到同一个表的时候很有用。(允许一个“轻" +"型”的类,只包含部分表字段)。" + +#. Tag: para +#: basic_mapping.xml:411 +#, no-c-format +msgid "" +"The persister attribute lets you customize the " +"persistence strategy used for the class. You may, for example, specify your " +"own subclass of org.hibernate.persister.EntityPersister " +"or you might even provide a completely new implementation of the interface " +"org.hibernate.persister.ClassPersister that implements " +"persistence via, for example, stored procedure calls, serialization to flat " +"files or LDAP. See org.hibernate.test.CustomPersister for " +"a simple example (of \"persistence\" to a Hashtable)." +msgstr "" +"persister属性可以让你定制这个类使用的持久化策略。 你可以指" +"定你自己实现 org.hibernate.persister.EntityPersister的子" +"类,你甚至可以完全从头开始编写一个 org.hibernate.persister." +"ClassPersister接口的实现, 比如是用储存过程调用、序列化到文件或者" +"LDAP数据库来实现。 参阅org.hibernate.test.CustomPersister,这是一个简单的例子 (“持久化”到一个Hashtable)。" + +#. Tag: para +#: basic_mapping.xml:422 +#, no-c-format +msgid "" +"Note that the dynamic-update and dynamic-insert settings are not inherited by subclasses and so may also be " +"specified on the <subclass> or <joined-" +"subclass> elements. These settings may increase performance in " +"some cases, but might actually decrease performance in others. Use " +"judiciously." +msgstr "" +"请注意dynamic-updatedynamic-insert的" +"设置并不会继承到子类, 所以在<subclass>或者" +"<joined-subclass>元素中可能 需要再次设置。这些设置是" +"否能够提高效率要视情形而定。请用你的智慧决定是否使用。" + +#. Tag: para +#: basic_mapping.xml:430 +#, no-c-format +msgid "" +"Use of select-before-update will usually decrease " +"performance. It is very useful to prevent a database update trigger being " +"called unnecessarily if you reattach a graph of detached instances to a " +"Session." +msgstr "" +"使用select-before-update通常会降低性能。如果你重新连接一个" +"脱管(detache)对象实例 到一个Session中时,它可以防止数据" +"库不必要的触发update。 这就很有用了。" + +#. Tag: para +#: basic_mapping.xml:436 +#, no-c-format +msgid "" +"If you enable dynamic-update, you will have a choice of " +"optimistic locking strategies:" +msgstr "" +"如果你打开了dynamic-update,你可以选择几种乐观锁定的策略:" + +#. Tag: para +#: basic_mapping.xml:442 +#, no-c-format +msgid "version check the version/timestamp columns" +msgstr "version(版本检查) 检查version/timestamp字段" + +#. Tag: para +#: basic_mapping.xml:447 +#, no-c-format +msgid "all check all columns" +msgstr "all(全部) 检查全部字段" + +#. Tag: para +#: basic_mapping.xml:452 +#, no-c-format +msgid "" +"dirty check the changed columns, allowing some concurrent " +"updates" +msgstr "dirty(脏检查)只检察修改过的字段" + +#. Tag: para +#: basic_mapping.xml:457 +#, no-c-format +msgid "none do not use optimistic locking" +msgstr "none(不检查)不使用乐观锁定" + +#. Tag: para +#: basic_mapping.xml:462 +#, no-c-format +msgid "" +"We very strongly recommend that you use version/" +"timestamp columns for optimistic locking with Hibernate. This is the optimal " +"strategy with respect to performance and is the only strategy that correctly " +"handles modifications made to detached instances (ie. when Session." +"merge() is used)." +msgstr "" +"我们非常强烈建议你在Hibernate中使用version/timestamp字段" +"来进行乐观锁定。 对性能来说,这是最好的选择,并且这也是唯一能够处理在session" +"外进行操作的策略(例如: 在使用Session.merge()的时候)。" + +#. Tag: para +#: basic_mapping.xml:469 +#, no-c-format +msgid "" +"There is no difference between a view and a base table for a Hibernate " +"mapping, as expected this is transparent at the database level (note that " +"some DBMS don't support views properly, especially with updates). Sometimes " +"you want to use a view, but can't create one in the database (ie. with a " +"legacy schema). In this case, you can map an immutable and read-only entity " +"to a given SQL subselect expression:" +msgstr "" +"对Hibernate映射来说视图和表是没有区别的,这是因为它们在数据层都是透明的( 注" +"意:一些数据库不支持视图属性,特别是更新的时候)。有时你想使用视图,但却不能" +"在数据库 中创建它(例如:在遗留的schema中)。这样的话,你可以映射一个不可变的" +"(immutable)并且是 只读的实体到一个给定的SQL子查询表达式:" + +#. Tag: programlisting +#: basic_mapping.xml:477 +#, no-c-format +msgid "" +"\n" +" \n" +" select item.name, max(bid.amount), count(*)\n" +" from item\n" +" join bid on bid.item_id = item.id\n" +" group by item.name\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:479 +#, no-c-format +msgid "" +"Declare the tables to synchronize this entity with, ensuring that auto-flush " +"happens correctly, and that queries against the derived entity do not return " +"stale data. The <subselect> is available as both as " +"an attribute and a nested mapping element." +msgstr "" +"定义这个实体用到的表为同步(synchronize),确保自动刷新(auto-flush)正确执" +"行, 并且依赖原实体的查询不会返回过期数据。<subselect>在属性元素 和一个嵌套映射元素中都可见。" + +#. Tag: title +#: basic_mapping.xml:489 +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:491 +#, no-c-format +msgid "" +"Mapped classes must declare the primary key column of " +"the database table. Most classes will also have a JavaBeans-style property " +"holding the unique identifier of an instance. The <id> element defines the mapping from that property to the primary key " +"column." +msgstr "" +"被映射的类必须定义对应数据库表主键字段。大多数类有一个" +"JavaBeans风格的属性, 为每一个实例包含唯一的标识。<id> 元素定义了该属性到数据库表主键字段的映射。" + +#. Tag: programlisting +#: basic_mapping.xml:506 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|@attribute-name|element/@attribute|.\"\n" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:509 +#, no-c-format +msgid "" +"name (optional): The name of the identifier property." +msgstr "name (可选): 标识属性的名字。" + +#. Tag: para +#: basic_mapping.xml:514 +#, no-c-format +msgid "" +"type (optional): A name that indicates the Hibernate type." +msgstr "type (可选): 标识Hibernate类型的名字。" + +#. Tag: para +#: basic_mapping.xml:519 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the primary key column." +msgstr "column (可选 - 默认为属性名): 主键字段的名字。" + +#. Tag: para +#: basic_mapping.xml:525 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to a \"sensible\" " +"value): An identifier property value that indicates that an instance is " +"newly instantiated (unsaved), distinguishing it from detached instances that " +"were saved or loaded in a previous session." +msgstr "" +"unsaved-value (可选 - 默认为一个切合实际(sensible)的" +"值): 一个特定的标识属性值,用来标志该实例是刚刚创建的,尚未保存。 这可以把这" +"种实例和从以前的session中装载过(可能又做过修改--译者注) 但未再次持久化的实" +"例区分开来。" + +#. Tag: para +#: basic_mapping.xml:533 basic_mapping.xml:1041 basic_mapping.xml:1180 +#: basic_mapping.xml:1262 basic_mapping.xml:1369 basic_mapping.xml:1558 +#: basic_mapping.xml:1732 basic_mapping.xml:1902 basic_mapping.xml:2481 +#, fuzzy, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the property " +"value." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认为property): " +"Hibernate用来访问属性值的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认为property): " +"Hibernate应该使用的访问此属性值的策略\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认是 property): " +"Hibernate用于访问属性值的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认是 property): " +"Hibernate用于访问属性值的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认值为 property): " +"Hibernate用来访问属性值的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认是 property): " +"Hibernate用来访问属性的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认是 property): " +"Hibernate用来访问属性的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 - 默认是 property): " +"Hibernate用来访问属性的策略。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"access (可选 -默认是 property): " +"Hibernate 用来访问属性值的策略。" + +#. Tag: para +#: basic_mapping.xml:541 +#, no-c-format +msgid "" +"If the name attribute is missing, it is assumed that the " +"class has no identifier property." +msgstr "如果 name属性不存在,会认为这个类没有标识属性。" + +#. Tag: para +#: basic_mapping.xml:546 +#, no-c-format +msgid "" +"The unsaved-value attribute is almost never needed in " +"Hibernate3." +msgstr "unsaved-value 属性在Hibernate3中几乎不再需要。" + +#. Tag: para +#: basic_mapping.xml:550 +#, no-c-format +msgid "" +"There is an alternative <composite-id> declaration " +"to allow access to legacy data with composite keys. We strongly discourage " +"its use for anything else." +msgstr "" +"还有一个另外的<composite-id>定义可以访问旧式的多主键" +"数据。 我们强烈不建议使用这种方式。" + +#. Tag: title +#: basic_mapping.xml:556 +#, no-c-format +msgid "Generator" +msgstr "Generator" + +#. Tag: para +#: basic_mapping.xml:558 +#, no-c-format +msgid "" +"The optional <generator> child element names a Java " +"class used to generate unique identifiers for instances of the persistent " +"class. If any parameters are required to configure or initialize the " +"generator instance, they are passed using the <param> element." +msgstr "" +"可选的<generator>子元素是一个Java类的名字, 用来为该" +"持久化类的实例生成唯一的标识。如果这个生成器实例需要某些配置值或者初始化参" +"数, 用<param>元素来传递。" + +#. Tag: programlisting +#: basic_mapping.xml:565 +#, no-c-format +msgid "" +"\n" +" \n" +" uid_table\n" +" next_hi_value_column\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:567 +#, fuzzy, no-c-format +msgid "" +"All generators implement the interface org.hibernate.id." +"IdentifierGenerator. This is a very simple interface; some " +"applications may choose to provide their own specialized implementations. " +"However, Hibernate provides a range of built-in implementations. There are " +"shortcut names for the built-in generators:" +msgstr "" +"所有的生成器都实现org.hibernate.id.IdentifierGenerator接" +"口。 这是一个非常简单的接口;某些应用程序可以选择提供他们自己特定的实现。当" +"然, Hibernate提供了很多内置的实现。下面是一些内置生成器的快捷名字: " +"" + +#. Tag: literal +#: basic_mapping.xml:575 +#, no-c-format +msgid "increment" +msgstr "increment" + +#. Tag: para +#: basic_mapping.xml:577 +#, no-c-format +msgid "" +"generates identifiers of type long, short or int that are unique only when no other " +"process is inserting data into the same table. Do not use in a " +"cluster." +msgstr "" +"用于为long, short或者int类型生成 唯一标识。只有在没有其他进程往同一张表中插入数据时才能使" +"用。 在集群下不要使用。" + +#. Tag: literal +#: basic_mapping.xml:586 +#, no-c-format +msgid "identity" +msgstr "identity" + +#. Tag: para +#: basic_mapping.xml:588 +#, no-c-format +msgid "" +"supports identity columns in DB2, MySQL, MS SQL Server, Sybase and " +"HypersonicSQL. The returned identifier is of type long, " +"short or int." +msgstr "" +"对DB2,MySQL, MS SQL Server, Sybase和HypersonicSQL的内置标识字段提供支持。 返" +"回的标识符是long, short 或者" +"int类型的。" + +#. Tag: literal +#: basic_mapping.xml:596 +#, no-c-format +msgid "sequence" +msgstr "sequence" + +#. Tag: para +#: basic_mapping.xml:598 +#, no-c-format +msgid "" +"uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in " +"Interbase. The returned identifier is of type long, " +"short or int" +msgstr "" +"在DB2,PostgreSQL, Oracle, SAP DB, McKoi中使用序列(sequence), 而在Interbase" +"中使用生成器(generator)。返回的标识符是long, " +"short或者 int类型的。" + +#. Tag: literal +#: basic_mapping.xml:606 +#, no-c-format +msgid "hilo" +msgstr "hilo" + +#. Tag: para +#: basic_mapping.xml:608 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a table and column (by default hibernate_unique_key " +"and next_hi respectively) as a source of hi values. The " +"hi/lo algorithm generates identifiers that are unique only for a particular " +"database." +msgstr "" +"使用一个高/低位算法高效的生成long, short 或者 int类型的标识符。给定一个表和字段(默认分别" +"是 hibernate_unique_keynext_hi)作为" +"高位值的来源。 高/低位算法生成的标识符只在一个特定的数据库中是唯一的。" + +#. Tag: literal +#: basic_mapping.xml:618 +#, no-c-format +msgid "seqhilo" +msgstr "seqhilo" + +#. Tag: para +#: basic_mapping.xml:620 +#, no-c-format +msgid "" +"uses a hi/lo algorithm to efficiently generate identifiers of type " +"long, short or int, " +"given a named database sequence." +msgstr "" +"使用一个高/低位算法来高效的生成long, short 或者 int类型的标识符,给定一个数据库序列" +"(sequence)的名字。" + +#. Tag: literal +#: basic_mapping.xml:628 +#, no-c-format +msgid "uuid" +msgstr "uuid" + +#. Tag: para +#: basic_mapping.xml:630 +#, no-c-format +msgid "" +"uses a 128-bit UUID algorithm to generate identifiers of type string, unique " +"within a network (the IP address is used). The UUID is encoded as a string " +"of hexadecimal digits of length 32." +msgstr "" +"用一个128-bit的UUID算法生成字符串类型的标识符, 这在一个网络中是唯一的(使用" +"了IP地址)。UUID被编码为一个32位16进制数字的字符串。" + +#. Tag: literal +#: basic_mapping.xml:638 +#, no-c-format +msgid "guid" +msgstr "guid" + +#. Tag: para +#: basic_mapping.xml:640 +#, no-c-format +msgid "uses a database-generated GUID string on MS SQL Server and MySQL." +msgstr "在MS SQL Server 和 MySQL 中使用数据库生成的GUID字符串。" + +#. Tag: literal +#: basic_mapping.xml:646 +#, no-c-format +msgid "native" +msgstr "native" + +#. Tag: para +#: basic_mapping.xml:648 +#, no-c-format +msgid "" +"picks identity, sequence or " +"hilo depending upon the capabilities of the underlying " +"database." +msgstr "" +"根据底层数据库的能力选择identity, sequence 或者hilo中的一个。" + +#. Tag: literal +#: basic_mapping.xml:656 +#, no-c-format +msgid "assigned" +msgstr "assigned" + +#. Tag: para +#: basic_mapping.xml:658 +#, no-c-format +msgid "" +"lets the application to assign an identifier to the object before " +"save() is called. This is the default strategy if no " +"<generator> element is specified." +msgstr "" +"让应用程序在save()之前为对象分配一个标示符。这是 " +"<generator>元素没有指定时的默认生成策略。" + +#. Tag: literal +#: basic_mapping.xml:666 +#, no-c-format +msgid "select" +msgstr "select" + +#. Tag: para +#: basic_mapping.xml:668 +#, no-c-format +msgid "" +"retrieves a primary key assigned by a database trigger by selecting the row " +"by some unique key and retrieving the primary key value." +msgstr "通过数据库触发器选择一些唯一主键的行并返回主键值来分配一个主键。" + +#. Tag: literal +#: basic_mapping.xml:675 +#, no-c-format +msgid "foreign" +msgstr "foreign" + +#. Tag: para +#: basic_mapping.xml:677 +#, no-c-format +msgid "" +"uses the identifier of another associated object. Usually used in " +"conjunction with a <one-to-one> primary key " +"association." +msgstr "" +"使用另外一个相关联的对象的标识符。通常和<one-to-one>" +"联合起来使用。" + +#. Tag: literal +#: basic_mapping.xml:684 +#, no-c-format +msgid "sequence-identity" +msgstr "sequence-identity" + +#. Tag: para +#: basic_mapping.xml:686 +#, no-c-format +msgid "" +"a specialized sequence generation strategy which utilizes a database " +"sequence for the actual value generation, but combines this with JDBC3 " +"getGeneratedKeys to actually return the generated identifier value as part " +"of the insert statement execution. This strategy is only known to be " +"supported on Oracle 10g drivers targetted for JDK 1.4. Note comments on " +"these insert statements are disabled due to a bug in the Oracle drivers." +msgstr "" +"一种特别的序列生成策略,使用数据库序列来生成实际值,但将它和JDBC3的" +"getGeneratedKeys结合在一起,使得在插入语句执行的时候就返回生成的值。目前为止只" +"有面向JDK 1.4的Oracle 10g驱动支持这一策略。注意,因为Oracle驱动程序的一个" +"bug,这些插入语句的注释被关闭了。(原文:Note comments on these insert " +"statements are disabled due to a bug in the Oracle drivers.)" + +#. Tag: title +#: basic_mapping.xml:703 +#, no-c-format +msgid "Hi/lo algorithm" +msgstr "高/低位算法(Hi/Lo Algorithm)" + +#. Tag: para +#: basic_mapping.xml:704 +#, no-c-format +msgid "" +"The hilo and seqhilo generators " +"provide two alternate implementations of the hi/lo algorithm, a favorite " +"approach to identifier generation. The first implementation requires a " +"\"special\" database table to hold the next available \"hi\" value. The " +"second uses an Oracle-style sequence (where supported)." +msgstr "" +"hiloseqhilo生成器给出了两种hi/lo算" +"法的实现, 这是一种很令人满意的标识符生成算法。第一种实现需要一个“特殊”的数据" +"库表来保存下一个可用的“hi”值。 第二种实现使用一个Oracle风格的序列(在被支持的" +"情况下)。" + +#. Tag: programlisting +#: basic_mapping.xml:711 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" next_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:713 +#, no-c-format +msgid "" +"\n" +" \n" +" hi_value\n" +" 100\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:715 +#, no-c-format +msgid "" +"Unfortunately, you can't use hilo when supplying your own " +"Connection to Hibernate. When Hibernate is using an " +"application server datasource to obtain connections enlisted with JTA, you " +"must properly configure the hibernate.transaction." +"manager_lookup_class." +msgstr "" +"很不幸,你在为Hibernate自行提供Connection时无法使用" +"hilo。 当Hibernate使用JTA获取应用服务器的数据源连接时,你必" +"须正确地配置 hibernate.transaction.manager_lookup_class。" + +#. Tag: title +#: basic_mapping.xml:724 +#, no-c-format +msgid "UUID algorithm" +msgstr "UUID算法(UUID Algorithm )" + +#. Tag: para +#: basic_mapping.xml:725 +#, no-c-format +msgid "" +"The UUID contains: IP address, startup time of the JVM (accurate to a " +"quarter second), system time and a counter value (unique within the JVM). " +"It's not possible to obtain a MAC address or memory address from Java code, " +"so this is the best we can do without using JNI." +msgstr "" +"UUID包含:IP地址,JVM的启动时间(精确到1/4秒),系统时间和一个计数器值(在JVM" +"中唯一)。 在Java代码中不可能获得MAC地址或者内存地址,所以这已经是我们在不使" +"用JNI的前提下的能做的最好实现了。" + +#. Tag: title +#: basic_mapping.xml:734 +#, no-c-format +msgid "Identity columns and sequences" +msgstr "标识字段和序列(Identity columns and Sequences)" + +#. Tag: para +#: basic_mapping.xml:735 +#, no-c-format +msgid "" +"For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), " +"you may use identity key generation. For databases that " +"support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you " +"may use sequence style key generation. Both these " +"strategies require two SQL queries to insert a new object." +msgstr "" +"对于内部支持标识字段的数据库(DB2,MySQL,Sybase,MS SQL),你可以使用" +"identity关键字生成。 对于内部支持序列的数据库(DB2," +"Oracle, PostgreSQL, Interbase, McKoi,SAP DB), 你可以使用sequence风格的关键字生成。 这两种方式对于插入一个新的对象都需要两次SQL查询。" + +#. Tag: programlisting +#: basic_mapping.xml:743 +#, no-c-format +msgid "" +"\n" +" \n" +" person_id_sequence\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:745 +#, no-c-format +msgid "" +"\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:747 +#, no-c-format +msgid "" +"For cross-platform development, the native strategy will " +"choose from the identity, sequence and " +"hilo strategies, dependant upon the capabilities of the " +"underlying database." +msgstr "" +"对于跨平台开发,native策略会从identity, sequencehilo中进行选择,选" +"择哪一个,这取决于底层数据库的支持能力。" + +#. Tag: title +#: basic_mapping.xml:756 +#, no-c-format +msgid "Assigned identifiers" +msgstr "程序分配的标识符(Assigned Identifiers)" + +#. Tag: para +#: basic_mapping.xml:757 +#, no-c-format +msgid "" +"If you want the application to assign identifiers (as opposed to having " +"Hibernate generate them), you may use the assigned " +"generator. This special generator will use the identifier value already " +"assigned to the object's identifier property. This generator is used when " +"the primary key is a natural key instead of a surrogate key. This is the " +"default behavior if you do no specify a <generator> " +"element." +msgstr "" +"如果你需要应用程序分配一个标示符(而非Hibernate来生成),你可以使用" +"assigned 生成器。这种特殊的生成器会使用已经分配给对象的标" +"识符属性的标识符值。 这个生成器使用一个自然键(natural key,有商业意义的列-" +"译注)作为主键,而不是使用一个代理键( surrogate key,没有商业意义的列-译" +"注)。这是没有指定<generator>元素时的默认行为" + +#. Tag: para +#: basic_mapping.xml:766 +#, no-c-format +msgid "" +"Choosing the assigned generator makes Hibernate use " +"unsaved-value=\"undefined\", forcing Hibernate to go to " +"the database to determine if an instance is transient or detached, unless " +"there is a version or timestamp property, or you define Interceptor." +"isUnsaved()." +msgstr "" +"当选择assigned生成器时,除非有一个version或timestamp属性," +"或者你定义了 Interceptor.isUnsaved(),否则需要让Hiberante" +"使用 unsaved-value=\"undefined\",强制Hibernatet查询数据库" +"来确定一个实例是瞬时的(transient) 还是脱管的(detached)。" + +#. Tag: title +#: basic_mapping.xml:776 +#, no-c-format +msgid "Primary keys assigned by triggers" +msgstr "触发器实现的主键生成器(Primary keys assigned by triggers)" + +#. Tag: para +#: basic_mapping.xml:777 +#, no-c-format +msgid "" +"For legacy schemas only (Hibernate does not generate DDL with triggers)." +msgstr "仅仅用于遗留的schema中 (Hibernate不能使用触发器生成DDL)。" + +#. Tag: programlisting +#: basic_mapping.xml:781 +#, no-c-format +msgid "" +"\n" +" \n" +" socialSecurityNumber\n" +" \n" +"
]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:783 +#, no-c-format +msgid "" +"In the above example, there is a unique valued property named " +"socialSecurityNumber defined by the class, as a natural " +"key, and a surrogate key named person_id whose value is " +"generated by a trigger." +msgstr "" +"在上面的例子中,类定义了一个命名为socialSecurityNumber的唯" +"一值属性, 它是一个自然键(natural key),命名为person_id" +"的代理键(surrogate key) 的值由触发器生成。" + +#. Tag: title +#: basic_mapping.xml:795 +#, no-c-format +msgid "Enhanced identifier generators" +msgstr "Enhanced identifier generators" + +#. Tag: para +#: basic_mapping.xml:797 +#, no-c-format +msgid "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." +msgstr "" +"Starting with release 3.2.3, there are 2 new generators which represent a re-" +"thinking of 2 different aspects of identifier generation. The first aspect " +"is database portability; the second is optimization (not having to query the " +"database for every request for a new identifier value). These two new " +"generators are intended to take the place of some of the named generators " +"described above (starting in 3.3.x); however, they are included in the " +"current releases and can be referenced by FQN." + +#. Tag: para +#: basic_mapping.xml:805 +#, fuzzy, no-c-format +msgid "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters:" +msgstr "" +"The first of these new generators is org.hibernate.id.enhanced." +"SequenceStyleGenerator which is intended firstly as a replacement " +"for the sequence generator and secondly as a better " +"portability generator than native (because " +"native (generally) chooses between identity and sequence which have largely different " +"semantics which can cause subtle isssues in applications eyeing " +"portability). org.hibernate.id.enhanced.SequenceStyleGenerator however achieves portability in a different manner. It chooses " +"between using a table or a sequence in the database to store its " +"incrementing values depending on the capabilities of the dialect being used. " +"The difference between this and native is that table-" +"based and sequence-based storage have the same exact semantic (in fact " +"sequences are exactly what Hibernate tries to emmulate with its table-based " +"generators). This generator has a number of configuration parameters: " +"" + +#. Tag: para +#: basic_mapping.xml:819 +#, no-c-format +msgid "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." +msgstr "" +"sequence_name (optional, defaults to " +"hibernate_sequence): The name of the sequence (or table) " +"to be used." + +#. Tag: para +#: basic_mapping.xml:825 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the sequence/table. In " +"sequence creation terms, this is analogous to the clause typical named " +"\"STARTS WITH\"." + +#. Tag: para +#: basic_mapping.xml:832 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the sequence/table should " +"differ. In sequence creation terms, this is analogous to the clause typical " +"named \"INCREMENT BY\"." + +#. Tag: para +#: basic_mapping.xml:839 +#, no-c-format +msgid "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" +msgstr "" +"force_table_use (optional, defaults to false): Should we force the use of a table as the backing structure even " +"though the dialect might support sequence?" + +#. Tag: para +#: basic_mapping.xml:846 +#, no-c-format +msgid "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." +msgstr "" +"value_column (optional, defaults to next_val): Only relevant for table structures! The name of the column on the " +"table which is used to hold the value." + +#. Tag: para +#: basic_mapping.xml:853 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to none): See" +msgstr "" +"cascade (可选 -默认是none): 级联的类型" + +#. Tag: para +#: basic_mapping.xml:860 +#, fuzzy, no-c-format +msgid "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters:" +msgstr "" +"The second of these new generators is org.hibernate.id.enhanced." +"TableGenerator which is intended firstly as a replacement for the " +"table generator (although it actually functions much more " +"like org.hibernate.id.MultipleHiLoPerTableGenerator) and " +"secondly as a re-implementation of org.hibernate.id." +"MultipleHiLoPerTableGenerator utilizing the notion of pluggable " +"optimiziers. Essentially this generator defines a table capable of holding a " +"number of different increment values simultaneously by using multiple " +"distinctly keyed rows. This generator has a number of configuration " +"parameters: " + +#. Tag: para +#: basic_mapping.xml:870 +#, no-c-format +msgid "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." +msgstr "" +"table_name (optional, defaults to " +"hibernate_sequences): The name of the table to be used." + +#. Tag: para +#: basic_mapping.xml:876 +#, no-c-format +msgid "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." +msgstr "" +"value_column_name (optional, defaults to " +"next_val): The name of the column on the table which is " +"used to hold the value." + +#. Tag: para +#: basic_mapping.xml:882 +#, no-c-format +msgid "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." +msgstr "" +"segment_column_name (optional, defaults to " +"sequence_name): The name of the column on the table which " +"is used to hold the \"segement key\". This is the value which distinctly " +"identifies which increment value to use." + +#. Tag: para +#: basic_mapping.xml:889 +#, no-c-format +msgid "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." +msgstr "" +"segment_value (optional, defaults to default): The \"segment key\" value for the segment from which we want to " +"pull increment values for this generator." + +#. Tag: para +#: basic_mapping.xml:896 +#, no-c-format +msgid "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." +msgstr "" +"segment_value_length (optional, defaults to 255): Used for schema generation; the column size to create this " +"segment key column." + +#. Tag: para +#: basic_mapping.xml:902 +#, no-c-format +msgid "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." +msgstr "" +"initial_value (optional, defaults to 1): The initial value to be retrieved from the table." + +#. Tag: para +#: basic_mapping.xml:908 +#, no-c-format +msgid "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." +msgstr "" +"increment_size (optional, defaults to 1): The value by which subsequent calls to the table should differ." + +#. Tag: para +#: basic_mapping.xml:914 +#, fuzzy, no-c-format +msgid "" +"optimizer (optional, defaults to ): See" +msgstr "" +"cascade (可选 -默认是none): 级联的类型" + +#. Tag: title +#: basic_mapping.xml:924 +#, no-c-format +msgid "Identifier generator optimization" +msgstr "Identifier generator optimization" + +#. Tag: para +#: basic_mapping.xml:925 +#, fuzzy, no-c-format +msgid "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion." +msgstr "" +"For identifier generators which store values in the database, it is " +"inefficient for them to hit the database on each and every call to generate " +"a new identifier value. Instead, you'd ideally want to group a bunch of them " +"in memory and only hit the database when you have exhausted your in-memory " +"value group. This is the role of the pluggable optimizers. Currently only " +"the two enhanced generators ( support this notion. " + +#. Tag: para +#: basic_mapping.xml:933 +#, no-c-format +msgid "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." +msgstr "" +"none (generally this is the default if no optimizer was " +"specified): This says to not perform any optimizations, and hit the database " +"each and every request." + +#. Tag: para +#: basic_mapping.xml:939 +#, no-c-format +msgid "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." +msgstr "" +"hilo: applies a hi/lo algorithm around the database " +"retrieved values. The values from the database for this optimizer are " +"expected to be sequential. The values retrieved from the database structure " +"for this optimizer indicates the \"group number\"; the " +"increment_size is multiplied by that value in memory to " +"define a group \"hi value\"." + +#. Tag: para +#: basic_mapping.xml:948 +#, no-c-format +msgid "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." +msgstr "" +"pooled: like was discussed for hilo, " +"this optimizers attempts to minimize the number of hits to the database. " +"Here, however, we simply store the starting value for the \"next group\" " +"into the database structure rather than a sequential value in combination " +"with an in-memory grouping algorithm. increment_size here " +"refers to the values coming from the database." + +#. Tag: title +#: basic_mapping.xml:961 +#, no-c-format +msgid "composite-id" +msgstr "composite-id" + +#. Tag: programlisting +#: basic_mapping.xml:963 +#, no-c-format +msgid "" +"\n" +" node=\"element-name|.\"\n" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:965 +#, no-c-format +msgid "" +"For a table with a composite key, you may map multiple properties of the " +"class as identifier properties. The <composite-id> " +"element accepts <key-property> property mappings " +"and <key-many-to-one> mappings as child elements." +msgstr "" +"如果表使用联合主键,你可以映射类的多个属性为标识符属性。 <" +"composite-id>元素接受<key-property> 属" +"性映射和<key-many-to-one>属性映射作为子元素。" + +#. Tag: programlisting +#: basic_mapping.xml:972 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:974 +#, no-c-format +msgid "" +"Your persistent class must override equals() and hashCode() to implement composite identifier " +"equality. It must also implements Serializable." +msgstr "" +"你的持久化类必须重载equals()和 " +"hashCode()方法,来实现组合的标识符的相等判断。 实现" +"Serializable接口也是必须的。" + +#. Tag: para +#: basic_mapping.xml:980 +#, no-c-format +msgid "" +"Unfortunately, this approach to composite identifiers means that a " +"persistent object is its own identifier. There is no convenient \"handle\" " +"other than the object itself. You must instantiate an instance of the " +"persistent class itself and populate its identifier properties before you " +"can load() the persistent state associated with a " +"composite key. We call this approach an embedded " +"composite identifier, and discourage it for serious applications." +msgstr "" +"不幸的是,这种组合关键字的方法意味着一个持久化类是它自己的标识。除了对象自己" +"之外, 没有什么方便的“把手”可用。你必须初始化持久化类的实例,填充它的标识符属" +"性,再load() 组合关键字关联的持久状态。我们把这种方法称为" +"embedded(嵌入式)的组合标识符,在重要的应用中不鼓励使用" +"这种用法。" + +#. Tag: para +#: basic_mapping.xml:989 +#, no-c-format +msgid "" +"A second approach is what we call a mapped composite " +"identifier, where the identifier properties named inside the <" +"composite-id> element are duplicated on both the persistent " +"class and a separate identifier class." +msgstr "" +"第二种方法我们称为mapped(映射式)组合标识符 (mapped " +"composite identifier),<composite-id>元素中列出的标识" +"属性不但在持久化类出现,还形成一个独立的标识符类。" + +#. Tag: programlisting +#: basic_mapping.xml:995 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:997 +#, no-c-format +msgid "" +"In this example, both the composite identifier class, MedicareId, and the entity class itself have properties named " +"medicareNumber and dependent. The " +"identifier class must override equals() and " +"hashCode() and implement. Serializable. The disadvantage of this approach is quite obvious—code " +"duplication." +msgstr "" +"在这个例子中,组合标识符类MedicareId和实体类都含有" +"medicareNumberdependent属性。标识符类" +"必须重载equals()hashCode()并且实现" +"Serializable接口。这种方法的缺点是出现了明显的代码重复。" + +#. Tag: para +#: basic_mapping.xml:1006 +#, no-c-format +msgid "" +"The following attributes are used to specify a mapped composite identifier:" +msgstr "下面列出的属性是用来指定一个映射式组合标识符的:" + +#. Tag: para +#: basic_mapping.xml:1012 +#, no-c-format +msgid "" +"mapped (optional, defaults to false): " +"indicates that a mapped composite identifier is used, and that the contained " +"property mappings refer to both the entity class and the composite " +"identifier class." +msgstr "" +"mapped (可选, 默认为false): 指明使用一" +"个映射式组合标识符,其包含的属性映射同时在实体类和组合标识符类中出现。" + +#. Tag: para +#: basic_mapping.xml:1020 +#, no-c-format +msgid "" +"class (optional, but required for a mapped composite " +"identifier): The class used as a composite identifier." +msgstr "" +"class (可选,但对映射式组合标识符必须指定): 作为组合标识符" +"类使用的类名." + +#. Tag: para +#: basic_mapping.xml:1027 +#, no-c-format +msgid "" +"We will describe a third, even more convenient approach where the composite " +"identifier is implemented as a component class in . The attributes described below apply only to this " +"alternative approach:" +msgstr "" +"在一节中,我们会描述第三种方式,那就" +"是把组合标识符实现为一个组件(component)类,这是更方便的方法。下面的属性仅对第" +"三种方法有效:" + +#. Tag: para +#: basic_mapping.xml:1035 +#, no-c-format +msgid "" +"name (optional, required for this approach): A property " +"of component type that holds the composite identifier (see chapter 9)." +msgstr "" +"name (可选,但对这种方法而言必须): 包含此组件标识符的组件类" +"型的名字 (参阅第9章)." + +#. Tag: para +#: basic_mapping.xml:1047 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The component class used as a composite " +"identifier (see next section)." +msgstr "" +"class (可选 - 默认会用反射来自动判定属性类型 ): 用来作为组" +"合标识符的组件类的类名(参阅下一节)" + +#. Tag: para +#: basic_mapping.xml:1054 +#, no-c-format +msgid "" +"This third approach, an identifier component is the one " +"we recommend for almost all applications." +msgstr "" +"第三种方式,被称为identifier component(标识符组件)是我们" +"对几乎所有应用都推荐使用的方式。" + +#. Tag: title +#: basic_mapping.xml:1062 +#, no-c-format +msgid "discriminator" +msgstr "鉴别器(discriminator)" + +#. Tag: para +#: basic_mapping.xml:1064 +#, no-c-format +msgid "" +"The <discriminator> element is required for " +"polymorphic persistence using the table-per-class-hierarchy mapping strategy " +"and declares a discriminator column of the table. The discriminator column " +"contains marker values that tell the persistence layer what subclass to " +"instantiate for a particular row. A restricted set of types may be used: " +"string, character, integer, byte, short, " +"boolean, yes_no, true_false." +msgstr "" +"在\"一棵对象继承树对应一个表\"的策略中,<discriminator>元素是必需的, 它定义了表的鉴别器字段。鉴别器字段包含标志值,用于告知" +"持久化层应该为某个特定的行创建哪一个子类的实例。 如下这些受到限制的类型可以使" +"用: string, character, " +"integer, byte, short, boolean, yes_no, " +"true_false." + +#. Tag: programlisting +#: basic_mapping.xml:1082 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1085 +#, no-c-format +msgid "" +"column (optional - defaults to class) " +"the name of the discriminator column." +msgstr "" +"column (可选 - 默认为 class) 鉴别器字段" +"的名字" + +#. Tag: para +#: basic_mapping.xml:1091 +#, no-c-format +msgid "" +"type (optional - defaults to string) a " +"name that indicates the Hibernate type" +msgstr "" +"type (可选 - 默认为 string) 一个" +"Hibernate字段类型的名字" + +#. Tag: para +#: basic_mapping.xml:1097 +#, no-c-format +msgid "" +"force (optional - defaults to false) " +"\"force\" Hibernate to specify allowed discriminator values even when " +"retrieving all instances of the root class." +msgstr "" +"force(强制) (可选 - 默认为 false) \"强" +"制\"Hibernate指定允许的鉴别器值,即使当取得的所有实例都是根类的。" + +#. Tag: para +#: basic_mapping.xml:1104 +#, no-c-format +msgid "" +"insert (optional - defaults to true) " +"set this to false if your discriminator column is also " +"part of a mapped composite identifier. (Tells Hibernate to not include the " +"column in SQL INSERTs.)" +msgstr "" +"insert (可选 - 默认为true) 如果你的鉴别" +"器字段也是映射为复合标识(composite identifier)的一部分,则需将 这个值设为" +"false。(告诉Hibernate在做SQL INSERT 时" +"不包含该列)" + +#. Tag: para +#: basic_mapping.xml:1112 +#, no-c-format +msgid "" +"formula (optional) an arbitrary SQL expression that is " +"executed when a type has to be evaluated. Allows content-based " +"discrimination." +msgstr "" +"formula (可选) 一个SQL表达式,在类型判断(判断是父类还是具" +"体子类-译注)时执行。可用于基于内容的鉴别器。" + +#. Tag: para +#: basic_mapping.xml:1120 +#, no-c-format +msgid "" +"Actual values of the discriminator column are specified by the " +"discriminator-value attribute of the <" +"class> and <subclass> elements." +msgstr "" +"鉴别器字段的实际值是根据<class><" +"subclass>元素中 的discriminator-value属性得来" +"的。" + +#. Tag: para +#: basic_mapping.xml:1126 +#, no-c-format +msgid "" +"The force attribute is (only) useful if the table " +"contains rows with \"extra\" discriminator values that are not mapped to a " +"persistent class. This will not usually be the case." +msgstr "" +"force属性仅仅在这种情况下有用的:表中包含没有被映射到持久" +"化类的附加辨别器值。 这种情况不会经常遇到。" + +#. Tag: para +#: basic_mapping.xml:1132 +#, no-c-format +msgid "" +"Using the formula attribute you can declare an arbitrary " +"SQL expression that will be used to evaluate the type of a row:" +msgstr "" +"使用formula属性你可以定义一个SQL表达式,用来判断一个行数据" +"的类型。" + +#. Tag: programlisting +#: basic_mapping.xml:1137 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1142 +#, no-c-format +msgid "version (optional)" +msgstr "版本(version)(可选)" + +#. Tag: para +#: basic_mapping.xml:1144 +#, no-c-format +msgid "" +"The <version> element is optional and indicates " +"that the table contains versioned data. This is particularly useful if you " +"plan to use long transactions (see below)." +msgstr "" +"<version>元素是可选的,表明表中包含附带版本信息的数" +"据。 这在你准备使用 长事务(long transactions)的时候特" +"别有用。(见后)" + +#. Tag: programlisting +#: basic_mapping.xml:1160 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1163 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of the column holding the version number." +msgstr "" +"column (可选 - 默认为属性名): 指定持有版本号的字段名。" + +#. Tag: para +#: basic_mapping.xml:1169 +#, no-c-format +msgid "" +"name: The name of a property of the persistent class." +msgstr "name: 持久化类的属性名。" + +#. Tag: para +#: basic_mapping.xml:1174 +#, no-c-format +msgid "" +"type (optional - defaults to integer): " +"The type of the version number." +msgstr "" +"type (可选 - 默认是 integer): 版本号的" +"类型。" + +#. Tag: para +#: basic_mapping.xml:1186 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to undefined): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (可选 - 默认是undefined): 用于标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值" +"就可以把这种情况 和已经在先前的session中保存或装载的脱管(detached)实例区分" +"开来。 (undefined指明应被使用的标识属性值。)" + +#. Tag: para +#: basic_mapping.xml:1195 +#, fuzzy, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this version property value is actually generated " +"by the database. See the discussion of generated properties." +msgstr "" +"generated (可选 - 默认是 never): 表明此" +"版本属性值是否实际上是由数据库生成的。请参阅generated properties部分的讨论。" + +#. Tag: para +#: basic_mapping.xml:1202 +#, no-c-format +msgid "" +"insert (optional - defaults to true): " +"Specifies whether the version column should be included in SQL insert " +"statements. May be set to false if and only if the " +"database column is defined with a default value of 0." +msgstr "" +"insert (可选 - 默认是 true): 表明此版本" +"列应该包含在SQL插入语句中。只有当数据库字段有默认值0的时" +"候,才可以设置为false。" + +#. Tag: para +#: basic_mapping.xml:1212 +#, no-c-format +msgid "" +"Version numbers may be of Hibernate type long, " +"integer, short, timestamp or calendar." +msgstr "" +"版本号必须是以下类型:long, integer, " +"short, timestamp或者calendar。" + +#. Tag: para +#: basic_mapping.xml:1217 +#, no-c-format +msgid "" +"A version or timestamp property should never be null for a detached " +"instance, so Hibernate will detect any instance with a null version or " +"timestamp as transient, no matter what other unsaved-value strategies are specified. Declaring a nullable version or " +"timestamp property is an easy way to avoid any problems with transitive " +"reattachment in Hibernate, especially useful for people using assigned " +"identifiers or composite keys!" +msgstr "" +"一个脱管(detached)实例的version或timestamp属性不能为空(null),因为" +"Hibernate不管 unsaved-value被指定为何种策略,它将任何属性" +"为空的version或timestamp 实例看作为瞬时(transient)实例。 避免" +"Hibernate中的传递重附(transitive reattachment)问题的一个简单方法是 定义一个" +"不能为空的version或timestamp属性,特别是在人们使用程序分配的标识符(assigned " +"identifiers) 或复合主键时非常有用!" + +#. Tag: title +#: basic_mapping.xml:1228 +#, no-c-format +msgid "timestamp (optional)" +msgstr "timestamp (可选)" + +#. Tag: para +#: basic_mapping.xml:1230 +#, no-c-format +msgid "" +"The optional <timestamp> element indicates that the " +"table contains timestamped data. This is intended as an alternative to " +"versioning. Timestamps are by nature a less safe implementation of " +"optimistic locking. However, sometimes the application might use the " +"timestamps in other ways." +msgstr "" +"可选的<timestamp>元素指明了表中包含时间戳数据。 这用" +"来作为版本的替代。时间戳本质上是一种对乐观锁定的一种不是特别安全的实现。当" +"然, 有时候应用程序可能在其他方面使用时间戳。" + +#. Tag: programlisting +#: basic_mapping.xml:1246 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1249 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): The " +"name of a column holding the timestamp." +msgstr "column (可选 - 默认为属性名): 持有时间戳的字段名。" + +#. Tag: para +#: basic_mapping.xml:1255 +#, no-c-format +msgid "" +"name: The name of a JavaBeans style property of Java type " +"Date or Timestamp of the persistent " +"class." +msgstr "" +"name: 在持久化类中的JavaBeans风格的属性名, 其Java类型是 " +"Date 或者 Timestamp的。" + +#. Tag: para +#: basic_mapping.xml:1268 +#, no-c-format +msgid "" +"unsaved-value (optional - defaults to null): A version property value that indicates that an instance is newly " +"instantiated (unsaved), distinguishing it from detached instances that were " +"saved or loaded in a previous session. (undefined " +"specifies that the identifier property value should be used.)" +msgstr "" +"unsaved-value (可选 - 默认是null): 用于" +"标明某个实例时刚刚被实例化的(尚未保存)版本属性值,依靠这个值就可以把这种情" +"况和 已经在先前的session中保存或装载的脱管(detached)实例区分开来。" +"(undefined 指明使用标识属性值进行这种判断。)" + +#. Tag: para +#: basic_mapping.xml:1277 +#, no-c-format +msgid "" +"source (optional - defaults to vm): " +"From where should Hibernate retrieve the timestamp value? From the database, " +"or from the current JVM? Database-based timestamps incur an overhead because " +"Hibernate must hit the database in order to determine the \"next value\", " +"but will be safer for use in clustered environments. Note also, that not all " +"Dialects are known to support retrieving of the " +"database's current timestamp, while others might be unsafe for usage in " +"locking due to lack of precision (Oracle 8 for example)." +msgstr "" +"source (可选 - 默认是 vm): Hibernate如" +"何才能获取到时间戳的值呢?从数据库,还是当前JVM?从数据库获取会带来一些负担," +"因为Hibernate必须访问数据库来获得“下一个值”,但是在集群环境中会更安全些。还要" +"注意,并不是所有的Dialect(方言)都支持获得数据库的当前时" +"间戳的,而支持的数据库中又有一部分因为精度不足,用于锁定是不安全的(例如" +"Oracle 8)。" + +#. Tag: para +#: basic_mapping.xml:1289 +#, fuzzy, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this timestamp property value is actually " +"generated by the database. See the discussion of generated properties." +msgstr "" +"generated (可选 - 默认是 never): 指出时" +"间戳值是否实际上是由数据库生成的.请参阅generated properties的讨论。" + +#. Tag: para +#: basic_mapping.xml:1298 +#, no-c-format +msgid "" +"Note that <timestamp> is equivalent to <" +"version type=\"timestamp\">. And <timestamp source=" +"\"db\"> is equivalent to <version type=\"dbtimestamp" +"\">" +msgstr "" +"注意,<timestamp><version type=" +"\"timestamp\">是等价的。并且<timestamp source=\"db" +"\"><version type=\"dbtimestamp\">是等" +"价的。" + +#. Tag: title +#: basic_mapping.xml:1308 +#, no-c-format +msgid "property" +msgstr "property" + +#. Tag: para +#: basic_mapping.xml:1310 +#, no-c-format +msgid "" +"The <property> element declares a persistent, " +"JavaBean style property of the class." +msgstr "" +"<property>元素为类定义了一个持久化的,JavaBean风格的" +"属性。" + +#. Tag: programlisting +#: basic_mapping.xml:1332 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1335 +#, no-c-format +msgid "" +"name: the name of the property, with an initial lowercase " +"letter." +msgstr "name: 属性的名字,以小写字母开头。" + +#. Tag: para +#: basic_mapping.xml:1341 +#, no-c-format +msgid "" +"column (optional - defaults to the property name): the " +"name of the mapped database table column. This may also be specified by " +"nested <column> element(s)." +msgstr "" +"column (可选 - 默认为属性名字): 对应的数据库字段名。 也可" +"以通过嵌套的<column>元素指定。" + +#. Tag: para +#: basic_mapping.xml:1348 +#, no-c-format +msgid "" +"type (optional): a name that indicates the Hibernate type." +msgstr "type (可选): 一个Hibernate类型的名字。" + +#. Tag: para +#: basic_mapping.xml:1353 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) : specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" property " +"whose value is initialized from some other property that maps to the same " +"colum(s) or by a trigger or other application." +msgstr "" +"update, insert (可选 - 默认为 true) : " +"表明用于UPDATE 和/或 INSERT 的SQL语句中" +"是否包含这个被映射了的字段。这二者如果都设置为false 则表明" +"这是一个“外源性(derived)”的属性,它的值来源于映射到同一个(或多个) 字段的" +"某些其他属性,或者通过一个trigger(触发器)或其他程序生成。" + +#. Tag: para +#: basic_mapping.xml:1362 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed property. Computed properties do " +"not have a column mapping of their own." +msgstr "" +"formula (可选): 一个SQL表达式,定义了这个计算 " +"(computed) 属性的值。计算属性没有和它对应的数据库字段。" + +#. Tag: para +#: basic_mapping.xml:1375 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this property should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (可选 - 默认为 false): 指定 指定实" +"例变量第一次被访问时,这个属性是否延迟抓取(fetched lazily)( 需要运行时字节" +"码增强)。" + +#. Tag: para +#: basic_mapping.xml:1382 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the columns. Also, allow this to be the target of a " +"property-ref." +msgstr "" +"unique (可选): 使用DDL为该字段添加唯一的约束。 同样,允许" +"它作为property-ref引用的目标。" + +#. Tag: para +#: basic_mapping.xml:1389 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the columns." +msgstr "" +"not-null (可选): 使用DDL为该字段添加可否为空" +"(nullability)的约束。" + +#. Tag: para +#: basic_mapping.xml:1395 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (可选 - 默认为 true): " +"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。 换句话说,它" +"决定这个属性发生脏数据时版本(version)的值是否增长。" + +#. Tag: para +#: basic_mapping.xml:1403 +#, fuzzy, no-c-format +msgid "" +"generated (optional - defaults to never): Specifies that this property value is actually generated by the " +"database. See the discussion of generated properties." +msgstr "" +"generated (可选 - 默认为 never): 表明此" +"属性值是否实际上是由数据库生成的。请参阅generated properties的讨论。" + +#. Tag: para +#: basic_mapping.xml:1412 +#, no-c-format +msgid "typename could be:" +msgstr "typename可以是如下几种:" + +#. Tag: para +#: basic_mapping.xml:1418 +#, no-c-format +msgid "" +"The name of a Hibernate basic type (eg. integer, string, character, " +"date, timestamp, float, binary, serializable, object, blob)." +msgstr "" +"Hibernate基本类型名(比如:integer, string, character,date, " +"timestamp, float, binary, serializable, object, blob)。" + +#. Tag: para +#: basic_mapping.xml:1424 +#, no-c-format +msgid "" +"The name of a Java class with a default basic type (eg. int, float, " +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)." +msgstr "" +"一个Java类的名字,这个类属于一种默认基础类型 (比如: int, float," +"char, java.lang.String, java.util.Date, java.lang.Integer, java.sql.Clob)。" + +#. Tag: para +#: basic_mapping.xml:1430 +#, no-c-format +msgid "The name of a serializable Java class." +msgstr "一个可以序列化的Java类的名字。" + +#. Tag: para +#: basic_mapping.xml:1435 +#, no-c-format +msgid "" +"The class name of a custom type (eg. com.illflow.type.MyCustomType)." +msgstr "" +"一个自定义类型的类的名字。(比如: com.illflow.type.MyCustomType)。" + +#. Tag: para +#: basic_mapping.xml:1441 +#, no-c-format +msgid "" +"If you do not specify a type, Hibernate will use reflection upon the named " +"property to take a guess at the correct Hibernate type. Hibernate will try " +"to interpret the name of the return class of the property getter using rules " +"2, 3, 4 in that order. However, this is not always enough. In certain cases " +"you will still need the type attribute. (For example, to " +"distinguish between Hibernate.DATE and Hibernate." +"TIMESTAMP, or to specify a custom type.)" +msgstr "" +"如果你没有指定类型,Hibernarte会使用反射来得到这个名字的属性,以此来猜测正确" +"的Hibernate类型。 Hibernate会按照规则2,3,4的顺序对属性读取器(getter方法)的返" +"回类进行解释。然而,这还不够。 在某些情况下你仍然需要type" +"属性。(比如,为了区别Hibernate.DATEHibernate." +"TIMESTAMP,或者为了指定一个自定义类型。)" + +#. Tag: para +#: basic_mapping.xml:1451 +#, no-c-format +msgid "" +"The access attribute lets you control how Hibernate will " +"access the property at runtime. By default, Hibernate will call the property " +"get/set pair. If you specify access=\"field\", Hibernate " +"will bypass the get/set pair and access the field directly, using " +"reflection. You may specify your own strategy for property access by naming " +"a class that implements the interface org.hibernate.property." +"PropertyAccessor." +msgstr "" +"access属性用来让你控制Hibernate如何在运行时访问属性。在默" +"认情况下, Hibernate会使用属性的get/set方法对(pair)。如果你指明" +"access=\"field\", Hibernate会忽略get/set方法对,直接使用反" +"射来访问成员变量。你也可以指定你自己的策略, 这就需要你自己实现org." +"hibernate.property.PropertyAccessor接口, 再在access中设置你自定义" +"策略类的名字。" + +#. Tag: para +#: basic_mapping.xml:1460 +#, no-c-format +msgid "" +"An especially powerful feature are derived properties. These properties are " +"by definition read-only, the property value is computed at load time. You " +"declare the computation as a SQL expression, this translates to a " +"SELECT clause subquery in the SQL query that loads an " +"instance:" +msgstr "" +"衍生属性(derive propertie)是一个特别强大的特征。这些属性应该定义为只读,属" +"性值在装载时计算生成。 你用一个SQL表达式生成计算的结果,它会在这个实例转载时" +"翻译成一个SQL查询的SELECT 子查询语句。" + +#. Tag: programlisting +#: basic_mapping.xml:1467 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1469 +#, no-c-format +msgid "" +"Note that you can reference the entities own table by not declaring an alias " +"on a particular column (customerId in the given example). " +"Also note that you can use the nested <formula> " +"mapping element if you don't like to use the attribute." +msgstr "" +"注意,你可以使用实体自己的表,而不用为这个特别的列定义别名( 上面例子中的" +"customerId)。同时注意,如果你不喜欢使用属性, 你可以使用" +"嵌套的<formula>映射元素。" + +#. Tag: title +#: basic_mapping.xml:1479 +#, no-c-format +msgid "many-to-one" +msgstr "多对一(many-to-one)" + +#. Tag: para +#: basic_mapping.xml:1481 +#, no-c-format +msgid "" +"An ordinary association to another persistent class is declared using a " +"many-to-one element. The relational model is a many-to-" +"one association: a foreign key in one table is referencing the primary key " +"column(s) of the target table." +msgstr "" +"通过many-to-one元素,可以定义一种常见的与另一个持久化类的关" +"联。 这种关系模型是多对一关联(实际上是一个对象引用-译注):这个表的一个外键" +"引用目标表的 主键字段。" + +#. Tag: programlisting +#: basic_mapping.xml:1509 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1512 basic_mapping.xml:1693 basic_mapping.xml:1879 +#, fuzzy, no-c-format +msgid "name: The name of the property." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 属性名。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 属性的名字。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"name: 属性名" + +#. Tag: para +#: basic_mapping.xml:1517 basic_mapping.xml:2308 +#, fuzzy, no-c-format +msgid "" +"column (optional): The name of the foreign key column. " +"This may also be specified by nested <column> " +"element(s)." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (可选): 外间字段名。它也可以通过嵌套的 " +"<column>元素指定。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"column (可选): 外键字段的名称。也可以通过嵌套的 " +"<column>指定。" + +#. Tag: para +#: basic_mapping.xml:1524 basic_mapping.xml:1698 +#, fuzzy, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the associated class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (可选 - 默认是通过反射得到属性类型): 关联的类的名" +"字。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"class (可选 - 默认是通过反射得到的属性类型):被关联的类的" +"名字。" + +#. Tag: para +#: basic_mapping.xml:1530 +#, no-c-format +msgid "" +"cascade (optional): Specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade(级联) (可选): 指明哪些操作会从父对象级联到关联的" +"对象。" + +#. Tag: para +#: basic_mapping.xml:1536 basic_mapping.xml:1719 +#, fuzzy, no-c-format +msgid "" +"fetch (optional - defaults to select): " +"Chooses between outer-join fetching or sequential select fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (可选 - 默认为 select): 在外连接" +"抓取(outer-join fetching)和序列选择抓取(sequential select fetching)两者中" +"选择其一。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"fetch (可选 - 默认设置为选择): 在外连接" +"抓取或者序列选择抓取选择其一." + +#. Tag: para +#: basic_mapping.xml:1542 +#, no-c-format +msgid "" +"update, insert (optional - defaults to true) specifies that the mapped columns should be included in SQL " +"UPDATE and/or INSERT statements. " +"Setting both to false allows a pure \"derived\" " +"association whose value is initialized from some other property that maps to " +"the same colum(s) or by a trigger or other application." +msgstr "" +"update, insert (可选 - 默认为 true) 指" +"定对应的字段是否包含在用于UPDATE 和/或 INSERT 的SQL语句中。如果二者都是false,则这是一个纯粹的 " +"“外源性(derived)”关联,它的值是通过映射到同一个(或多个)字段的某些其他属性" +"得到 或者通过trigger(触发器)、或其他程序生成。" + +#. Tag: para +#: basic_mapping.xml:1551 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to this foreign key. If not specified, the " +"primary key of the associated class is used." +msgstr "" +"property-ref: (可选) 指定关联类的一个属性,这个属性将会和" +"本外键相对应。 如果没有指定,会使用对方关联类的主键。" + +#. Tag: para +#: basic_mapping.xml:1564 +#, no-c-format +msgid "" +"unique (optional): Enable the DDL generation of a unique " +"constraint for the foreign-key column. Also, allow this to be the target of " +"a property-ref. This makes the association multiplicity " +"effectively one to one." +msgstr "" +"unique (可选): 使用DDL为外键字段生成一个唯一约束。此外, " +"这也可以用作property-ref的目标属性。这使关联同时具有 一对" +"一的效果。" + +#. Tag: para +#: basic_mapping.xml:1572 +#, no-c-format +msgid "" +"not-null (optional): Enable the DDL generation of a " +"nullability constraint for the foreign key columns." +msgstr "" +"not-null (可选): 使用DDL为外键字段生成一个非空约束。" + +#. Tag: para +#: basic_mapping.xml:1578 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, dertermines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (可选 - 默认为 true): " +"指定这个属性在做更新时是否需要获得乐观锁定(optimistic lock)。 换句话说,它" +"决定这个属性发生脏数据时版本(version)的值是否增长。" + +#. Tag: para +#: basic_mapping.xml:1586 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched." +msgstr "" +"lazy (可选 - 默认为 proxy): 默认情况" +"下,单点关联是经过代理的。lazy=\"no-proxy\"指定此属性应该" +"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增" +"强)。 lazy=\"false\"指定此关联总是被预先抓取。" + +#. Tag: para +#: basic_mapping.xml:1596 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +"handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"not-found (可选 - 默认为 exception): 指" +"定外键引用的数据不存在时如何处理: ignore会将行数据不存在" +"视为一个空(null)关联。" + +#. Tag: para +#: basic_mapping.xml:1603 basic_mapping.xml:1757 +#, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class." +msgstr "entity-name (可选): 被关联的类的实体名。" + +#. Tag: para +#: basic_mapping.xml:1608 +#, no-c-format +msgid "" +"formula (optional): an SQL expression that defines the " +"value for a computed foreign key." +msgstr "" +"formula (可选): SQL表达式,用于定义computed(计" +"算出的)外键值。" + +#. Tag: para +#: basic_mapping.xml:1616 +#, no-c-format +msgid "" +"Setting a value of the cascade attribute to any " +"meaningful value other than none will propagate certain " +"operations to the associated object. The meaningful values are the names of " +"Hibernate's basic operations, persist, merge, delete, save-update, " +"evict, replicate, lock, refresh, as well as the special values " +"delete-orphan and all and comma-" +"separated combinations of operation names, for example, cascade=" +"\"persist,merge,evict\" or cascade=\"all,delete-orphan\". See for a full " +"explanation. Note that single valued associations (many-to-one and one-to-" +"one associations) do not support orphan delete." +msgstr "" +"cascade属性设置为除了none以外任何有意义" +"的值, 它将把特定的操作传递到关联对象中。这个值就代表着Hibernate基本操作的名" +"称, persist, merge, delete, save-update, evict, replicate, lock, " +"refresh, 以及特别的值delete-orphan和" +"all,并且可以用逗号分隔符 来组合这些操作,例如," +"cascade=\"persist,merge,evict\"cascade=\"all," +"delete-orphan\"。更全面的解释请参考. 注意,单值关联 (many-to-one 和 one-to-one 关联) 不支持删除孤" +"儿(orphan delete,删除不再被引用的值)." + +#. Tag: para +#: basic_mapping.xml:1629 +#, no-c-format +msgid "" +"A typical many-to-one declaration looks as simple as this:" +msgstr "一个典型的简单many-to-one定义例子:" + +#. Tag: programlisting +#: basic_mapping.xml:1633 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1635 +#, no-c-format +msgid "" +"The property-ref attribute should only be used for " +"mapping legacy data where a foreign key refers to a unique key of the " +"associated table other than the primary key. This is an ugly relational " +"model. For example, suppose the Product class had a " +"unique serial number, that is not the primary key. (The unique attribute controls Hibernate's DDL generation with the SchemaExport " +"tool.)" +msgstr "" +"property-ref属性只应该用来对付遗留下来的数据库系统, 可能" +"有外键指向对方关联表的是个非主键字段(但是应该是一个惟一关键字)的情况下。 这" +"是一种十分丑陋的关系模型。比如说,假设Product类有一个惟一" +"的序列号, 它并不是主键。(unique属性控制Hibernate通过" +"SchemaExport工具进行的DDL生成。)" + +#. Tag: programlisting +#: basic_mapping.xml:1644 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1646 +#, no-c-format +msgid "Then the mapping for OrderItem might use:" +msgstr "那么关于OrderItem 的映射可能是:" + +#. Tag: programlisting +#: basic_mapping.xml:1650 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1652 +#, no-c-format +msgid "This is certainly not encouraged, however." +msgstr "当然,我们决不鼓励这种用法。" + +#. Tag: para +#: basic_mapping.xml:1656 +#, no-c-format +msgid "" +"If the referenced unique key comprises multiple properties of the associated " +"entity, you should map the referenced properties inside a named <" +"properties> element." +msgstr "" +"如果被引用的唯一主键由关联实体的多个属性组成,你应该在名称为<" +"properties>的元素 里面映射所有关联的属性。" + +#. Tag: para +#: basic_mapping.xml:1661 +#, no-c-format +msgid "" +"If the referenced unique key is the property of a component, you may specify " +"a property path:" +msgstr "假若被引用的唯一主键是组件的属性,你可以指定属性路径:" + +#. Tag: programlisting +#: basic_mapping.xml:1665 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1670 +#, no-c-format +msgid "one-to-one" +msgstr "一对一" + +#. Tag: para +#: basic_mapping.xml:1672 +#, no-c-format +msgid "" +"A one-to-one association to another persistent class is declared using a " +"one-to-one element." +msgstr "" +"持久化对象之间一对一的关联关系是通过one-to-one元素定义的。" + +#. Tag: programlisting +#: basic_mapping.xml:1690 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1704 +#, no-c-format +msgid "" +"cascade (optional) specifies which operations should be " +"cascaded from the parent object to the associated object." +msgstr "" +"cascade(级联) (可选) 表明操作是否从父对象级联到被关联的对" +"象。" + +#. Tag: para +#: basic_mapping.xml:1710 +#, no-c-format +msgid "" +"constrained (optional) specifies that a foreign key " +"constraint on the primary key of the mapped table references the table of " +"the associated class. This option affects the order in which save()" +" and delete() are cascaded, and determines " +"whether the association may be proxied (it is also used by the schema export " +"tool)." +msgstr "" +"constrained(约束) (可选) 表明该类对应的表对应的数据库表," +"和被关联的对象所对应的数据库表之间,通过一个外键引用对主键进行约束。 这个选项" +"影响save()delete()在级联执行时的先后" +"顺序以及 决定该关联能否被委托(也在schema export tool中被使用)." + +#. Tag: para +#: basic_mapping.xml:1725 +#, no-c-format +msgid "" +"property-ref: (optional) The name of a property of the " +"associated class that is joined to the primary key of this class. If not " +"specified, the primary key of the associated class is used." +msgstr "" +"property-ref: (可选) 指定关联类的属性名,这个属性将会和本" +"类的主键相对应。如果没有指定,会使用对方关联类的主键。" + +#. Tag: para +#: basic_mapping.xml:1738 +#, no-c-format +msgid "" +"formula (optional): Almost all one to one associations " +"map to the primary key of the owning entity. In the rare case that this is " +"not the case, you may specify a some other column, columns or expression to " +"join on using an SQL formula. (See org.hibernate.test." +"onetooneformula for an example.)" +msgstr "" +"formula (可选):绝大多数一对一的关联都指向其实体的主键。在" +"一些少见的情况中, 你可能会指向其他的一个或多个字段,或者是一个表达式,这些情" +"况下,你可以用一个SQL公式来表示。 (可以在org.hibernate.test.onetooneformula" +"找到例子)" + +#. Tag: para +#: basic_mapping.xml:1746 +#, no-c-format +msgid "" +"lazy (optional - defaults to proxy): " +"By default, single point associations are proxied. lazy=\"no-proxy" +"\" specifies that the property should be fetched lazily when the " +"instance variable is first accessed (requires build-time bytecode " +"instrumentation). lazy=\"false\" specifies that the " +"association will always be eagerly fetched. Note that if " +"constrained=\"false\", proxying is impossible and " +"Hibernate will eager fetch the association!" +msgstr "" +"lazy (可选 - 默认为 proxy): 默认情况" +"下,单点关联是经过代理的。lazy=\"no-proxy\"指定此属性应该" +"在实例变量第一次被访问时应该延迟抓取(fetche lazily)(需要运行时字节码的增" +"强)。 lazy=\"false\"指定此关联总是被预先抓取。" +"注意,如果constrained=\"false\", 不可能使用代理,Hibernate" +"会采取预先抓取!" + +#. Tag: para +#: basic_mapping.xml:1764 +#, no-c-format +msgid "There are two varieties of one-to-one association:" +msgstr "有两种不同的一对一关联:" + +#. Tag: para +#: basic_mapping.xml:1768 +#, no-c-format +msgid "primary key associations" +msgstr "主键关联" + +#. Tag: para +#: basic_mapping.xml:1771 +#, no-c-format +msgid "unique foreign key associations" +msgstr "惟一外键关联" + +#. Tag: para +#: basic_mapping.xml:1776 +#, no-c-format +msgid "" +"Primary key associations don't need an extra table column; if two rows are " +"related by the association then the two table rows share the same primary " +"key value. So if you want two objects to be related by a primary key " +"association, you must make sure that they are assigned the same identifier " +"value!" +msgstr "" +"主键关联不需要额外的表字段;如果两行是通过这种一对一关系相关联的,那么这两行" +"就共享同样的主关键字值。所以如果你希望两个对象通过主键一对一关联,你必须确认" +"它们被赋予同样的标识值!" + +#. Tag: para +#: basic_mapping.xml:1783 +#, no-c-format +msgid "" +"For a primary key association, add the following mappings to " +"Employee and Person, respectively." +msgstr "" +"比如说,对下面的EmployeePerson进行主" +"键一对一关联:" + +#. Tag: programlisting +#: basic_mapping.xml:1788 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:1789 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1791 +#, no-c-format +msgid "" +"Now we must ensure that the primary keys of related rows in the PERSON and " +"EMPLOYEE tables are equal. We use a special Hibernate identifier generation " +"strategy called foreign:" +msgstr "" +"现在我们必须确保PERSON和EMPLOYEE中相关的字段是相等的。我们使用一个被成为" +"foreign的特殊的hibernate标识符生成策略:" + +#. Tag: programlisting +#: basic_mapping.xml:1797 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" employee\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1799 +#, no-c-format +msgid "" +"A newly saved instance of Person is then assigned the " +"same primary key value as the Employee instance refered " +"with the employee property of that Person." +msgstr "" +"一个刚刚保存的Person实例被赋予和该Personemployee属性所指向的Employee" +"实例同样的关键字值。" + +#. Tag: para +#: basic_mapping.xml:1805 +#, no-c-format +msgid "" +"Alternatively, a foreign key with a unique constraint, from " +"Employee to Person, may be expressed " +"as:" +msgstr "" +"另一种方式是一个外键和一个惟一关键字对应,上面的Employee和" +"Person的例子,如果使用这种关联方式,可以表达成:" + +#. Tag: programlisting +#: basic_mapping.xml:1810 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1812 +#, no-c-format +msgid "" +"And this association may be made bidirectional by adding the following to " +"the Person mapping:" +msgstr "" +"如果在Person的映射加入下面几句,这种关联就是双向的:" + +#. Tag: programlisting +#: basic_mapping.xml:1817 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:1822 +#, no-c-format +msgid "natural-id" +msgstr "自然ID(natural-id)" + +#. Tag: programlisting +#: basic_mapping.xml:1824 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ......\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1826 +#, no-c-format +msgid "" +"Even though we recommend the use of surrogate keys as primary keys, you " +"should still try to identify natural keys for all entities. A natural key is " +"a property or combination of properties that is unique and non-null. If it " +"is also immutable, even better. Map the properties of the natural key inside " +"the <natural-id> element. Hibernate will generate " +"the necessary unique key and nullability constraints, and your mapping will " +"be more self-documenting." +msgstr "" +"我们建议使用代用键(键值不具备实际意义)作为主键,我们仍然应该尝试为所有的实" +"体采用自然的键值作为(附加——译者注)标示。自然键(natural key)是单个或组合属" +"性,他们必须唯一且非空。如果它还是不可变的那就更理想了。在<" +"natural-id>元素中列出自然键的属性。Hibernate会帮你生成必须的唯一" +"键值和非空约束,你的映射会更加的明显易懂(原文是self-documenting,自我注" +"解)。" + +#. Tag: para +#: basic_mapping.xml:1835 +#, no-c-format +msgid "" +"We strongly recommend that you implement equals() and " +"hashCode() to compare the natural key properties of the " +"entity." +msgstr "" +"我们强烈建议你实现equals()hashCode()" +"方法,来比较实体的自然键属性。" + +#. Tag: para +#: basic_mapping.xml:1840 +#, no-c-format +msgid "" +"This mapping is not intended for use with entities with natural primary keys." +msgstr "这一映射不是为了把自然键作为主键而准备的。" + +#. Tag: para +#: basic_mapping.xml:1846 +#, no-c-format +msgid "" +"mutable (optional, defaults to false): " +"By default, natural identifier properties as assumed to be immutable " +"(constant)." +msgstr "" +"mutable (可选, 默认为false): 默认情况" +"下,自然标识属性被假定为不可变的(常量)。" + +#. Tag: title +#: basic_mapping.xml:1856 +#, no-c-format +msgid "component, dynamic-component" +msgstr "组件(component), 动态组件(dynamic-component)" + +#. Tag: para +#: basic_mapping.xml:1858 +#, no-c-format +msgid "" +"The <component> element maps properties of a child " +"object to columns of the table of a parent class. Components may, in turn, " +"declare their own properties, components or collections. See \"Components\" " +"below." +msgstr "" +"<component>元素把子对象的一些元素与父类对应的表的一" +"些字段映射起来。 然后组件可以定义它们自己的属性、组件或者集合。参见后面" +"的“Components”一章。" + +#. Tag: programlisting +#: basic_mapping.xml:1876 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1884 +#, no-c-format +msgid "" +"class (optional - defaults to the property type " +"determined by reflection): The name of the component (child) class." +msgstr "" +"class (可选 - 默认为通过反射得到的属性类型):组件(子)类的名" +"字。" + +#. Tag: para +#: basic_mapping.xml:1890 basic_mapping.xml:1979 +#, fuzzy, no-c-format +msgid "" +"insert: Do the mapped columns appear in SQL " +"INSERTs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert: 被映射的字段是否出现在SQL的INSERT语句中?\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"insert: 被映射的字段是否出现在SQL的 INSERT语句中?" + +#. Tag: para +#: basic_mapping.xml:1896 basic_mapping.xml:1985 +#, fuzzy, no-c-format +msgid "" +"update: Do the mapped columns appear in SQL " +"UPDATEs?" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update: 被映射的字段是否出现在SQL的UPDATE语句中?\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"update: 被映射的字段是否出现在SQL的 UPDATE语句中?" + +#. Tag: para +#: basic_mapping.xml:1908 +#, no-c-format +msgid "" +"lazy (optional - defaults to false): " +"Specifies that this component should be fetched lazily when the instance " +"variable is first accessed (requires build-time bytecode instrumentation)." +msgstr "" +"lazy (可选 - 默认是 false): 表明此组件" +"应在实例变量第一次被访问的时候延迟加载(需要编译时字节码装置器)" + +#. Tag: para +#: basic_mapping.xml:1915 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this component do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when this property is dirty." +msgstr "" +"optimistic-lock (可选 - 默认是 true):表" +"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" +"(Version)" + +#. Tag: para +#: basic_mapping.xml:1923 basic_mapping.xml:1999 +#, no-c-format +msgid "" +"unique (optional - defaults to false): " +"Specifies that a unique constraint exists upon all mapped columns of the " +"component." +msgstr "" +"unique (可选 - 默认是 false):表明组件映" +"射的所有字段上都有唯一性约束" + +#. Tag: para +#: basic_mapping.xml:1932 +#, no-c-format +msgid "" +"The child <property> tags map properties of the " +"child class to table columns." +msgstr "" +"其<property>子标签为子类的一些属性与表字段之间建立映" +"射。" + +#. Tag: para +#: basic_mapping.xml:1937 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component>元素允许加入一个<parent>子元素,在组件类内部就可以有一个指向其容器的实体的反向引用。" + +#. Tag: para +#: basic_mapping.xml:1943 +#, no-c-format +msgid "" +"The <dynamic-component> element allows a " +"Map to be mapped as a component, where the property names " +"refer to keys of the map, see ." +msgstr "" +"<dynamic-component>元素允许把一个Map映射为组件,其属性名对应map的键值。 参见." + +#. Tag: title +#: basic_mapping.xml:1952 +#, no-c-format +msgid "properties" +msgstr "properties" + +#. Tag: para +#: basic_mapping.xml:1954 +#, no-c-format +msgid "" +"The <properties> element allows the definition of a " +"named, logical grouping of properties of a class. The most important use of " +"the construct is that it allows a combination of properties to be the target " +"of a property-ref. It is also a convenient way to define " +"a multi-column unique constraint." +msgstr "" +"<properties> 元素允许定义一个命名的逻辑分组" +"(grouping)包含一个类中的多个属性。 这个元素最重要的用处是允许多个属性的组合作" +"为property-ref的目标(target)。 这也是定义多字段唯一约束的" +"一种方便途径。" + +#. Tag: programlisting +#: basic_mapping.xml:1970 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" ........\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:1973 +#, no-c-format +msgid "" +"name: The logical name of the grouping - not an actual property name." +msgstr "" +"name: 分组的逻辑名称 - 不是 实际属性" +"的名称." + +#. Tag: para +#: basic_mapping.xml:1991 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to these properties do or do not require " +"acquisition of the optimistic lock. In other words, determines if a version " +"increment should occur when these properties are dirty." +msgstr "" +"optimistic-lock (可选 - 默认是 true):表" +"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" +"(Version)" + +#. Tag: para +#: basic_mapping.xml:2008 +#, no-c-format +msgid "" +"For example, if we have the following <properties> " +"mapping:" +msgstr "例如,如果我们有如下的<properties>映射:" + +#. Tag: programlisting +#: basic_mapping.xml:2012 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2014 +#, no-c-format +msgid "" +"Then we might have some legacy data association which refers to this unique " +"key of the Person table, instead of to the primary key:" +msgstr "" +"然后,我们可能有一些遗留的数据关联,引用 Person表的这个唯" +"一键,而不是主键。" + +#. Tag: programlisting +#: basic_mapping.xml:2019 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2021 +#, no-c-format +msgid "" +"We don't recommend the use of this kind of thing outside the context of " +"mapping legacy data." +msgstr "我们并不推荐这样使用,除非在映射遗留数据的情况下。" + +#. Tag: title +#: basic_mapping.xml:2029 +#, no-c-format +msgid "subclass" +msgstr "子类(subclass)" + +#. Tag: para +#: basic_mapping.xml:2031 +#, no-c-format +msgid "" +"Finally, polymorphic persistence requires the declaration of each subclass " +"of the root persistent class. For the table-per-class-hierarchy mapping " +"strategy, the <subclass> declaration is used." +msgstr "" +"最后,多态持久化需要为父类的每个子类都进行定义。对于“每一棵类继承树对应一个" +"表”的策略来说,就需要使用<subclass>定义。" + +#. Tag: programlisting +#: basic_mapping.xml:2044 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2047 basic_mapping.xml:2105 basic_mapping.xml:2168 +#, no-c-format +msgid "" +"name: The fully qualified class name of the subclass." +msgstr "name: 子类的全限定名。" + +#. Tag: para +#: basic_mapping.xml:2052 +#, no-c-format +msgid "" +"discriminator-value (optional - defaults to the class " +"name): A value that distiguishes individual subclasses." +msgstr "" +"discriminator-value(辨别标志) (可选 - 默认为类名):一个用于" +"区分每个独立的子类的值。" + +#. Tag: para +#: basic_mapping.xml:2058 basic_mapping.xml:2115 basic_mapping.xml:2178 +#, fuzzy, no-c-format +msgid "" +"proxy (optional): Specifies a class or interface to use " +"for lazy initializing proxies." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy(代理) (可选): 指定一个类或者接口,在延迟装载时作为代" +"理使用。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (可选): 指定一个类或者接口,在延迟装载时作为代理使" +"用。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"proxy (可选): 指定一个类或者接口,在延迟装载时作为代理使" +"用。" + +#. Tag: para +#: basic_mapping.xml:2064 basic_mapping.xml:2121 basic_mapping.xml:2184 +#, fuzzy, no-c-format +msgid "" +"lazy (optional, defaults to true): " +"Setting lazy=\"false\" disables the use of lazy fetching." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (可选, 默认是true): 设置为 " +"lazy=\"false\" 禁止使用延迟抓取\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (可选, 默认是 true): 设置为 " +"lazy=\"false\" 禁止使用延迟装载。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"lazy (可选, 默认是 true): 设置为 " +"lazy=\"false\" 禁止使用延迟装载。" + +#. Tag: para +#: basic_mapping.xml:2072 +#, no-c-format +msgid "" +"Each subclass should declare its own persistent properties and subclasses. " +"<version> and <id> " +"properties are assumed to be inherited from the root class. Each subclass in " +"a heirarchy must define a unique discriminator-value. If " +"none is specified, the fully qualified Java class name is used." +msgstr "" +"每个子类都应该定义它自己的持久化属性和子类。 <version><id> 属性可以从根父类继承下来。在一棵继承" +"树上的每个子类都必须定义一个唯一的discriminator-value。如" +"果没有指定,就会使用Java类的全限定名。" + +#. Tag: para +#: basic_mapping.xml:2080 basic_mapping.xml:2138 basic_mapping.xml:2196 +#, fuzzy, no-c-format +msgid "" +"For information about inheritance mappings, see ." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"更多关于继承映射的信息, 参考 章节.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"更多关于继承映射的信息,参考。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"更多关于继承映射的信息,参考。" + +#. Tag: title +#: basic_mapping.xml:2087 +#, no-c-format +msgid "joined-subclass" +msgstr "连接的子类(joined-subclass)" + +#. Tag: para +#: basic_mapping.xml:2089 +#, no-c-format +msgid "" +"Alternatively, each subclass may be mapped to its own table (table-per-" +"subclass mapping strategy). Inherited state is retrieved by joining with the " +"table of the superclass. We use the <joined-subclass> element." +msgstr "" +"此外,每个子类可能被映射到他自己的表中(每个子类一个表的策略)。被继承的状态通" +"过和超类的表关联得到。我们使用<joined-subclass>元" +"素。" + +#. Tag: programlisting +#: basic_mapping.xml:2102 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2110 basic_mapping.xml:2173 +#, fuzzy, no-c-format +msgid "table: The name of the subclass table." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table: 子类的表名.\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"table: 子类的表名" + +#. Tag: para +#: basic_mapping.xml:2129 +#, no-c-format +msgid "" +"No discriminator column is required for this mapping strategy. Each subclass " +"must, however, declare a table column holding the object identifier using " +"the <key> element. The mapping at the start of the " +"chapter would be re-written as:" +msgstr "" +"这种映射策略不需要指定辨别标志(discriminator)字段。但是,每一个子类都必须使用" +"<key>元素指定一个表字段来持有对象的标识符。本章开始" +"的映射可以被用如下方式重写:" + +#. Tag: programlisting +#: basic_mapping.xml:2136 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2145 +#, no-c-format +msgid "union-subclass" +msgstr "联合子类(union-subclass)" + +#. Tag: para +#: basic_mapping.xml:2147 +#, no-c-format +msgid "" +"A third option is to map only the concrete classes of an inheritance " +"hierarchy to tables, (the table-per-concrete-class strategy) where each " +"table defines all persistent state of the class, including inherited state. " +"In Hibernate, it is not absolutely necessary to explicitly map such " +"inheritance hierarchies. You can simply map each class with a separate " +"<class> declaration. However, if you wish use " +"polymorphic associations (e.g. an association to the superclass of your " +"hierarchy), you need to use the <union-subclass> " +"mapping." +msgstr "" +"第三种选择是仅仅映射类继承树中具体类部分到表中(每个具体类一张表的策略)。其" +"中,每张表定义了类的所有持久化状态,包括继承的状态。在 Hibernate 中,并不需要" +"完全显式地映射这样的继承树。你可以简单地使用单独的<class>定义映射每个类。然而,如果你想使用多态关联(例如,一个对类继承树中超类" +"的关联),你需要使用<union-subclass>映射。" + +#. Tag: programlisting +#: basic_mapping.xml:2165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2192 +#, no-c-format +msgid "" +"No discriminator column or key column is required for this mapping strategy." +msgstr "这种映射策略不需要指定辨别标志(discriminator)字段。" + +#. Tag: title +#: basic_mapping.xml:2203 +#, no-c-format +msgid "join" +msgstr "连接(join)" + +#. Tag: para +#: basic_mapping.xml:2205 +#, no-c-format +msgid "" +"Using the <join> element, it is possible to map " +"properties of one class to several tables, when there's a 1-to-1 " +"relationship between the tables." +msgstr "" +"使用 <join> 元素,假若在表之间存在一对一关联,可以将" +"一个类的属性映射到多张表中。" + +#. Tag: programlisting +#: basic_mapping.xml:2219 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2223 +#, no-c-format +msgid "table: The name of the joined table." +msgstr "table: 被连接表的名称。" + +#. Tag: para +#: basic_mapping.xml:2240 +#, no-c-format +msgid "" +"fetch (optional - defaults to join): " +"If set to join, the default, Hibernate will use an inner " +"join to retrieve a <join> defined by a class or its " +"superclasses and an outer join for a <join> defined " +"by a subclass. If set to select then Hibernate will use a " +"sequential select for a <join> defined on a " +"subclass, which will be issued only if a row turns out to represent an " +"instance of the subclass. Inner joins will still be used to retrieve a " +"<join> defined by the class and its superclasses." +msgstr "" +"fetch (可选 - 默认是 join): 如果设置为" +"默认值join, Hibernate 将使用一个内连接来得到这个类或其超" +"类定义的<join>,而使用一个外连接来得到其子类定义的" +"<join>。如果设置为select,则 " +"Hibernate 将为子类定义的 <join>使用顺序选择。这仅在" +"一行数据表示一个子类的对象的时候才会发生。对这个类和其超类定义的<" +"join>,依然会使用内连接得到。" + +#. Tag: para +#: basic_mapping.xml:2253 +#, no-c-format +msgid "" +"inverse (optional - defaults to false): If enabled, Hibernate will not try to insert or update the " +"properties defined by this join." +msgstr "" +"inverse (可选 - 默认是 false): 如果打" +"开,Hibernate 不会插入或者更新此连接定义的属性。" + +#. Tag: para +#: basic_mapping.xml:2260 +#, no-c-format +msgid "" +"optional (optional - defaults to false): If enabled, Hibernate will insert a row only if the properties " +"defined by this join are non-null and will always use an outer join to " +"retrieve the properties." +msgstr "" +"optional (可选 - 默认是 false): 如果打" +"开,Hibernate 只会在此连接定义的属性非空时插入一行数据,并且总是使用一个外连" +"接来得到这些属性。" + +#. Tag: para +#: basic_mapping.xml:2269 +#, no-c-format +msgid "" +"For example, the address information for a person can be mapped to a " +"separate table (while preserving value type semantics for all properties):" +msgstr "" +"例如,一个人(person)的地址(address)信息可以被映射到单独的表中(并保留所有属性" +"的值类型语义):" + +#. Tag: programlisting +#: basic_mapping.xml:2274 +#, no-c-format +msgid "" +"\n" +"\n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2276 +#, no-c-format +msgid "" +"This feature is often only useful for legacy data models, we recommend fewer " +"tables than classes and a fine-grained domain model. However, it is useful " +"for switching between inheritance mapping strategies in a single hierarchy, " +"as explained later." +msgstr "" +"此特性常常对遗留数据模型有用,我们推荐表个数比类个数少,以及细粒度的领域模" +"型。然而,在单独的继承树上切换继承映射策略是有用的,后面会解释这点。" + +#. Tag: title +#: basic_mapping.xml:2286 +#, no-c-format +msgid "key" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2288 +#, no-c-format +msgid "" +"We've seen the <key> element crop up a few times " +"now. It appears anywhere the parent mapping element defines a join to a new " +"table, and defines the foreign key in the joined table, that references the " +"primary key of the original table." +msgstr "" +"我们目前已经见到过<key>元素多次了。 这个元素在父映射" +"元素定义了对新表的连接,并且在被连接表中定义了一个外键引用原表的主键的情况下" +"经常使用。" + +#. Tag: programlisting +#: basic_mapping.xml:2304 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2315 +#, no-c-format +msgid "" +"on-delete (optional, defaults to noaction): Specifies whether the foreign key constraint has database-level " +"cascade delete enabled." +msgstr "" +"on-delete (可选, 默认是 noaction): 表明" +"外键关联是否打开数据库级别的级联删除。" + +#. Tag: para +#: basic_mapping.xml:2322 +#, no-c-format +msgid "" +"property-ref (optional): Specifies that the foreign key " +"refers to columns that are not the primary key of the orginal table. " +"(Provided for legacy data.)" +msgstr "" +"property-ref (可选): 表明外键引用的字段不是原表的主键(提供" +"给遗留数据)。" + +#. Tag: para +#: basic_mapping.xml:2329 +#, no-c-format +msgid "" +"not-null (optional): Specifies that the foreign key " +"columns are not nullable (this is implied whenever the foreign key is also " +"part of the primary key)." +msgstr "" +"not-null (可选): 表明外键的字段不可为空(这意味着无论何时外" +"键都是主键的一部分)。" + +#. Tag: para +#: basic_mapping.xml:2336 +#, no-c-format +msgid "" +"update (optional): Specifies that the foreign key should " +"never be updated (this is implied whenever the foreign key is also part of " +"the primary key)." +msgstr "" +"update (可选): 表明外键决不应该被更新(这意味着无论何时外键" +"都是主键的一部分)。" + +#. Tag: para +#: basic_mapping.xml:2343 +#, no-c-format +msgid "" +"unique (optional): Specifies that the foreign key should " +"have a unique constraint (this is implied whenever the foreign key is also " +"the primary key)." +msgstr "" +"unique (可选): 表明外键应有唯一性约束 (这意味着无论何时外" +"键都是主键的一部分)。" + +#. Tag: para +#: basic_mapping.xml:2351 +#, no-c-format +msgid "" +"We recommend that for systems where delete performance is important, all " +"keys should be defined on-delete=\"cascade\", and " +"Hibernate will use a database-level ON CASCADE DELETE " +"constraint, instead of many individual DELETE statements. " +"Be aware that this feature bypasses Hibernate's usual optimistic locking " +"strategy for versioned data." +msgstr "" +"对那些看重删除性能的系统,我们推荐所有的键都应该定义为on-delete=" +"\"cascade\",这样 Hibernate 将使用数据库级的ON CASCADE " +"DELETE约束,而不是多个DELETE语句。 注意,这个特" +"性会绕过 Hibernate 通常对版本数据(versioned data)采用的乐观锁策略。" + +#. Tag: para +#: basic_mapping.xml:2359 +#, no-c-format +msgid "" +"The not-null and update attributes are " +"useful when mapping a unidirectional one to many association. If you map a " +"unidirectional one to many to a non-nullable foreign key, you " +"must declare the key column using <key not-" +"null=\"true\">." +msgstr "" +"not-nullupdate 属性在映射单向一对多" +"关联的时候有用。如果你映射一个单向一对多关联到非空的(non-nullable)外键,你" +"必须<key not-null=\"true\">" +"定义此键字段。" + +#. Tag: title +#: basic_mapping.xml:2369 +#, no-c-format +msgid "column and formula elements" +msgstr "字段和规则元素(column and formula elements)" + +#. Tag: para +#: basic_mapping.xml:2370 +#, no-c-format +msgid "" +"Any mapping element which accepts a column attribute will " +"alternatively accept a <column> subelement. " +"Likewise, <formula> is an alternative to the " +"formula attribute." +msgstr "" +"任何接受column属性的映射元素都可以选择接受<" +"column> 子元素。同样的,formula子元素也可以替" +"换<formula>属性。" + +#. Tag: programlisting +#: basic_mapping.xml:2376 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2378 +#, no-c-format +msgid "SQL expression]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2380 +#, no-c-format +msgid "" +"column and formula attributes may even " +"be combined within the same property or association mapping to express, for " +"example, exotic join conditions." +msgstr "" +"columnformula 属性甚至可以在同一个" +"属性或关联映射中被合并来表达,例如,一些奇异的连接条件。" + +#. Tag: programlisting +#: basic_mapping.xml:2386 +#, no-c-format +msgid "" +"\n" +" \n" +" 'MAILING'\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2391 +#, no-c-format +msgid "import" +msgstr "引用(import)" + +#. Tag: para +#: basic_mapping.xml:2393 +#, no-c-format +msgid "" +"Suppose your application has two persistent classes with the same name, and " +"you don't want to specify the fully qualified (package) name in Hibernate " +"queries. Classes may be \"imported\" explicitly, rather than relying upon " +"auto-import=\"true\". You may even import classes and " +"interfaces that are not explicitly mapped." +msgstr "" +"假设你的应用程序有两个同样名字的持久化类,但是你不想在Hibernate查询中使用他们" +"的全限定名。除了依赖auto-import=\"true\"以外,类也可以被显" +"式地“import(引用)”。你甚至可以引用没有被明确映射的类和接口。" + +#. Tag: programlisting +#: basic_mapping.xml:2400 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2407 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2410 +#, no-c-format +msgid "" +"class: The fully qualified class name of of any Java " +"class." +msgstr "class: 任何Java类的全限定名。" + +#. Tag: para +#: basic_mapping.xml:2415 +#, no-c-format +msgid "" +"rename (optional - defaults to the unqualified class " +"name): A name that may be used in the query language." +msgstr "" +"rename (可选 - 默认为类的全限定名): 在查询语句中可以使用的" +"名字。" + +#. Tag: title +#: basic_mapping.xml:2426 +#, no-c-format +msgid "any" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2428 +#, no-c-format +msgid "" +"There is one further type of property mapping. The <any> mapping element defines a polymorphic association to classes from " +"multiple tables. This type of mapping always requires more than one column. " +"The first column holds the type of the associated entity. The remaining " +"columns hold the identifier. It is impossible to specify a foreign key " +"constraint for this kind of association, so this is most certainly not meant " +"as the usual way of mapping (polymorphic) associations. You should use this " +"only in very special cases (eg. audit logs, user session data, etc)." +msgstr "" +"这是属性映射的又一种类型。<any> 映射元素定义了一种从" +"多个表到类的多态关联。这种类型的映射常常需要多于一个字段。第一个字段持有被关" +"联实体的类型,其他的字段持有标识符。对这种类型的关联来说,不可能指定一个外键" +"约束,所以这当然不是映射(多态)关联的通常的方式。你只应该在非常特殊的情况下使" +"用它(比如,审计log,用户会话数据等等)。" + +#. Tag: para +#: basic_mapping.xml:2438 +#, no-c-format +msgid "" +"The meta-type attribute lets the application specify a " +"custom type that maps database column values to persistent classes which " +"have identifier properties of the type specified by id-type. You must specify the mapping from values of the meta-type to class " +"names." +msgstr "" +"meta-type 属性使得应用程序能指定一个将数据库字段的值映射到" +"持久化类的自定义类型。这个持久化类包含有用id-type指定的标" +"识符属性。 你必须指定从meta-type的值到类名的映射。" + +#. Tag: programlisting +#: basic_mapping.xml:2445 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2456 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" .....\n" +" \n" +" \n" +" .....\n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2459 +#, no-c-format +msgid "name: the property name." +msgstr "name: 属性名" + +#. Tag: para +#: basic_mapping.xml:2464 +#, no-c-format +msgid "id-type: the identifier type." +msgstr "id-type: 标识符类型" + +#. Tag: para +#: basic_mapping.xml:2469 +#, no-c-format +msgid "" +"meta-type (optional - defaults to string): Any type that is allowed for a discriminator mapping." +msgstr "" +"meta-type (可选 -默认是 string): 允许辨" +"别标志(discriminator)映射的任何类型" + +#. Tag: para +#: basic_mapping.xml:2475 +#, no-c-format +msgid "" +"cascade (optional- defaults to none): " +"the cascade style." +msgstr "" +"cascade (可选 -默认是none): 级联的类型" + +#. Tag: para +#: basic_mapping.xml:2487 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Specifies that updates to this property do or do not require " +"acquisition of the optimistic lock. In other words, define if a version " +"increment should occur if this property is dirty." +msgstr "" +"optimistic-lock (可选 -默认是 true): 表" +"明更新此组件是否需要获取乐观锁。换句话说,当这个属性变脏时,是否增加版本号" +"(Version)" + +#. Tag: title +#: basic_mapping.xml:2502 +#, no-c-format +msgid "Hibernate Types" +msgstr "Hibernate 的类型" + +#. Tag: title +#: basic_mapping.xml:2505 +#, no-c-format +msgid "Entities and values" +msgstr "实体(Entities)和值(values)" + +#. Tag: para +#: basic_mapping.xml:2507 +#, no-c-format +msgid "" +"To understand the behaviour of various Java language-level objects with " +"respect to the persistence service, we need to classify them into two groups:" +msgstr "" +"为了理解很多与持久化服务相关的Java语言级对象的行为,我们需要把它们分为两类:" + +#. Tag: para +#: basic_mapping.xml:2512 +#, no-c-format +msgid "" +"An entity exists independently of any other objects " +"holding references to the entity. Contrast this with the usual Java model " +"where an unreferenced object is garbage collected. Entities must be " +"explicitly saved and deleted (except that saves and deletions may be " +"cascaded from a parent entity to its children). This is " +"different from the ODMG model of object persistence by reachablity - and " +"corresponds more closely to how application objects are usually used in " +"large systems. Entities support circular and shared references. They may " +"also be versioned." +msgstr "" +"实体entity 独立于任何持有实体引用的对象。与通常的Java模" +"型相比,不再被引用的对象会被当作垃圾收集掉。实体必须被显式的保存和删除(除非保" +"存和删除是从父实体向子实体引发的级联)。这和ODMG模型中关" +"于对象通过可触及保持持久性有一些不同——比较起来更加接近应用程序对象通常在一个" +"大系统中的使用方法。实体支持循环引用和交叉引用,它们也可以加上版本信息。" + +#. Tag: para +#: basic_mapping.xml:2523 +#, no-c-format +msgid "" +"An entity's persistent state consists of references to other entities and " +"instances of value types. Values are primitives, " +"collections (not what's inside a collection), components and certain " +"immutable objects. Unlike entities, values (in particular collections and " +"components) are persisted and deleted by reachability. " +"Since value objects (and primitives) are persisted and deleted along with " +"their containing entity they may not be independently versioned. Values have " +"no independent identity, so they cannot be shared by two entities or " +"collections." +msgstr "" +"一个实体的持久状态包含指向其他实体和类型实例的引用。值" +"可以是原始类型,集合(不是集合中的对象),组件或者特定的不可变对象。与实体不" +"同,值(特别是集合和组件)是通过可触及性来进行持久化和删除的。因为值对象(和原始" +"类型数据)是随着包含他们的实体而被持久化和删除的,他们不能被独立的加上版本信" +"息。值没有独立的标识,所以他们不能被两个实体或者集合共享。" + +#. Tag: para +#: basic_mapping.xml:2534 +#, no-c-format +msgid "" +"Up until now, we've been using the term \"persistent class\" to refer to " +"entities. We will continue to do that. Strictly speaking, however, not all " +"user-defined classes with persistent state are entities. A " +"component is a user defined class with value semantics. " +"A Java property of type java.lang.String also has value " +"semantics. Given this definition, we can say that all types (classes) " +"provided by the JDK have value type semantics in Java, while user-defined " +"types may be mapped with entity or value type semantics. This decision is up " +"to the application developer. A good hint for an entity class in a domain " +"model are shared references to a single instance of that class, while " +"composition or aggregation usually translates to a value type." +msgstr "" +"直到现在,我们都一直使用术语“持久类”(persistent class)来代表实体。我们仍然会" +"这么做。 然而严格说来,不是所有的用户自定义的,带有持久化状态的类都是实体。" +"组件就是用户自定义类,却是值语义的。java.lang." +"String类型的java属性也是值语义的。给了这个定义以后,我们可以说所有" +"JDK提供的类型(类)都是值类型的语义,而用于自定义类型可能被映射为实体类型或值类" +"型语义。采用哪种类型的语义取决于开发人员。在领域模型中,寻找实体类的一个好线" +"索是共享引用指向这个类的单一实例,而组合或聚合通常被转化为值类型。" + +#. Tag: para +#: basic_mapping.xml:2548 +#, no-c-format +msgid "We'll revisit both concepts throughout the documentation." +msgstr "我们会在本文档中重复碰到这两个概念。" + +#. Tag: para +#: basic_mapping.xml:2552 +#, no-c-format +msgid "" +"The challenge is to map the Java type system (and the developers' definition " +"of entities and value types) to the SQL/database type system. The bridge " +"between both systems is provided by Hibernate: for entities we use " +"<class>, <subclass> and so " +"on. For value types we use <property>, <" +"component>, etc, usually with a type " +"attribute. The value of this attribute is the name of a Hibernate " +"mapping type. Hibernate provides many mappings (for " +"standard JDK value types) out of the box. You can write your own mapping " +"types and implement your custom conversion strategies as well, as you'll see " +"later." +msgstr "" +"挑战在于将java类型系统(和开发者定义的实体和值类型)映射到 SQL/数据库类型系统。" +"Hibernate提供了连接两个系统之间的桥梁:对于实体类型,我们使用<" +"class>, <subclass> 等等。对于值类型,我" +"们使用 <property>, <component> 及其他,通常跟随着type属性。这个属性的值是" +"Hibernate 的映射类型的名字。Hibernate提供了许多现成的映" +"射(标准的JDK值类型)。你也可以编写自己的映射类型并实现自定义的变换策略,随后我" +"们会看到这点。" + +#. Tag: para +#: basic_mapping.xml:2565 +#, no-c-format +msgid "All built-in Hibernate types except collections support null semantics." +msgstr "所有的Hibernate内建类型,除了collections以外,都支持空(null)语义。" + +#. Tag: title +#: basic_mapping.xml:2572 +#, no-c-format +msgid "Basic value types" +msgstr "基本值类型" + +#. Tag: para +#: basic_mapping.xml:2574 +#, fuzzy, no-c-format +msgid "" +"The built-in basic mapping types may be roughly " +"categorized into" +msgstr "内建的 基本映射类型可以大致分为 " + +#. Tag: literal +#: basic_mapping.xml:2579 +#, no-c-format +msgid "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" +msgstr "" +"integer, long, short, float, double, character, byte, boolean, yes_no, " +"true_false" + +#. Tag: para +#: basic_mapping.xml:2582 +#, no-c-format +msgid "" +"Type mappings from Java primitives or wrapper classes to appropriate (vendor-" +"specific) SQL column types. boolean, yes_no and " +"true_false are all alternative encodings for a Java " +"boolean or java.lang.Boolean." +msgstr "" +"这些类型都对应Java的原始类型或者其封装类,来符合(特定厂商的)SQL 字段类型。" +"boolean, yes_notrue_false都是Java " +"中boolean 或者java.lang.Boolean的另外说" +"法。" + +#. Tag: literal +#: basic_mapping.xml:2591 +#, no-c-format +msgid "string" +msgstr "string" + +#. Tag: para +#: basic_mapping.xml:2593 +#, no-c-format +msgid "" +"A type mapping from java.lang.String to VARCHAR (or Oracle VARCHAR2)." +msgstr "" +"从java.lang.StringVARCHAR (或者 " +"Oracle的 VARCHAR2)的映射。" + +#. Tag: literal +#: basic_mapping.xml:2600 +#, no-c-format +msgid "date, time, timestamp" +msgstr "date, time, timestamp" + +#. Tag: para +#: basic_mapping.xml:2602 +#, no-c-format +msgid "" +"Type mappings from java.util.Date and its subclasses to " +"SQL types DATE, TIME and " +"TIMESTAMP (or equivalent)." +msgstr "" +"从java.util.Date和其子类到SQL类型DATE, " +"TIMETIMESTAMP (或等价类型)的映射。" + +#. Tag: literal +#: basic_mapping.xml:2610 +#, no-c-format +msgid "calendar, calendar_date" +msgstr "calendar, calendar_date" + +#. Tag: para +#: basic_mapping.xml:2612 +#, no-c-format +msgid "" +"Type mappings from java.util.Calendar to SQL types " +"TIMESTAMP and DATE (or equivalent)." +msgstr "" +"从java.util.Calendar 到SQL 类型TIMESTAMPDATE(或等价类型)的映射。" + +#. Tag: literal +#: basic_mapping.xml:2620 +#, no-c-format +msgid "big_decimal, big_integer" +msgstr "big_decimal, big_integer" + +#. Tag: para +#: basic_mapping.xml:2622 +#, no-c-format +msgid "" +"Type mappings from java.math.BigDecimal and java." +"math.BigInteger to NUMERIC (or Oracle " +"NUMBER)." +msgstr "" +"从java.math.BigDecimaljava.math.BigIntegerNUMERIC (或者 Oracle 的NUMBER" +"类型)的映射。" + +#. Tag: literal +#: basic_mapping.xml:2630 +#, no-c-format +msgid "locale, timezone, currency" +msgstr "locale, timezone, currency" + +#. Tag: para +#: basic_mapping.xml:2632 +#, no-c-format +msgid "" +"Type mappings from java.util.Locale, java.util." +"TimeZone and java.util.Currency to " +"VARCHAR (or Oracle VARCHAR2). " +"Instances of Locale and Currency are " +"mapped to their ISO codes. Instances of TimeZone are " +"mapped to their ID." +msgstr "" +"从java.util.Locale, java.util.TimeZone " +"和java.util.CurrencyVARCHAR (或者 " +"Oracle 的VARCHAR2类型)的映射. Locale和 " +"Currency 的实例被映射为它们的ISO代码。TimeZone的实例被影射为它的ID。" + +#. Tag: literal +#: basic_mapping.xml:2644 +#, fuzzy, no-c-format +msgid "class" +msgstr "all(全部) 检查全部字段" + +#. Tag: para +#: basic_mapping.xml:2646 +#, no-c-format +msgid "" +"A type mapping from java.lang.Class to VARCHAR (or Oracle VARCHAR2). A Class " +"is mapped to its fully qualified name." +msgstr "" +"从java.lang.ClassVARCHAR (或者 " +"Oracle 的VARCHAR2类型)的映射。Class被映" +"射为它的全限定名。" + +#. Tag: literal +#: basic_mapping.xml:2654 +#, no-c-format +msgid "binary" +msgstr "binary" + +#. Tag: para +#: basic_mapping.xml:2656 +#, no-c-format +msgid "Maps byte arrays to an appropriate SQL binary type." +msgstr "把字节数组(byte arrays)映射为对应的 SQL二进制类型。" + +#. Tag: literal +#: basic_mapping.xml:2662 +#, no-c-format +msgid "text" +msgstr "text" + +#. Tag: para +#: basic_mapping.xml:2664 +#, no-c-format +msgid "" +"Maps long Java strings to a SQL CLOB or TEXT type." +msgstr "" +"把长Java字符串映射为SQL的CLOB或者TEXT类" +"型。" + +#. Tag: literal +#: basic_mapping.xml:2671 +#, no-c-format +msgid "serializable" +msgstr "serializable" + +#. Tag: para +#: basic_mapping.xml:2673 +#, no-c-format +msgid "" +"Maps serializable Java types to an appropriate SQL binary type. You may also " +"indicate the Hibernate type serializable with the name of " +"a serializable Java class or interface that does not default to a basic type." +msgstr "" +"把可序列化的Java类型映射到对应的SQL二进制类型。你也可以为一个并非默认为基本类" +"型的可序列化Java类或者接口指定Hibernate类型serializable。" + +#. Tag: literal +#: basic_mapping.xml:2682 +#, no-c-format +msgid "clob, blob" +msgstr "clob, blob" + +#. Tag: para +#: basic_mapping.xml:2684 +#, no-c-format +msgid "" +"Type mappings for the JDBC classes java.sql.Clob and " +"java.sql.Blob. These types may be inconvenient for some " +"applications, since the blob or clob object may not be reused outside of a " +"transaction. (Furthermore, driver support is patchy and inconsistent.)" +msgstr "" +"JDBC 类 java.sql.Clobjava.sql.Blob" +"的映射。某些程序可能不适合使用这个类型,因为blob和clob对象可能在一个事务之外" +"是无法重用的。(而且, 驱动程序对这种类型的支持充满着补丁和前后矛盾。)" + +#. Tag: literal +#: basic_mapping.xml:2694 +#, no-c-format +msgid "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" +msgstr "" +"imm_date, imm_time, imm_timestamp, imm_calendar, imm_calendar_date, " +"imm_serializable, imm_binary" + +#. Tag: para +#: basic_mapping.xml:2698 +#, no-c-format +msgid "" +"Type mappings for what are usually considered mutable Java types, where " +"Hibernate makes certain optimizations appropriate only for immutable Java " +"types, and the application treats the object as immutable. For example, you " +"should not call Date.setTime() for an instance mapped as " +"imm_timestamp. To change the value of the property, and " +"have that change made persistent, the application must assign a new " +"(nonidentical) object to the property." +msgstr "" +"一般来说,映射类型被假定为是可变的Java类型,只有对不可变Java类型,Hibernate会" +"采取特定的优化措施,应用程序会把这些对象作为不可变对象处理。比如,你不应该对" +"作为imm_timestamp映射的Date执行Date.setTime()。要改变属性的值,并且保存这一改变,应用程序必须对这一属性重新设置一" +"个新的(不一样的)对象。" + +#. Tag: para +#: basic_mapping.xml:2713 +#, no-c-format +msgid "" +"Unique identifiers of entities and collections may be of any basic type " +"except binary, blob and clob. (Composite identifiers are also allowed, see below.)" +msgstr "" +"实体及其集合的唯一标识可以是除了binaryblobclob之外的任何基础类型。(联合标识也是允许的," +"后面会说到。)" + +#. Tag: para +#: basic_mapping.xml:2719 +#, no-c-format +msgid "" +"The basic value types have corresponding Type constants " +"defined on org.hibernate.Hibernate. For example, " +"Hibernate.STRING represents the string " +"type." +msgstr "" +"在org.hibernate.Hibernate中,定义了基础类型对应的" +"Type常量。比如,Hibernate.STRING代表" +"string 类型。" + +#. Tag: title +#: basic_mapping.xml:2728 +#, no-c-format +msgid "Custom value types" +msgstr "自定义值类型" + +#. Tag: para +#: basic_mapping.xml:2730 +#, no-c-format +msgid "" +"It is relatively easy for developers to create their own value types. For " +"example, you might want to persist properties of type java.lang." +"BigInteger to VARCHAR columns. Hibernate does " +"not provide a built-in type for this. But custom types are not limited to " +"mapping a property (or collection element) to a single table column. So, for " +"example, you might have a Java property getName()/" +"setName() of type java.lang.String " +"that is persisted to the columns FIRST_NAME, " +"INITIAL, SURNAME." +msgstr "" +"开发者创建属于他们自己的值类型也是很容易的。比如说,你可能希望持久化" +"java.lang.BigInteger类型的属性,持久化成为" +"VARCHAR字段。Hibernate没有内置这样一种类型。自定义类型能够" +"映射一个属性(或集合元素)到不止一个数据库表字段。比如说,你可能有这样的Java属" +"性:getName()/setName(),这是" +"java.lang.String类型的,对应的持久化到三个字段:" +"FIRST_NAME, INITIAL, SURNAME。" + +#. Tag: para +#: basic_mapping.xml:2741 +#, no-c-format +msgid "" +"To implement a custom type, implement either org.hibernate." +"UserType or org.hibernate.CompositeUserType and " +"declare properties using the fully qualified classname of the type. Check " +"out org.hibernate.test.DoubleStringType to see the kind " +"of things that are possible." +msgstr "" +"要实现一个自定义类型,可以实现org.hibernate.UserType或" +"org.hibernate.CompositeUserType中的任一个,并且使用类型的" +"Java全限定类名来定义属性。请查看org.hibernate.test." +"DoubleStringType这个例子,看看它是怎么做的。" + +#. Tag: programlisting +#: basic_mapping.xml:2749 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2751 +#, no-c-format +msgid "" +"Notice the use of <column> tags to map a property " +"to multiple columns." +msgstr "" +"注意使用<column>标签来把一个属性映射到多个字段的做" +"法。" + +#. Tag: para +#: basic_mapping.xml:2756 +#, no-c-format +msgid "" +"The CompositeUserType, EnhancedUserType, UserCollectionType, and " +"UserVersionType interfaces provide support for more " +"specialized uses." +msgstr "" +"CompositeUserType, EnhancedUserType, " +"UserCollectionType, 和 UserVersionType " +"接口为更特殊的使用方式提供支持。" + +#. Tag: para +#: basic_mapping.xml:2762 +#, no-c-format +msgid "" +"You may even supply parameters to a UserType in the " +"mapping file. To do this, your UserType must implement " +"the org.hibernate.usertype.ParameterizedType interface. " +"To supply parameters to your custom type, you can use the <" +"type> element in your mapping files." +msgstr "" +"你甚至可以在一个映射文件中提供参数给一个UserType。 为了这" +"样做,你的UserType必须实现org.hibernate.usertype." +"ParameterizedType接口。为了给自定义类型提供参数,你可以在映射文件中" +"使用<type>元素。" + +#. Tag: programlisting +#: basic_mapping.xml:2770 +#, no-c-format +msgid "" +"\n" +" \n" +" 0\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2772 +#, no-c-format +msgid "" +"The UserType can now retrieve the value for the parameter " +"named default from the Properties " +"object passed to it." +msgstr "" +"现在,UserType 可以从传入的Properties对" +"象中得到default 参数的值。" + +#. Tag: para +#: basic_mapping.xml:2777 +#, no-c-format +msgid "" +"If you use a certain UserType very often, it may be " +"useful to define a shorter name for it. You can do this using the " +"<typedef> element. Typedefs assign a name to a " +"custom type, and may also contain a list of default parameter values if the " +"type is parameterized." +msgstr "" +"如果你非常频繁地使用某一UserType,可以为他定义一个简称。这" +"可以通过使用 <typedef>元素来实现。Typedefs为一自定义" +"类型赋予一个名称,并且如果此类型是参数化的,还可以包含一系列默认的参数值。" + +#. Tag: programlisting +#: basic_mapping.xml:2784 +#, no-c-format +msgid "" +"\n" +" 0\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: basic_mapping.xml:2786 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2788 +#, no-c-format +msgid "" +"It is also possible to override the parameters supplied in a typedef on a " +"case-by-case basis by using type parameters on the property mapping." +msgstr "也可以根据具体案例通过属性映射中的类型参数覆盖在typedef中提供的参数。" + +#. Tag: para +#: basic_mapping.xml:2793 +#, no-c-format +msgid "" +"Even though Hibernate's rich range of built-in types and support for " +"components means you will very rarely need to use a " +"custom type, it is nevertheless considered good form to use custom types for " +"(non-entity) classes that occur frequently in your application. For example, " +"a MonetaryAmount class is a good candidate for a " +"CompositeUserType, even though it could easily be mapped " +"as a component. One motivation for this is abstraction. With a custom type, " +"your mapping documents would be future-proofed against possible changes in " +"your way of representing monetary values." +msgstr "" +"尽管 Hibernate 内建的丰富的类型和对组件的支持意味着你可能很少 需要" +"使用自定义类型。不过,为那些在你的应用中经常出现的(非实体)类使用自" +"定义类型也是一个好方法。例如,一个MonetaryAmount类使用" +"CompositeUserType来映射是不错的选择,虽然他可以很容易地被" +"映射成组件。这样做的动机之一是抽象。使用自定义类型,以后假若你改变表示金额的" +"方法时,它可以保证映射文件不需要修改。" + +#. Tag: title +#: basic_mapping.xml:2809 +#, no-c-format +msgid "Mapping a class more than once" +msgstr "多次映射同一个类" + +#. Tag: para +#: basic_mapping.xml:2810 +#, no-c-format +msgid "" +"It is possible to provide more than one mapping for a particular persistent " +"class. In this case you must specify an entity name do " +"disambiguate between instances of the two mapped entities. (By default, the " +"entity name is the same as the class name.) Hibernate lets you specify the " +"entity name when working with persistent objects, when writing queries, or " +"when mapping associations to the named entity." +msgstr "" +"对特定的持久化类,映射多次是允许的。这种情形下,你必须指定entity " +"name来区别不同映射实体的对象实例。(默认情况下,实体名字和类名是相" +"同的。) Hibernate在操作持久化对象、编写查询条件,或者把关联映射到指定实体" +"时,允许你指定这个entity name(实体名字)。" + +#. Tag: programlisting +#: basic_mapping.xml:2818 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2820 +#, no-c-format +msgid "" +"Notice how associations are now specified using entity-name instead of class." +msgstr "" +"注意这里关联是如何用entity-name来代替class的。" + +#. Tag: title +#: basic_mapping.xml:2828 +#, no-c-format +msgid "SQL quoted identifiers" +msgstr "SQL中引号包围的标识符" + +#. Tag: para +#: basic_mapping.xml:2829 +#, no-c-format +msgid "" +"You may force Hibernate to quote an identifier in the generated SQL by " +"enclosing the table or column name in backticks in the mapping document. " +"Hibernate will use the correct quotation style for the SQL Dialect (usually double quotes, but brackets for SQL Server and backticks " +"for MySQL)." +msgstr "" +"你可通过在映射文档中使用反向引号(`)把表名或者字段名包围起来,以强制Hibernate" +"在生成的SQL中把标识符用引号包围起来。Hibernate会使用相应的" +"SQLDialect(方言)来使用正确的引号风格(通常是双引号,但是在" +"SQL Server中是括号,MySQL中是反向引号)。" + +#. Tag: programlisting +#: basic_mapping.xml:2836 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: basic_mapping.xml:2842 +#, no-c-format +msgid "Metadata alternatives" +msgstr "其他元数据(Metadata)" + +#. Tag: para +#: basic_mapping.xml:2844 +#, no-c-format +msgid "" +"XML isn't for everyone, and so there are some alternative ways to define O/R " +"mapping metadata in Hibernate." +msgstr "" +"XML 并不适用于所有人, 因此有其他定义Hibernate O/R 映射元数据(metadata)的方" +"法。" + +#. Tag: title +#: basic_mapping.xml:2849 +#, no-c-format +msgid "Using XDoclet markup" +msgstr "使用 XDoclet 标记" + +#. Tag: para +#: basic_mapping.xml:2851 +#, no-c-format +msgid "" +"Many Hibernate users prefer to embed mapping information directly in " +"sourcecode using XDoclet @hibernate.tags. We will not " +"cover this approach in this document, since strictly it is considered part " +"of XDoclet. However, we include the following example of the Cat class with XDoclet mappings." +msgstr "" +"很多Hibernate使用者更喜欢使用XDoclet@hibernate.tags将映射" +"信息直接嵌入到源代码中。我们不会在本文档中涉及这个方法,因为严格说来,这属于" +"XDoclet的一部分。然而,我们包含了如下使用XDoclet映射的Cat" +"类的例子。" + +#. Tag: programlisting +#: basic_mapping.xml:2858 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2860 +#, no-c-format +msgid "See the Hibernate web site for more examples of XDoclet and Hibernate." +msgstr "参考Hibernate网站更多的Xdoclet和Hibernate的例子" + +#. Tag: title +#: basic_mapping.xml:2867 +#, no-c-format +msgid "Using JDK 5.0 Annotations" +msgstr "使用 JDK 5.0 的注解(Annotation)" + +#. Tag: para +#: basic_mapping.xml:2869 +#, no-c-format +msgid "" +"JDK 5.0 introduced XDoclet-style annotations at the language level, type-" +"safe and checked at compile time. This mechnism is more powerful than " +"XDoclet annotations and better supported by tools and IDEs. IntelliJ IDEA, " +"for example, supports auto-completion and syntax highlighting of JDK 5.0 " +"annotations. The new revision of the EJB specification (JSR-220) uses JDK " +"5.0 annotations as the primary metadata mechanism for entity beans. " +"Hibernate3 implements the EntityManager of JSR-220 (the " +"persistence API), support for mapping metadata is available via the " +"Hibernate Annotations package, as a separate download. " +"Both EJB3 (JSR-220) and Hibernate3 metadata is supported." +msgstr "" +"JDK 5.0 在语言级别引入了 XDoclet 风格的标注,并且是类型安全的,在编译期进行检" +"查。这一机制比XDoclet的注解更为强大,有更好的工具和IDE支持。例如, IntelliJ " +"IDEA,支持JDK 5.0注解的自动完成和语法高亮 。EJB规范的新修订版(JSR-220)使用 " +"JDK 5.0的注解作为entity beans的主要元数据(metadata)机制。Hibernate 3 实现了" +"JSR-220 (the persistence API)的EntityManager,支持通过" +"Hibernate Annotations包定义映射元数据。这个包作为单独的" +"部分下载,支持EJB3 (JSR-220)和Hibernate3的元数据。" + +#. Tag: para +#: basic_mapping.xml:2880 +#, no-c-format +msgid "This is an example of a POJO class annotated as an EJB entity bean:" +msgstr "这是一个被注解为EJB entity bean 的POJO类的例子" + +#. Tag: programlisting +#: basic_mapping.xml:2884 +#, no-c-format +msgid "" +" orders;\n" +"\n" +" // Getter/setter and business methods\n" +"}]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2886 +#, no-c-format +msgid "" +"Note that support for JDK 5.0 Annotations (and JSR-220) is still work in " +"progress and not completed. Please refer to the Hibernate Annotations module " +"for more details." +msgstr "" +"注意:对 JDK 5.0 注解 (和 JSR-220)支持的工作仍然在进行中,并未完成。更多细节请" +"参阅Hibernate Annotations 模块。" + +#. Tag: title +#: basic_mapping.xml:2895 +#, no-c-format +msgid "Generated Properties" +msgstr "数据库生成属性(Generated Properties)" + +#. Tag: para +#: basic_mapping.xml:2896 +#, no-c-format +msgid "" +"Generated properties are properties which have their values generated by the " +"database. Typically, Hibernate applications needed to refresh objects which contain any properties for which the database was " +"generating values. Marking properties as generated, however, lets the " +"application delegate this responsibility to Hibernate. Essentially, whenever " +"Hibernate issues an SQL INSERT or UPDATE for an entity which has defined " +"generated properties, it immediately issues a select afterwards to retrieve " +"the generated values." +msgstr "" +"Generated properties指的是其值由数据库生成的属性。一般来说,如果对象有任何属" +"性由数据库生成值,Hibernate应用程序需要进行刷新(refresh)。" +"但如果把属性标明为generated,就可以转由Hibernate来负责这个动作。实际上。对定" +"义了generated properties的实体,每当Hibernate执行一条SQL INSERT或者UPDATE语" +"句,会立刻执行一条select来获得生成的值。" + +#. Tag: para +#: basic_mapping.xml:2905 +#, fuzzy, no-c-format +msgid "" +"Properties marked as generated must additionally be non-insertable and non-" +"updateable. Only versions, timestamps, " +"and simple properties " +"can be marked as generated." +msgstr "" +"被标明为generated的属性还必须是 non-insertable和 non-updateable的。只有versionstimestamps简单属性(simple properties)可以被标明为" +"generated。" + +#. Tag: para +#: basic_mapping.xml:2912 +#, no-c-format +msgid "" +"never (the default) - means that the given property value " +"is not generated within the database." +msgstr "never (默认) 标明此属性值不是从数据库中生成。" + +#. Tag: para +#: basic_mapping.xml:2916 +#, fuzzy, no-c-format +msgid "" +"insert - states that the given property value is " +"generated on insert, but is not regenerated on subsequent updates. Things " +"like created-date would fall into this category. Note that even thought " +"version and timestamp properties can be " +"marked as generated, this option is not available there..." +msgstr "" +"insert - 标明此属性值在insert的时候生成,但是不会在随后的" +"update时重新生成。比如说创建日期就归属于这类。注意虽然versiontimestamp属性可以被标注为generated,但是不适用" +"这个选项..." + +#. Tag: para +#: basic_mapping.xml:2924 +#, no-c-format +msgid "" +"always - states that the property value is generated both " +"on insert and on update." +msgstr "always - 标明此属性值在insert和update时都会被生成。" + +#. Tag: title +#: basic_mapping.xml:2931 +#, no-c-format +msgid "Auxiliary Database Objects" +msgstr "辅助数据库对象(Auxiliary Database Objects)" + +#. Tag: para +#: basic_mapping.xml:2932 +#, no-c-format +msgid "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects..." +msgstr "" +"Allows CREATE and DROP of arbitrary database objects, in conjunction with " +"Hibernate's schema evolution tools, to provide the ability to fully define a " +"user schema within the Hibernate mapping files. Although designed " +"specifically for creating and dropping things like triggers or stored " +"procedures, really any SQL command that can be run via a java.sql." +"Statement.execute() method is valid here (ALTERs, INSERTS, etc). " +"There are essentially two modes for defining auxiliary database objects... 帮" +"助CREATE和DROP任意数据库对象,与Hibernate的schema交互工具组合起来,可以提供在" +"Hibernate映射文件中完全定义用户schema的能力。虽然这是为创建和销毁trigger(触发" +"器)或stored procedure(存储过程)等特别设计的,实际上任何可以在java." +"sql.Statement.execute()方法中执行的SQL命令都可以在此使用(比如" +"ALTER, INSERT,等等)。本质上有两种模式来定义辅助数据库对象..." + +#. Tag: para +#: basic_mapping.xml:2941 +#, no-c-format +msgid "" +"The first mode is to explicitly list the CREATE and DROP commands out in the " +"mapping file:" +msgstr "第一种模式是在映射文件中显式声明CREATE和DROP命令:" + +#. Tag: programlisting +#: basic_mapping.xml:2945 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" CREATE TRIGGER my_trigger ...\n" +" DROP TRIGGER my_trigger\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2946 +#, no-c-format +msgid "" +"The second mode is to supply a custom class which knows how to construct the " +"CREATE and DROP commands. This custom class must implement the org." +"hibernate.mapping.AuxiliaryDatabaseObject interface." +msgstr "" +"第二种模式是提供一个类,这个类知道如何组织CREATE和DROP命令。这个特别类必须实" +"现org.hibernate.mapping.AuxiliaryDatabaseObject接口。" + +#. Tag: programlisting +#: basic_mapping.xml:2951 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: basic_mapping.xml:2952 +#, no-c-format +msgid "" +"Additionally, these database objects can be optionally scoped such that they " +"only apply when certain dialects are used." +msgstr "还有,这些数据库对象可以特别指定为仅在特定的方言中才使用。" + +#. Tag: programlisting +#: basic_mapping.xml:2956 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "class" +#~ msgstr "class" + +#~ msgid "id" +#~ msgstr "id" + +#~ msgid "" +#~ "optimizer (optional, defaults to none): See " +#~ msgstr "" +#~ "optimizer (optional, defaults to none): See " + +#~ msgid "" +#~ "optimizer (optional, defaults to ): See " +#~ "" +#~ msgstr "" +#~ "optimizer (optional, defaults to ): See " +#~ "" + +#~ msgid "key" +#~ msgstr "键(key)" + +#~ msgid "any" +#~ msgstr "any" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/batch.po b/documentation/envers/src/main/docbook/zh-CN/content/batch.po new file mode 100644 index 0000000000..73529b5470 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/batch.po @@ -0,0 +1,608 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: batch.xml:29 +#, no-c-format +msgid "Batch processing" +msgstr "批量处理(Batch processing)" + +#. Tag: para +#: batch.xml:31 +#, no-c-format +msgid "" +"A naive approach to inserting 100 000 rows in the database using Hibernate " +"might look like this:" +msgstr "" +"使用Hibernate将 100 000 条记录插入到数据库的一个很自然的做法可能是这样的" + +#. Tag: programlisting +#: batch.xml:36 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:38 +#, no-c-format +msgid "" +"This would fall over with an OutOfMemoryException " +"somewhere around the 50 000th row. That's because Hibernate caches all the " +"newly inserted Customer instances in the session-level " +"cache." +msgstr "" +"这段程序大概运行到 50 000 条记录左右会失败并抛出 内存溢出异常" +"(OutOfMemoryException) 。 这是因为 Hibernate 把所有新插入的 " +"客户(Customer)实例在 session级别的缓存区进行了缓存的缘" +"故。" + +#. Tag: para +#: batch.xml:44 +#, no-c-format +msgid "" +"In this chapter we'll show you how to avoid this problem. First, however, if " +"you are doing batch processing, it is absolutely critical that you enable " +"the use of JDBC batching, if you intend to achieve reasonable performance. " +"Set the JDBC batch size to a reasonable number (say, 10-50):" +msgstr "" +"我们会在本章告诉你如何避免此类问题。首先,如果你要执行批量处理并且想要达到一" +"个理想的性能, 那么使用JDBC的批量(batching)功能是至关重要。将JDBC的批量抓取" +"数量(batch size)参数设置到一个合适值 (比如,10-50之间):" + +#. Tag: programlisting +#: batch.xml:51 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:53 +#, no-c-format +msgid "" +"Note that Hibernate disables insert batching at the JDBC level transparently " +"if you use an identiy identifier generator." +msgstr "" +"注意,假若你使用了identiy标识符生成器,Hibernate在JDBC级别透" +"明的关闭插入语句的批量执行。" + +#. Tag: para +#: batch.xml:58 +#, no-c-format +msgid "" +"You also might like to do this kind of work in a process where interaction " +"with the second-level cache is completely disabled:" +msgstr "你也可能想在执行批量处理时关闭二级缓存:" + +#. Tag: programlisting +#: batch.xml:63 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: batch.xml:65 +#, no-c-format +msgid "" +"However, this is not absolutely necessary, since we can explicitly set the " +"CacheMode to disable interaction with the second-level " +"cache." +msgstr "" +"但是,这不是绝对必须的,因为我们可以显式设置CacheMode来关" +"闭与二级缓存的交互。" + +#. Tag: title +#: batch.xml:71 +#, no-c-format +msgid "Batch inserts" +msgstr "批量插入(Batch inserts)" + +#. Tag: para +#: batch.xml:73 +#, no-c-format +msgid "" +"When making new objects persistent, you must flush() and " +"then clear() the session regularly, to control the size " +"of the first-level cache." +msgstr "" +"如果要将很多对象持久化,你必须通过经常的调用 flush() 以及" +"稍后调用 clear() 来控制第一级缓存的大小。" + +#. Tag: programlisting +#: batch.xml:79 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:84 +#, no-c-format +msgid "Batch updates" +msgstr "批量更新(Batch updates)" + +#. Tag: para +#: batch.xml:86 +#, no-c-format +msgid "" +"For retrieving and updating data the same ideas apply. In addition, you need " +"to use scroll() to take advantage of server-side cursors " +"for queries that return many rows of data." +msgstr "" +"此方法同样适用于检索和更新数据。此外,在进行会返回很多行数据的查询时, 你需要" +"使用 scroll() 方法以便充分利用服务器端游标所带来的好处。" + +#. Tag: programlisting +#: batch.xml:92 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: batch.xml:97 +#, no-c-format +msgid "The StatelessSession interface" +msgstr "StatelessSession (无状态session)接口" + +#. Tag: para +#: batch.xml:98 +#, no-c-format +msgid "" +"Alternatively, Hibernate provides a command-oriented API that may be used " +"for streaming data to and from the database in the form of detached objects. " +"A StatelessSession has no persistence context associated " +"with it and does not provide many of the higher-level life cycle semantics. " +"In particular, a stateless session does not implement a first-level cache " +"nor interact with any second-level or query cache. It does not implement " +"transactional write-behind or automatic dirty checking. Operations performed " +"using a stateless session do not ever cascade to associated instances. " +"Collections are ignored by a stateless session. Operations performed via a " +"stateless session bypass Hibernate's event model and interceptors. Stateless " +"sessions are vulnerable to data aliasing effects, due to the lack of a first-" +"level cache. A stateless session is a lower-level abstraction, much closer " +"to the underlying JDBC." +msgstr "" +"作为选择,Hibernate提供了基于命令的API,可以用detached object的形式把数据以流" +"的方法加入到数据库,或从数据库输出。StatelessSession没有持" +"久化上下文,也不提供多少高层的生命周期语义。特别是,无状态session不实现第一级" +"cache,也不和第二级缓存,或者查询缓存交互。它不实现事务化写,也不实现脏数据检" +"查。用stateless session进行的操作甚至不级联到关联实例。stateless session忽略" +"集合类(Collections)。通过stateless session进行的操作不触发Hibernate的事件模型" +"和拦截器。无状态session对数据的混淆现象免疫,因为它没有第一级缓存。无状态" +"session是低层的抽象,和低层JDBC相当接近。" + +#. Tag: programlisting +#: batch.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:115 +#, no-c-format +msgid "" +"Note that in this code example, the Customer instances " +"returned by the query are immediately detached. They are never associated " +"with any persistence context." +msgstr "" +"注意在上面的例子中,查询返回的Customer实例立即被脱管" +"(detach)。它们与任何持久化上下文都没有关系。" + +#. Tag: para +#: batch.xml:121 +#, no-c-format +msgid "" +"The insert(), update() and delete() " +"operations defined by the StatelessSession interface are " +"considered to be direct database row-level operations, which result in " +"immediate execution of a SQL INSERT, UPDATE or " +"DELETE respectively. Thus, they have very different " +"semantics to the save(), saveOrUpdate() and " +"delete() operations defined by the Session interface." +msgstr "" +"StatelessSession 接口定义的insert(), update()delete()操作是直接的数据库行级别操作,其结果是" +"立刻执行一条INSERT, UPDATEDELETE 语" +"句。因此,它们的语义和Session 接口定义的save(), " +"saveOrUpdate()delete() 操作有很大的不同。" + +#. Tag: title +#: batch.xml:134 +#, no-c-format +msgid "DML-style operations" +msgstr "DML(数据操作语言)风格的操作(DML-style operations)" + +#. Tag: para +#: batch.xml:136 +#, fuzzy, no-c-format +msgid "" +"As already discussed, automatic and transparent object/relational mapping is " +"concerned with the management of object state. This implies that the object " +"state is available in memory, hence manipulating (using the SQL " +"Data Manipulation Language (DML) statements: " +"INSERT, UPDATE, DELETE) data directly in the database will not affect in-memory state. " +"However, Hibernate provides methods for bulk SQL-style DML statement " +"execution which are performed through the Hibernate Query Language (HQL)." +msgstr "" +"hence manipulating (using the SQL Data Manipulation Language (DML) statements: INSERT, UPDATE, DELETE) data directly in the database will not " +"affect in-memory state. However, Hibernate provides methods for bulk SQL-" +"style DML statement execution which are performed through the Hibernate " +"Query Language (HQL). 就像已经讨论的那样," +"自动和透明的 对象/关系 映射(object/relational mapping)关注于管理对象的状" +"态。 这就意味着对象的状态存在于内存,因此直接操作 (使用 SQL Data " +"Manipulation Language(DML,数据操作语言)语句 :INSERT ,UPDATEDELETE) 数据库中的" +"数据将不会影响内存中的对象状态和对象数据。 不过,Hibernate提供通过Hibernate查" +"询语言(HQL)来执行大批 量SQL风格的DML语句" +"的方法。" + +#. Tag: para +#: batch.xml:146 +#, no-c-format +msgid "" +"The pseudo-syntax for UPDATE and DELETE statements is: ( UPDATE | DELETE ) FROM? EntityName (WHERE " +"where_conditions)?. Some points to note:" +msgstr "" +"UPDATEDELETE语句的语法为: " +"( UPDATE | DELETE ) FROM? EntityName (WHERE where_conditions)? 有几点说明:" + +#. Tag: para +#: batch.xml:154 +#, no-c-format +msgid "In the from-clause, the FROM keyword is optional" +msgstr "在FROM子句(from-clause)中,FROM关键字是可选的" + +#. Tag: para +#: batch.xml:159 +#, no-c-format +msgid "" +"There can only be a single entity named in the from-clause; it can " +"optionally be aliased. If the entity name is aliased, then any property " +"references must be qualified using that alias; if the entity name is not " +"aliased, then it is illegal for any property references to be qualified." +msgstr "" +"在FROM子句(from-clause)中只能有一个实体名,它可以是别名。如果实体名是别名," +"那么任何被引用的属性都必须加上此别名的前缀;如果不是别名,那么任何有前缀的属" +"性引用都是非法的。" + +#. Tag: para +#: batch.xml:167 +#, fuzzy, no-c-format +msgid "" +"No joins (either implicit or " +"explicit) can be specified in a bulk HQL query. Sub-queries may be used in " +"the where-clause; the subqueries, themselves, may contain joins." +msgstr "" +"不能在大批量HQL语句中使用连接(join)(显式或者隐式的都不行)。不过在WHERE子句中可以使用子查询。可以在where子" +"句中使用子查询,子查询本身可以包含join。" + +#. Tag: para +#: batch.xml:174 +#, no-c-format +msgid "The where-clause is also optional." +msgstr "整个WHERE子句是可选的。" + +#. Tag: para +#: batch.xml:180 +#, no-c-format +msgid "" +"As an example, to execute an HQL UPDATE, use the " +"Query.executeUpdate() method (the method is named for " +"those familiar with JDBC's PreparedStatement.executeUpdate()):" +msgstr "" +"举个例子,使用Query.executeUpdate()方法执行一个HQL " +"UPDATE语句(: (方法命名是来源于JDBC's " +"PreparedStatement.executeUpdate()):" + +#. Tag: programlisting +#: batch.xml:186 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:188 +#, fuzzy, no-c-format +msgid "" +"HQL UPDATE statements, by default do not effect the version or the timestamp property values for the " +"affected entities; this is in keeping with the EJB3 specification. However, " +"you can force Hibernate to properly reset the version or " +"timestamp property values through the use of a " +"versioned update. This is achieved by adding the " +"VERSIONED keyword after the UPDATE " +"keyword." +msgstr "" +"HQL UPDATE语句,默认不会影响更新实体的version或者timestamp属性值。这和EJB3规范是一致的。但是," +"通过使用versioned update,你可以强制Hibernate正确的重置" +"version或者timestamp属性值。这通过在" +"UPDATE关键字后面增加VERSIONED关键字来实" +"现的。" + +#. Tag: programlisting +#: batch.xml:198 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:200 +#, no-c-format +msgid "" +"Note that custom version types (org.hibernate.usertype." +"UserVersionType) are not allowed in conjunction with a " +"update versioned statement." +msgstr "" +"注意,自定义的版本类型(org.hibernate.usertype.UserVersionType)不允许和update versioned语句联用。" + +#. Tag: para +#: batch.xml:205 +#, no-c-format +msgid "" +"To execute an HQL DELETE, use the same Query." +"executeUpdate() method:" +msgstr "" +"执行一个HQL DELETE,同样使用 Query.executeUpdate" +"() 方法:" + +#. Tag: programlisting +#: batch.xml:210 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: batch.xml:212 +#, no-c-format +msgid "" +"The int value returned by the Query.executeUpdate" +"() method indicate the number of entities effected by the " +"operation. Consider this may or may not correlate to the number of rows " +"effected in the database. An HQL bulk operation might result in multiple " +"actual SQL statements being executed, for joined-subclass, for example. The " +"returned number indicates the number of actual entities affected by the " +"statement. Going back to the example of joined-subclass, a delete against " +"one of the subclasses may actually result in deletes against not just the " +"table to which that subclass is mapped, but also the \"root\" table and " +"potentially joined-subclass tables further down the inheritence hierarchy." +msgstr "" +"由Query.executeUpdate()方法返回的整型值" +"表明了受此操作影响的记录数量。 注意这个数值可能与数据库中被(最后一条SQL语" +"句)影响了的“行”数有关,也可能没有。一个大批量HQL操作可能导致多条实际的SQL语" +"句被执行, 举个例子,对joined-subclass映射方式的类进行的此类操作。这个返回值" +"代表了实际被语句影响了的记录数量。在那个joined-subclass的例子中, 对一个子类" +"的删除实际上可能不仅仅会删除子类映射到的表而且会影响“根”表,还有可能影响与之" +"有继承关系的joined-subclass映射方式的子类的表。" + +#. Tag: para +#: batch.xml:223 +#, no-c-format +msgid "" +"The pseudo-syntax for INSERT statements is: " +"INSERT INTO EntityName properties_list select_statement. " +"Some points to note:" +msgstr "" +"INSERT语句的伪码是: INSERT INTO EntityName " +"properties_list select_statement. 要注意的是:" + +#. Tag: para +#: batch.xml:231 +#, no-c-format +msgid "" +"Only the INSERT INTO ... SELECT ... form is supported; not the INSERT " +"INTO ... VALUES ... form." +msgstr "" +"只支持INSERT INTO ... SELECT ...形式,不支持INSERT INTO ... VALUES ...形式." + +#. Tag: para +#: batch.xml:234 +#, no-c-format +msgid "" +"The properties_list is analogous to the column speficiation in the SQL INSERT statement. For entities " +"involved in mapped inheritence, only properties directly defined on that " +"given class-level can be used in the properties_list. Superclass properties " +"are not allowed; and subclass properties do not make sense. In other words, " +"INSERT statements are inherently non-polymorphic." +msgstr "" +"properties_list和SQL INSERT语句中的字段定义" +"(column speficiation)类似。对参与继承树映射的实体而言,只有直接定义" +"在给定的类级别的属性才能直接在properties_list中使用。超类的属性不被支持;子类" +"的属性无意义。换句话说,INSERT天生不支持多态。" + +#. Tag: para +#: batch.xml:244 +#, no-c-format +msgid "" +"select_statement can be any valid HQL select query, with the caveat that the " +"return types must match the types expected by the insert. Currently, this is " +"checked during query compilation rather than allowing the check to relegate " +"to the database. Note however that this might cause problems between " +"Hibernate Types which are equivalent " +"as opposed to equal. This might cause issues with " +"mismatches between a property defined as a org.hibernate.type." +"DateType and a property defined as a org.hibernate.type." +"TimestampType, even though the database might not make a " +"distinction or might be able to handle the conversion." +msgstr "" +"select_statement可以是任何合法的HQL选择查询,不过要保证返回类型必须和要插入的" +"类型完全匹配。目前,这一检查是在查询编译的时候进行的,而不是把它交给数据库。" +"注意,在HibernateType间如果只是等价" +"(equivalent)而非相等(equal),会导致问题。定" +"义为org.hibernate.type.DateTypeorg.hibernate." +"type.TimestampType的两个属性可能会产生类型不匹配错误,虽然数据库级" +"可能不加区分或者可以处理这种转换。" + +#. Tag: para +#: batch.xml:256 +#, no-c-format +msgid "" +"For the id property, the insert statement gives you two options. You can " +"either explicitly specify the id property in the properties_list (in which " +"case its value is taken from the corresponding select expression) or omit it " +"from the properties_list (in which case a generated value is used). This " +"later option is only available when using id generators that operate in the " +"database; attempting to use this option with any \"in memory\" type " +"generators will cause an exception during parsing. Note that for the " +"purposes of this discussion, in-database generators are considered to be " +"org.hibernate.id.SequenceGenerator (and its subclasses) " +"and any implementors of org.hibernate.id." +"PostInsertIdentifierGenerator. The most notable exception here is " +"org.hibernate.id.TableHiLoGenerator, which cannot be used " +"because it does not expose a selectable way to get its values." +msgstr "" +"对id属性来说,insert语句给你两个选择。你可以明确地在properties_list表中指定id" +"属性(这样它的值是从对应的select表达式中获得),或者在properties_list中省略它" +"(此时使用生成指)。后一种选择只有当使用在数据库中生成值的id产生器时才能使" +"用;如果是“内存”中计算的类型生成器,在解析时会抛出一个异常。注意,为了说明这" +"一问题,数据库产生值的生成器是org.hibernate.id.SequenceGenerator(和它的子类),以及任何org.hibernate.id." +"PostInsertIdentifierGenerator接口的实现。这儿最值得注意的意外是" +"org.hibernate.id.TableHiLoGenerator,它不能在此使用,因为" +"它没有得到其值的途径。" + +#. Tag: para +#: batch.xml:271 +#, no-c-format +msgid "" +"For properties mapped as either version or " +"timestamp, the insert statement gives you two options. " +"You can either specify the property in the properties_list (in which case " +"its value is taken from the corresponding select expressions) or omit it " +"from the properties_list (in which case the seed value " +"defined by the org.hibernate.type.VersionType is used)." +msgstr "" +"对映射为versiontimestamp的属性来" +"说,insert语句也给你两个选择,你可以在properties_list表中指定(此时其值从对应" +"的select表达式中获得),或者在properties_list中省略它(此时,使用在" +"org.hibernate.type.VersionType 中定义的seed value" +"(种子值))。" + +#. Tag: para +#: batch.xml:281 +#, no-c-format +msgid "An example HQL INSERT statement execution:" +msgstr "执行HQL INSERT语句的例子如下:" + +#. Tag: programlisting +#: batch.xml:285 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/best_practices.po b/documentation/envers/src/main/docbook/zh-CN/content/best_practices.po new file mode 100644 index 0000000000..1ff8be9342 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/best_practices.po @@ -0,0 +1,428 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: best_practices.xml:29 +#, no-c-format +msgid "Best Practices" +msgstr "最佳实践(Best Practices)" + +#. Tag: term +#: best_practices.xml:33 +#, no-c-format +msgid "" +"Write fine-grained classes and map them using <component>." +msgstr "" +"设计细颗粒度的持久类并且使用<component>来实现映射。" + +#. Tag: para +#: best_practices.xml:35 +#, no-c-format +msgid "" +"Use an Address class to encapsulate street, suburb, state, " +"postcode. This encourages code reuse and simplifies " +"refactoring." +msgstr "" +"使用一个Address持久类来封装 street, " +"suburb, state, postcode. 这将有利于代码重用和简化代码重构(refactoring)的工作。" + +#. Tag: term +#: best_practices.xml:43 +#, no-c-format +msgid "Declare identifier properties on persistent classes." +msgstr "对持久类声明标识符属性( identifier properties)。" + +#. Tag: para +#: best_practices.xml:45 +#, no-c-format +msgid "" +"Hibernate makes identifier properties optional. There are all sorts of " +"reasons why you should use them. We recommend that identifiers be " +"'synthetic' (generated, with no business meaning)." +msgstr "" +"Hibernate中标识符属性是可选的,不过有很多原因来说明你应该使用标识符属性。我们" +"建议标识符应该是“人造”的(自动生成,不涉及业务含义)。" + +#. Tag: term +#: best_practices.xml:53 +#, no-c-format +msgid "Identify natural keys." +msgstr "使用自然键(natural keys)标识" + +#. Tag: para +#: best_practices.xml:55 +#, no-c-format +msgid "" +"Identify natural keys for all entities, and map them using <" +"natural-id>. Implement equals() and " +"hashCode() to compare the properties that make up the " +"natural key." +msgstr "" +"对所有的实体都标识出自然键,用<natural-id>进行映射。" +"实现equals()hashCode(),在其中用组成" +"自然键的属性进行比较。" + +#. Tag: term +#: best_practices.xml:63 +#, no-c-format +msgid "Place each class mapping in its own file." +msgstr "为每个持久类写一个映射文件" + +#. Tag: para +#: best_practices.xml:65 +#, no-c-format +msgid "" +"Don't use a single monolithic mapping document. Map com.eg.Foo in the file com/eg/Foo.hbm.xml. This makes " +"particularly good sense in a team environment." +msgstr "" +"不要把所有的持久类映射都写到一个大文件中。把 com.eg.Foo 映" +"射到com/eg/Foo.hbm.xml中, 在团队开发环境中,这一点显得特" +"别有意义。" + +#. Tag: term +#: best_practices.xml:73 +#, no-c-format +msgid "Load mappings as resources." +msgstr "把映射文件作为资源加载" + +#. Tag: para +#: best_practices.xml:75 +#, no-c-format +msgid "Deploy the mappings along with the classes they map." +msgstr "把映射文件和他们的映射类放在一起进行部署。" + +#. Tag: term +#: best_practices.xml:81 +#, no-c-format +msgid "Consider externalising query strings." +msgstr "考虑把查询字符串放在程序外面" + +#. Tag: para +#: best_practices.xml:83 +#, no-c-format +msgid "" +"This is a good practice if your queries call non-ANSI-standard SQL " +"functions. Externalising the query strings to mapping files will make the " +"application more portable." +msgstr "" +"如果你的查询中调用了非ANSI标准的SQL函数,那么这条实践经验对你适用。把查询字符" +"串放在映射文件中可以让程序具有更好的可移植性。" + +#. Tag: term +#: best_practices.xml:91 +#, no-c-format +msgid "Use bind variables." +msgstr "使用绑定变量" + +#. Tag: para +#: best_practices.xml:93 +#, no-c-format +msgid "" +"As in JDBC, always replace non-constant values by \"?\". Never use string " +"manipulation to bind a non-constant value in a query! Even better, consider " +"using named parameters in queries." +msgstr "" +"就像在JDBC编程中一样,应该总是用占位符\"?\"来替换非常量值,不要在查询中用字符" +"串值来构造非常量值!更好的办法是在查询中使用命名参数。" + +#. Tag: term +#: best_practices.xml:101 +#, no-c-format +msgid "Don't manage your own JDBC connections." +msgstr "不要自己来管理JDBC connections" + +#. Tag: para +#: best_practices.xml:103 +#, no-c-format +msgid "" +"Hibernate lets the application manage JDBC connections. This approach should " +"be considered a last-resort. If you can't use the built-in connections " +"providers, consider providing your own implementation of org." +"hibernate.connection.ConnectionProvider." +msgstr "" +"Hibernate允许应用程序自己来管理JDBC connections,但是应该作为最后没有办法的办" +"法。如果你不能使用Hibernate内建的connections providers,那么考虑实现自己来实" +"现org.hibernate.connection.ConnectionProvider" + +#. Tag: term +#: best_practices.xml:111 +#, no-c-format +msgid "Consider using a custom type." +msgstr "考虑使用用户自定义类型(custom type)" + +#. Tag: para +#: best_practices.xml:113 +#, no-c-format +msgid "" +"Suppose you have a Java type, say from some library, that needs to be " +"persisted but doesn't provide the accessors needed to map it as a component. " +"You should consider implementing org.hibernate.UserType. " +"This approach frees the application code from implementing transformations " +"to / from a Hibernate type." +msgstr "" +"假设你有一个Java类型,来自某些类库,需要被持久化,但是该类没有提供映射操作需" +"要的存取方法。那么你应该考虑实现org.hibernate.UserType接" +"口。这种办法使程序代码写起来更加自如,不再需要考虑类与Hibernate type之间的相" +"互转换。" + +#. Tag: term +#: best_practices.xml:122 +#, no-c-format +msgid "Use hand-coded JDBC in bottlenecks." +msgstr "在性能瓶颈的地方使用硬编码的JDBC" + +#. Tag: para +#: best_practices.xml:124 +#, no-c-format +msgid "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider." +msgstr "" +"In performance-critical areas of the system, some kinds of operations might " +"benefit from direct JDBC. But please, wait until you know something is a bottleneck. And don't assume that direct JDBC is " +"necessarily faster. If you need to use direct JDBC, it might be worth " +"opening a Hibernate Session and using that JDBC " +"connection. That way you can still use the same transaction strategy and " +"underlying connection provider. 在系统中对性能要求很严格的一些部分,某些操作" +"也许直接使用JDBC会更好。但是请先确认这的确是一个瓶颈,并" +"且不要想当然认为JDBC一定会更快。如果确实需要直接使用JDBC,那么最好打开一个 " +"Hibernate Session 然后从 Session获得" +"connection,按照这种办法你仍然可以使用同样的transaction策略和底层的" +"connection provider。" + +#. Tag: term +#: best_practices.xml:134 +#, no-c-format +msgid "Understand Session flushing." +msgstr "理解Session清洗( flushing)" + +#. Tag: para +#: best_practices.xml:136 +#, no-c-format +msgid "" +"From time to time the Session synchronizes its persistent state with the " +"database. Performance will be affected if this process occurs too often. You " +"may sometimes minimize unnecessary flushing by disabling automatic flushing " +"or even by changing the order of queries and other operations within a " +"particular transaction." +msgstr "" +"Session会不时的向数据库同步持久化状态,如果这种操作进行的过于频繁,性能会受到" +"一定的影响。有时候你可以通过禁止自动flushing,尽量最小化非必要的flushing操" +"作,或者更进一步,在一个特定的transaction中改变查询和其它操作的顺序。" + +#. Tag: term +#: best_practices.xml:145 +#, no-c-format +msgid "In a three tiered architecture, consider using detached objects." +msgstr "在三层结构中,考虑使用托管对象(detached object)" + +#. Tag: para +#: best_practices.xml:147 +#, no-c-format +msgid "" +"When using a servlet / session bean architecture, you could pass persistent " +"objects loaded in the session bean to and from the servlet / JSP layer. Use " +"a new session to service each request. Use Session.merge() or Session.saveOrUpdate() to synchronize objects " +"with the database." +msgstr "" +"当使用一个servlet / session bean 类型的架构的时候, 你可以把已加载的持久对象在" +"session bean层和servlet / JSP 层之间来回传递。使用新的session来为每个请求服" +"务,使用 Session.merge() 或者Session.saveOrUpdate" +"()来与数据库同步。" + +#. Tag: term +#: best_practices.xml:156 +#, no-c-format +msgid "In a two tiered architecture, consider using long persistence contexts." +msgstr "在两层结构中,考虑使用长持久上下文(long persistence contexts)." + +#. Tag: para +#: best_practices.xml:158 +#, no-c-format +msgid "" +"Database Transactions have to be as short as possible for best scalability. " +"However, it is often neccessary to implement long running " +"application transactions, a single unit-of-work from " +"the point of view of a user. An application transaction might span several " +"client request/response cycles. It is common to use detached objects to " +"implement application transactions. An alternative, extremely appropriate in " +"two tiered architecture, is to maintain a single open persistence contact " +"(session) for the whole life cycle of the application transaction and simply " +"disconnect from the JDBC connection at the end of each request and reconnect " +"at the beginning of the subsequent request. Never share a single session " +"across more than one application transaction, or you will be working with " +"stale data." +msgstr "" +"为了得到最佳的可伸缩性,数据库事务(Database Transaction)应该尽可能的短。但" +"是,程序常常需要实现长时间运行的“应用程序事务(Application " +"Transaction)”,包含一个从用户的观点来看的原子操作。这个应用程序事" +"务可能跨越多次从用户请求到得到反馈的循环。用脱管对象(与session脱离的对象)来实" +"现应用程序事务是常见的。或者,尤其在两层结构中,把Hibernate Session从JDBC连接" +"中脱离开,下次需要用的时候再连接上。绝不要把一个Session用在多个应用程序事务" +"(Application Transaction)中,否则你的数据可能会过期失效。" + +#. Tag: term +#: best_practices.xml:172 +#, no-c-format +msgid "Don't treat exceptions as recoverable." +msgstr "不要把异常看成可恢复的" + +#. Tag: para +#: best_practices.xml:174 +#, no-c-format +msgid "" +"This is more of a necessary practice than a \"best\" practice. When an " +"exception occurs, roll back the Transaction and close the " +"Session. If you don't, Hibernate can't guarantee that in-" +"memory state accurately represents persistent state. As a special case of " +"this, do not use Session.load() to determine if an " +"instance with the given identifier exists on the database; use " +"Session.get() or a query instead." +msgstr "" +"这一点甚至比“最佳实践”还要重要,这是“必备常识”。当异常发生的时候,必须要回滚 " +"Transaction ,关闭Session。如果你不这样" +"做的话,Hibernate无法保证内存状态精确的反应持久状态。尤其不要使用" +"Session.load()来判断一个给定标识符的对象实例在数据库中是否" +"存在,应该使用Session.get()或者进行一次查询." + +#. Tag: term +#: best_practices.xml:184 +#, no-c-format +msgid "Prefer lazy fetching for associations." +msgstr "对于关联优先考虑lazy fetching" + +#. Tag: para +#: best_practices.xml:186 +#, no-c-format +msgid "" +"Use eager fetching sparingly. Use proxies and lazy collections for most " +"associations to classes that are not likely to be completely held in the " +"second-level cache. For associations to cached classes, where there is an a " +"extremely high probability of a cache hit, explicitly disable eager fetching " +"using lazy=\"false\". When an join fetching is " +"appropriate to a particular use case, use a query with a left join " +"fetch." +msgstr "" +"谨慎的使用主动抓取(eager fetching)。对于关联来说,若其目标是无法在第二级缓存" +"中完全缓存所有实例的类,应该使用代理(proxies)与/或具有延迟加载属性的集合" +"(lazy collections)。若目标是可以被缓存的,尤其是缓存的命中率非常高的情况下," +"应该使用lazy=\"false\",明确的禁止掉eager fetching。如果那" +"些特殊的确实适合使用join fetch 的场合,请在查询中使用left join " +"fetch。" + +#. Tag: term +#: best_practices.xml:196 +#, no-c-format +msgid "" +"Use the open session in view pattern, or a disciplined " +"assembly phase to avoid problems with unfetched data." +msgstr "" +"使用open session in view模式,或者执行严格的装" +"配期(assembly phase)策略来避免再次抓取数据带来的问题" + +#. Tag: para +#: best_practices.xml:201 +#, no-c-format +msgid "" +"Hibernate frees the developer from writing tedious Data Transfer " +"Objects (DTO). In a traditional EJB architecture, DTOs serve dual " +"purposes: first, they work around the problem that entity beans are not " +"serializable; second, they implicitly define an assembly phase where all " +"data to be used by the view is fetched and marshalled into the DTOs before " +"returning control to the presentation tier. Hibernate eliminates the first " +"purpose. However, you will still need an assembly phase (think of your " +"business methods as having a strict contract with the presentation tier " +"about what data is available in the detached objects) unless you are " +"prepared to hold the persistence context (the session) open across the view " +"rendering process. This is not a limitation of Hibernate! It is a " +"fundamental requirement of safe transactional data access." +msgstr "" +"Hibernate让开发者们摆脱了繁琐的Data Transfer Objects " +"(DTO)。在传统的EJB结构中,DTO有双重作用:首先,他们解决了entity bean无法序列" +"化的问题;其次,他们隐含地定义了一个装配期,在此期间,所有在view层需要用到的" +"数据,都被抓取、集中到了DTO中,然后控制才被装到表示层。Hibernate终结了第一个" +"作用。然而,除非你做好了在整个渲染过程中都维护一个打开的持久化上下文(session)" +"的准备,你仍然需要一个装配期(想象一下,你的业务方法与你的表示层有严格的契" +"约,数据总是被放置到托管对象中)。这并非是Hibernate的限制!这是实现安全的事务" +"化数据访问的基本需求。" + +#. Tag: term +#: best_practices.xml:215 +#, no-c-format +msgid "Consider abstracting your business logic from Hibernate." +msgstr "考虑把Hibernate代码从业务逻辑代码中抽象出来" + +#. Tag: para +#: best_practices.xml:217 +#, no-c-format +msgid "" +"Hide (Hibernate) data-access code behind an interface. Combine the " +"DAO and Thread Local Session " +"patterns. You can even have some classes persisted by handcoded JDBC, " +"associated to Hibernate via a UserType. (This advice is " +"intended for \"sufficiently large\" applications; it is not appropriate for " +"an application with five tables!)" +msgstr "" +"把Hibernate的数据存取代码隐藏到接口(interface)的后面,组合使用DAOThread Local Session模式。通过Hibernate的" +"UserType,你甚至可以用硬编码的JDBC来持久化那些本该被" +"Hibernate持久化的类。 (该建议更适用于规模足够大应用软件中,对于那些只有5张表" +"的应用程序并不适合。)" + +#. Tag: term +#: best_practices.xml:227 +#, no-c-format +msgid "Don't use exotic association mappings." +msgstr "不要用怪异的连接映射" + +#. Tag: para +#: best_practices.xml:229 +#, no-c-format +msgid "" +"Good usecases for a real many-to-many associations are rare. Most of the " +"time you need additional information stored in the \"link table\". In this " +"case, it is much better to use two one-to-many associations to an " +"intermediate link class. In fact, we think that most associations are one-to-" +"many and many-to-one, you should be careful when using any other association " +"style and ask yourself if it is really neccessary." +msgstr "" +"多对多连接用得好的例子实际上相当少见。大多数时候你在“连接表”中需要保存额外的" +"信息。这种情况下,用两个指向中介类的一对多的连接比较好。实际上,我们认为绝大" +"多数的连接是一对多和多对一的,你应该谨慎使用其它连接风格,用之前问自己一句," +"是否真的必须这么做。" + +#. Tag: term +#: best_practices.xml:239 +#, no-c-format +msgid "Prefer bidirectional associations." +msgstr "偏爱双向关联" + +#. Tag: para +#: best_practices.xml:241 +#, no-c-format +msgid "" +"Unidirectional associations are more difficult to query. In a large " +"application, almost all associations must be navigable in both directions in " +"queries." +msgstr "" +"单向关联更加难于查询。在大型应用中,几乎所有的关联必须在查询中可以双向导航。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/collection_mapping.po b/documentation/envers/src/main/docbook/zh-CN/content/collection_mapping.po new file mode 100644 index 0000000000..ed8d58fd51 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/collection_mapping.po @@ -0,0 +1,1832 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: collection_mapping.xml:29 +#, no-c-format +msgid "Collection Mapping" +msgstr "集合类(Collections)映射" + +#. Tag: title +#: collection_mapping.xml:32 +#, no-c-format +msgid "Persistent collections" +msgstr "持久化集合类(Persistent collections)" + +#. Tag: para +#: collection_mapping.xml:34 +#, no-c-format +msgid "" +"Hibernate requires that persistent collection-valued fields be declared as " +"an interface type, for example:" +msgstr "" +"Hibernate要求持久化集合值字段必须声明为接口,比如:(译者注:在阅读本章的时" +"候,以后整个手册的阅读过程中,我们都会面临一个名词方面的问题,那就是“集合”。" +"\"Collections\"和\"Set\"在中文里对应都被翻译为“集合”,但是他们的含义很不一" +"样。Collections是一个超集,Set是其中的一种。大部分情况下,本译稿中泛指的未加" +"英文注明的“集合”,都应当理解为“Collections”。在有些二者同时出现,可能造成混淆" +"的地方,我们用“集合类”来特指“Collecions”,“集合(Set)”来指\"Set\",一般都会在后" +"面的括号中给出英文。希望大家在阅读时联系上下文理解,不要造成误解。 与此同" +"时,“元素”一词对应的英文“element”,也有两个不同的含义。其一为集合的元素,是内" +"存中的一个变量;另一含义则是XML文档中的一个标签所代表的元素。也请注意区别。 " +"本章中,特别是后半部分是需要反复阅读才能理解清楚的。如果遇到任何疑问,请记住,英" +"文版本的reference是惟一标准的参考资料。)" + +#. Tag: programlisting +#: collection_mapping.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:41 +#, no-c-format +msgid "" +"The actual interface might be java.util.Set, " +"java.util.Collection, java.util.List, " +"java.util.Map, java.util.SortedSet, " +"java.util.SortedMap or ... anything you like! (Where " +"\"anything you like\" means you will have to write an implementation of " +"org.hibernate.usertype.UserCollectionType.)" +msgstr "" +"实际的接口可能是java.util.Set, java.util." +"Collection, java.util.List, java.util." +"Map, java.util.SortedSet, java.util." +"SortedMap 或者...任何你喜欢的类型!(\"任何你喜欢的类型\" 代表你需要" +"编写 org.hibernate.usertype.UserCollectionType的实现.)" + +#. Tag: para +#: collection_mapping.xml:50 +#, no-c-format +msgid "" +"Notice how we initialized the instance variable with an instance of " +"HashSet. This is the best way to initialize collection " +"valued properties of newly instantiated (non-persistent) instances. When you " +"make the instance persistent - by calling persist(), for " +"example - Hibernate will actually replace the HashSet " +"with an instance of Hibernate's own implementation of Set. Watch out for errors like this:" +msgstr "" +"注意我们是如何用一个HashSet实例来初始化实例变量的.这是用于" +"初始化新创建(尚未持久化)的类实例中集合值属性的最佳方法。当你持久化这个实例时" +"——比如通过调用persist()——Hibernate 会自动把" +"HashSet替换为Hibernate自己的Set实现。观" +"察下面的错误:" + +#. Tag: programlisting +#: collection_mapping.xml:60 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:62 +#, no-c-format +msgid "" +"The persistent collections injected by Hibernate behave like " +"HashMap, HashSet, TreeMap, TreeSet or ArrayList, " +"depending upon the interface type." +msgstr "" +"根据不同的接口类型,被Hibernate注射的持久化集合类的表现类似HashMap, HashSet, TreeMap, " +"TreeSet or ArrayList。" + +#. Tag: para +#: collection_mapping.xml:69 +#, no-c-format +msgid "" +"Collections instances have the usual behavior of value types. They are " +"automatically persisted when referenced by a persistent object and " +"automatically deleted when unreferenced. If a collection is passed from one " +"persistent object to another, its elements might be moved from one table to " +"another. Two entities may not share a reference to the same collection " +"instance. Due to the underlying relational model, collection-valued " +"properties do not support null value semantics; Hibernate does not " +"distinguish between a null collection reference and an empty collection." +msgstr "" +"集合类实例具有值类型的通常行为。当被持久化对象引用后,他们会自动被持久化,当" +"不再被引用后,自动被删除。假若实例被从一个持久化对象传递到另一个,它的元素可" +"能从一个表转移到另一个表。两个实体不能共享同一个集合类实例的引用。因为底层关" +"系数据库模型的原因,集合值属性无法支持空值语义;Hibernate对空的集合引用和空集" +"合不加区别。" + +#. Tag: para +#: collection_mapping.xml:80 +#, no-c-format +msgid "" +"You shouldn't have to worry much about any of this. Use persistent " +"collections the same way you use ordinary Java collections. Just make sure " +"you understand the semantics of bidirectional associations (discussed later)." +msgstr "" +"你不需要过多的为此担心。就如同你平时使用普通的Java集合类一样来使用持久化集合" +"类。只是要确认你理解了双向关联的语义(后文讨论)。" + +#. Tag: title +#: collection_mapping.xml:89 +#, no-c-format +msgid "Collection mappings" +msgstr "集合映射( Collection mappings )" + +#. Tag: para +#: collection_mapping.xml:92 +#, no-c-format +msgid "" +"There are quite a range of mappings that can be generated for collections, " +"covering many common relational models. We suggest you experiment with the " +"schema generation tool to get a feeling for how various mapping declarations " +"translate to database tables." +msgstr "" +"任何值集合或者多对多关联需要专用的具有一个或多个外键字段的" +"collection table、一个或多个collection " +"element column,以及还可能有一个或多个索引字段。" + +#. Tag: para +#: collection_mapping.xml:99 +#, no-c-format +msgid "" +"The Hibernate mapping element used for mapping a collection depends upon the " +"type of the interface. For example, a <set> element " +"is used for mapping properties of type Set." +msgstr "" +"用于映射集合类的Hibernate映射元素取决于接口的类型。比如, <" +"set> 元素用来映射Set类型的属性。" + +#. Tag: programlisting +#: collection_mapping.xml:105 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:107 +#, no-c-format +msgid "" +"Apart from <set>, there is also <" +"list>, <map>, <bag>, <array> and <primitive-" +"array> mapping elements. The <map> " +"element is representative:" +msgstr "" +"除了<set>,还有<list>, " +"<map>, <bag>, <" +"array><primitive-array> 映射元素。" +"<map>具有代表性:" + +#. Tag: programlisting +#: collection_mapping.xml:132 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:135 +#, no-c-format +msgid "name the collection property name" +msgstr "name 集合属性的名称" + +#. Tag: para +#: collection_mapping.xml:140 +#, no-c-format +msgid "" +"table (optional - defaults to property name) the name of " +"the collection table (not used for one-to-many associations)" +msgstr "" +"table (可选——默认为属性的名称)这个集合表的名称(不能在一" +"对多的关联关系中使用)" + +#. Tag: para +#: collection_mapping.xml:146 +#, no-c-format +msgid "" +"schema (optional) the name of a table schema to override " +"the schema declared on the root element" +msgstr "" +"schema (可选) 表的schema的名称, 他将覆盖在根元素中定义的" +"schema" + +#. Tag: para +#: collection_mapping.xml:152 +#, no-c-format +msgid "" +"lazy (optional - defaults to true) may " +"be used to disable lazy fetching and specify that the association is always " +"eagerly fetched, or to enable \"extra-lazy\" fetching where most operations " +"do not initialize the collection (suitable for very large collections)" +msgstr "" +"lazy (可选--默认为true) 可以用来关闭延迟加载(false),指定" +"一直使用预先抓取,或者打开\"extra-lazy\" 抓取,此时大多数操作不会初始化集合类" +"(适用于非常大的集合)" + +#. Tag: para +#: collection_mapping.xml:161 +#, no-c-format +msgid "" +"inverse (optional - defaults to false) " +"mark this collection as the \"inverse\" end of a bidirectional association" +msgstr "" +"inverse (可选——默认为false) 标记这个集" +"合作为双向关联关系中的方向一端。" + +#. Tag: para +#: collection_mapping.xml:167 +#, no-c-format +msgid "" +"cascade (optional - defaults to none) " +"enable operations to cascade to child entities" +msgstr "" +"cascade (可选——默认为none) 让操作级联到" +"子实体" + +#. Tag: para +#: collection_mapping.xml:173 +#, no-c-format +msgid "" +"sort (optional) specify a sorted collection with " +"natural sort order, or a given comparator class" +msgstr "" +"sort(可选)指定集合的排序顺序, 其可以为自然的" +"(natural)或者给定一个用来比较的类。" + +#. Tag: para +#: collection_mapping.xml:179 +#, no-c-format +msgid "" +"order-by (optional, JDK1.4 only) specify a table column " +"(or columns) that define the iteration order of the Map, " +"Set or bag, together with an optional asc or desc" +msgstr "" +"order-by (可选, 仅用于jdk1.4) 指定表的字段(一个或几个)再加" +"上asc或者desc(可选), 定义Map,Set和Bag的迭代顺序" + +#. Tag: para +#: collection_mapping.xml:186 +#, no-c-format +msgid "" +"where (optional) specify an arbitrary SQL WHERE condition to be used when retrieving or removing the collection " +"(useful if the collection should contain only a subset of the available data)" +msgstr "" +"where (可选) 指定任意的SQL where条件, 该条件将在重新载入或" +"者删除这个集合时使用(当集合中的数据仅仅是所有可用数据的一个子集时这个条件非常" +"有用)" + +#. Tag: para +#: collection_mapping.xml:193 +#, no-c-format +msgid "" +"fetch (optional, defaults to select) " +"Choose between outer-join fetching, fetching by sequential select, and " +"fetching by sequential subselect." +msgstr "" +"fetch (可选, 默认为select) 用于在外连接" +"抓取、通过后续select抓取和通过后续subselect抓取之间选择。" + +#. Tag: para +#: collection_mapping.xml:200 +#, no-c-format +msgid "" +"batch-size (optional, defaults to 1) " +"specify a \"batch size\" for lazily fetching instances of this collection." +msgstr "" +"batch-size (可选, 默认为1) 指定通过延迟" +"加载取得集合实例的批处理块大小(\"batch size\")。" + +#. Tag: para +#: collection_mapping.xml:206 +#, no-c-format +msgid "" +"access (optional - defaults to property): The strategy Hibernate should use for accessing the collection " +"property value." +msgstr "" +"access(可选-默认为属性property):Hibernate取得集合属性值时" +"使用的策略" + +#. Tag: para +#: collection_mapping.xml:212 +#, no-c-format +msgid "" +"optimistic-lock (optional - defaults to true): Species that changes to the state of the collection results in " +"increment of the owning entity's version. (For one to many associations, it " +"is often reasonable to disable this setting.)" +msgstr "" +"乐观锁 (可选 - 默认为 true): 对集合的状" +"态的改变会是否导致其所属的实体的版本增长。 (对一对多关联来说,关闭这个属性常" +"常是有理的)" + +#. Tag: para +#: collection_mapping.xml:220 +#, no-c-format +msgid "" +"mutable (optional - defaults to true): " +"A value of false specifies that the elements of the " +"collection never change (a minor performance optimization in some cases)." +msgstr "" +"mutable(可变) (可选 - 默认为true): 若" +"值为false,表明集合中的元素不会改变(在某些情况下可以进行一" +"些小的性能优化)。" + +#. Tag: title +#: collection_mapping.xml:230 +#, no-c-format +msgid "Collection foreign keys" +msgstr "集合外键(Collection foreign keys)" + +#. Tag: para +#: collection_mapping.xml:232 +#, no-c-format +msgid "" +"Collection instances are distinguished in the database by the foreign key of " +"the entity that owns the collection. This foreign key is referred to as the " +"collection key column (or columns) of the collection " +"table. The collection key column is mapped by the <key> element." +msgstr "" +"集合实例在数据库中依靠持有集合的实体的外键加以辨别。此外键作为集合" +"关键字段(collection key column)(或多个字段)加以引用。集合关键" +"字段通过<key> 元素映射。" + +#. Tag: para +#: collection_mapping.xml:240 +#, no-c-format +msgid "" +"There may be a nullability constraint on the foreign key column. For most " +"collections, this is implied. For unidirectional one to many associations, " +"the foreign key column is nullable by default, so you might need to specify " +"not-null=\"true\"." +msgstr "" +"在外键字段上可能具有非空约束。对于大多数集合来说,这是隐含的。对单向一对多关" +"联来说,外键字段默认是可以为空的,因此你可能需要指明 not-null=\"true" +"\"。" + +#. Tag: programlisting +#: collection_mapping.xml:247 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:249 +#, no-c-format +msgid "" +"The foreign key constraint may use ON DELETE CASCADE." +msgstr "外键约束可以使用ON DELETE CASCADE。" + +#. Tag: programlisting +#: collection_mapping.xml:253 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:255 +#, no-c-format +msgid "" +"See the previous chapter for a full definition of the <key> element." +msgstr "对<key> 元素的完整定义,请参阅前面的章节。" + +#. Tag: title +#: collection_mapping.xml:263 +#, no-c-format +msgid "Collection elements" +msgstr "集合元素(Collection elements)" + +#. Tag: para +#: collection_mapping.xml:265 +#, no-c-format +msgid "" +"Collections may contain almost any other Hibernate type, including all basic " +"types, custom types, components, and of course, references to other " +"entities. This is an important distinction: an object in a collection might " +"be handled with \"value\" semantics (its life cycle fully depends on the " +"collection owner) or it might be a reference to another entity, with its own " +"life cycle. In the latter case, only the \"link\" between the two objects is " +"considered to be state held by the collection." +msgstr "" +"集合几乎可以包含任何其他的Hibernate类型,包括所有的基本类型、自定义类型、组" +"件,当然还有对其他实体的引用。存在一个重要的区别:位于集合中的对象可能是根" +"据“值”语义来操作(其声明周期完全依赖于集合持有者),或者它可能是指向另一个实" +"体的引用,具有其自己的生命周期。在后者的情况下,被作为集合持有的状态考虑的," +"只有两个对象之间的“连接”。" + +#. Tag: para +#: collection_mapping.xml:274 +#, no-c-format +msgid "" +"The contained type is referred to as the collection element type. Collection elements are mapped by <element> or <composite-element>, or in the case of " +"entity references, with <one-to-many> or " +"<many-to-many>. The first two map elements with " +"value semantics, the next two are used to map entity associations." +msgstr "" +"被包容的类型被称为集合元素类型(collection element type)。集合元素通过<element><" +"composite-element>映射,或在其是实体引用的时候,通过" +"<one-to-many><many-to-many>映射。前两种用于使用值语义映射元素,后两种用于映射实体关联。" + +#. Tag: title +#: collection_mapping.xml:286 +#, no-c-format +msgid "Indexed collections" +msgstr "索引集合类(Indexed collections)" + +#. Tag: para +#: collection_mapping.xml:288 +#, no-c-format +msgid "" +"All collection mappings, except those with set and bag semantics, need an " +"index column in the collection table - a column that " +"maps to an array index, or List index, or Map key. The index of a Map may be of any basic " +"type, mapped with <map-key>, it may be an entity " +"reference mapped with <map-key-many-to-many>, or it " +"may be a composite type, mapped with <composite-map-key>. The index of an array or list is always of type integer and is mapped using the <list-index> " +"element. The mapped column contains sequential integers (numbered from zero, " +"by default)." +msgstr "" +"所有的集合映射,除了set和bag语义的以外,都需要指定一个集合表的索引" +"字段(index column)——用于对应到数组索引,或者List的索引,或者Map的关键字。通过<map-" +"key>,Map 的索引可以是任何基础类型;若通过" +"<map-key-many-to-many>,它也可以是一个实体引用;若通" +"过<composite-map-key>,它还可以是一个组合类型。数组" +"或列表的索引必须是integer类型,并且使用 <list-" +"index>元素定义映射。被映射的字段包含有顺序排列的整数(默认从0开" +"始)。" + +#. Tag: sect2 +#: collection_mapping.xml:299 +#, no-c-format +msgid "" +" ]]> column_name (required): The " +"name of the column holding the collection index values. " +" base (optional, " +"defaults to 0): The value of the index column that " +"corresponds to the first element of the list or array. ]]> column (optional): The name of the " +"column holding the collection index values. formula (optional): A SQL " +"formula used to evaluate the key of the map. type (reguired): The type of " +"the map keys. " +" ]]> " +" column (optional): The name of the foreign key " +"column for the collection index values. formula (optional): A SQL " +"formula used to evaluate the foreign key of the map key. " +" class " +"(required): The entity class used as the map key. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:380 +#, no-c-format +msgid "" +"If your table doesn't have an index column, and you still wish to use " +"List as the property type, you should map the property as " +"a Hibernate <bag>. A bag does not retain its " +"order when it is retrieved from the database, but it may be optionally " +"sorted or ordered." +msgstr "" +"值集合于多对多关联(Collections of values and many-to-many associations)" + +#. Tag: title +#: collection_mapping.xml:390 +#, no-c-format +msgid "Collections of values and many-to-many associations" +msgstr "对于一个值集合, 我们使用<element>标签。" + +#. Tag: para +#: collection_mapping.xml:392 +#, no-c-format +msgid "" +"Any collection of values or many-to-many association requires a dedicated " +"collection table with a foreign key column or columns, " +"collection element column or columns and possibly an " +"index column or columns." +msgstr "column(可选):保存集合元素值的字段名。" + +#. Tag: para +#: collection_mapping.xml:399 +#, no-c-format +msgid "" +"For a collection of values, we use the <element> " +"tag." +msgstr "formula (可选): 用于计算元素的SQL公式" + +#. Tag: sect2 +#: collection_mapping.xml:401 +#, no-c-format +msgid "" +" " +" ]]> " +"column (optional): The name of the column holding the " +"collection element values. formula (optional): An SQL formula used to " +"evaluate the element. " +" type (required): The type of the collection " +"element. A " +"many-to-many association is specified using the " +"<many-to-many> element. " +" " +" " +"]]> " +" column (optional): The name of the element foreign " +"key column. " +"formula (optional): An SQL formula used to evaluate the " +"element foreign key value. class (required): The name of the associated " +"class. " +"fetch (optional - defaults to join): " +"enables outer-join or sequential select fetching for this association. This " +"is a special case; for full eager fetching (in a single SELECT) of an entity and its many-to-many relationships to other entities, " +"you would enable join fetching not only of the collection " +"itself, but also with this attribute on the <many-to-many> nested element. unique (optional): Enable the DDL generation " +"of a unique constraint for the foreign-key column. This makes the " +"association multiplicity effectively one to many. " +" not-found " +"(optional - defaults to exception): Specifies how foreign " +"keys that reference missing rows will be handled: ignore " +"will treat a missing row as a null association. entity-name (optional): " +"The entity name of the associated class, as an alternative to " +"class. property-ref: (optional) The name of a " +"property of the associated class that is joined to this foreign key. If not " +"specified, the primary key of the associated class is used. " +msgstr "" + +#. Tag: para +#: collection_mapping.xml:506 +#, no-c-format +msgid "Some examples, first, a set of strings:" +msgstr "" +"包含一组整数的bag(还设置了order-by参数指定了迭代的顺序):" + +#. Tag: programlisting +#: collection_mapping.xml:510 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:512 +#, no-c-format +msgid "" +"A bag containing integers (with an iteration order determined by the " +"order-by attribute):" +msgstr "" +"一个实体数组,在这个案例中是一个多对多的关联(注意这里的实体是自动管理生命周期" +"的对象(life cycle objects),cascade=\"all\"):" + +#. Tag: programlisting +#: collection_mapping.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:519 +#, no-c-format +msgid "An array of entities - in this case, a many to many association:" +msgstr "一个map,通过字符串的索引来指明日期:" + +#. Tag: programlisting +#: collection_mapping.xml:523 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:525 +#, no-c-format +msgid "A map from string indices to dates:" +msgstr "一个组件的列表:(下一章讨论)" + +#. Tag: programlisting +#: collection_mapping.xml:529 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:531 +#, no-c-format +msgid "A list of components (discussed in the next chapter):" +msgstr "一对多关联(One-to-many Associations)" + +#. Tag: programlisting +#: collection_mapping.xml:535 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:540 +#, no-c-format +msgid "One-to-many associations" +msgstr "" +"一对多关联通过外键连接两个类对应的" +"表,而没有中间集合表。 这个关系模型失去了一些Java集合的语义:" + +#. Tag: para +#: collection_mapping.xml:542 +#, no-c-format +msgid "" +"A one to many association links the tables of two " +"classes via a foreign key, with no intervening collection table. This " +"mapping loses certain semantics of normal Java collections:" +msgstr "一个被包含的实体的实例只能被包含在一个集合的实例中" + +#. Tag: para +#: collection_mapping.xml:550 +#, no-c-format +msgid "" +"An instance of the contained entity class may not belong to more than one " +"instance of the collection" +msgstr "一个被包含的实体的实例只能对应于集合索引的一个值中" + +#. Tag: para +#: collection_mapping.xml:556 +#, no-c-format +msgid "" +"An instance of the contained entity class may not appear at more than one " +"value of the collection index" +msgstr "" +"一个从ProductPart的关联需要关键字字" +"段,可能还有一个索引字段指向Part所对应的表。 <" +"one-to-many>标记指明了一个一对多的关联。" + +#. Tag: para +#: collection_mapping.xml:563 +#, no-c-format +msgid "" +"An association from Product to Part " +"requires existence of a foreign key column and possibly an index column to " +"the Part table. A <one-to-many> " +"tag indicates that this is a one to many association." +msgstr "class(必须):被关联类的名称。" + +#. Tag: programlisting +#: collection_mapping.xml:576 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:579 +#, fuzzy, no-c-format +msgid "class (required): The name of the associated class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"为此关联打开外连接抓取或者后续select抓取。这是特殊情况;对于一个实体及其指向" +"其他实体的多对多关联进全预先抓取(使用一条单独的SELECT)," +"你不仅需要对集合自身打开join,也需要对<many-" +"to-many>这个内嵌元素打开此属性。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"not-found (可选 - 默认为exception): 指" +"明若缓存的标示值关联的行缺失,该如何处理: ignore 会把缺失的" +"行作为一个空关联处理。" + +#. Tag: para +#: collection_mapping.xml:584 +#, no-c-format +msgid "" +"not-found (optional - defaults to exception): Specifies how cached identifiers that reference missing rows will " +"be handled: ignore will treat a missing row as a null " +"association." +msgstr "" +"entity-name (可选): 被关联的类的实体名,作为" +"class的替代。" + +#. Tag: para +#: collection_mapping.xml:591 +#, fuzzy, no-c-format +msgid "" +"entity-name (optional): The entity name of the associated " +"class, as an alternative to class." +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"property-ref: (可选) 被关联到此外键(foreign key)的类中的对" +"应属性的名字。若未指定,使用被关联类的主键。\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"例子" + +#. Tag: para +#: collection_mapping.xml:599 +#, no-c-format +msgid "" +"Notice that the <one-to-many> element does not need " +"to declare any columns. Nor is it necessary to specify the table name anywhere." +msgstr "" +"注意:<one-to-many>元素不需要定义任何字段。 也不需要" +"指定表名。" + +#. Tag: para +#: collection_mapping.xml:605 +#, no-c-format +msgid "" +"Very important note: If the foreign key column of a " +"<one-to-many> association is declared NOT " +"NULL, you must declare the <key> mapping " +"not-null=\"true\" or use a bidirectional " +"association with the collection mapping marked inverse=" +"\"true\". See the discussion of bidirectional associations later " +"in this chapter." +msgstr "" +"重要提示:如果一对多关联中的外键字段定" +"义成NOT NULL,你必须把<key>映射声" +"明为not-null=\"true\",或者使用双向关联,并且标明inverse=\"true\"。参阅本章后面关于双向" +"关联的讨论。" + +#. Tag: para +#: collection_mapping.xml:614 +#, no-c-format +msgid "" +"This example shows a map of Part entities by name (where " +"partName is a persistent property of Part). Notice the use of a formula-based index." +msgstr "" +"下面的例子展示一个Part实体的map,把name作为关键字。" +"( partNamePart的持久化属性)。注意其" +"中的基于公式的索引的用法。" + +#. Tag: programlisting +#: collection_mapping.xml:620 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:626 +#, no-c-format +msgid "Advanced collection mappings" +msgstr "高级集合映射(Advanced collection mappings)" + +#. Tag: title +#: collection_mapping.xml:629 +#, no-c-format +msgid "Sorted collections" +msgstr "有序集合(Sorted collections)" + +#. Tag: para +#: collection_mapping.xml:631 +#, no-c-format +msgid "" +"Hibernate supports collections implementing java.util.SortedMap and java.util.SortedSet. You must specify a " +"comparator in the mapping file:" +msgstr "" +"Hibernate支持实现java.util.SortedMapjava.util." +"SortedSet的集合。 你必须在映射文件中指定一个比较器:" + +#. Tag: programlisting +#: collection_mapping.xml:636 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:638 +#, no-c-format +msgid "" +"Allowed values of the sort attribute are " +"unsorted, natural and the name of a " +"class implementing java.util.Comparator." +msgstr "" +"sort属性中允许的值包括unsorted," +"natural和某个实现了java.util.Comparator" +"的类的名称。" + +#. Tag: para +#: collection_mapping.xml:644 +#, no-c-format +msgid "" +"Sorted collections actually behave like java.util.TreeSet " +"or java.util.TreeMap." +msgstr "" +"分类集合的行为事实上象java.util.TreeSet或者java." +"util.TreeMap。" + +#. Tag: para +#: collection_mapping.xml:649 +#, no-c-format +msgid "" +"If you want the database itself to order the collection elements use the " +"order-by attribute of set, " +"bag or map mappings. This solution is " +"only available under JDK 1.4 or higher (it is implemented using " +"LinkedHashSet or LinkedHashMap). This " +"performs the ordering in the SQL query, not in memory." +msgstr "" +"如果你希望数据库自己对集合元素排序,可以利用set," +"bag或者map映射中的order-by属性。这个解决方案只能在jdk1.4或者更高的jdk版本中才可以实现(通过" +"LinkedHashSet或者 LinkedHashMap实现)。 它是在SQL查询中完成排序,而不是在内存" +"中。" + +#. Tag: programlisting +#: collection_mapping.xml:658 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:660 +#, no-c-format +msgid "" +"Note that the value of the order-by attribute is an SQL " +"ordering, not a HQL ordering!" +msgstr "" +"注意: 这个order-by属性的值是一个SQL排序子句而不是HQL的!" + +#. Tag: para +#: collection_mapping.xml:665 +#, no-c-format +msgid "" +"Associations may even be sorted by some arbitrary criteria at runtime using " +"a collection filter()." +msgstr "" +"关联还可以在运行时使用集合filter()根据任意的条件来排序。" + +#. Tag: programlisting +#: collection_mapping.xml:670 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: collection_mapping.xml:675 +#, no-c-format +msgid "Bidirectional associations" +msgstr "双向关联(Bidirectional associations)" + +#. Tag: para +#: collection_mapping.xml:677 +#, fuzzy, no-c-format +msgid "" +"A bidirectional association allows navigation from both " +"\"ends\" of the association. Two kinds of bidirectional association are " +"supported:" +msgstr "" +"双向关联允许通过关联的任一端访问另外一端。在Hibernate" +"中, 支持两种类型的双向关联: " + +#. Tag: term +#: collection_mapping.xml:684 +#, no-c-format +msgid "one-to-many" +msgstr "一对多(one-to-many)" + +#. Tag: para +#: collection_mapping.xml:686 +#, no-c-format +msgid "set or bag valued at one end, single-valued at the other" +msgstr "Set或者bag值在一端, 单独值(非集合)在另外一端" + +#. Tag: term +#: collection_mapping.xml:692 +#, no-c-format +msgid "many-to-many" +msgstr "多对多(many-to-many)" + +#. Tag: para +#: collection_mapping.xml:694 +#, no-c-format +msgid "set or bag valued at both ends" +msgstr "两端都是set或bag值" + +#. Tag: para +#: collection_mapping.xml:703 +#, no-c-format +msgid "" +"You may specify a bidirectional many-to-many association simply by mapping " +"two many-to-many associations to the same database table and declaring one " +"end as inverse (which one is your choice, but it can " +"not be an indexed collection)." +msgstr "" +"要建立一个双向的多对多关联,只需要映射两个many-to-many关联到同一个数据库表" +"中,并再定义其中的一端为inverse(使用哪一端要根据你的选" +"择,但它不能是一个索引集合)。" + +#. Tag: para +#: collection_mapping.xml:710 +#, no-c-format +msgid "" +"Here's an example of a bidirectional many-to-many association; each category " +"can have many items and each item can be in many categories:" +msgstr "" +"这里有一个many-to-many的双向关联的例子;每一个category都可以有很多items,每一个" +"items可以属于很多categories:" + +#. Tag: programlisting +#: collection_mapping.xml:715 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ...\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:717 +#, no-c-format +msgid "" +"Changes made only to the inverse end of the association are not persisted. This means that Hibernate has two representations in " +"memory for every bidirectional association, one link from A to B and another " +"link from B to A. This is easier to understand if you think about the Java " +"object model and how we create a many-to-many relationship in Java:" +msgstr "" +"如果只对关联的反向端进行了改变,这个改变不会被持久化。 " +"这表示Hibernate为每个双向关联在内存中存在两次表现,一个从A连接到B,另一个从B连" +"接到A。如果你回想一下Java对象模型,我们是如何在Java中创建多对多关系的,这可以" +"让你更容易理解:" + +#. Tag: programlisting +#: collection_mapping.xml:725 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:727 +#, no-c-format +msgid "" +"The non-inverse side is used to save the in-memory representation to the " +"database." +msgstr "非反向端用于把内存中的表示保存到数据库中。" + +#. Tag: para +#: collection_mapping.xml:731 +#, no-c-format +msgid "" +"You may define a bidirectional one-to-many association by mapping a one-to-" +"many association to the same table column(s) as a many-to-one association " +"and declaring the many-valued end inverse=\"true\"." +msgstr "" +"要建立一个一对多的双向关联,你可以通过把一个一对多关联,作为一个多对一关联映" +"射到到同一张表的字段上,并且在\"多\"的那一端定义inverse=\"true\"。" + +#. Tag: programlisting +#: collection_mapping.xml:737 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:739 +#, no-c-format +msgid "" +"Mapping one end of an association with inverse=\"true\" " +"doesn't affect the operation of cascades, these are orthogonal concepts!" +msgstr "" +"在“一”这一端定义inverse=\"true\"不会影响级联操作,二者是正" +"交的概念!" + +#. Tag: title +#: collection_mapping.xml:747 +#, no-c-format +msgid "Bidirectional associations with indexed collections" +msgstr "双向关联,涉及有序集合类" + +#. Tag: para +#: collection_mapping.xml:748 +#, no-c-format +msgid "" +"A bidirectional association where one end is represented as a <" +"list> or <map> requires special " +"consideration. If there is a property of the child class which maps to the " +"index column, no problem, we can continue using inverse=\"true\" on the collection mapping:" +msgstr "" +"对于有一端是<list>或者<map>" +"的双向关联,需要加以特别考虑。假若子类中的一个属性映射到索引字段,没问题,我" +"们仍然可以在集合类映射上使用inverse=\"true\":" + +#. Tag: programlisting +#: collection_mapping.xml:755 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:757 +#, no-c-format +msgid "" +"But, if there is no such property on the child class, we can't think of the " +"association as truly bidirectional (there is information available at one " +"end of the association that is not available at the other end). In this " +"case, we can't map the collection inverse=\"true\". " +"Instead, we could use the following mapping:" +msgstr "" +"但是,假若子类中没有这样的属性存在,我们不能认为这个关联是真正的双向关联(信" +"息不对称,在关联的一端有一些另外一端没有的信息)。在这种情况下,我们不能使用" +"inverse=\"true\"。我们需要这样用:" + +#. Tag: programlisting +#: collection_mapping.xml:764 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:766 +#, no-c-format +msgid "" +"Note that in this mapping, the collection-valued end of the association is " +"responsible for updates to the foreign key. TODO: Does this really result in " +"some unnecessary update statements?" +msgstr "" +"注意在这个映射中,关联中集合类\"值\"一端负责来更新外键.TODO: Does this " +"really result in some unnecessary update statements?" + +#. Tag: title +#: collection_mapping.xml:774 +#, no-c-format +msgid "Ternary associations" +msgstr "三重关联(Ternary associations)" + +#. Tag: para +#: collection_mapping.xml:776 +#, no-c-format +msgid "" +"There are three possible approaches to mapping a ternary association. One is " +"to use a Map with an association as its index:" +msgstr "" +"有三种可能的途径来映射一个三重关联。第一种是使用一个Map," +"把一个关联作为其索引:" + +#. Tag: programlisting +#: collection_mapping.xml:781 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: collection_mapping.xml:783 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:785 +#, no-c-format +msgid "" +"A second approach is to simply remodel the association as an entity class. " +"This is the approach we use most commonly." +msgstr "" +"第二种方法是简单的把关联重新建模为一个实体类。这使我们最经常使用的方法。" + +#. Tag: para +#: collection_mapping.xml:790 +#, no-c-format +msgid "" +"A final alternative is to use composite elements, which we will discuss " +"later." +msgstr "最后一种选择是使用复合元素,我们会在后面讨论" + +#. Tag: literal +#: collection_mapping.xml:797 +#, no-c-format +msgid "Using an <idbag>" +msgstr "使用<idbag>" + +#. Tag: para +#: collection_mapping.xml:799 +#, no-c-format +msgid "" +"If you've fully embraced our view that composite keys are a bad thing and " +"that entities should have synthetic identifiers (surrogate keys), then you " +"might find it a bit odd that the many to many associations and collections " +"of values that we've shown so far all map to tables with composite keys! " +"Now, this point is quite arguable; a pure association table doesn't seem to " +"benefit much from a surrogate key (though a collection of composite values " +"might). Nevertheless, Hibernate provides a feature that " +"allows you to map many to many associations and collections of values to a " +"table with a surrogate key." +msgstr "" +"如果你完全信奉我们对于“联合主键(composite keys)是个坏东西”,和“实体应该使用" +"(无机的)自己生成的代用标识符(surrogate keys)”的观点,也许你会感到有一些奇" +"怪,我们目前为止展示的多对多关联和值集合都是映射成为带有联合主键的表的!现" +"在,这一点非常值得争辩;看上去一个单纯的关联表并不能从代用标识符中获得什么好" +"处(虽然使用组合值的集合可能会获得一点好处)。不过," +"Hibernate提供了一个(一点点试验性质的)功能,让你把多对多关联和值集合应得到一" +"个使用代用标识符的表去。" + +#. Tag: para +#: collection_mapping.xml:810 +#, no-c-format +msgid "" +"The <idbag> element lets you map a List (or Collection) with bag semantics." +msgstr "" +"<idbag> 属性让你使用bag语义来映射一个List (或Collection)。" + +#. Tag: programlisting +#: collection_mapping.xml:815 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:817 +#, no-c-format +msgid "" +"As you can see, an <idbag> has a synthetic id " +"generator, just like an entity class! A different surrogate key is assigned " +"to each collection row. Hibernate does not provide any mechanism to discover " +"the surrogate key value of a particular row, however." +msgstr "" +"你可以理解,<idbag>人工的id生成器,就好像是实体类一" +"样!集合的每一行都有一个不同的人造关键字。但是,Hibernate没有提供任何机制来让" +"你取得某个特定行的人造关键字。" + +#. Tag: para +#: collection_mapping.xml:824 +#, no-c-format +msgid "" +"Note that the update performance of an <idbag> is " +"much better than a regular <bag>! Hibernate can locate individual rows efficiently and update or " +"delete them individually, just like a list, map or set." +msgstr "" +"注意<idbag>的更新性能要比普通的<bag>" +"高得多!Hibernate可以有效的定位到不同的行,分别进行更新或删除工作," +"就如同处理一个list, map或者set一样。" + +#. Tag: para +#: collection_mapping.xml:831 +#, no-c-format +msgid "" +"In the current implementation, the native identifier " +"generation strategy is not supported for <idbag> " +"collection identifiers." +msgstr "" +"在目前的实现中,还不支持使用identity标识符生成器策略来生成" +"<idbag>集合的标识符。" + +#. Tag: title +#: collection_mapping.xml:855 +#, no-c-format +msgid "Collection examples" +msgstr "集合例子(Collection example)" + +#. Tag: para +#: collection_mapping.xml:857 +#, no-c-format +msgid "" +"The previous sections are pretty confusing. So lets look at an example. This " +"class:" +msgstr "在前面的几个章节的确非常令人迷惑。 因此让我们来看一个例子。这个类:" + +#. Tag: programlisting +#: collection_mapping.xml:862 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:864 +#, no-c-format +msgid "" +"has a collection of Child instances. If each child has at " +"most one parent, the most natural mapping is a one-to-many association:" +msgstr "" +"这个类有一个Child的实例集合。如果每一个子实例至多有一个父" +"实例, 那么最自然的映射是一个one-to-many的关联关系:" + +#. Tag: programlisting +#: collection_mapping.xml:870 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:872 +#, no-c-format +msgid "This maps to the following table definitions:" +msgstr "在以下的表定义中反应了这个映射关系:" + +#. Tag: programlisting +#: collection_mapping.xml:876 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:878 +#, no-c-format +msgid "" +"If the parent is required, use a bidirectional one-to-" +"many association:" +msgstr "" +"如果父亲是必须的, 那么就可以使用双向one-to-many的关联" +"了:" + +#. Tag: programlisting +#: collection_mapping.xml:883 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:885 +#, no-c-format +msgid "Notice the NOT NULL constraint:" +msgstr "请注意NOT NULL的约束:" + +#. Tag: programlisting +#: collection_mapping.xml:889 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:891 +#, no-c-format +msgid "" +"Alternatively, if you absolutely insist that this association should be " +"unidirectional, you can declare the NOT NULL constraint " +"on the <key> mapping:" +msgstr "" +"另外,如果你绝对坚持这个关联应该是单向的,你可以对<key>映射声明NOT NULL约束:" + +#. Tag: programlisting +#: collection_mapping.xml:897 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:899 +#, no-c-format +msgid "" +"On the other hand, if a child might have multiple parents, a many-to-many " +"association is appropriate:" +msgstr "" +"另外一方面,如果一个子实例可能有多个父实例, 那么就应该使用many-to-many关联:" + +#. Tag: programlisting +#: collection_mapping.xml:904 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:906 +#, no-c-format +msgid "Table definitions:" +msgstr "表定义:" + +#. Tag: programlisting +#: collection_mapping.xml:910 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: collection_mapping.xml:912 +#, no-c-format +msgid "" +"For more examples and a complete walk-through a parent/child relationship " +"mapping, see ." +msgstr "" +"更多的例子,以及一个完整的父/子关系映射的排练,请参阅." + +#. Tag: para +#: collection_mapping.xml:917 +#, no-c-format +msgid "" +"Even more exotic association mappings are possible, we will catalog all " +"possibilities in the next chapter." +msgstr "甚至可能出现更加复杂的关联映射,我们会在下一章中列出所有可能性。" + +#~ msgid "" +#~ "column_name (required): The name of the column holding " +#~ "the collection index values." +#~ msgstr "column(可选):保存集合索引值的字段名。" + +#~ msgid "" +#~ "base (optional, defaults to 0): The " +#~ "value of the index column that corresponds to the first element of the " +#~ "list or array." +#~ msgstr "formula (可选): 用于计算map关键字的SQL公式" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection index values." +#~ msgstr "type (必须):映射键(map key)的类型。" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "key of the map." +#~ msgstr "column(可选):集合索引值中外键字段的名称" + +#~ msgid "type (reguired): The type of the map keys." +#~ msgstr "formula (可选): 用于计算map关键字的外键的SQL公式" + +#~ msgid "" +#~ "column (optional): The name of the foreign key column " +#~ "for the collection index values." +#~ msgstr "class (必需):映射的键(map key)使用的实体类。" + +#~ msgid "" +#~ "formula (optional): A SQL formula used to evaluate the " +#~ "foreign key of the map key." +#~ msgstr "" +#~ "假若你的表没有一个索引字段,当你仍然希望使用List作为属性" +#~ "类型,你应该把此属性映射为Hibernate <bag>。从数" +#~ "据库中获取的时候,bag不维护其顺序,但也可选择性的进行排序。" + +#~ msgid "" +#~ "class (required): The entity class used as the map key." +#~ msgstr "" +#~ "从集合类可以产生很大一部分映射,覆盖了很多常见的关系模型。我们建议你试验" +#~ "schema生成工具,来体会一下不同的映射声明是如何被翻译为数据库表的。" + +#~ msgid "" +#~ "column (optional): The name of the column holding the " +#~ "collection element values." +#~ msgstr "type (必需):集合元素的类型" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element." +#~ msgstr "" +#~ "多对多关联(many-to-many association) 使用 " +#~ "<many-to-many>元素定义." + +#~ msgid "" +#~ "type (required): The type of the collection element." +#~ msgstr "column(可选): 这个元素的外键关键字段名" + +#~ msgid "" +#~ "A many-to-many association is specified using the " +#~ "<many-to-many> element." +#~ msgstr "formula (可选): 用于计算元素外键值的SQL公式." + +#~ msgid "" +#~ "column (optional): The name of the element foreign key " +#~ "column." +#~ msgstr "class (必需): 关联类的名称" + +#~ msgid "" +#~ "formula (optional): An SQL formula used to evaluate " +#~ "the element foreign key value." +#~ msgstr "" +#~ "outer-join (可选 - 默认为auto): 在" +#~ "Hibernate系统参数中hibernate.use_outer_join被打开的情况" +#~ "下,该参数用来允许使用outer join来载入此集合的数据。" + +#~ msgid "" +#~ "fetch (optional - defaults to join): enables outer-join or sequential select fetching for this " +#~ "association. This is a special case; for full eager fetching (in a single " +#~ "SELECT) of an entity and its many-to-many " +#~ "relationships to other entities, you would enable join " +#~ "fetching not only of the collection itself, but also with this attribute " +#~ "on the <many-to-many> nested element." +#~ msgstr "" +#~ "对外键字段允许DDL生成的时候生成一个惟一约束。这使关联变成了一个高效的一对" +#~ "多关联。(此句存疑:原文为This makes the association multiplicity " +#~ "effectively one to many.)" + +#~ msgid "" +#~ "unique (optional): Enable the DDL generation of a " +#~ "unique constraint for the foreign-key column. This makes the association " +#~ "multiplicity effectively one to many." +#~ msgstr "" +#~ "not-found (可选 - 默认为 exception): 指明引用的外键中缺少某些行该如何处理: ignore 会把缺失的行作为一个空引用处理。" + +#~ msgid "" +#~ "not-found (optional - defaults to exception): Specifies how foreign keys that reference missing rows will be " +#~ "handled: ignore will treat a missing row as a null " +#~ "association." +#~ msgstr "" +#~ "entity-name (可选): 被关联的类的实体名,作为" +#~ "class的替代。" + +#~ msgid "" +#~ "property-ref: (optional) The name of a property of the " +#~ "associated class that is joined to this foreign key. If not specified, " +#~ "the primary key of the associated class is used." +#~ msgstr "例子:首先, 一组字符串:" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/component_mapping.po b/documentation/envers/src/main/docbook/zh-CN/content/component_mapping.po new file mode 100644 index 0000000000..8ea7025844 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/component_mapping.po @@ -0,0 +1,653 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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-format +msgid "Component Mapping" +msgstr "组件(Component)映射" + +#. Tag: para +#: component_mapping.xml:7 +#, no-c-format +msgid "" +"The notion of a component is re-used in several " +"different contexts, for different purposes, throughout Hibernate." +msgstr "" +"组件(Component)这个概念在Hibernate中几处不同的地方为了不" +"同的目的被重复使用." + +#. Tag: title +#: component_mapping.xml:13 +#, no-c-format +msgid "Dependent objects" +msgstr "依赖对象(Dependent objects)" + +#. Tag: para +#: component_mapping.xml:15 +#, no-c-format +msgid "" +"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 "" +"组件(Component)是一个被包含的对象,在持久化的过程中,它被当作值类型,而并非一" +"个实体的引用。在这篇文档中,组件这一术语指的是面向对象的合成概念(而并不是系" +"统构架层次上的组件的概念)。举个例子, 你对人(Person)这个概念可以像下面这样来" +"建模:" + +#. Tag: programlisting +#: component_mapping.xml:21 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: component_mapping.xml:23 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: component_mapping.xml:25 +#, no-c-format +msgid "" +"Now Name may be persisted as a component of " +"Person. Notice that Name defines " +"getter and setter methods for its persistent properties, but doesn't need to " +"declare any interfaces or identifier properties." +msgstr "" +"在持久化的过程中,姓名(Name)可以作为人(Person)的一个组件。需要注意的是:你应该为姓名的持久化属性" +"定义getter和setter方法,但是你不需要实现任何的接口或申明标识符字段。" + +#. Tag: para +#: component_mapping.xml:32 +#, no-c-format +msgid "Our Hibernate mapping would look like:" +msgstr "以下是这个例子的Hibernate映射文件:" + +#. Tag: programlisting +#: component_mapping.xml:36 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:38 +#, no-c-format +msgid "" +"The person table would have the columns pid, " +"birthday, initial, first and last." +msgstr "" +"人员(Person)表中将包括pid, birthday, " +"initial, firstlast等字段。" + +#. Tag: para +#: component_mapping.xml:46 +#, no-c-format +msgid "" +"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 ad hoc. 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 "" +"就像所有的值类型一样, 组件不支持共享引用。 换句话说,两个人可能重名,但是两个" +"Person对象应该包含两个独立的Name对象,只不过这两个Name对象具有“同样”的值。 组" +"件的值可以为空,其定义如下。 每当Hibernate重新加载一个包含组件的对象,如果该组" +"件的所有字段为空,Hibernate将假定整个组件为空。 在大多数情况下,这样假定应该是" +"没有问题的。" + +#. Tag: para +#: component_mapping.xml:55 +#, no-c-format +msgid "" +"The properties of a component may be of any Hibernate type (collections, " +"many-to-one associations, other components, etc). Nested components should " +"not be considered an exotic usage. Hibernate is " +"intended to support a very fine-grained object model." +msgstr "" +"组件的属性可以是任意一种Hibernate类型(包括集合, 多对多关联, 以及其它组件等" +"等)。嵌套组件不应该被当作一种特殊的应用(Nested components should not be " +"considered an exotic usage)。 Hibernate倾向于支持细致的(fine-grained)对象模" +"型。" + +#. Tag: para +#: component_mapping.xml:62 +#, no-c-format +msgid "" +"The <component> element allows a <" +"parent> subelement that maps a property of the component class " +"as a reference back to the containing entity." +msgstr "" +"<component> 元素还允许有 <parent>子元素,用来表明component类中的一个属性是指向包含它的实体的引用。" + +#. Tag: programlisting +#: component_mapping.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:84 +#, no-c-format +msgid "" +"Note: if you define a Set of composite elements, it is " +"very important to implement equals() and hashCode" +"() correctly." +msgstr "" +"注意,如果你定义的Set包含组合元素(composite-element),正确地实现" +"equals()hashCode()是非常重要的。" + +#. Tag: para +#: component_mapping.xml:90 +#, no-c-format +msgid "" +"Composite elements may contain components but not collections. If your " +"composite element itself contains components, use the <nested-" +"composite-element> 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 "" +"组合元素可以包含组件,但是不能包含集合。如果你的组合元素自身包含组件, 你必须" +"使用<nested-composite-element>标签。这是一个相当特殊" +"的案例 - 在一个组件的集合里,那些组件本身又可以包含其他的组件。这个时候你就应" +"该考虑一下使用one-to-many关联是否会更恰当。 尝试对这个组合元素重新建模为一个" +"实体-但是需要注意的是,虽然Java模型和重新建模前是一样的,关系模型和持久性语" +"义会有细微的变化。" + +#. Tag: para +#: component_mapping.xml:102 +#, no-c-format +msgid "" +"Please note that a composite element mapping doesn't support null-able " +"properties if you're using a <set>. 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 <list>, <map>, <bag> or " +"<idbag>." +msgstr "" +"请注意如果你使用<set>标签,一个组合元素的映射不支持可" +"能为空的属性. 当删除对象时, Hibernate必须使用每一个字段的值来确定一条记录(在" +"组合元素表中,没有单独的关键字段), 如果有为null的字段,这样做就不可能了。你" +"必须作出一个选择,要么在组合元素中使用不能为空的属性,要么选择使用" +"<list>,<map>,<" +"bag> 或者 <idbag>而不是 <" +"set>。" + +#. Tag: para +#: component_mapping.xml:113 +#, no-c-format +msgid "" +"A special case of a composite element is a composite element with a nested " +"<many-to-one> 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 " +"Order to Item where " +"purchaseDate, price and " +"quantity are properties of the association:" +msgstr "" +"组合元素有个特别的用法是它可以包含一个<many-to-one>" +"元素。类似这样的映射允许你将一个many-to-many关联表映射为组合元素的集合。(A " +"mapping like this allows you to map extra columns of a many-to-many " +"association table to the composite element class.) 接下来的的例子是从" +"OrderItem的一个多对多的关联关系, 关联" +"属性是 purchaseDate, price 和 " +"quantity 。" + +#. Tag: programlisting +#: component_mapping.xml:123 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:125 +#, no-c-format +msgid "" +"Of course, there can't be a reference to the purchae on the other side, for " +"bidirectional association navigation. Remember that components are value " +"types and don't allow shared references. A single Purchase can be in the set of an Order, but it can't be " +"referenced by the Item at the same time." +msgstr "" +"当然,当你定义Item时,你无法引用这些purchase,因此你无法实现双向关联查询。记" +"住组件是值类型,并且不允许共享引用。某一个特定的Purchase " +"可以放在Order的集合中,但它不能同时被Item所引用。" + +#. Tag: para +#: component_mapping.xml:133 +#, no-c-format +msgid "Even ternary (or quaternary, etc) associations are possible:" +msgstr "其实组合元素的这个用法可以扩展到三重或多重关联:" + +#. Tag: programlisting +#: component_mapping.xml:135 +#, no-c-format +msgid "" +"\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:137 +#, no-c-format +msgid "" +"Composite elements may appear in queries using the same syntax as " +"associations to other entities." +msgstr "在查询中,表达组合元素的语法和关联到其他实体的语法是一样的。" + +#. Tag: title +#: component_mapping.xml:145 +#, no-c-format +msgid "Components as Map indices" +msgstr "组件作为Map的索引(Components as Map indices )" + +#. Tag: para +#: component_mapping.xml:147 +#, no-c-format +msgid "" +"The <composite-map-key> element lets you map a " +"component class as the key of a Map. Make sure you " +"override hashCode() and equals() " +"correctly on the component class." +msgstr "" +"<composite-map-key>元素允许你映射一个组件类作为一个" +"Map的key,前提是你必须正确的在这个类中重写了" +"hashCode()equals()方法。" + +#. Tag: title +#: component_mapping.xml:156 +#, no-c-format +msgid "Components as composite identifiers" +msgstr "组件作为联合标识符(Components as composite identifiers)" + +#. Tag: para +#: component_mapping.xml:158 +#, no-c-format +msgid "" +"You may use a component as an identifier of an entity class. Your component " +"class must satisfy certain requirements:" +msgstr "" +"你可以使用一个组件作为一个实体类的标识符。 你的组件类必须满足以下要求:" + +#. Tag: para +#: component_mapping.xml:165 +#, no-c-format +msgid "It must implement java.io.Serializable." +msgstr "它必须实现java.io.Serializable接口" + +#. Tag: para +#: component_mapping.xml:170 +#, no-c-format +msgid "" +"It must re-implement equals() and hashCode(), consistently with the database's notion of composite key equality." +msgstr "" +"它必须重新实现equals()hashCode()方" +"法, 始终和组合关键字在数据库中的概念保持一致" + +#. Tag: emphasis +#: component_mapping.xml:179 +#, no-c-format +msgid "" +"Note: in Hibernate3, the second requirement is not an absolutely hard " +"requirement of Hibernate. But do it anyway." +msgstr "" +"注意:在Hibernate3中,第二个要求并非是Hibernate强制必须的。但最好这样做。" + +#. Tag: para +#: component_mapping.xml:183 +#, no-c-format +msgid "" +"You can't use an IdentifierGenerator to generate " +"composite keys. Instead the application must assign its own identifiers." +msgstr "" +"你不能使用一个IdentifierGenerator产生组合关键字。一个应用" +"程序必须分配它自己的标识符。" + +#. Tag: para +#: component_mapping.xml:188 +#, no-c-format +msgid "" +"Use the <composite-id> tag (with nested " +"<key-property> elements) in place of the usual " +"<id> declaration. For example, the " +"OrderLine class has a primary key that depends upon the " +"(composite) primary key of Order." +msgstr "" +"使用<composite-id> 标签(并且内嵌<key-" +"property>元素)代替通常的<id>标签。比如," +"OrderLine类具有一个主键,这个主键依赖于Order的(联合)主键。" + +#. Tag: programlisting +#: component_mapping.xml:196 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:198 +#, no-c-format +msgid "" +"Now, any foreign keys referencing the OrderLine table are " +"also composite. You must declare this in your mappings for other classes. An " +"association to OrderLine would be mapped like this:" +msgstr "" +"现在,任何指向OrderLine的外键都是复合的。在你的映射文件" +"中,必须为其他类也这样声明。例如,一个指向OrderLine的关联" +"可能被这样映射:" + +#. Tag: programlisting +#: component_mapping.xml:204 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:206 +#, no-c-format +msgid "" +"(Note that the <column> tag is an alternative to " +"the column attribute everywhere.)" +msgstr "" +"(注意在各个地方<column>标签都是column属性的替代写法。)" + +#. Tag: para +#: component_mapping.xml:211 +#, no-c-format +msgid "" +"A many-to-many association to OrderLine also uses the composite foreign key:" +msgstr "" +"指向OrderLine多对多关联也使用联合外" +"键:" + +#. Tag: programlisting +#: component_mapping.xml:216 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:218 +#, no-c-format +msgid "" +"The collection of OrderLines in Order " +"would use:" +msgstr "" +"在Order中,OrderLine的集合则是这样:" + +#. Tag: programlisting +#: component_mapping.xml:223 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:225 +#, no-c-format +msgid "" +"(The <one-to-many> element, as usual, declares no " +"columns.)" +msgstr "(与通常一样,<one-to-many>元素不声明任何列.)" + +#. Tag: para +#: component_mapping.xml:229 +#, no-c-format +msgid "" +"If OrderLine itself owns a collection, it also has a " +"composite foreign key." +msgstr "假若OrderLine本身拥有一个集合,它也具有组合外键。" + +#. Tag: programlisting +#: component_mapping.xml:234 +#, no-c-format +msgid "" +"\n" +" ....\n" +" ....\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: component_mapping.xml:239 +#, no-c-format +msgid "Dynamic components" +msgstr "动态组件 (Dynamic components)" + +#. Tag: para +#: component_mapping.xml:241 +#, no-c-format +msgid "You may even map a property of type Map:" +msgstr "你甚至可以映射Map类型的属性:" + +#. Tag: programlisting +#: component_mapping.xml:245 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: component_mapping.xml:247 +#, no-c-format +msgid "" +"The semantics of a <dynamic-component> mapping are " +"identical to <component>. The advantage of this " +"kind of mapping is the ability to determine the actual properties of the " +"bean at deployment time, just by editing the mapping document. Runtime " +"manipulation of the mapping document is also possible, using a DOM parser. " +"Even better, you can access (and change) Hibernate's configuration-time " +"metamodel via the Configuration object." +msgstr "" +"从<dynamic-component>映射的语义上来讲,它和" +"<component>是相同的。 这种映射类型的优点在于通过修改" +"映射文件,就可以具有在部署时检测真实属性的能力。利用一个DOM解析器,也可以在程" +"序运行时操作映射文件。 更好的是,你可以通过Configuration对" +"象来访问(或者修改)Hibernate的运行时元模型。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/configuration.po b/documentation/envers/src/main/docbook/zh-CN/content/configuration.po new file mode 100644 index 0000000000..158793266a --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/configuration.po @@ -0,0 +1,3731 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: configuration.xml:5 +#, no-c-format +msgid "Configuration" +msgstr "配置" + +#. Tag: para +#: configuration.xml:7 +#, no-c-format +msgid "" +"Because Hibernate is designed to operate in many different environments, " +"there are a large number of configuration parameters. Fortunately, most have " +"sensible default values and Hibernate is distributed with an example " +"hibernate.properties file in etc/ that " +"shows the various options. Just put the example file in your classpath and " +"customize it." +msgstr "" +"由于Hibernate是为了能在各种不同环境下工作而设计的, 因此存在着大量的配置参数. " +"幸运的是多数配置参数都 有比较直观的默认值, 并有随Hibernate一同分发的配置样例" +"hibernate.properties (位于etc/)来展示各" +"种配置选项. 所需做的仅仅是将这个样例文件复制到类路径 (classpath)下并做一些自" +"定义的修改." + +#. Tag: title +#: configuration.xml:16 +#, no-c-format +msgid "Programmatic configuration" +msgstr "可编程的配置方式" + +#. Tag: para +#: configuration.xml:18 +#, no-c-format +msgid "" +"An instance of org.hibernate.cfg.Configuration represents " +"an entire set of mappings of an application's Java types to an SQL database. " +"The Configuration is used to build an (immutable) " +"SessionFactory. The mappings are compiled from various " +"XML mapping files." +msgstr "" +"一个org.hibernate.cfg.Configuration实例代表了一个应用程序" +"中Java类型 到SQL数据库映射的完整集合. Configuration被用来" +"构建一个(不可变的 (immutable))SessionFactory. 映射定义则由" +"不同的XML映射定义文件编译而来." + +#. Tag: para +#: configuration.xml:26 +#, no-c-format +msgid "" +"You may obtain a Configuration instance by instantiating " +"it directly and specifying XML mapping documents. If the mapping files are " +"in the classpath, use addResource():" +msgstr "" +"你可以直接实例化Configuration来获取一个实例,并为它指定XML" +"映射定义 文件. 如果映射定 义文件在类路径(classpath)中, 请使用" +"addResource():" + +#. Tag: programlisting +#: configuration.xml:32 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:34 +#, no-c-format +msgid "" +"An alternative (sometimes better) way is to specify the mapped class, and " +"let Hibernate find the mapping document for you:" +msgstr "" +"一个替代方法(有时是更好的选择)是,指定被映射的类,让Hibernate帮你寻找映射定" +"义文件:" + +#. Tag: programlisting +#: configuration.xml:39 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:41 +#, no-c-format +msgid "" +"Then Hibernate will look for mapping files named /org/hibernate/" +"auction/Item.hbm.xml and /org/hibernate/auction/Bid.hbm." +"xml in the classpath. This approach eliminates any hardcoded " +"filenames." +msgstr "" +"Hibernate将会在类路径(classpath)中寻找名字为 /org/hibernate/auction/" +"Item.hbm.xml/org/hibernate/auction/Bid.hbm.xml映射定义文件. 这种方式消除了任何对文件名的硬编码(hardcoded)." + +#. Tag: para +#: configuration.xml:48 +#, no-c-format +msgid "" +"A Configuration also allows you to specify configuration " +"properties:" +msgstr "Configuration也允许你指定配置属性:" + +#. Tag: programlisting +#: configuration.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:55 +#, no-c-format +msgid "" +"This is not the only way to pass configuration properties to Hibernate. The " +"various options include:" +msgstr "当然这不是唯一的传递Hibernate配置属性的方式, 其他可选方式还包括:" + +#. Tag: para +#: configuration.xml:62 +#, no-c-format +msgid "" +"Pass an instance of java.util.Properties to " +"Configuration.setProperties()." +msgstr "" +"传一个java.util.Properties实例给 Configuration." +"setProperties()." + +#. Tag: para +#: configuration.xml:68 +#, no-c-format +msgid "" +"Place hibernate.properties in a root directory of the " +"classpath." +msgstr "" +"将hibernate.properties放置在类路径(classpath)的根目录下 " +"(root directory)." + +#. Tag: para +#: configuration.xml:74 +#, no-c-format +msgid "" +"Set System properties using java -" +"Dproperty=value." +msgstr "" +"通过java -Dproperty=value来设置系统 (System)属性." + +#. Tag: para +#: configuration.xml:80 +#, no-c-format +msgid "" +"Include <property> elements in hibernate." +"cfg.xml (discussed later)." +msgstr "" +"在hibernate.cfg.xml中加入元素 <property> (稍后讨论)." + +#. Tag: para +#: configuration.xml:87 +#, no-c-format +msgid "" +"hibernate.properties is the easiest approach if you want " +"to get started quickly." +msgstr "" +"如果想尽快体验Hibernate, hibernate.properties是最简单的方" +"式." + +#. Tag: para +#: configuration.xml:92 +#, no-c-format +msgid "" +"The Configuration is intended as a startup-time object, " +"to be discarded once a SessionFactory is created." +msgstr "" +"Configuration实例被设计成启动期间(startup-time)对象, 一" +"旦SessionFactory创建完成它就被丢弃了." + +#. Tag: title +#: configuration.xml:100 +#, no-c-format +msgid "Obtaining a SessionFactory" +msgstr "获得SessionFactory" + +#. Tag: para +#: configuration.xml:102 +#, no-c-format +msgid "" +"When all mappings have been parsed by the Configuration, " +"the application must obtain a factory for Session " +"instances. This factory is intended to be shared by all application threads:" +msgstr "" +"当所有映射定义被Configuration解析后, 应用程序必须获得一个" +"用于构造Session实例的工厂. 这个工厂将被应用程序的所有线程" +"共享:" + +#. Tag: programlisting +#: configuration.xml:108 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: configuration.xml:110 +#, no-c-format +msgid "" +"Hibernate does allow your application to instantiate more than one " +"SessionFactory. This is useful if you are using more than " +"one database." +msgstr "" +"Hibernate允许你的应用程序创建多个SessionFactory实例. 这对 " +"使用多个数据库的应用来说很有用." + +#. Tag: title +#: configuration.xml:119 +#, no-c-format +msgid "JDBC connections" +msgstr "JDBC连接" + +#. Tag: para +#: configuration.xml:121 +#, no-c-format +msgid "" +"Usually, you want to have the SessionFactory create and " +"pool JDBC connections for you. If you take this approach, opening a " +"Session is as simple as:" +msgstr "" +"通常你希望SessionFactory来为你创建和缓存(pool)JDBC连接. 如" +"果你采用这种方式, 只需要如下例所示那样,打开一个Session:" + +#. Tag: programlisting +#: configuration.xml:127 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:129 +#, no-c-format +msgid "" +"As soon as you do something that requires access to the database, a JDBC " +"connection will be obtained from the pool." +msgstr "" +"一旦你需要进行数据访问时, 就会从连接池(connection pool)获得一个JDBC连接." + +#. Tag: para +#: configuration.xml:134 +#, no-c-format +msgid "" +"For this to work, we need to pass some JDBC connection properties to " +"Hibernate. All Hibernate property names and semantics are defined on the " +"class org.hibernate.cfg.Environment. We will now describe " +"the most important settings for JDBC connection configuration." +msgstr "" +"为了使这种方式工作起来, 我们需要向Hibernate传递一些JDBC连接的属性. 所有" +"Hibernate属性的名字和语义都在org.hibernate.cfg.Environment" +"中定义. 我们现在将描述JDBC连接配置中最重要的设置." + +#. Tag: para +#: configuration.xml:141 +#, no-c-format +msgid "" +"Hibernate will obtain (and pool) connections using java.sql." +"DriverManager if you set the following properties:" +msgstr "" +"如果你设置如下属性,Hibernate将使用java.sql.DriverManager" +"来获得(和缓存)JDBC连接 :" + +#. Tag: title +#: configuration.xml:147 +#, no-c-format +msgid "Hibernate JDBC Properties" +msgstr "Hibernate JDBC属性" + +#. Tag: entry +#: configuration.xml:153 configuration.xml:241 configuration.xml:338 +#: configuration.xml:529 configuration.xml:725 configuration.xml:832 +#: configuration.xml:920 +#, no-c-format +msgid "Property name" +msgstr "属性名" + +#. Tag: entry +#: configuration.xml:154 configuration.xml:242 configuration.xml:339 +#: configuration.xml:530 configuration.xml:726 configuration.xml:833 +#: configuration.xml:921 +#, no-c-format +msgid "Purpose" +msgstr "用途" + +#. Tag: literal +#: configuration.xml:160 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: emphasis +#: configuration.xml:163 +#, no-c-format +msgid "JDBC driver class" +msgstr "jdbc驱动类" + +#. Tag: literal +#: configuration.xml:168 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: emphasis +#: configuration.xml:171 +#, no-c-format +msgid "JDBC URL" +msgstr "jdbc URL" + +#. Tag: literal +#: configuration.xml:176 configuration.xml:272 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: emphasis +#: configuration.xml:179 +#, no-c-format +msgid "database user" +msgstr "数据库用户" + +#. Tag: literal +#: configuration.xml:184 configuration.xml:280 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: emphasis +#: configuration.xml:187 +#, no-c-format +msgid "database user password" +msgstr "数据库用户密码" + +#. Tag: literal +#: configuration.xml:192 +#, no-c-format +msgid "hibernate.connection.pool_size" +msgstr "hibernate.connection.pool_size" + +#. Tag: emphasis +#: configuration.xml:195 +#, no-c-format +msgid "maximum number of pooled connections" +msgstr "连接池容量上限数目" + +#. Tag: para +#: configuration.xml:202 +#, no-c-format +msgid "" +"Hibernate's own connection pooling algorithm is however quite rudimentary. " +"It is intended to help you get started and is not intended for use " +"in a production system or even for performance testing. You " +"should use a third party pool for best performance and stability. Just " +"replace the hibernate.connection.pool_size property with " +"connection pool specific settings. This will turn off Hibernate's internal " +"pool. For example, you might like to use C3P0." +msgstr "" +"但Hibernate自带的连接池算法相当不成熟. 它只是为了让你快些上手,并不" +"适合用于产品系统或性能测试中。 出于最佳性能和稳定性考虑你应该使用" +"第三方的连接池。只需要用特定连接池的设置替换 hibernate.connection." +"pool_size即可。这将关闭Hibernate自带的连接池. 例如, 你可能会想用" +"C3P0." + +#. Tag: para +#: configuration.xml:212 +#, no-c-format +msgid "" +"C3P0 is an open source JDBC connection pool distributed along with Hibernate " +"in the lib directory. Hibernate will use its " +"C3P0ConnectionProvider for connection pooling if you set " +"hibernate.c3p0.* properties. If you'd like to use Proxool " +"refer to the packaged hibernate.properties and the " +"Hibernate web site for more information." +msgstr "" +"C3P0是一个随Hibernate一同分发的开源的JDBC连接池, 它位于lib" +"目录下。 如果你设置了hibernate.c3p0.*相关的属性, Hibernate" +"将使用 C3P0ConnectionProvider来缓存JDBC连接. 如果你更原意" +"使用Proxool, 请参考发 行包中的hibernate.properties并到" +"Hibernate网站获取更多的信息." + +#. Tag: para +#: configuration.xml:221 +#, no-c-format +msgid "" +"Here is an example hibernate.properties file for C3P0:" +msgstr "这是一个使用C3P0的hibernate.properties样例文件:" + +#. Tag: programlisting +#: configuration.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:227 +#, no-c-format +msgid "" +"For use inside an application server, you should almost always configure " +"Hibernate to obtain connections from an application server " +"Datasource registered in JNDI. You'll need to set at " +"least one of the following properties:" +msgstr "" +"为了能在应用程序服务器(application server)中使用Hibernate, 应当总是将" +"Hibernate 配置成从注册在JNDI中的Datasource处获得连接,你至" +"少需要设置下列属性中的一个:" + +#. Tag: title +#: configuration.xml:235 +#, no-c-format +msgid "Hibernate Datasource Properties" +msgstr "Hibernate数据源属性" + +#. Tag: literal +#: configuration.xml:248 +#, no-c-format +msgid "hibernate.connection.datasource" +msgstr "hibernate.connection.datasource" + +#. Tag: emphasis +#: configuration.xml:251 +#, no-c-format +msgid "datasource JNDI name" +msgstr "数据源JNDI名字" + +#. Tag: literal +#: configuration.xml:256 +#, no-c-format +msgid "hibernate.jndi.url" +msgstr "hibernate.jndi.url" + +#. Tag: entry +#: configuration.xml:258 +#, fuzzy, no-c-format +msgid "URL of the JNDI provider (optional)" +msgstr "JNDI提供者的URL" + +#. Tag: literal +#: configuration.xml:264 +#, no-c-format +msgid "hibernate.jndi.class" +msgstr "hibernate.jndi.class" + +#. Tag: entry +#: configuration.xml:266 +#, no-c-format +msgid "" +"class of the JNDI InitialContextFactory (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:274 +#, no-c-format +msgid "database user (optional)" +msgstr "" + +#. Tag: entry +#: configuration.xml:282 +#, no-c-format +msgid "database user password (optional)" +msgstr "" + +#. Tag: para +#: configuration.xml:290 +#, no-c-format +msgid "" +"Here's an example hibernate.properties file for an " +"application server provided JNDI datasource:" +msgstr "" +"这是一个使用应用程序服务器提供的JNDI数据源的hibernate.properties样例文件:" + +#. Tag: programlisting +#: configuration.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:297 +#, no-c-format +msgid "" +"JDBC connections obtained from a JNDI datasource will automatically " +"participate in the container-managed transactions of the application server." +msgstr "" +"从JNDI数据源获得的JDBC连接将自动参与到应用程序服务器中容器管理的事务" +"(container-managed transactions)中去." + +#. Tag: para +#: configuration.xml:302 +#, no-c-format +msgid "" +"Arbitrary connection properties may be given by prepending " +"\"hibernate.connection\" to the property name. For " +"example, you may specify a charSet using " +"hibernate.connection.charSet." +msgstr "" +"任何连接(connection)属性的属性名都要以\"hibernate.connnection\"开头. 例如, 你可能会使用hibernate.connection.charSet来指定字符集charSet." + +#. Tag: para +#: configuration.xml:308 +#, no-c-format +msgid "" +"You may define your own plugin strategy for obtaining JDBC connections by " +"implementing the interface org.hibernate.connection." +"ConnectionProvider. You may select a custom implementation by " +"setting hibernate.connection.provider_class." +msgstr "" +"通过实现org.hibernate.connection.ConnectionProvider接口," +"你可以定义属于 你自己的获得JDBC连接的插件策略。通过设置hibernate." +"connection.provider_class, 你可以选择一个自定义的实现." + +#. Tag: title +#: configuration.xml:317 +#, no-c-format +msgid "Optional configuration properties" +msgstr "可选的配置属性" + +#. Tag: para +#: configuration.xml:319 +#, no-c-format +msgid "" +"There are a number of other properties that control the behaviour of " +"Hibernate at runtime. All are optional and have reasonable default values." +msgstr "" +"有大量属性能用来控制Hibernate在运行期的行为. 它们都是可选的, 并拥有适当的默认" +"值." + +#. Tag: para +#: configuration.xml:324 +#, no-c-format +msgid "" +"Warning: some of these properties are \"system-level\" only. System-level properties can be set only via java -" +"Dproperty=value or hibernate.properties. They " +"may not be set by the other techniques described above." +msgstr "" +"警告: 其中一些属性是\"系统级(system-level)的\". 系统级属" +"性只能通过java -Dproperty=valuehibernate." +"properties来设置, 而不能用上面描述的其他方法来" +"设置." + +#. Tag: title +#: configuration.xml:332 +#, no-c-format +msgid "Hibernate Configuration Properties" +msgstr "Hibernate配置属性" + +#. Tag: literal +#: configuration.xml:345 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: configuration.xml:347 +#, fuzzy, no-c-format +msgid "" +"The classname of a Hibernate Dialect which allows " +"Hibernate to generate SQL optimized for a particular relational database." +msgstr "" +"一个Hibernate 类名允许Hibernate针对特定的关系数据库生成优化的" +"SQL. " + +#. Tag: para +#: configuration.xml:351 +#, fuzzy, no-c-format +msgid "" +"eg. full.classname.of.Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:359 +#, no-c-format +msgid "hibernate.show_sql" +msgstr "hibernate.show_sql" + +#. Tag: entry +#: configuration.xml:361 +#, fuzzy, no-c-format +msgid "" +"Write all SQL statements to console. This is an alternative to setting the " +"log category org.hibernate.SQL to debug." +msgstr "" +"输出所有SQL语句到控制台. 有一个另外的选择是把这个log category" +"设为" + +#. Tag: para +#: configuration.xml:365 configuration.xml:377 configuration.xml:471 +#: configuration.xml:484 configuration.xml:497 configuration.xml:510 +#: configuration.xml:564 configuration.xml:591 configuration.xml:605 +#: configuration.xml:660 configuration.xml:888 configuration.xml:903 +#: configuration.xml:993 +#, fuzzy, no-c-format +msgid "" +"eg. true | " +"false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:373 +#, no-c-format +msgid "hibernate.format_sql" +msgstr "hibernate.format_sql" + +#. Tag: entry +#: configuration.xml:375 +#, fuzzy, no-c-format +msgid "Pretty print the SQL in the log and console." +msgstr "在log和console中打印出更漂亮的SQL。 " + +#. Tag: literal +#: configuration.xml:385 +#, no-c-format +msgid "hibernate.default_schema" +msgstr "hibernate.default_schema" + +#. Tag: entry +#: configuration.xml:387 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given schema/tablespace in " +"generated SQL." +msgstr "" +"在生成的SQL中, 将给定的schema/tablespace附加于非全限定名的表名上. " +"" + +#. Tag: para +#: configuration.xml:390 +#, fuzzy, no-c-format +msgid "eg. SCHEMA_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:398 +#, no-c-format +msgid "hibernate.default_catalog" +msgstr "hibernate.default_catalog" + +#. Tag: entry +#: configuration.xml:400 +#, fuzzy, no-c-format +msgid "" +"Qualify unqualified table names with the given catalog in generated SQL." +msgstr "" +"在生成的SQL中, 将给定的catalog附加于非全限定名的表名上. " + +#. Tag: para +#: configuration.xml:403 +#, fuzzy, no-c-format +msgid "" +"eg. CATALOG_NAME" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:411 +#, no-c-format +msgid "hibernate.session_factory_name" +msgstr "hibernate.session_factory_name" + +#. Tag: entry +#: configuration.xml:413 +#, fuzzy, no-c-format +msgid "" +"The SessionFactory will be automatically bound to this " +"name in JNDI after it has been created." +msgstr "" +"创建后,将自动使用这个名字绑定到JNDI中. " + +#. Tag: para +#: configuration.xml:416 configuration.xml:859 +#, fuzzy, no-c-format +msgid "" +"eg. jndi/composite/name" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:424 +#, no-c-format +msgid "hibernate.max_fetch_depth" +msgstr "hibernate.max_fetch_depth" + +#. Tag: entry +#: configuration.xml:426 +#, fuzzy, no-c-format +msgid "" +"Set a maximum \"depth\" for the outer join fetch tree for single-ended " +"associations (one-to-one, many-to-one). A 0 disables " +"default outer join fetching." +msgstr "" +"为单向关联(一对一, 多对一)的外连接抓取(outer join fetch)树设置最大深度. 值" +"为意味着将关闭默认的外连接抓取. " + +#. Tag: para +#: configuration.xml:430 +#, no-c-format +msgid "" +"eg. recommended values between " +"0 and 3" +msgstr "" +"取值 建议在0到" +"3之间取值" + +#. Tag: literal +#: configuration.xml:439 +#, no-c-format +msgid "hibernate.default_batch_fetch_size" +msgstr "hibernate.default_batch_fetch_size" + +#. Tag: entry +#: configuration.xml:441 +#, fuzzy, no-c-format +msgid "Set a default size for Hibernate batch fetching of associations." +msgstr "为Hibernate关联的批量抓取设置默认数量. " + +#. Tag: para +#: configuration.xml:443 +#, no-c-format +msgid "" +"eg. recommended values 4, 8, 16" +msgstr "" +"取值 建议的取值为4, " +"8, 和16" + +#. Tag: literal +#: configuration.xml:452 +#, no-c-format +msgid "hibernate.default_entity_mode" +msgstr "hibernate.default_entity_mode" + +#. Tag: entry +#: configuration.xml:454 +#, fuzzy, no-c-format +msgid "" +"Set a default mode for entity representation for all sessions opened from " +"this SessionFactory" +msgstr "" +"为由这个打开的所有Session指定默认的实体表现模式. " +"" + +#. Tag: para +#: configuration.xml:457 +#, no-c-format +msgid "" +"dynamic-map, dom4j, pojo" +msgstr "" +"取值dynamic-map, " +"dom4j, pojo" + +#. Tag: literal +#: configuration.xml:465 +#, no-c-format +msgid "hibernate.order_updates" +msgstr "hibernate.order_updates" + +#. Tag: entry +#: configuration.xml:467 +#, fuzzy, no-c-format +msgid "" +"Force Hibernate to order SQL updates by the primary key value of the items " +"being updated. This will result in fewer transaction deadlocks in highly " +"concurrent systems." +msgstr "" +"强制Hibernate按照被更新数据的主键,为SQL更新排序。这么做将减少在高并发系统中" +"事务的死锁。 " + +#. Tag: literal +#: configuration.xml:479 +#, no-c-format +msgid "hibernate.generate_statistics" +msgstr "hibernate.generate_statistics" + +#. Tag: entry +#: configuration.xml:481 +#, fuzzy, no-c-format +msgid "" +"If enabled, Hibernate will collect statistics useful for performance tuning." +msgstr "如果开启, Hibernate将收集有助于性能调节的统计数据. " + +#. Tag: literal +#: configuration.xml:492 +#, no-c-format +msgid "hibernate.use_identifier_rollback" +msgstr "hibernate.use_identifer_rollback" + +#. Tag: entry +#: configuration.xml:494 +#, fuzzy, no-c-format +msgid "" +"If enabled, generated identifier properties will be reset to default values " +"when objects are deleted." +msgstr "" +"如果开启, 在对象被删除时生成的标识属性将被重设为默认值. " + +#. Tag: literal +#: configuration.xml:505 +#, no-c-format +msgid "hibernate.use_sql_comments" +msgstr "hibernate.use_sql_comments" + +#. Tag: entry +#: configuration.xml:507 +#, fuzzy, no-c-format +msgid "" +"If turned on, Hibernate will generate comments inside the SQL, for easier " +"debugging, defaults to false." +msgstr "" +"如果开启, Hibernate将在SQL中生成有助于调试的注释信息, 默认值为. " + +#. Tag: title +#: configuration.xml:521 +#, no-c-format +msgid "Hibernate JDBC and Connection Properties" +msgstr "Hibernate JDBC和连接(connection)属性" + +#. Tag: literal +#: configuration.xml:536 +#, no-c-format +msgid "hibernate.jdbc.fetch_size" +msgstr "hibernate.jdbc.fetch_size" + +#. Tag: entry +#: configuration.xml:538 +#, fuzzy, no-c-format +msgid "" +"A non-zero value determines the JDBC fetch size (calls Statement." +"setFetchSize())." +msgstr "非零值,指定JDBC抓取数量的大小 (调用)." + +#. Tag: literal +#: configuration.xml:545 +#, no-c-format +msgid "hibernate.jdbc.batch_size" +msgstr "hibernate.jdbc.batch_size" + +#. Tag: entry +#: configuration.xml:547 +#, fuzzy, no-c-format +msgid "A non-zero value enables use of JDBC2 batch updates by Hibernate." +msgstr "非零值,允许Hibernate使用JDBC2的批量更新. " + +#. Tag: para +#: configuration.xml:549 +#, no-c-format +msgid "" +"eg. recommended values between " +"5 and 30" +msgstr "" +"取值 建议取5到" +"30之间的值" + +#. Tag: literal +#: configuration.xml:557 +#, no-c-format +msgid "hibernate.jdbc.batch_versioned_data" +msgstr "hibernate.jdbc.batch_versioned_data" + +#. Tag: entry +#: configuration.xml:559 +#, fuzzy, no-c-format +msgid "" +"Set this property to true if your JDBC driver returns " +"correct row counts from executeBatch() (it is usually " +"safe to turn this option on). Hibernate will then use batched DML for " +"automatically versioned data. Defaults to false." +msgstr "" +"如果你想让你的JDBC驱动从返回正确的行计数 , 那么将此属性设为" +"(开启这个选项通常是安全的). 同时,Hibernate将为自动版本化的数" +"据使用批量DML. 默认值为. " + +#. Tag: literal +#: configuration.xml:572 +#, no-c-format +msgid "hibernate.jdbc.factory_class" +msgstr "hibernate.jdbc.factory_class" + +#. Tag: entry +#: configuration.xml:574 +#, fuzzy, no-c-format +msgid "" +"Select a custom Batcher. Most applications will not need " +"this configuration property." +msgstr "" +"选择一个自定义的. 多数应用程序不需要这个配置属性. " +"" + +#. Tag: para +#: configuration.xml:577 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"BatcherFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:585 +#, no-c-format +msgid "hibernate.jdbc.use_scrollable_resultset" +msgstr "hibernate.jdbc.use_scrollable_resultset" + +#. Tag: entry +#: configuration.xml:587 +#, fuzzy, no-c-format +msgid "" +"Enables use of JDBC2 scrollable resultsets by Hibernate. This property is " +"only necessary when using user supplied JDBC connections, Hibernate uses " +"connection metadata otherwise." +msgstr "" +"允许Hibernate使用JDBC2的可滚动结果集. 只有在使用用户提供的JDBC连接时,这个选" +"项才是必要的, 否则Hibernate会使用连接的元数据. " + +#. Tag: literal +#: configuration.xml:599 +#, no-c-format +msgid "hibernate.jdbc.use_streams_for_binary" +msgstr "hibernate.jdbc.use_streams_for_binary" + +#. Tag: entry +#: configuration.xml:601 +#, fuzzy, no-c-format +msgid "" +"Use streams when writing/reading binary or " +"serializable types to/from JDBC (system-level property)." +msgstr "" +"在JDBC读写 的类型时使用流(stream)(系统级属" +"性). " + +#. Tag: literal +#: configuration.xml:613 +#, no-c-format +msgid "hibernate.jdbc.use_get_generated_keys" +msgstr "hibernate.jdbc.use_get_generated_keys" + +#. Tag: entry +#: configuration.xml:615 +#, fuzzy, no-c-format +msgid "" +"Enable use of JDBC3 PreparedStatement.getGeneratedKeys() " +"to retrieve natively generated keys after insert. Requires JDBC3+ driver and " +"JRE1.4+, set to false if your driver has problems with the Hibernate " +"identifier generators. By default, tries to determine the driver " +"capabilities using connection metadata." +msgstr "" +"在数据插入数据库之后,允许使用JDBC3 来获取数据库生成的key" +"(键)。需要JDBC3+驱动和JRE1.4+, 如果你的数据库驱动在使用Hibernate的标 识生成器" +"时遇到问题,请将此值设为false. 默认情况下将使用连接的元数据来判定驱动的能力. " +"" + +#. Tag: para +#: configuration.xml:621 configuration.xml:751 configuration.xml:763 +#: configuration.xml:777 configuration.xml:815 +#, fuzzy, no-c-format +msgid "eg. true|false" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:629 +#, no-c-format +msgid "hibernate.connection.provider_class" +msgstr "hibernate.connection.provider_class" + +#. Tag: entry +#: configuration.xml:631 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom ConnectionProvider which " +"provides JDBC connections to Hibernate." +msgstr "" +"自定义的类名, 此类用来向Hibernate提供JDBC连接. " + +#. Tag: para +#: configuration.xml:634 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"ConnectionProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:642 +#, no-c-format +msgid "hibernate.connection.isolation" +msgstr "hibernate.connection.isolation" + +#. Tag: entry +#: configuration.xml:644 +#, fuzzy, no-c-format +msgid "" +"Set the JDBC transaction isolation level. Check java.sql." +"Connection for meaningful values but note that most databases do " +"not support all isolation levels." +msgstr "" +"设置JDBC事务隔离级别. 查看来了解各个值的具体意义, 但请注意多" +"数数据库都不支持所有的隔离级别. " + +#. Tag: para +#: configuration.xml:648 +#, fuzzy, no-c-format +msgid "eg. 1, 2, 4, 8" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:656 +#, no-c-format +msgid "hibernate.connection.autocommit" +msgstr "hibernate.connection.autocommit" + +#. Tag: entry +#: configuration.xml:658 +#, fuzzy, no-c-format +msgid "Enables autocommit for JDBC pooled connections (not recommended)." +msgstr "" +"允许被缓存的JDBC连接开启自动提交(autocommit) (不建议). " + +#. Tag: literal +#: configuration.xml:668 +#, no-c-format +msgid "hibernate.connection.release_mode" +msgstr "hibernate.connection.release_mode" + +#. Tag: entry +#: configuration.xml:670 +#, fuzzy, no-c-format +msgid "" +"Specify when Hibernate should release JDBC connections. By default, a JDBC " +"connection is held until the session is explicitly closed or disconnected. " +"For an application server JTA datasource, you should use " +"after_statement to aggressively release connections after " +"every JDBC call. For a non-JTA connection, it often makes sense to release " +"the connection at the end of each transaction, by using " +"after_transaction. auto will choose " +"after_statement for the JTA and CMT transaction " +"strategies and after_transaction for the JDBC transaction " +"strategy." +msgstr "" +"指定Hibernate在何时释放JDBC连接. 默认情况下,直到Session被显式关闭或被断开连接" +"时,才会释放JDBC连接. 对于应用程序服务器的JTA数据源, 你应当使用, 这样在每次JDBC调用后,都会主动的释放连接. 对于非JTA的连接, 使用" +"在每个事务结束时释放连接是合理的. 将为JTA和" +"CMT事务策略选择, 为JDBC事务策略选择. " +"" + +#. Tag: para +#: configuration.xml:681 +#, fuzzy, no-c-format +msgid "" +"eg. auto (default) | " +"on_close | after_transaction | " +"after_statement" +msgstr "" +"取值auto (默认) | " +"on_close | after_transaction | " +"after_statement" + +#. Tag: para +#: configuration.xml:686 +#, fuzzy, no-c-format +msgid "" +"Note that this setting only affects Sessions returned " +"from SessionFactory.openSession. For Sessions obtained through SessionFactory.getCurrentSession, the CurrentSessionContext implementation " +"configured for use controls the connection release mode for those " +"Sessions. See" +msgstr "" +"注意,这些设置仅对通过SessionFactory.openSession得到的" +"Session起作用。对于通过SessionFactory." +"getCurrentSession得到的Session,所配置的" +"CurrentSessionContext实现控制这些Session的连接释放模式。请参阅。" + +#. Tag: literal +#: configuration.xml:698 +#, no-c-format +msgid "hibernate.connection.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:700 +#, fuzzy, no-c-format +msgid "" +"Pass the JDBC property propertyName to " +"DriverManager.getConnection()." +msgstr "" +"传一个java.util.Properties实例给 Configuration." +"setProperties()." + +#. Tag: literal +#: configuration.xml:707 +#, no-c-format +msgid "hibernate.jndi.<propertyName>" +msgstr "" + +#. Tag: entry +#: configuration.xml:709 +#, fuzzy, no-c-format +msgid "" +"Pass the property propertyName to the JNDI " +"InitialContextFactory." +msgstr "" +"传一个java.util.Properties实例给 Configuration." +"setProperties()." + +#. Tag: title +#: configuration.xml:719 +#, no-c-format +msgid "Hibernate Cache Properties" +msgstr "Hibernate缓存属性" + +#. Tag: literal +#: configuration.xml:732 +#, no-c-format +msgid "hibernate.cache.provider_class" +msgstr "hibernate.cache.provider_class" + +#. Tag: entry +#: configuration.xml:734 +#, fuzzy, no-c-format +msgid "The classname of a custom CacheProvider." +msgstr "自定义的的类名. " + +#. Tag: para +#: configuration.xml:736 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"CacheProvider" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:744 +#, no-c-format +msgid "hibernate.cache.use_minimal_puts" +msgstr "hibernate.cache.use_minimal_puts" + +#. Tag: entry +#: configuration.xml:746 +#, fuzzy, no-c-format +msgid "" +"Optimize second-level cache operation to minimize writes, at the cost of " +"more frequent reads. This setting is most useful for clustered caches and, " +"in Hibernate3, is enabled by default for clustered cache implementations." +msgstr "" +"以频繁的读操作为代价, 优化二级缓存来最小化写操作. 在Hibernate3中,这个设置对" +"的集群缓存非常有用, 对集群缓存的实现而言,默认是开启的. " + +#. Tag: literal +#: configuration.xml:759 +#, no-c-format +msgid "hibernate.cache.use_query_cache" +msgstr "hibernate.cache.use_query_cache" + +#. Tag: entry +#: configuration.xml:761 +#, fuzzy, no-c-format +msgid "" +"Enable the query cache, individual queries still have to be set cachable." +msgstr "允许查询缓存, 个别查询仍然需要被设置为可缓存的. " + +#. Tag: literal +#: configuration.xml:771 +#, no-c-format +msgid "hibernate.cache.use_second_level_cache" +msgstr "hibernate.cache.use_second_level_cache" + +#. Tag: entry +#: configuration.xml:773 +#, fuzzy, no-c-format +msgid "" +"May be used to completely disable the second level cache, which is enabled " +"by default for classes which specify a <cache> " +"mapping." +msgstr "" +"能用来完全禁止使用二级缓存. 对那些在类的映射定义中指定的类," +"会默认开启二级缓存. " + +#. Tag: literal +#: configuration.xml:785 +#, no-c-format +msgid "hibernate.cache.query_cache_factory" +msgstr "hibernate.cache.query_cache_factory" + +#. Tag: entry +#: configuration.xml:787 +#, fuzzy, no-c-format +msgid "" +"The classname of a custom QueryCache interface, defaults " +"to the built-in StandardQueryCache." +msgstr "" +"自定义实现接口的类名, 默认为内建的. " +"" + +#. Tag: para +#: configuration.xml:790 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of.QueryCache" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:798 +#, no-c-format +msgid "hibernate.cache.region_prefix" +msgstr "hibernate.cache.region_prefix" + +#. Tag: entry +#: configuration.xml:800 +#, fuzzy, no-c-format +msgid "A prefix to use for second-level cache region names." +msgstr "二级缓存区域名的前缀. " + +#. Tag: para +#: configuration.xml:802 +#, fuzzy, no-c-format +msgid "eg. prefix" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:810 +#, no-c-format +msgid "hibernate.cache.use_structured_entries" +msgstr "hibernate.cache.use_structured_entries" + +#. Tag: entry +#: configuration.xml:812 +#, fuzzy, no-c-format +msgid "" +"Forces Hibernate to store data in the second-level cache in a more human-" +"friendly format." +msgstr "强制Hibernate以更人性化的格式将数据存入二级缓存. " + +#. Tag: title +#: configuration.xml:826 +#, no-c-format +msgid "Hibernate Transaction Properties" +msgstr "Hibernate事务属性" + +#. Tag: literal +#: configuration.xml:839 +#, no-c-format +msgid "hibernate.transaction.factory_class" +msgstr "hibernate.transaction.factory_class" + +#. Tag: entry +#: configuration.xml:841 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionFactory to use with " +"Hibernate Transaction API (defaults to " +"JDBCTransactionFactory)." +msgstr "" +"一个的类名, 用于Hibernate API (默认为" +"). " + +#. Tag: para +#: configuration.xml:845 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionFactory" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:853 +#, no-c-format +msgid "jta.UserTransaction" +msgstr "jta.UserTransaction" + +#. Tag: entry +#: configuration.xml:855 +#, fuzzy, no-c-format +msgid "" +"A JNDI name used by JTATransactionFactory to obtain the " +"JTA UserTransaction from the application server." +msgstr "" +"一个JNDI名字,被用来从应用服务器获取JTA . " +"" + +#. Tag: literal +#: configuration.xml:867 +#, no-c-format +msgid "hibernate.transaction.manager_lookup_class" +msgstr "hibernate.transaction.manager_lookup_class" + +#. Tag: entry +#: configuration.xml:869 +#, fuzzy, no-c-format +msgid "" +"The classname of a TransactionManagerLookup - required " +"when JVM-level caching is enabled or when using hilo generator in a JTA " +"environment." +msgstr "" +"一个的类名 - 当使用JVM级缓存,或在JTA环境中使用hilo生成器的时" +"候需要该类. " + +#. Tag: para +#: configuration.xml:873 +#, fuzzy, no-c-format +msgid "" +"eg. classname.of." +"TransactionManagerLookup" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:881 +#, no-c-format +msgid "hibernate.transaction.flush_before_completion" +msgstr "hibernate.transaction.flush_before_completion" + +#. Tag: entry +#: configuration.xml:883 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically flushed during the before " +"completion phase of the transaction. Built-in and automatic session context " +"management is preferred, see ." +msgstr "" +"如果开启, session在事务完成后将被自动清洗(flush)。 现在更好的方法是使用自动" +"session上下文管理。请参见。 " +"" + +#. Tag: literal +#: configuration.xml:896 +#, no-c-format +msgid "hibernate.transaction.auto_close_session" +msgstr "hibernate.transaction.auto_close_session" + +#. Tag: entry +#: configuration.xml:898 +#, fuzzy, no-c-format +msgid "" +"If enabled, the session will be automatically closed during the after " +"completion phase of the transaction. Built-in and utomatic session context " +"management is preferred, see ." +msgstr "" +"如果开启, session在事务完成后将被自动关闭。 现在更好的方法是使用自动session上" +"下文管理。请参见。 " +"" + +#. Tag: title +#: configuration.xml:914 +#, no-c-format +msgid "Miscellaneous Properties" +msgstr "其他属性" + +#. Tag: literal +#: configuration.xml:927 +#, no-c-format +msgid "hibernate.current_session_context_class" +msgstr "hibernate.current_session_context_class" + +#. Tag: entry +#: configuration.xml:929 +#, fuzzy, no-c-format +msgid "" +"Supply a (custom) strategy for the scoping of the \"current\" " +"Session. See for more information about the built-in strategies." +msgstr "" +"为\"当前\" 指定一个(自定义的)策略。关于内置策略的详情,请参见" +"" + +#. Tag: para +#: configuration.xml:934 +#, fuzzy, no-c-format +msgid "" +"eg. jta | " +"thread | managed | custom." +"Class" +msgstr "" +"eg.jta | " +"thread | managed | custom." +"Class" + +#. Tag: literal +#: configuration.xml:943 +#, no-c-format +msgid "hibernate.query.factory_class" +msgstr "hibernate.query.factory_class" + +#. Tag: entry +#: configuration.xml:945 +#, fuzzy, no-c-format +msgid "Chooses the HQL parser implementation." +msgstr "选择HQL解析器的实现. " + +#. Tag: para +#: configuration.xml:947 +#, fuzzy, no-c-format +msgid "" +"eg. org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" +msgstr "" +"取值org.hibernate.hql.ast." +"ASTQueryTranslatorFactory or org.hibernate.hql.classic." +"ClassicQueryTranslatorFactory" + +#. Tag: literal +#: configuration.xml:956 +#, no-c-format +msgid "hibernate.query.substitutions" +msgstr "hibernate.query.substitutions" + +#. Tag: entry +#: configuration.xml:958 +#, fuzzy, no-c-format +msgid "" +"Mapping from tokens in Hibernate queries to SQL tokens (tokens might be " +"function or literal names, for example)." +msgstr "" +"将Hibernate查询中的符号映射到SQL查询中的符号 (符号可能是函数名或常量名字). " +"" + +#. Tag: para +#: configuration.xml:961 +#, fuzzy, no-c-format +msgid "" +"eg. hqlLiteral=SQL_LITERAL, " +"hqlFunction=SQLFUNC" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"eg.true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"取值true | " +"false" + +#. Tag: literal +#: configuration.xml:969 +#, no-c-format +msgid "hibernate.hbm2ddl.auto" +msgstr "hibernate.hbm2ddl.auto" + +#. Tag: entry +#: configuration.xml:971 +#, fuzzy, no-c-format +msgid "" +"Automatically validate or export schema DDL to the database when the " +"SessionFactory is created. With create-drop, the database schema will be dropped when the " +"SessionFactory is closed explicitly." +msgstr "" +"在创建时,自动检查数据库结构,或者将数据库schema的DDL导出到数" +"据库. 使用 时,在显式关闭时,将drop掉数据库" +"schema. " + +#. Tag: para +#: configuration.xml:977 +#, fuzzy, no-c-format +msgid "" +"eg. validate | " +"update | create | create-" +"drop" +msgstr "" +"取值validate | " +"update | create | create-" +"drop" + +#. Tag: literal +#: configuration.xml:986 +#, no-c-format +msgid "hibernate.cglib.use_reflection_optimizer" +msgstr "hibernate.cglib.use_reflection_optimizer" + +#. Tag: entry +#: configuration.xml:988 +#, fuzzy, no-c-format +msgid "" +"Enables use of CGLIB instead of runtime reflection (System-level property). " +"Reflection can sometimes be useful when troubleshooting, note that Hibernate " +"always requires CGLIB even if you turn off the optimizer. You can not set " +"this property in hibernate.cfg.xml." +msgstr "" +"开启CGLIB来替代运行时反射机制(系统级属性). 反射机制有时在除错时比较有用. 注意" +"即使关闭这个优化, Hibernate还是需要CGLIB. 你不能在中设置此属" +"性. " + +#. Tag: title +#: configuration.xml:1004 +#, no-c-format +msgid "SQL Dialects" +msgstr "SQL方言" + +#. Tag: para +#: configuration.xml:1006 +#, no-c-format +msgid "" +"You should always set the hibernate.dialect property to " +"the correct org.hibernate.dialect.Dialect subclass for " +"your database. If you specify a dialect, Hibernate will use sensible " +"defaults for some of the other properties listed above, saving you the " +"effort of specifying them manually." +msgstr "" +"你应当总是为你的数据库将hibernate.dialect属性设置成正确的 " +"org.hibernate.dialect.Dialect子类. 如果你指定一种方言, " +"Hibernate将为上面列出的一些属性使用合理的默认值, 为你省去了手工指定它们的功" +"夫." + +#. Tag: title +#: configuration.xml:1014 +#, no-c-format +msgid "Hibernate SQL Dialects (hibernate.dialect)" +msgstr "Hibernate SQL方言 (hibernate.dialect)" + +#. Tag: entry +#: configuration.xml:1022 +#, no-c-format +msgid "RDBMS" +msgstr "RDBMS" + +#. Tag: entry +#: configuration.xml:1023 +#, fuzzy, no-c-format +msgid "Dialect" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"Dialect\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"方言" + +#. Tag: entry +#: configuration.xml:1028 +#, no-c-format +msgid "DB2" +msgstr "" + +#. Tag: literal +#: configuration.xml:1028 +#, no-c-format +msgid "org.hibernate.dialect.DB2Dialect" +msgstr "org.hibernate.dialect.DB2Dialect" + +#. Tag: entry +#: configuration.xml:1031 +#, no-c-format +msgid "DB2 AS/400" +msgstr "DB2 AS/400" + +#. Tag: literal +#: configuration.xml:1031 +#, no-c-format +msgid "org.hibernate.dialect.DB2400Dialect" +msgstr "org.hibernate.dialect.DB2400Dialect" + +#. Tag: entry +#: configuration.xml:1034 +#, no-c-format +msgid "DB2 OS390" +msgstr "DB2 OS390" + +#. Tag: literal +#: configuration.xml:1034 +#, no-c-format +msgid "org.hibernate.dialect.DB2390Dialect" +msgstr "org.hibernate.dialect.DB2390Dialect" + +#. Tag: entry +#: configuration.xml:1037 +#, no-c-format +msgid "PostgreSQL" +msgstr "PostgreSQL" + +#. Tag: literal +#: configuration.xml:1037 +#, no-c-format +msgid "org.hibernate.dialect.PostgreSQLDialect" +msgstr "org.hibernate.dialect.PostgreSQLDialect" + +#. Tag: entry +#: configuration.xml:1040 +#, no-c-format +msgid "MySQL" +msgstr "MySQL" + +#. Tag: literal +#: configuration.xml:1040 +#, no-c-format +msgid "org.hibernate.dialect.MySQLDialect" +msgstr "org.hibernate.dialect.MySQLDialect" + +#. Tag: entry +#: configuration.xml:1043 +#, no-c-format +msgid "MySQL with InnoDB" +msgstr "MySQL with InnoDB" + +#. Tag: literal +#: configuration.xml:1043 +#, no-c-format +msgid "org.hibernate.dialect.MySQLInnoDBDialect" +msgstr "org.hibernate.dialect.MySQLInnoDBDialect" + +#. Tag: entry +#: configuration.xml:1046 +#, no-c-format +msgid "MySQL with MyISAM" +msgstr "MySQL with MyISAM" + +#. Tag: literal +#: configuration.xml:1046 +#, no-c-format +msgid "org.hibernate.dialect.MySQLMyISAMDialect" +msgstr "org.hibernate.dialect.MySQLMyISAMDialect" + +#. Tag: entry +#: configuration.xml:1049 +#, no-c-format +msgid "Oracle (any version)" +msgstr "Oracle (any version)" + +#. Tag: literal +#: configuration.xml:1049 +#, no-c-format +msgid "org.hibernate.dialect.OracleDialect" +msgstr "org.hibernate.dialect.OracleDialect" + +#. Tag: entry +#: configuration.xml:1052 +#, no-c-format +msgid "Oracle 9i/10g" +msgstr "Oracle 9i/10g" + +#. Tag: literal +#: configuration.xml:1052 +#, no-c-format +msgid "org.hibernate.dialect.Oracle9Dialect" +msgstr "org.hibernate.dialect.Oracle9Dialect" + +#. Tag: entry +#: configuration.xml:1055 +#, no-c-format +msgid "Sybase" +msgstr "Sybase" + +#. Tag: literal +#: configuration.xml:1055 +#, no-c-format +msgid "org.hibernate.dialect.SybaseDialect" +msgstr "org.hibernate.dialect.SybaseDialect" + +#. Tag: entry +#: configuration.xml:1058 +#, no-c-format +msgid "Sybase Anywhere" +msgstr "Sybase Anywhere" + +#. Tag: literal +#: configuration.xml:1058 +#, no-c-format +msgid "org.hibernate.dialect.SybaseAnywhereDialect" +msgstr "org.hibernate.dialect.SybaseAnywhereDialect" + +#. Tag: entry +#: configuration.xml:1061 +#, no-c-format +msgid "Microsoft SQL Server" +msgstr "Microsoft SQL Server" + +#. Tag: literal +#: configuration.xml:1061 +#, no-c-format +msgid "org.hibernate.dialect.SQLServerDialect" +msgstr "org.hibernate.dialect.SQLServerDialect" + +#. Tag: entry +#: configuration.xml:1064 +#, no-c-format +msgid "SAP DB" +msgstr "SAP DB" + +#. Tag: literal +#: configuration.xml:1064 +#, no-c-format +msgid "org.hibernate.dialect.SAPDBDialect" +msgstr "org.hibernate.dialect.SAPDBDialect" + +#. Tag: entry +#: configuration.xml:1067 +#, no-c-format +msgid "Informix" +msgstr "Informix" + +#. Tag: literal +#: configuration.xml:1067 +#, no-c-format +msgid "org.hibernate.dialect.InformixDialect" +msgstr "org.hibernate.dialect.InformixDialect" + +#. Tag: entry +#: configuration.xml:1070 +#, no-c-format +msgid "HypersonicSQL" +msgstr "HypersonicSQL" + +#. Tag: literal +#: configuration.xml:1070 +#, no-c-format +msgid "org.hibernate.dialect.HSQLDialect" +msgstr "org.hibernate.dialect.HSQLDialect" + +#. Tag: entry +#: configuration.xml:1073 +#, no-c-format +msgid "Ingres" +msgstr "Ingres" + +#. Tag: literal +#: configuration.xml:1073 +#, no-c-format +msgid "org.hibernate.dialect.IngresDialect" +msgstr "org.hibernate.dialect.IngresDialect" + +#. Tag: entry +#: configuration.xml:1076 +#, no-c-format +msgid "Progress" +msgstr "Progress" + +#. Tag: literal +#: configuration.xml:1076 +#, no-c-format +msgid "org.hibernate.dialect.ProgressDialect" +msgstr "org.hibernate.dialect.ProgressDialect" + +#. Tag: entry +#: configuration.xml:1079 +#, no-c-format +msgid "Mckoi SQL" +msgstr "Mckoi SQL" + +#. Tag: literal +#: configuration.xml:1079 +#, no-c-format +msgid "org.hibernate.dialect.MckoiDialect" +msgstr "org.hibernate.dialect.MckoiDialect" + +#. Tag: entry +#: configuration.xml:1082 +#, no-c-format +msgid "Interbase" +msgstr "Interbase" + +#. Tag: literal +#: configuration.xml:1082 +#, no-c-format +msgid "org.hibernate.dialect.InterbaseDialect" +msgstr "org.hibernate.dialect.InterbaseDialect" + +#. Tag: entry +#: configuration.xml:1085 +#, no-c-format +msgid "Pointbase" +msgstr "Pointbase" + +#. Tag: literal +#: configuration.xml:1085 +#, no-c-format +msgid "org.hibernate.dialect.PointbaseDialect" +msgstr "org.hibernate.dialect.PointbaseDialect" + +#. Tag: entry +#: configuration.xml:1088 +#, no-c-format +msgid "FrontBase" +msgstr "FrontBase" + +#. Tag: literal +#: configuration.xml:1088 +#, no-c-format +msgid "org.hibernate.dialect.FrontbaseDialect" +msgstr "org.hibernate.dialect.FrontbaseDialect" + +#. Tag: entry +#: configuration.xml:1091 +#, no-c-format +msgid "Firebird" +msgstr "Firebird" + +#. Tag: literal +#: configuration.xml:1091 +#, no-c-format +msgid "org.hibernate.dialect.FirebirdDialect" +msgstr "org.hibernate.dialect.FirebirdDialect" + +#. Tag: title +#: configuration.xml:1100 +#, no-c-format +msgid "Outer Join Fetching" +msgstr "外连接抓取(Outer Join Fetching)" + +#. Tag: para +#: configuration.xml:1102 +#, no-c-format +msgid "" +"If your database supports ANSI, Oracle or Sybase style outer joins, " +"outer join fetching will often increase performance by " +"limiting the number of round trips to and from the database (at the cost of " +"possibly more work performed by the database itself). Outer join fetching " +"allows a whole graph of objects connected by many-to-one, one-to-many, many-" +"to-many and one-to-one associations to be retrieved in a single SQL " +"SELECT." +msgstr "" +"如果你的数据库支持ANSI, Oracle或Sybase风格的外连接, 外连接抓取通常能通过限制往返数据库次数 (更多的工作交由数据库自己来完成)来提高" +"效率. 外连接抓取允许在单个SELECTSQL语句中, 通过many-to-" +"one, one-to-many, many-to-many和one-to-one关联获取连接对象的整个对象图." + +#. Tag: para +#: configuration.xml:1111 +#, no-c-format +msgid "" +"Outer join fetching may be disabled globally by setting " +"the property hibernate.max_fetch_depth to 0. A setting of 1 or higher enables outer join " +"fetching for one-to-one and many-to-one associations which have been mapped " +"with fetch=\"join\"." +msgstr "" +"将hibernate.max_fetch_depth设为0能在" +"全局 范围内禁止外连接抓取. 设为1或更" +"高值能启用one-to-one和many-to-oneouter关联的外连接抓取, 它们通过 " +"fetch=\"join\"来映射." + +#. Tag: para +#: configuration.xml:1119 +#, no-c-format +msgid "See for more information." +msgstr "参见获得更多信息." + +#. Tag: title +#: configuration.xml:1126 +#, no-c-format +msgid "Binary Streams" +msgstr "二进制流 (Binary Streams)" + +#. Tag: para +#: configuration.xml:1128 +#, no-c-format +msgid "" +"Oracle limits the size of byte arrays that may be passed " +"to/from its JDBC driver. If you wish to use large instances of " +"binary or serializable type, you " +"should enable hibernate.jdbc.use_streams_for_binary. " +"This is a system-level setting only." +msgstr "" +"Oracle限制那些通过JDBC驱动传输的字节数组的数目. 如果你希望" +"使用二进值 (binary)可序列化的 (serializable)类型的大对象, 你应该开启 hibernate.jdbc." +"use_streams_for_binary属性. 这是系统级属性." + +#. Tag: title +#: configuration.xml:1139 +#, no-c-format +msgid "Second-level and query cache" +msgstr "二级缓存与查询缓存" + +#. Tag: para +#: configuration.xml:1141 +#, no-c-format +msgid "" +"The properties prefixed by hibernate.cache allow you to " +"use a process or cluster scoped second-level cache system with Hibernate. " +"See the for more details." +msgstr "" +"以hibernate.cache为前缀的属性允许你在Hibernate中,使用进程" +"或群集范围内的二级缓存系统. 参见获取更多" +"的详情." + +#. Tag: title +#: configuration.xml:1151 +#, no-c-format +msgid "Query Language Substitution" +msgstr "查询语言中的替换" + +#. Tag: para +#: configuration.xml:1153 +#, no-c-format +msgid "" +"You may define new Hibernate query tokens using hibernate.query." +"substitutions. For example:" +msgstr "" +"你可以使用hibernate.query.substitutions在Hibernate中定义新" +"的查询符号. 例如:" + +#. Tag: programlisting +#: configuration.xml:1158 +#, no-c-format +msgid "hibernate.query.substitutions true=1, false=0" +msgstr "hibernate.query.substitutions true=1, false=0" + +#. Tag: para +#: configuration.xml:1160 +#, no-c-format +msgid "" +"would cause the tokens true and false " +"to be translated to integer literals in the generated SQL." +msgstr "" +"将导致符号truefalse在生成的SQL中被翻" +"译成整数常量." + +#. Tag: programlisting +#: configuration.xml:1165 +#, no-c-format +msgid "hibernate.query.substitutions toLowercase=LOWER" +msgstr "hibernate.query.substitutions toLowercase=LOWER" + +#. Tag: para +#: configuration.xml:1167 +#, no-c-format +msgid "would allow you to rename the SQL LOWER function." +msgstr "将允许你重命名SQL中的LOWER函数." + +#. Tag: title +#: configuration.xml:1174 +#, no-c-format +msgid "Hibernate statistics" +msgstr "Hibernate的统计(statistics)机制" + +#. Tag: para +#: configuration.xml:1176 +#, no-c-format +msgid "" +"If you enable hibernate.generate_statistics, Hibernate " +"will expose a number of metrics that are useful when tuning a running system " +"via SessionFactory.getStatistics(). Hibernate can even be " +"configured to expose these statistics via JMX. Read the Javadoc of the " +"interfaces in org.hibernate.stats for more information." +msgstr "" +"如果你开启hibernate.generate_statistics, 那么当你通过 " +"SessionFactory.getStatistics()调整正在运行的系统时," +"Hibernate将导出大量有用的数据. Hibernate甚至能被配置成通过JMX导出这些统计信" +"息. 参考org.hibernate.stats中接口的Javadoc,以获得更多信" +"息." + +#. Tag: title +#: configuration.xml:1188 +#, no-c-format +msgid "Logging" +msgstr "日志" + +#. Tag: para +#: configuration.xml:1190 +#, no-c-format +msgid "Hibernate logs various events using Apache commons-logging." +msgstr "Hibernate使用Apache commons-logging来为各种事件记录日志." + +#. Tag: para +#: configuration.xml:1194 +#, no-c-format +msgid "" +"The commons-logging service will direct output to either Apache Log4j (if " +"you include log4j.jar in your classpath) or JDK1.4 " +"logging (if running under JDK1.4 or above). You may download Log4j from " +"http://jakarta.apache.org. To use Log4j you will need to " +"place a log4j.properties file in your classpath, an " +"example properties file is distributed with Hibernate in the src/ directory." +msgstr "" +"commons-logging将直接输出到Apache Log4j(如果在类路径中包括log4j." +"jar)或 JDK1.4 logging (如果运行在JDK1.4或以上的环境下). 你可以从" +"http://jakarta.apache.org 下载Log4j. 要使用Log4j,你需要将" +"log4j.properties文件放置在类路径下, 随Hibernate 一同分发的" +"样例属性文件在src/目录下." + +#. Tag: para +#: configuration.xml:1204 +#, no-c-format +msgid "" +"We strongly recommend that you familiarize yourself with Hibernate's log " +"messages. A lot of work has been put into making the Hibernate log as " +"detailed as possible, without making it unreadable. It is an essential " +"troubleshooting device. The most interesting log categories are the " +"following:" +msgstr "" +"我们强烈建议你熟悉一下Hibernate的日志消息. 在不失可读性的前提下, 我们做了很" +"多工作,使Hibernate的日志可能地详细. 这是必要的查错利器. 最令人感兴趣的日志分" +"类有如下这些:" + +#. Tag: title +#: configuration.xml:1213 +#, no-c-format +msgid "Hibernate Log Categories" +msgstr "Hibernate日志类别" + +#. Tag: entry +#: configuration.xml:1219 +#, no-c-format +msgid "Category" +msgstr "类别" + +#. Tag: entry +#: configuration.xml:1220 +#, no-c-format +msgid "Function" +msgstr "功能" + +#. Tag: literal +#: configuration.xml:1225 +#, no-c-format +msgid "org.hibernate.SQL" +msgstr "org.hibernate.SQL" + +#. Tag: entry +#: configuration.xml:1226 +#, no-c-format +msgid "Log all SQL DML statements as they are executed" +msgstr "在所有SQL DML语句被执行时为它们记录日志" + +#. Tag: literal +#: configuration.xml:1229 +#, no-c-format +msgid "org.hibernate.type" +msgstr "org.hibernate.type" + +#. Tag: entry +#: configuration.xml:1230 +#, no-c-format +msgid "Log all JDBC parameters" +msgstr "为所有JDBC参数记录日志" + +#. Tag: literal +#: configuration.xml:1233 +#, no-c-format +msgid "org.hibernate.tool.hbm2ddl" +msgstr "org.hibernate.tool.hbm2ddl" + +#. Tag: entry +#: configuration.xml:1234 +#, no-c-format +msgid "Log all SQL DDL statements as they are executed" +msgstr "在所有SQL DDL语句执行时为它们记录日志" + +#. Tag: literal +#: configuration.xml:1237 +#, no-c-format +msgid "org.hibernate.pretty" +msgstr "org.hibernate.pretty" + +#. Tag: entry +#: configuration.xml:1238 +#, no-c-format +msgid "" +"Log the state of all entities (max 20 entities) associated with the session " +"at flush time" +msgstr "在session清洗(flush)时,为所有与其关联的实体(最多20个)的状态记录日志" + +#. Tag: literal +#: configuration.xml:1244 +#, no-c-format +msgid "org.hibernate.cache" +msgstr "org.hibernate.cache" + +#. Tag: entry +#: configuration.xml:1245 +#, no-c-format +msgid "Log all second-level cache activity" +msgstr "为所有二级缓存的活动记录日志" + +#. Tag: literal +#: configuration.xml:1248 +#, no-c-format +msgid "org.hibernate.transaction" +msgstr "org.hibernate.transaction" + +#. Tag: entry +#: configuration.xml:1249 +#, no-c-format +msgid "Log transaction related activity" +msgstr "为事务相关的活动记录日志" + +#. Tag: literal +#: configuration.xml:1252 +#, no-c-format +msgid "org.hibernate.jdbc" +msgstr "org.hibernate.jdbc" + +#. Tag: entry +#: configuration.xml:1253 +#, no-c-format +msgid "Log all JDBC resource acquisition" +msgstr "为所有JDBC资源的获取记录日志" + +#. Tag: literal +#: configuration.xml:1256 +#, no-c-format +msgid "org.hibernate.hql.ast.AST" +msgstr "org.hibernate.hql.AST" + +#. Tag: entry +#: configuration.xml:1257 +#, no-c-format +msgid "Log HQL and SQL ASTs during query parsing" +msgstr "在解析查询的时候,记录HQL和SQL的AST分析日志" + +#. Tag: literal +#: configuration.xml:1262 +#, no-c-format +msgid "org.hibernate.secure" +msgstr "org.hibernate.secure" + +#. Tag: entry +#: configuration.xml:1263 +#, no-c-format +msgid "Log all JAAS authorization requests" +msgstr "为JAAS认证请求做日志" + +#. Tag: literal +#: configuration.xml:1266 +#, no-c-format +msgid "org.hibernate" +msgstr "org.hibernate" + +#. Tag: entry +#: configuration.xml:1267 +#, no-c-format +msgid "" +"Log everything (a lot of information, but very useful for troubleshooting)" +msgstr "为任何Hibernate相关信息做日志 (信息量较大, 但对查错非常有帮助)" + +#. Tag: para +#: configuration.xml:1276 +#, no-c-format +msgid "" +"When developing applications with Hibernate, you should almost always work " +"with debug enabled for the category org." +"hibernate.SQL, or, alternatively, the property hibernate." +"show_sql enabled." +msgstr "" +"在使用Hibernate开发应用程序时, 你应当总是为org.hibernate.SQL 开启debug级别的日志记录,或者开启" +"hibernate.show_sql属性。" + +#. Tag: title +#: configuration.xml:1286 +#, no-c-format +msgid "Implementing a NamingStrategy" +msgstr "实现NamingStrategy" + +#. Tag: para +#: configuration.xml:1288 +#, no-c-format +msgid "" +"The interface org.hibernate.cfg.NamingStrategy allows you " +"to specify a \"naming standard\" for database objects and schema elements." +msgstr "" +"org.hibernate.cfg.NamingStrategy接口允许你为数据库中的对象" +"和schema 元素指定一个“命名标准”." + +#. Tag: para +#: configuration.xml:1293 +#, no-c-format +msgid "" +"You may provide rules for automatically generating database identifiers from " +"Java identifiers or for processing \"logical\" column and table names given " +"in the mapping file into \"physical\" table and column names. This feature " +"helps reduce the verbosity of the mapping document, eliminating repetitive " +"noise (TBL_ prefixes, for example). The default strategy " +"used by Hibernate is quite minimal." +msgstr "" +"你可能会提供一些通过Java标识生成数据库标识或将映射定义文件中\"逻辑\"表/列名处" +"理成\"物理\"表/列名的规则. 这个特性有助于减少冗长的映射定义文件." + +#. Tag: para +#: configuration.xml:1302 +#, no-c-format +msgid "" +"You may specify a different strategy by calling Configuration." +"setNamingStrategy() before adding mappings:" +msgstr "" +"在加入映射定义前,你可以调用 Configuration.setNamingStrategy()指定一个不同的命名策略:" + +#. Tag: programlisting +#: configuration.xml:1307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1309 +#, no-c-format +msgid "" +"org.hibernate.cfg.ImprovedNamingStrategy is a built-in " +"strategy that might be a useful starting point for some applications." +msgstr "" +"org.hibernate.cfg.ImprovedNamingStrategy是一个内建的命名策" +"略, 对 一些应用程序而言,可能是非常有用的起点." + +#. Tag: title +#: configuration.xml:1317 +#, no-c-format +msgid "XML configuration file" +msgstr "XML配置文件" + +#. Tag: para +#: configuration.xml:1319 +#, no-c-format +msgid "" +"An alternative approach to configuration is to specify a full configuration " +"in a file named hibernate.cfg.xml. This file can be used " +"as a replacement for the hibernate.properties file or, if " +"both are present, to override properties." +msgstr "" +"另一个配置方法是在hibernate.cfg.xml文件中指定一套完整的配" +"置. 这个文件可以当成hibernate.properties的替代。 若两个文" +"件同时存在,它将覆盖前者的属性." + +#. Tag: para +#: configuration.xml:1326 +#, no-c-format +msgid "" +"The XML configuration file is by default expected to be in the root o your " +"CLASSPATH. Here is an example:" +msgstr "" +"XML配置文件被默认是放在CLASSPATH的根目录下. 这是一个例子:" + +#. Tag: programlisting +#: configuration.xml:1331 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +"\n" +" \n" +" java:/comp/env/jdbc/MyDB\n" +" org.hibernate.dialect.MySQLDialect\n" +" false\n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" java:comp/UserTransaction\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1333 +#, no-c-format +msgid "" +"As you can see, the advantage of this approach is the externalization of the " +"mapping file names to configuration. The hibernate.cfg.xml is also more convenient once you have to tune the Hibernate cache. " +"Note that is your choice to use either hibernate.properties or hibernate.cfg.xml, both are equivalent, " +"except for the above mentioned benefits of using the XML syntax." +msgstr "" +"如你所见, 这个方法优势在于,在配置文件中指出了映射定义文件的名字. 一旦你需要" +"调整Hibernate的缓存, hibernate.cfg.xml也是更方便. 注意," +"使用hibernate.properties还是 hibernate.cfg.xml完全是由你来决定, 除了上面提到的XML语法的优势之外, 两者是等价的." + +#. Tag: para +#: configuration.xml:1342 +#, no-c-format +msgid "With the XML configuration, starting Hibernate is then as simple as" +msgstr "" +"使用XML配置,使得启动Hibernate变的异常简单, 如下所示,一行代码就可以搞定:" + +#. Tag: programlisting +#: configuration.xml:1346 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: configuration.xml:1348 +#, no-c-format +msgid "You can pick a different XML configuration file using" +msgstr "你可以使用如下代码来添加一个不同的XML配置文件" + +#. Tag: programlisting +#: configuration.xml:1352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: configuration.xml:1357 +#, no-c-format +msgid "J2EE Application Server integration" +msgstr "J2EE应用程序服务器的集成" + +#. Tag: para +#: configuration.xml:1359 +#, no-c-format +msgid "Hibernate has the following integration points for J2EE infrastructure:" +msgstr "针对J2EE体系,Hibernate有如下几个集成的方面:" + +#. Tag: para +#: configuration.xml:1365 +#, no-c-format +msgid "" +"Container-managed datasources: Hibernate can use JDBC " +"connections managed by the container and provided through JNDI. Usually, a " +"JTA compatible TransactionManager and a " +"ResourceManager take care of transaction management " +"(CMT), esp. distributed transaction handling across several datasources. You " +"may of course also demarcate transaction boundaries programmatically (BMT) " +"or you might want to use the optional Hibernate Transaction API for this to keep your code portable." +msgstr "" +"容器管理的数据源(Container-managed datasources): " +"Hibernate能使用通过容器管理,并由JNDI提供的JDBC连接. 通常, 特别是当处理多个数" +"据源的分布式事务的时候, 由一个JTA兼容的TransactionManager" +"和一个 ResourceManager来处理事务管理(CMT, 容器管理的事" +"务). 当然你可以通过 编程方式来划分事务边界(BMT, Bean管理的事务). 或者为了代码" +"的可移植性,你也也许会想使用可选的 Hibernate Transaction " +"API." + +#. Tag: para +#: configuration.xml:1380 +#, no-c-format +msgid "" +"Automatic JNDI binding: Hibernate can bind its " +"SessionFactory to JNDI after startup." +msgstr "" +"自动JNDI绑定: Hibernate可以在启动后将 " +"SessionFactory绑定到JNDI." + +#. Tag: para +#: configuration.xml:1389 +#, no-c-format +msgid "" +"JTA Session binding: The Hibernate Session may be automatically bound to the scope of JTA transactions. Simply " +"lookup the SessionFactory from JNDI and get the current " +"Session. Let Hibernate take care of flushing and closing " +"the Session when your JTA transaction completes. " +"Transaction demarcation is either declarative (CMT) or programmatic (BMT/" +"UserTransaction)." +msgstr "" +"JTA Session绑定: Hibernate Session 可" +"以自动绑定到JTA事务作用的范围. 只需简单地从JNDI查找SessionFactory并获得当前的 Session. 当JTA事务完成时, 让Hibernate" +"来处理 Session的清洗(flush)与关闭. 事务的划分可以是声明式" +"的(CMT),也可以是编程式的(BMT/UserTransaction)." + +#. Tag: para +#: configuration.xml:1402 +#, no-c-format +msgid "" +"JMX deployment: If you have a JMX capable application " +"server (e.g. JBoss AS), you can chose to deploy Hibernate as a managed " +"MBean. This saves you the one line startup code to build your " +"SessionFactory from a Configuration. " +"The container will startup your HibernateService, and " +"ideally also take care of service dependencies (Datasource has to be " +"available before Hibernate starts, etc)." +msgstr "" +"JMX部署: 如果你使用支持JMX应用程序服务器(如, JBoss AS), " +"那么你可以选择将Hibernate部署成托管MBean. 这将为你省去一行从" +"Configuration构建SessionFactory的启动代" +"码. 容器将启动你的HibernateService, 并完美地处理好服务间的" +"依赖关系 (在Hibernate启动前,数据源必须是可用的,等等)." + +#. Tag: para +#: configuration.xml:1413 +#, no-c-format +msgid "" +"Depending on your environment, you might have to set the configuration " +"option hibernate.connection.aggressive_release to true if " +"your application server shows \"connection containment\" exceptions." +msgstr "" +"如果应用程序服务器抛出\"connection containment\"异常, 根据你的环境,也许该将" +"配置属性 hibernate.connection.release_mode设为" +"after_statement." + +#. Tag: title +#: configuration.xml:1420 +#, no-c-format +msgid "Transaction strategy configuration" +msgstr "事务策略配置" + +#. Tag: para +#: configuration.xml:1422 +#, no-c-format +msgid "" +"The Hibernate Session API is independent of any " +"transaction demarcation system in your architecture. If you let Hibernate " +"use JDBC directly, through a connection pool, you may begin and end your " +"transactions by calling the JDBC API. If you run in a J2EE application " +"server, you might want to use bean-managed transactions and call the JTA API " +"and UserTransaction when needed." +msgstr "" +"在你的架构中,Hibernate的Session API是独立于任何事务分界系" +"统的. 如果你让Hibernate通过连接池直接使用JDBC, 你需要调用JDBC API来打开和关闭" +"你的事务. 如果你运行在J2EE应用程序服务器中, 你也许想用Bean管理的事务并在需要" +"的时候调用JTA API和UserTransaction." + +#. Tag: para +#: configuration.xml:1430 +#, no-c-format +msgid "" +"To keep your code portable between these two (and other) environments we " +"recommend the optional Hibernate Transaction API, which " +"wraps and hides the underlying system. You have to specify a factory class " +"for Transaction instances by setting the Hibernate " +"configuration property hibernate.transaction.factory_class." +msgstr "" +"为了让你的代码在两种(或其他)环境中可以移植,我们建议使用可选的Hibernate " +"Transaction API, 它包装并隐藏了底层系统. 你必须通过设置" +"Hibernate配置属性hibernate.transaction.factory_class来指" +"定 一个Transaction实例的工厂类." + +#. Tag: para +#: configuration.xml:1437 +#, no-c-format +msgid "There are three standard (built-in) choices:" +msgstr "有三个标准(内建)的选择:" + +#. Tag: literal +#: configuration.xml:1443 +#, no-c-format +msgid "org.hibernate.transaction.JDBCTransactionFactory" +msgstr "org.hibernate.transaction.JDBCTransactionFactory" + +#. Tag: para +#: configuration.xml:1445 +#, no-c-format +msgid "delegates to database (JDBC) transactions (default)" +msgstr "委托给数据库(JDBC)事务(默认)" + +#. Tag: literal +#: configuration.xml:1449 +#, no-c-format +msgid "org.hibernate.transaction.JTATransactionFactory" +msgstr "org.hibernate.transaction.JTATransactionFactory" + +#. Tag: para +#: configuration.xml:1451 +#, no-c-format +msgid "" +"delegates to container-managed transaction if an existing transaction is " +"underway in this context (e.g. EJB session bean method), otherwise a new " +"transaction is started and bean-managed transaction are used." +msgstr "" +"如果在上下文环境中存在运行着的事务(如, EJB会话Bean的方法), 则委托给容器管 理" +"的事务, 否则,将启动一个新的事务,并使用Bean管理的事务." + +#. Tag: literal +#: configuration.xml:1459 +#, no-c-format +msgid "org.hibernate.transaction.CMTTransactionFactory" +msgstr "org.hibernate.transaction.CMTTransactionFactory" + +#. Tag: para +#: configuration.xml:1461 +#, no-c-format +msgid "delegates to container-managed JTA transactions" +msgstr "委托给容器管理的JTA事务" + +#. Tag: para +#: configuration.xml:1466 +#, no-c-format +msgid "" +"You may also define your own transaction strategies (for a CORBA transaction " +"service, for example)." +msgstr "你也可以定义属于你自己的事务策略 (如, 针对CORBA的事务服务)" + +#. Tag: para +#: configuration.xml:1471 +#, no-c-format +msgid "" +"Some features in Hibernate (i.e. the second level cache, Contextual Sessions " +"with JTA, etc.) require access to the JTA TransactionManager in a managed environment. In an application server you have to " +"specify how Hibernate should obtain a reference to the " +"TransactionManager, since J2EE does not standardize a " +"single mechanism:" +msgstr "" +"Hibernate的一些特性 (比如二级缓存, Contextual Sessions with JTA等等)需要访问" +"在托管环境中的JTA TransactionManager. 由于J2EE没有标准化一" +"个单一的机制,Hibernate在应用程序服务器中,你必须指定Hibernate如何获得" +"TransactionManager的引用:" + +#. Tag: title +#: configuration.xml:1479 +#, no-c-format +msgid "JTA TransactionManagers" +msgstr "JTA TransactionManagers" + +#. Tag: entry +#: configuration.xml:1485 +#, no-c-format +msgid "Transaction Factory" +msgstr "Transaction工厂类" + +#. Tag: entry +#: configuration.xml:1486 +#, no-c-format +msgid "Application Server" +msgstr "应用程序服务器" + +#. Tag: literal +#: configuration.xml:1491 +#, no-c-format +msgid "org.hibernate.transaction.JBossTransactionManagerLookup" +msgstr "org.hibernate.transaction.JBossTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1492 +#, no-c-format +msgid "JBoss" +msgstr "JBoss" + +#. Tag: literal +#: configuration.xml:1495 +#, no-c-format +msgid "org.hibernate.transaction.WeblogicTransactionManagerLookup" +msgstr "org.hibernate.transaction.WeblogicTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1496 +#, no-c-format +msgid "Weblogic" +msgstr "Weblogic" + +#. Tag: literal +#: configuration.xml:1499 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereTransactionManagerLookup" +msgstr "org.hibernate.transaction.WebSphereTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1500 +#, no-c-format +msgid "WebSphere" +msgstr "WebSphere" + +#. Tag: literal +#: configuration.xml:1503 +#, no-c-format +msgid "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" +msgstr "org.hibernate.transaction.WebSphereExtendedJTATransactionLookup" + +#. Tag: entry +#: configuration.xml:1504 +#, no-c-format +msgid "WebSphere 6" +msgstr "WebSphere 6" + +#. Tag: literal +#: configuration.xml:1507 +#, no-c-format +msgid "org.hibernate.transaction.OrionTransactionManagerLookup" +msgstr "org.hibernate.transaction.OrionTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1508 +#, no-c-format +msgid "Orion" +msgstr "Orion" + +#. Tag: literal +#: configuration.xml:1511 +#, no-c-format +msgid "org.hibernate.transaction.ResinTransactionManagerLookup" +msgstr "org.hibernate.transaction.ResinTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1512 +#, no-c-format +msgid "Resin" +msgstr "Resin" + +#. Tag: literal +#: configuration.xml:1515 +#, no-c-format +msgid "org.hibernate.transaction.JOTMTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOTMTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1516 +#, no-c-format +msgid "JOTM" +msgstr "JOTM" + +#. Tag: literal +#: configuration.xml:1519 +#, no-c-format +msgid "org.hibernate.transaction.JOnASTransactionManagerLookup" +msgstr "org.hibernate.transaction.JOnASTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1520 +#, no-c-format +msgid "JOnAS" +msgstr "JOnAS" + +#. Tag: literal +#: configuration.xml:1523 +#, no-c-format +msgid "org.hibernate.transaction.JRun4TransactionManagerLookup" +msgstr "org.hibernate.transaction.JRun4TransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1524 +#, no-c-format +msgid "JRun4" +msgstr "JRun4" + +#. Tag: literal +#: configuration.xml:1527 +#, no-c-format +msgid "org.hibernate.transaction.BESTransactionManagerLookup" +msgstr "org.hibernate.transaction.BESTransactionManagerLookup" + +#. Tag: entry +#: configuration.xml:1528 +#, no-c-format +msgid "Borland ES" +msgstr "Borland ES" + +#. Tag: title +#: configuration.xml:1537 +#, no-c-format +msgid "JNDI-bound SessionFactory" +msgstr "JNDI绑定的SessionFactory" + +#. Tag: para +#: configuration.xml:1539 +#, no-c-format +msgid "" +"A JNDI bound Hibernate SessionFactory can simplify the " +"lookup of the factory and the creation of new Sessions. " +"Note that this is not related to a JNDI bound Datasource, " +"both simply use the same registry!" +msgstr "" +"与JNDI绑定的Hibernate的SessionFactory能简化工厂的查询,简" +"化创建新的Session. 需要注意的是这与JNDI绑定" +"Datasource没有关系, 它们只是恰巧用了相同的注册表!" + +#. Tag: para +#: configuration.xml:1546 +#, no-c-format +msgid "" +"If you wish to have the SessionFactory bound to a JNDI " +"namespace, specify a name (eg. java:hibernate/SessionFactory) using the property hibernate.session_factory_name. If this property is omitted, the SessionFactory " +"will not be bound to JNDI. (This is especially useful in environments with a " +"read-only JNDI default implementation, e.g. Tomcat.)" +msgstr "" +"如果你希望将SessionFactory绑定到一个JNDI的名字空间, 用属性" +"hibernate.session_factory_name指定一个名字(如, " +"java:hibernate/SessionFactory). 如果不设置这个属性, " +"SessionFactory将不会被绑定到JNDI中. (在以只读JNDI为默认实" +"现的环境中,这个设置尤其有用, 如Tomcat.)" + +#. Tag: para +#: configuration.xml:1554 +#, no-c-format +msgid "" +"When binding the SessionFactory to JNDI, Hibernate will " +"use the values of hibernate.jndi.url, hibernate." +"jndi.class to instantiate an initial context. If they are not " +"specified, the default InitialContext will be used." +msgstr "" +"在将SessionFactory绑定至JNDI时, Hibernate将使用" +"hibernate.jndi.url, 和hibernate.jndi.class的值来实例化初始环境(initial context). 如果它们没有被指定, 将使用默认" +"的InitialContext." + +#. Tag: para +#: configuration.xml:1561 +#, no-c-format +msgid "" +"Hibernate will automatically place the SessionFactory in " +"JNDI after you call cfg.buildSessionFactory(). This means " +"you will at least have this call in some startup code (or utility class) in " +"your application, unless you use JMX deployment with the " +"HibernateService (discussed later)." +msgstr "" +"在你调用cfg.buildSessionFactory()后, Hibernate会自动将" +"SessionFactory注册到JNDI. 这意味这你至少需要在你应用程序的" +"启动代码(或工具类)中完成这个调用, 除非你使用HibernateService来做JMX部署 (见后面讨论)." + +#. Tag: para +#: configuration.xml:1568 +#, no-c-format +msgid "" +"If you use a JNDI SessionFactory, an EJB or any other " +"class may obtain the SessionFactory using a JNDI lookup." +msgstr "" +"假若你使用JNDI SessionFactory,EJB或者任何其它类都可以从" +"JNDI中找到此SessionFactory。" + +#. Tag: para +#: configuration.xml:1573 +#, no-c-format +msgid "" +"We recommend that you bind the SessionFactory to JNDI in " +"a managed environment and use a static singleton " +"otherwise. To shield your application code from these details, we also " +"recommend to hide the actual lookup code for a SessionFactory in a helper class, such as HibernateUtil.getSessionFactory" +"(). Note that such a class is also a convenient way to startup " +"Hibernate—see chapter 1." +msgstr "" +"我们建议,在受管理的环境中,把SessionFactory绑定到JNDI,在" +"其它情况下,使用一个static(静态的)singleton。为了在你的应" +"用程序代码中隐藏这些细节,我们还建议你用一个helper类把实际查找" +"SessionFactory的代码隐藏起来,比如HibernateUtil." +"getSessionFactory()。注意,这个类也就可以方便地启动Hibernate,参见" +"第一章。" + +#. Tag: title +#: configuration.xml:1585 +#, no-c-format +msgid "Current Session context management with JTA" +msgstr "在JTA环境下使用Current Session context (当前session上下文)管理" + +#. Tag: para +#: configuration.xml:1587 +#, fuzzy, no-c-format +msgid "" +"The easiest way to handle Sessions and transactions is " +"Hibernates automatic \"current\" Session management. See " +"the discussion of current " +"sessions. Using the \"jta\" session context, if there is " +"no Hibernate Session associated with the current JTA " +"transaction, one will be started and associated with that JTA transaction " +"the first time you call sessionFactory.getCurrentSession(). The Sessions retrieved via " +"getCurrentSession() in \"jta\" context " +"will be set to automatically flush before the transaction completes, close " +"after the transaction completes, and aggressively release JDBC connections " +"after each statement. This allows the Sessions to be " +"managed by the life cycle of the JTA transaction to which it is associated, " +"keeping user code clean of such management concerns. Your code can either " +"use JTA programmatically through UserTransaction, or " +"(recommended for portable code) use the Hibernate Transaction API to set transaction boundaries. If you run in an EJB container, " +"declarative transaction demarcation with CMT is preferred." +msgstr "" +"在Hibernate中,管理Session和transaction最好的方法是自动的" +"\"当前\"Session管理。请参见contextual sessions一节的讨论。使用\"jta" +"\"session上下文,假若在当前JTA事务中还没有" +"HibernateSession关联,第一次sessionFactory." +"getCurrentSession()调用会启动一个Session,并关联到当前的JTA事务。在" +"\"jta\"上下文中调用getCurrentSession()" +"获得的Session,会被设置为在transaction关闭的时候自动flush" +"(清洗)、在transaction关闭之后自动关闭,每句语句之后主动释放JDBC连接。这就可" +"以根据JTA事务的生命周期来管理与之关联的Session,用户代码中" +"就可以不再考虑这些管理。你的代码也可以通过UserTransaction" +"用编程方式使用JTA,或者(我们建议,为了便于移植代码)使用Hibernate的" +"Transaction API来设置transaction边界。如果你的代码运行在" +"EJB容器中,建议对CMT使用声明式事务声明。" + +#. Tag: title +#: configuration.xml:1610 +#, no-c-format +msgid "JMX deployment" +msgstr "JMX部署" + +#. Tag: para +#: configuration.xml:1612 +#, no-c-format +msgid "" +"The line cfg.buildSessionFactory() still has to be " +"executed somewhere to get a SessionFactory into JNDI. You " +"can do this either in a static initializer block (like " +"the one in HibernateUtil) or you deploy Hibernate as a " +"managed service." +msgstr "" +"为了将SessionFactory注册到JNDI中,cfg." +"buildSessionFactory()这行代码仍需在某处被执行. 你可在一个" +"static初始化块(像HibernateUtil中的那样)" +"中执行它或将Hibernate部署为一个托管的服务." + +#. Tag: para +#: configuration.xml:1620 +#, no-c-format +msgid "" +"Hibernate is distributed with org.hibernate.jmx.HibernateService for deployment on an application server with JMX capabilities, such " +"as JBoss AS. The actual deployment and configuration is vendor specific. " +"Here is an example jboss-service.xml for JBoss 4.0.x:" +msgstr "" +"为了部署在一个支持JMX的应用程序服务器上,Hibernate和 org.hibernate." +"jmx.HibernateService一同分发,如Jboss AS。 实际的部署和配置是由应用" +"程序服务器提供者指定的. 这里是JBoss 4.0.x的jboss-service.xml样例:" + +#. Tag: programlisting +#: configuration.xml:1627 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" jboss.jca:service=RARDeployer\n" +" jboss.jca:service=LocalTxCM,name=HsqlDS\n" +"\n" +" \n" +" java:/hibernate/SessionFactory\n" +"\n" +" \n" +" java:HsqlDS\n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" \n" +" org.hibernate.transaction.JTATransactionFactory\n" +" \n" +" org.hibernate.transaction.JBossTransactionManagerLookup\n" +" true\n" +" true\n" +"\n" +" \n" +" 5\n" +"\n" +" \n" +" true\n" +" org.hibernate.cache." +"EhCacheProvider\n" +" true\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" auction/Item.hbm.xml,auction/Category." +"hbm.xml\n" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: configuration.xml:1629 +#, no-c-format +msgid "" +"This file is deployed in a directory called META-INF and " +"packaged in a JAR file with the extension .sar (service " +"archive). You also need to package Hibernate, its required third-party " +"libraries, your compiled persistent classes, as well as your mapping files " +"in the same archive. Your enterprise beans (usually session beans) may be " +"kept in their own JAR file, but you may include this EJB JAR file in the " +"main service archive to get a single (hot-)deployable unit. Consult the " +"JBoss AS documentation for more information about JMX service and EJB " +"deployment." +msgstr "" +"这个文件是部署在META-INF目录下的, 并会被打包到以." +"sar (service archive)为扩展名的JAR文件中. 同时,你需要将Hibernate、" +"它所需要的第三方库、你编译好的持久化类以及你的映射定义文件打包进同一个文档. " +"你的企业Bean(一般为会话Bean)可能会被打包成它们自己的JAR文件, 但你也许会将EJB " +"JAR文件一同包含进能独立(热)部署的主服务文档. 参考JBoss AS文档以了解更多的JMX" +"服务与EJB部署的信息." + +#~ msgid " (optional)" +#~ msgstr " (可选)" + +#~ msgid "InitialContextFactory" +#~ msgstr "InitialContextFactory" + +#~ msgid "class of the JNDI " +#~ msgstr "JNDI 类" + +#, fuzzy +#~ msgid "eg." +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "eg.\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "取值" + +#~ msgid "full.classname.of.Dialect" +#~ msgstr "full.classname.of.Dialect" + +#~ msgid "debug" +#~ msgstr "debug" + +#~ msgid "SCHEMA_NAME" +#~ msgstr "SCHEMA_NAME" + +#~ msgid "CATALOG_NAME" +#~ msgstr "CATALOG_NAME" + +#~ msgid "SessionFactory" +#~ msgstr "SessionFactory" + +#~ msgid "jndi/composite/name" +#~ msgstr "jndi/composite/name" + +#~ msgid "0" +#~ msgstr "0" + +#~ msgid "false" +#~ msgstr "false" + +#~ msgid "Statement.setFetchSize()" +#~ msgstr "Statement.setFetchSize()" + +#~ msgid "true" +#~ msgstr "executeBatch()" + +#~ msgid "executeBatch()" +#~ msgstr "true" + +#~ msgid "Batcher" +#~ msgstr "Batcher" + +#~ msgid "classname.of.BatcherFactory" +#~ msgstr "classname.of.BatcherFactory" + +#~ msgid "binary" +#~ msgstr "binary (二进制)" + +#~ msgid "serializable" +#~ msgstr "serializable (可序列化)" + +#~ msgid "PreparedStatement.getGeneratedKeys()" +#~ msgstr "PreparedStatement.getGeneratedKeys()" + +#~ msgid "true|false" +#~ msgstr "true|false" + +#~ msgid "ConnectionProvider" +#~ msgstr "ConnectionProvider" + +#~ msgid "classname.of.ConnectionProvider" +#~ msgstr "classname.of.ConnectionProvider" + +#~ msgid "java.sql.Connection" +#~ msgstr "java.sql.Connection" + +#~ msgid "1, 2, 4, 8" +#~ msgstr "1, 2, 4, 8" + +#~ msgid "after_statement" +#~ msgstr "after_statement" + +#~ msgid "after_transaction" +#~ msgstr "after_transaction" + +#~ msgid "auto" +#~ msgstr "auto" + +#~ msgid "<propertyName>" +#~ msgstr "<propertyName>" + +#~ msgid "hibernate.connection." +#~ msgstr "hibernate.connection." + +#~ msgid "propertyName" +#~ msgstr "propertyName" + +#~ msgid "DriverManager.getConnection()" +#~ msgstr "DriverManager.getConnection()" + +#~ msgid "Pass the JDBC property to ." +#~ msgstr "将JDBC属性传递到中去." + +#~ msgid "hibernate.jndi." +#~ msgstr "hibernate.jndi." + +#~ msgid "Pass the property to the JNDI ." +#~ msgstr "将属性传递到JNDI 中去." + +#~ msgid "CacheProvider" +#~ msgstr "CacheProvider" + +#~ msgid "classname.of.CacheProvider" +#~ msgstr "classname.of.CacheProvider" + +#~ msgid "<cache>" +#~ msgstr "<cache>" + +#~ msgid "QueryCache" +#~ msgstr "QueryCache" + +#~ msgid "StandardQueryCache" +#~ msgstr "StandardQueryCache" + +#~ msgid "classname.of.QueryCache" +#~ msgstr "classname.of.QueryCache" + +#~ msgid "prefix" +#~ msgstr "prefix" + +#~ msgid "TransactionFactory" +#~ msgstr "TransactionFactory" + +#~ msgid "Transaction" +#~ msgstr "Transaction" + +#~ msgid "JDBCTransactionFactory" +#~ msgstr "JDBCTransactionFactory" + +#~ msgid "classname.of.TransactionFactory" +#~ msgstr "classname.of.TransactionFactory" + +#~ msgid "JTATransactionFactory" +#~ msgstr "JTATransactionFactory" + +#~ msgid "UserTransaction" +#~ msgstr "UserTransaction" + +#~ msgid "TransactionManagerLookup" +#~ msgstr "TransactionManagerLookup" + +#~ msgid "classname.of.TransactionManagerLookup" +#~ msgstr "classname.of.TransactionManagerLookup" + +#~ msgid "Session" +#~ msgstr "Session" + +#~ msgid "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" +#~ msgstr "hqlLiteral=SQL_LITERAL, hqlFunction=SQLFUNC" + +#~ msgid "create-drop" +#~ msgstr "create-drop" + +#~ msgid "hibernate.cfg.xml" +#~ msgstr "hibernate.cfg.xml" + +#~ msgid "DB2" +#~ msgstr "DB2" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/events.po b/documentation/envers/src/main/docbook/zh-CN/content/events.po new file mode 100644 index 0000000000..54a5c13151 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/events.po @@ -0,0 +1,457 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: events.xml:29 +#, no-c-format +msgid "Interceptors and events" +msgstr "拦截器与事件(Interceptors and events)" + +#. Tag: para +#: events.xml:31 +#, no-c-format +msgid "" +"It is often useful for the application to react to certain events that occur " +"inside Hibernate. This allows implementation of certain kinds of generic " +"functionality, and extension of Hibernate functionality." +msgstr "" +"应用程序能够响应Hibernate内部产生的特定事件是非常有用的。这样就允许实现某些通" +"用的功能 以及允许对Hibernate功能进行扩展。" + +#. Tag: title +#: events.xml:38 +#, no-c-format +msgid "Interceptors" +msgstr "拦截器(Interceptors)" + +#. Tag: para +#: events.xml:40 +#, no-c-format +msgid "" +"The Interceptor interface provides callbacks from the " +"session to the application allowing the application to inspect and/or " +"manipulate properties of a persistent object before it is saved, updated, " +"deleted or loaded. One possible use for this is to track auditing " +"information. For example, the following Interceptor " +"automatically sets the createTimestamp when an " +"Auditable is created and updates the " +"lastUpdateTimestamp property when an Auditable is updated." +msgstr "" +"Interceptor接口提供了从会话(session)回调(callback)应用程序" +"(application)的机制, 这种回调机制可以允许应用程序在持久化对象被保存、更新、" +"删除或是加载之前,检查并(或)修改其 属性。一个可能的用途,就是用来跟踪审核" +"(auditing)信息。例如:下面的这个拦截器,会在一个实现了 " +"Auditable接口的对象被创建时自动地设置" +"createTimestamp属性,并在实现了 Auditable接口的对象被更新时,同步更新lastUpdateTimestamp属" +"性。" + +#. Tag: para +#: events.xml:51 +#, no-c-format +msgid "" +"You may either implement Interceptor directly or (better) " +"extend EmptyInterceptor." +msgstr "" +"你可以直接实现Interceptor接口,也可以(最好)继承自" +"EmptyInterceptor。" + +#. Tag: programlisting +#: events.xml:56 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:58 +#, no-c-format +msgid "" +"Interceptors come in two flavors: Session-scoped and " +"SessionFactory-scoped." +msgstr "" +"拦截器可以有两种:Session范围内的,和" +"SessionFactory范围内的。" + +#. Tag: para +#: events.xml:63 +#, no-c-format +msgid "" +"A Session-scoped interceptor is specified when a session " +"is opened using one of the overloaded SessionFactory.openSession() methods " +"accepting an Interceptor." +msgstr "" +"当使用某个重载的SessionFactory.openSession()使用Interceptor作为参数调用打开一个session的时候,就指定了Session" +"范围内的拦截器。" + +#. Tag: programlisting +#: events.xml:69 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: events.xml:71 +#, no-c-format +msgid "" +"A SessionFactory-scoped interceptor is registered with " +"the Configuration object prior to building the " +"SessionFactory. In this case, the supplied interceptor " +"will be applied to all sessions opened from that SessionFactory; this is true unless a session is opened explicitly specifying the " +"interceptor to use. SessionFactory-scoped interceptors " +"must be thread safe, taking care to not store session-specific state since " +"multiple sessions will use this interceptor (potentially) concurrently." +msgstr "" +"SessionFactory范围内的拦截器要通过Configuration中注册,而这必须在创建SessionFactory之前。在这种情" +"况下,给出的拦截器会被这个SessionFactory所打开的所有" +"session使用了;除非session打开时明确指明了使用的拦截器。" +"SessionFactory范围内的拦截器,必须是线程安全的,因为多个" +"session可能并发使用这个拦截器,要因此小心不要保存与session相关的状态。" + +#. Tag: programlisting +#: events.xml:80 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: events.xml:85 +#, no-c-format +msgid "Event system" +msgstr "事件系统(Event system)" + +#. Tag: para +#: events.xml:87 +#, no-c-format +msgid "" +"If you have to react to particular events in your persistence layer, you may " +"also use the Hibernate3 event architecture. The event " +"system can be used in addition or as a replacement for interceptors." +msgstr "" +"如果需要响应持久层的某些特殊事件,你也可以使用Hibernate3的事件框架。 该事件系" +"统可以用来替代拦截器,也可以作为拦截器的补充来使用。" + +#. Tag: para +#: events.xml:93 +#, no-c-format +msgid "" +"Essentially all of the methods of the Session interface " +"correlate to an event. You have a LoadEvent, a " +"FlushEvent, etc (consult the XML configuration-file DTD " +"or the org.hibernate.event package for the full list of " +"defined event types). When a request is made of one of these methods, the " +"Hibernate Session generates an appropriate event and " +"passes it to the configured event listeners for that type. Out-of-the-box, " +"these listeners implement the same processing in which those methods always " +"resulted. However, you are free to implement a customization of one of the " +"listener interfaces (i.e., the LoadEvent is processed by " +"the registered implemenation of the LoadEventListener " +"interface), in which case their implementation would be responsible for " +"processing any load() requests made of the " +"Session." +msgstr "" +"基本上,Session接口的每个方法都有相对应的事件。比如 " +"LoadEventFlushEvent,等等(查阅XML配" +"置文件 的DTD,以及org.hibernate.event包来获得所有已定义的" +"事件的列表)。当某个方 法被调用时,Hibernate Session会生成" +"一个相对应的事件并激活所 有配置好的事件监听器。系统预设的监听器实现的处理过程" +"就是被监听的方法要做的(被监听的方法所做的其实仅仅是激活监听器, “实际”的工作" +"是由监听器完成的)。不过,你可以自由地选择实现 一个自己定制的监听器(比如,实" +"现并注册用来处理处理LoadEvent的" +"LoadEventListener接口), 来负责处理所有的调用" +"Sessionload()方法的请求。" + +#. Tag: para +#: events.xml:108 +#, no-c-format +msgid "" +"The listeners should be considered effectively singletons; meaning, they are " +"shared between requests, and thus should not save any state as instance " +"variables." +msgstr "" +"监听器应该被看作是单例(singleton)对象,也就是说,所有同类型的事件的处理共享同" +"一个监听器实例,因此监听器 不应该保存任何状态(也就是不应该使用成员变量)。" + +#. Tag: para +#: events.xml:113 +#, no-c-format +msgid "" +"A custom listener should implement the appropriate interface for the event " +"it wants to process and/or extend one of the convenience base classes (or " +"even the default event listeners used by Hibernate out-of-the-box as these " +"are declared non-final for this purpose). Custom listeners can either be " +"registered programmatically through the Configuration " +"object, or specified in the Hibernate configuration XML (declarative " +"configuration through the properties file is not supported). Here's an " +"example of a custom load event listener:" +msgstr "" +"用户定制的监听器应该实现与所要处理的事件相对应的接口,或者从一个合适的基类继" +"承(甚至是从Hibernate自带的默认事件监听器类继承, 为了方便你这样做,这些类都" +"被声明成non-final的了)。用户定制的监听器可以通过编程使用" +"Configuration对象 来注册,也可以在Hibernate的XML格式的配置" +"文件中进行声明(不支持在Properties格式的配置文件声明监听器)。 下面是一个用户" +"定制的加载事件(load event)的监听器:" + +#. Tag: programlisting +#: events.xml:123 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:125 +#, no-c-format +msgid "" +"You also need a configuration entry telling Hibernate to use the listener in " +"addition to the default listener:" +msgstr "" +"你还需要修改一处配置,来告诉Hibernate,除了默认的监听器,还要附加选定的监听" +"器。" + +#. Tag: programlisting +#: events.xml:130 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:132 +#, no-c-format +msgid "Instead, you may register it programmatically:" +msgstr "看看用另一种方式,通过编程的方式来注册它。" + +#. Tag: programlisting +#: events.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: events.xml:138 +#, no-c-format +msgid "" +"Listeners registered declaratively cannot share instances. If the same class " +"name is used in multiple <listener/> elements, each " +"reference will result in a separate instance of that class. If you need the " +"capability to share listener instances between listener types you must use " +"the programmatic registration approach." +msgstr "" +"通过在XML配置文件声明而注册的监听器不能共享实例。如果在多个<" +"listener/>节点中使用 了相同的类的名字,则每一个引用都将会产生一" +"个独立的实例。如果你需要在多个监听器类型之间共享 监听器的实例,则你必须使用编" +"程的方式来进行注册。" + +#. Tag: para +#: events.xml:146 +#, no-c-format +msgid "" +"Why implement an interface and define the specific type during " +"configuration? Well, a listener implementation could implement multiple " +"event listener interfaces. Having the type additionally defined during " +"registration makes it easier to turn custom listeners on or off during " +"configuration." +msgstr "" +"为什么我们实现了特定监听器的接口,在注册的时候还要明确指出我们要注册哪个事件" +"的监听器呢? 这是因为一个类可能实现多个监听器的接口。在注册的时候明确指定要监" +"听的事件,可以让启用或者禁用对某个事件的监听的配置工作简单些。" + +#. Tag: title +#: events.xml:156 +#, no-c-format +msgid "Hibernate declarative security" +msgstr "Hibernate的声明式安全机制" + +#. Tag: para +#: events.xml:157 +#, no-c-format +msgid "" +"Usually, declarative security in Hibernate applications is managed in a " +"session facade layer. Now, Hibernate3 allows certain actions to be " +"permissioned via JACC, and authorized via JAAS. This is optional " +"functionality built on top of the event architecture." +msgstr "" +"通常,Hibernate应用程序的声明式安全机制由会话外观层(session facade)所管理。 " +"现在,Hibernate3允许某些特定的行为由JACC进行许可管理,由JAAS进行授权管理。 本" +"功能是一个建立在事件框架之上的可选的功能。" + +#. Tag: para +#: events.xml:163 +#, no-c-format +msgid "" +"First, you must configure the appropriate event listeners, to enable the use " +"of JAAS authorization." +msgstr "" +"首先,你必须要配置适当的事件监听器(event listener),来激活使用JAAS管理授权" +"的功能。" + +#. Tag: programlisting +#: events.xml:168 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:170 +#, no-c-format +msgid "" +"Note that <listener type=\"...\" class=\"...\"/> is " +"just a shorthand for <event type=\"...\"><listener class=" +"\"...\"/></event> when there is exactly one listener for " +"a particular event type." +msgstr "" +"注意,<listener type=\"...\" class=\"...\"/>只是" +"<event type=\"...\"><listener class=\"...\"/></" +"event>的简写,对每一个事件类型都必须严格的有一个监听器与之对应。" + +#. Tag: para +#: events.xml:176 +#, no-c-format +msgid "" +"Next, still in hibernate.cfg.xml, bind the permissions to " +"roles:" +msgstr "" +"接下来,仍然在hibernate.cfg.xml文件中,绑定角色的权限:" + +#. Tag: programlisting +#: events.xml:180 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: events.xml:182 +#, no-c-format +msgid "The role names are the roles understood by your JACC provider." +msgstr "这些角色的名字就是你的JACC provider所定义的角色的名字。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/example_mappings.po b/documentation/envers/src/main/docbook/zh-CN/content/example_mappings.po new file mode 100644 index 0000000000..bded3ec820 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/example_mappings.po @@ -0,0 +1,785 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_mappings.xml:29 +#, no-c-format +msgid "Example: Various Mappings" +msgstr "示例:复杂映射实例" + +#. Tag: para +#: example_mappings.xml:31 +#, no-c-format +msgid "This chapters shows off some more complex association mappings." +msgstr "本章展示了一些较为复杂的关系映射。" + +#. Tag: title +#: example_mappings.xml:36 +#, no-c-format +msgid "Employer/Employee" +msgstr "Employer(雇主)/Employee(雇员)" + +#. Tag: para +#: example_mappings.xml:38 +#, no-c-format +msgid "" +"The following model of the relationship between Employer " +"and Employee uses an actual entity class " +"(Employment) 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 "" +"下面关于EmployerEmployee的关系模型" +"使用了一个真实的实体类 (Employment)来表述,这是因为对于相" +"同的雇员和雇主可能会有多个雇佣时间段。 对于金额和雇员姓名,用Components建模。" + +#. Tag: para +#: example_mappings.xml:55 +#, no-c-format +msgid "Heres a possible mapping document:" +msgstr "映射文件可能是这样:" + +#. Tag: programlisting +#: example_mappings.xml:59 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" employer_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" employment_id_seq\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" employee_id_seq\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:61 +#, no-c-format +msgid "" +"And heres the table schema generated by SchemaExport." +msgstr "用SchemaExport生成表结构。" + +#. Tag: programlisting +#: example_mappings.xml:65 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:70 +#, no-c-format +msgid "Author/Work" +msgstr "Author(作家)/Work(作品)" + +#. Tag: para +#: example_mappings.xml:72 +#, no-c-format +msgid "" +"Consider the following model of the relationships between Work, Author and Person. We " +"represent the relationship between Work and " +"Author as a many-to-many association. We choose to " +"represent the relationship between Author and " +"Person as one-to-one association. Another possibility " +"would be to have Author extend Person." +msgstr "" +"考虑下面的Work,Author 和 " +"Person模型的关系。 我们用多对多关系来描述WorkAuthor, 用一对一关系来描述AuthorPerson, 另一种可能性是Author继承Person。" + +#. Tag: para +#: example_mappings.xml:90 +#, no-c-format +msgid "" +"The following mapping document correctly represents these relationships:" +msgstr "下面的映射文件正确的描述了这些关系:" + +#. Tag: programlisting +#: example_mappings.xml:94 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:96 +#, no-c-format +msgid "" +"There are four tables in this mapping. works, " +"authors and persons hold work, author " +"and person data respectively. author_work is an " +"association table linking authors to works. Heres the table schema, as " +"generated by SchemaExport." +msgstr "" +"映射中有4个表。works, authors 和 " +"persons 分别保存着work,author和person的数据。" +"author_work是authors和works的关联表。 表结构是由" +"SchemaExport生成的。" + +#. Tag: programlisting +#: example_mappings.xml:104 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:109 +#, no-c-format +msgid "Customer/Order/Product" +msgstr "Customer(客户)/Order(订单)/Product(产品)" + +#. Tag: para +#: example_mappings.xml:111 +#, no-c-format +msgid "" +"Now consider a model of the relationships between Customer, Order and LineItem and " +"Product. There is a one-to-many association between " +"Customer and Order, but how should we " +"represent Order / LineItem / " +"Product? I've chosen to map LineItem " +"as an association class representing the many-to-many association between " +"Order and Product. In Hibernate, this " +"is called a composite element." +msgstr "" +"现在来考虑Customer,Order , " +"LineItemProduct关系的模型。" +"CustomerOrder之间 是一对多的关系," +"但是我们怎么来描述Order / LineItem / " +"Product呢? 我可以把LineItem作为描述" +"OrderProduct 多对多关系的关联类,在" +"Hibernate,这叫做组合元素。" + +#. Tag: para +#: example_mappings.xml:131 +#, no-c-format +msgid "The mapping document:" +msgstr "映射文件如下:" + +#. Tag: programlisting +#: example_mappings.xml:135 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: example_mappings.xml:137 +#, no-c-format +msgid "" +"customers, orders, " +"line_items and products hold customer, " +"order, order line item and product data respectively. line_items also acts as an association table linking orders with products." +msgstr "" +"customers, orders, " +"line_itemsproducts 分别保存着" +"customer, order, order line item 和 product的数据。 line_items也作为连接orders 和 products的关联表。" + +#. Tag: programlisting +#: example_mappings.xml:144 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_mappings.xml:149 +#, no-c-format +msgid "Miscellaneous example mappings" +msgstr "杂例" + +#. Tag: para +#: example_mappings.xml:151 +#, no-c-format +msgid "" +"These examples are all taken from the Hibernate test suite. You will find " +"many other useful example mappings there. Look in the test folder of the Hibernate distribution." +msgstr "" +"这些例子全部来自于Hibernate的test suite,同时你也可以找到其他有用的例子。 可" +"以参考Hibernate的test目录。" + +#. Tag: para +#: example_mappings.xml:157 +#, no-c-format +msgid "TODO: put words around this stuff" +msgstr "TODO: put words around this stuff" + +#. Tag: title +#: example_mappings.xml:160 +#, no-c-format +msgid "\"Typed\" one-to-one association" +msgstr "\"Typed\" one-to-one association" + +#. Tag: programlisting +#: example_mappings.xml:161 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" name\n" +" 'HOME'\n" +" \n" +" \n" +" name\n" +" 'MAILING'\n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:165 +#, no-c-format +msgid "Composite key example" +msgstr "Composite key example" + +#. Tag: programlisting +#: example_mappings.xml:166 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity*p.price) \n" +" from LineItem li, Product p \n" +" where li.productId = p.productId \n" +" and li.customerId = customerId \n" +" and li.orderNumber = orderNumber )\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ( select sum(li.quantity) \n" +" from LineItem li \n" +" where li.productId = productId )\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:170 +#, no-c-format +msgid "Many-to-many with shared composite key attribute" +msgstr "" +"共有组合键属性的多对多(Many-to-many with shared composite key attribute)" + +#. Tag: programlisting +#: example_mappings.xml:171 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" org\n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:175 +#, no-c-format +msgid "Content based discrimination" +msgstr "Content based discrimination" + +#. Tag: programlisting +#: example_mappings.xml:176 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" case \n" +" when title is not null then 'E' \n" +" when salesperson is not null then 'C' \n" +" else 'P' \n" +" end\n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: example_mappings.xml:180 +#, no-c-format +msgid "Associations on alternate keys" +msgstr "Associations on alternate keys" + +#. Tag: programlisting +#: example_mappings.xml:181 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/example_parentchild.po b/documentation/envers/src/main/docbook/zh-CN/content/example_parentchild.po new file mode 100644 index 0000000000..160bb1fd2b --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/example_parentchild.po @@ -0,0 +1,572 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_parentchild.xml:29 +#, no-c-format +msgid "Example: Parent/Child" +msgstr "示例:父子关系(Parent Child Relationships)" + +#. Tag: para +#: example_parentchild.xml:31 +#, no-c-format +msgid "" +"One of the very first things that new users try to do with Hibernate is to " +"model a parent / child type relationship. There are two different approaches " +"to this. For various reasons the most convenient approach, especially for " +"new users, is to model both Parent and Child as entity classes with a <one-to-many> " +"association from Parent to Child. (The " +"alternative approach is to declare the Child as a " +"<composite-element>.) Now, it turns out that " +"default semantics of a one to many association (in Hibernate) are much less " +"close to the usual semantics of a parent / child relationship than those of " +"a composite element mapping. We will explain how to use a " +"bidirectional one to many association with cascades to " +"model a parent / child relationship efficiently and elegantly. It's not at " +"all difficult!" +msgstr "" +"刚刚接触Hibernate的人大多是从父子关系(parent / child type relationship)的建" +"模入手的。父子关系的建模有两种方法。由于种种原因,最方便的方法是把" +"ParentChild都建模成实体类,并创建一个" +"从Parent指向Child的<one-to-many>" +"关联,对新手来说尤其如此。还有一种方法,就是将Child声明为" +"一个<composite-element>(组合元素)。 事实上在" +"Hibernate中one to many关联的默认语义远没有composite element贴近parent / child" +"关系的通常语义。下面我们会阐述如何使用带有级联的双向一对多关联" +"(bidirectional one to many association with cascades)去建立有效、" +"优美的parent / child关系。这一点也不难!" + +#. Tag: title +#: example_parentchild.xml:45 +#, no-c-format +msgid "A note about collections" +msgstr "关于collections需要注意的一点" + +#. Tag: para +#: example_parentchild.xml:47 +#, no-c-format +msgid "" +"Hibernate collections are considered to be a logical part of their owning " +"entity; never of the contained entities. This is a crucial distinction! It " +"has the following consequences:" +msgstr "" +"Hibernate collections被当作其所属实体而不是其包含实体的一个逻辑部分。这非常重" +"要!它主要体现为以下几点:" + +#. Tag: para +#: example_parentchild.xml:54 +#, no-c-format +msgid "" +"When we remove / add an object from / to a collection, the version number of " +"the collection owner is incremented." +msgstr "当删除或增加collection中对象的时候,collection所属者的版本值会递增。" + +#. Tag: para +#: example_parentchild.xml:60 +#, no-c-format +msgid "" +"If an object that was removed from a collection is an instance of a value " +"type (eg, a composite element), that object will cease to be persistent and " +"its state will be completely removed from the database. Likewise, adding a " +"value type instance to the collection will cause its state to be immediately " +"persistent." +msgstr "" +"如果一个从collection中移除的对象是一个值类型(value type)的实例,比如" +"composite element,那么这个对象的持久化状态将会终止,其在数据库中对应的记录会" +"被删除。同样的,向collection增加一个value type的实例将会使之立即被持久化。" + +#. Tag: para +#: example_parentchild.xml:68 +#, no-c-format +msgid "" +"On the other hand, if an entity is removed from a collection (a one-to-many " +"or many-to-many association), it will not be deleted, by default. This " +"behaviour is completely consistent - a change to the internal state of " +"another entity should not cause the associated entity to vanish! Likewise, " +"adding an entity to a collection does not cause that entity to become " +"persistent, by default." +msgstr "" +"另一方面,如果从一对多或多对多关联的collection中移除一个实体,在缺省情况下这" +"个对象并不会被删除。这个行为是完全合乎逻辑的--改变一个实体的内部状态不应该" +"使与它关联的实体消失掉!同样的,向collection增加一个实体不会使之被持久化。" + +#. Tag: para +#: example_parentchild.xml:78 +#, no-c-format +msgid "" +"Instead, the default behaviour is that adding an entity to a collection " +"merely creates a link between the two entities, while removing it removes " +"the link. This is very appropriate for all sorts of cases. Where it is not " +"appropriate at all is the case of a parent / child relationship, where the " +"life of the child is bound to the life cycle of the parent." +msgstr "" +"实际上,向Collection增加一个实体的缺省动作只是在两个实体之间创建一个连接而" +"已,同样移除的时候也只是删除连接。这种处理对于所有的情况都是合适的。对于父子" +"关系则是完全不适合的,在这种关系下,子对象的生存绑定于父对象的生存周期。" + +#. Tag: title +#: example_parentchild.xml:88 +#, no-c-format +msgid "Bidirectional one-to-many" +msgstr "双向的一对多关系(Bidirectional one-to-many)" + +#. Tag: para +#: example_parentchild.xml:90 +#, no-c-format +msgid "" +"Suppose we start with a simple <one-to-many> " +"association from Parent to Child." +msgstr "假设我们要实现一个简单的从Parent到Child的<one-to-many>关联。" + +#. Tag: programlisting +#: example_parentchild.xml:95 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:97 +#, no-c-format +msgid "If we were to execute the following code" +msgstr "如果我们运行下面的代码" + +#. Tag: programlisting +#: example_parentchild.xml:101 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:103 +#, no-c-format +msgid "Hibernate would issue two SQL statements:" +msgstr "Hibernate会产生两条SQL语句:" + +#. Tag: para +#: example_parentchild.xml:109 +#, no-c-format +msgid "" +"an INSERT to create the record for c" +msgstr "一条INSERT语句,为c创建一条记录" + +#. Tag: para +#: example_parentchild.xml:112 +#, no-c-format +msgid "" +"an UPDATE to create the link from p to " +"c" +msgstr "" +"一条UPDATE语句,创建从pc的连接" + +#. Tag: para +#: example_parentchild.xml:119 +#, no-c-format +msgid "" +"This is not only inefficient, but also violates any NOT NULL constraint on the parent_id column. We can fix " +"the nullability constraint violation by specifying not-null=\"true" +"\" in the collection mapping:" +msgstr "" +"这样做不仅效率低,而且违反了列parent_id非空的限制。我们可" +"以通过在集合类映射上指定not-null=\"true\"来解决违反非空约" +"束的问题:" + +#. Tag: programlisting +#: example_parentchild.xml:125 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:127 +#, no-c-format +msgid "However, this is not the recommended solution." +msgstr "然而,这并非是推荐的解决方法。" + +#. Tag: para +#: example_parentchild.xml:130 +#, no-c-format +msgid "" +"The underlying cause of this behaviour is that the link (the foreign key " +"parent_id) from p to c is not considered part of the state of the Child " +"object and is therefore not created in the INSERT. So the " +"solution is to make the link part of the Child mapping." +msgstr "" +"这种现象的根本原因是从pc的连接(外键" +"parent_id)没有被当作Child对象状态的一部分,因而没有在" +"INSERT语句中被创建。因此解决的办法就是把这个连接添加到Child的映射中。" + +#. Tag: programlisting +#: example_parentchild.xml:137 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:139 +#, no-c-format +msgid "" +"(We also need to add the parent property to the " +"Child class.)" +msgstr "" +"(我们还需要为类Child添加parent属性)" + +#. Tag: para +#: example_parentchild.xml:143 +#, no-c-format +msgid "" +"Now that the Child entity is managing the state of the " +"link, we tell the collection not to update the link. We use the " +"inverse attribute." +msgstr "" +"现在实体Child在管理连接的状态,为了使collection不更新连" +"接,我们使用inverse属性。" + +#. Tag: programlisting +#: example_parentchild.xml:148 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:150 +#, no-c-format +msgid "The following code would be used to add a new Child" +msgstr "下面的代码是用来添加一个新的Child" + +#. Tag: programlisting +#: example_parentchild.xml:154 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:156 +#, no-c-format +msgid "And now, only one SQL INSERT would be issued!" +msgstr "现在,只会有一条INSERT语句被执行!" + +#. Tag: para +#: example_parentchild.xml:160 +#, no-c-format +msgid "" +"To tighten things up a bit, we could create an addChild() " +"method of Parent." +msgstr "" +"为了让事情变得井井有条,可以为Parent加一个" +"addChild()方法。" + +#. Tag: programlisting +#: example_parentchild.xml:165 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:167 +#, no-c-format +msgid "Now, the code to add a Child looks like" +msgstr "现在,添加Child的代码就是这样" + +#. Tag: programlisting +#: example_parentchild.xml:171 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_parentchild.xml:176 +#, no-c-format +msgid "Cascading life cycle" +msgstr "级联生命周期(Cascading life cycle)" + +#. Tag: para +#: example_parentchild.xml:178 +#, no-c-format +msgid "" +"The explicit call to save() is still annoying. We will " +"address this by using cascades." +msgstr "" +"需要显式调用save()仍然很麻烦,我们可以用级联来解决这个问" +"题。" + +#. Tag: programlisting +#: example_parentchild.xml:183 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:185 +#, no-c-format +msgid "This simplifies the code above to" +msgstr "这样上面的代码可以简化为:" + +#. Tag: programlisting +#: example_parentchild.xml:189 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:191 +#, no-c-format +msgid "" +"Similarly, we don't need to iterate over the children when saving or " +"deleting a Parent. The following removes p and all its children from the database." +msgstr "" +"同样的,保存或删除Parent对象的时候并不需要遍历其子对象。 " +"下面的代码会删除对象p及其所有子对象对应的数据库记录。" + +#. Tag: programlisting +#: example_parentchild.xml:196 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:198 +#, no-c-format +msgid "However, this code" +msgstr "然而,这段代码" + +#. Tag: programlisting +#: example_parentchild.xml:202 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:204 +#, no-c-format +msgid "" +"will not remove c from the database; it will ony remove " +"the link to p (and cause a NOT NULL " +"constraint violation, in this case). You need to explicitly delete()" +" the Child." +msgstr "" +"不会从数据库删除c;它只会删除与p之间的" +"连接(并且会导致违反NOT NULL约束,在这个例子中)。你需要显" +"式调用delete()来删除Child。" + +#. Tag: programlisting +#: example_parentchild.xml:210 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:212 +#, no-c-format +msgid "" +"Now, in our case, a Child can't really exist without its " +"parent. So if we remove a Child from the collection, we " +"really do want it to be deleted. For this, we must use cascade=" +"\"all-delete-orphan\"." +msgstr "" +"在我们的例子中,如果没有父对象,子对象就不应该存在,如果将子对象从collection" +"中移除,实际上我们是想删除它。要实现这种要求,就必须使用cascade=" +"\"all-delete-orphan\"。" + +#. Tag: programlisting +#: example_parentchild.xml:218 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:220 +#, no-c-format +msgid "" +"Note: even though the collection mapping specifies inverse=\"true" +"\", cascades are still processed by iterating the collection " +"elements. So if you require that an object be saved, deleted or updated by " +"cascade, you must add it to the collection. It is not enough to simply call " +"setParent()." +msgstr "" +"注意:即使在collection一方的映射中指定inverse=\"true\",级" +"联仍然是通过遍历collection中的元素来处理的。如果你想要通过级联进行子对象的插" +"入、删除、更新操作,就必须把它加到collection中,只调用setParent()是不够的。" + +#. Tag: title +#: example_parentchild.xml:230 +#, no-c-format +msgid "Cascades and unsaved-value" +msgstr "" +"级联与未保存值(Cascades and unsaved-value)" + +#. Tag: para +#: example_parentchild.xml:232 +#, no-c-format +msgid "" +"Suppose we loaded up a Parent in one Session, made some changes in a UI action and wish to persist these changes " +"in a new session by calling update(). The " +"Parent will contain a collection of childen and, since " +"cascading update is enabled, Hibernate needs to know which children are " +"newly instantiated and which represent existing rows in the database. Lets " +"assume that both Parent and Child have " +"genenerated identifier properties of type Long. Hibernate " +"will use the identifier and version/timestamp property value to determine " +"which of the children are new. (See .) In Hibernate3, it is no longer necessary to specify an " +"unsaved-value explicitly." +msgstr "" +"假设我们从Session中装入了一个Parent对" +"象,用户界面对其进行了修改,然后希望在一个新的Session里面调用update" +"()来保存这些修改。对象Parent包含了子对象的集合," +"由于打开了级联更新,Hibernate需要知道哪些Child对象是新实例化的,哪些代表数据" +"库中已经存在的记录。我们假设ParentChild对象的标识属性都是自动生成的,类型为java.lang.Long。Hibernate会使用标识属性的值,和version 或 timestamp 属性,来判断哪" +"些子对象是新的。(参见.) " +"在 Hibernate3 中,显式指定unsaved-value不再是必须" +"的了。" + +#. Tag: para +#: example_parentchild.xml:244 +#, no-c-format +msgid "" +"The following code will update parent and child and insert newChild." +msgstr "" +"下面的代码会更新parentchild对象,并且" +"插入newChild对象。" + +#. Tag: programlisting +#: example_parentchild.xml:249 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: example_parentchild.xml:251 +#, no-c-format +msgid "" +"Well, that's all very well for the case of a generated identifier, but what " +"about assigned identifiers and composite identifiers? This is more " +"difficult, since Hibernate can't use the identifier property to distinguish " +"between a newly instantiated object (with an identifier assigned by the " +"user) and an object loaded in a previous session. In this case, Hibernate " +"will either use the timestamp or version property, or will actually query " +"the second-level cache or, worst case, the database, to see if the row " +"exists." +msgstr "" +"这对于自动生成标识的情况是非常好的,但是自分配的标识和复合标识怎么办呢?这是" +"有点麻烦,因为Hibernate没有办法区分新实例化的对象(标识被用户指定了)和前一个" +"Session装入的对象。在这种情况下,Hibernate会使用timestamp或version属性,或者" +"查询第二级缓存,或者最坏的情况,查询数据库,来确认是否此行存在。" + +#. Tag: title +#: example_parentchild.xml:284 +#, no-c-format +msgid "Conclusion" +msgstr "结论" + +#. Tag: para +#: example_parentchild.xml:286 +#, no-c-format +msgid "" +"There is quite a bit to digest here and it might look confusing first time " +"around. However, in practice, it all works out very nicely. Most Hibernate " +"applications use the parent / child pattern in many places." +msgstr "" +"这里有不少东西需要融会贯通,可能会让新手感到迷惑。但是在实践中它们都工作地非" +"常好。大部分Hibernate应用程序都会经常用到父子对象模式。" + +#. Tag: para +#: example_parentchild.xml:291 +#, no-c-format +msgid "" +"We mentioned an alternative in the first paragraph. None of the above issues " +"exist in the case of <composite-element> mappings, " +"which have exactly the semantics of a parent / child relationship. " +"Unfortunately, there are two big limitations to composite element classes: " +"composite elements may not own collections, and they should not be the child " +"of any entity other than the unique parent." +msgstr "" +"在第一段中我们曾经提到另一个方案。上面的这些问题都不会出现在<" +"composite-element>映射中,它准确地表达了父子关系的语义。很不幸复" +"合元素还有两个重大限制:复合元素不能拥有collections,并且,除了用于惟一的父对" +"象外,它们不能再作为其它任何实体的子对象。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/example_weblog.po b/documentation/envers/src/main/docbook/zh-CN/content/example_weblog.po new file mode 100644 index 0000000000..4785ab802e --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/example_weblog.po @@ -0,0 +1,481 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: example_weblog.xml:29 +#, no-c-format +msgid "Example: Weblog Application" +msgstr "示例:Weblog 应用程序" + +#. Tag: title +#: example_weblog.xml:32 +#, no-c-format +msgid "Persistent Classes" +msgstr "持久化类" + +#. Tag: para +#: example_weblog.xml:34 +#, no-c-format +msgid "" +"The persistent classes represent a weblog, and an item posted in a weblog. " +"They are to be modelled as a standard parent/child relationship, but we will " +"use an ordered bag, instead of a set." +msgstr "" +"下面的持久化类表示一个weblog和在其中张贴的一个贴子。他们是标准的父/子关系模" +"型,但是我们会用一个有序包(ordered bag)而非集合(set)。" + +#. Tag: programlisting +#: example_weblog.xml:40 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:42 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: example_weblog.xml:47 +#, no-c-format +msgid "Hibernate Mappings" +msgstr "Hibernate 映射" + +#. Tag: para +#: example_weblog.xml:49 +#, no-c-format +msgid "The XML mappings should now be quite straightforward." +msgstr "下列的XML映射应该是很直白的。" + +#. Tag: programlisting +#: example_weblog.xml:53 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: example_weblog.xml:55 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: title +#: example_weblog.xml:60 +#, no-c-format +msgid "Hibernate Code" +msgstr "Hibernate 代码" + +#. Tag: para +#: example_weblog.xml:62 +#, no-c-format +msgid "" +"The following class demonstrates some of the kinds of things we can do with " +"these classes, using Hibernate." +msgstr "下面的类演示了我们可以使用Hibernate对这些类进行的一些操作。" + +#. Tag: programlisting +#: example_weblog.xml:67 +#, no-c-format +msgid "" +" :minDate\"\n" +" );\n" +"\n" +" Calendar cal = Calendar.getInstance();\n" +" cal.roll(Calendar.MONTH, false);\n" +" q.setCalendar(\"minDate\", cal);\n" +" \n" +" result = q.list();\n" +" tx.commit();\n" +" }\n" +" catch (HibernateException he) {\n" +" if (tx!=null) tx.rollback();\n" +" throw he;\n" +" }\n" +" finally {\n" +" session.close();\n" +" }\n" +" return result;\n" +" }\n" +"}]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/filters.po b/documentation/envers/src/main/docbook/zh-CN/content/filters.po new file mode 100644 index 0000000000..a1f8fe6ac3 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/filters.po @@ -0,0 +1,286 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: filters.xml:29 +#, no-c-format +msgid "Filtering data" +msgstr "过滤数据" + +#. Tag: para +#: filters.xml:31 +#, no-c-format +msgid "" +"Hibernate3 provides an innovative new approach to handling data with " +"\"visibility\" rules. A Hibernate filter is a global, " +"named, parameterized filter that may be enabled or disabled for a particular " +"Hibernate session." +msgstr "" +"Hibernate3 提供了一种创新的方式来处理具有“显性(visibility)”规则的数据,那就是" +"使用Hibernate filterHibernate filter是全局有效的、具有名字、可以带参数的过滤器, 对于某个特定的" +"Hibernate session您可以选择是否启用(或禁用)某个过滤器。" + +#. Tag: title +#: filters.xml:38 +#, no-c-format +msgid "Hibernate filters" +msgstr "Hibernate 过滤器(filters)" + +#. Tag: para +#: filters.xml:40 +#, no-c-format +msgid "" +"Hibernate3 adds the ability to pre-define filter criteria and attach those " +"filters at both a class and a collection level. A filter criteria is the " +"ability to define a restriction clause very similiar to the existing \"where" +"\" attribute available on the class and various collection elements. Except " +"these filter conditions can be parameterized. The application can then make " +"the decision at runtime whether given filters should be enabled and what " +"their parameter values should be. Filters can be used like database views, " +"but parameterized inside the application." +msgstr "" +"Hibernate3新增了对某个类或者集合使用预先定义的过滤器条件(filter criteria)的功" +"能。过滤器条件相当于定义一个 非常类似于类和各种集合上的“where”属性的约束子" +"句,但是过滤器条件可以带参数。 应用程序可以在运行时决定是否启用给定的过滤器," +"以及使用什么样的参数值。 过滤器的用法很像数据库视图,只不过是在应用程序中确定" +"使用什么样的参数的。" + +#. Tag: para +#: filters.xml:50 +#, no-c-format +msgid "" +"In order to use filters, they must first be defined and then attached to the " +"appropriate mapping elements. To define a filter, use the <" +"filter-def/> element within a <hibernate-mapping/" +"> element:" +msgstr "" +"要使用过滤器,必须首先在相应的映射节点中定义。而定义一个过滤器,要用到位于" +"<hibernate-mapping/> 节点之内的<filter-" +"def/>节点:" + +#. Tag: programlisting +#: filters.xml:56 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:58 +#, no-c-format +msgid "Then, this filter can be attached to a class:" +msgstr "定义好之后,就可以在某个类中使用这个过滤器:" + +#. Tag: programlisting +#: filters.xml:62 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:64 +#, no-c-format +msgid "or, to a collection:" +msgstr "也可以在某个集合使用它:" + +#. Tag: programlisting +#: filters.xml:68 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:70 +#, no-c-format +msgid "or, even to both (or multiples of each) at the same time." +msgstr "" +"可以在多个类或集合中使用某个过滤器;某个类或者集合中也可以使用多个过滤器。" + +#. Tag: para +#: filters.xml:74 +#, fuzzy, no-c-format +msgid "" +"The methods on Session are: enableFilter(String " +"filterName), getEnabledFilter(String filterName), and disableFilter(String filterName). By " +"default, filters are not enabled for a given session; " +"they must be explcitly enabled through use of the Session." +"enableFilter() method, which returns an instance of the " +"Filter interface. Using the simple filter defined above, " +"this would look like:" +msgstr "" +"Session对象中会用到的方法有:enableFilter(String " +"filterName), getEnabledFilter(String filterName), 和 disableFilter(String filterName). Session中默" +"认是启用过滤器的,必须通过Session." +"enabledFilter()方法显式的启用。 该方法返回被启用的Filter的实例。以上文定义的过滤器为例:" + +#. Tag: programlisting +#: filters.xml:83 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: filters.xml:85 +#, no-c-format +msgid "" +"Note that methods on the org.hibernate.Filter interface do allow the method-" +"chaining common to much of Hibernate." +msgstr "" +"注意,org.hibernate.Filter的方法允许链式方法调用。(类似上面例子中启用Filter" +"之后设定Filter参数这个“方法链”) Hibernate的其他部分也大多有这个特性。" + +#. Tag: para +#: filters.xml:89 +#, no-c-format +msgid "" +"A full example, using temporal data with an effective record date pattern:" +msgstr "下面是一个比较完整的例子,使用了记录生效日期模式过滤有时效的数据:" + +#. Tag: programlisting +#: filters.xml:93 +#, no-c-format +msgid "" +"\n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +"...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +"...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:95 +#, no-c-format +msgid "" +"Then, in order to ensure that you always get back currently effective " +"records, simply enable the filter on the session prior to retrieving " +"employee data:" +msgstr "" +"定义好后,如果想要保证取回的都是目前处于生效期的记录,只需在获取雇员数据的操" +"作之前先开启过滤器即可:" + +#. Tag: programlisting +#: filters.xml:100 +#, no-c-format +msgid "" +" :" +"targetSalary\")\n" +" .setLong(\"targetSalary\", new Long(1000000))\n" +" .list();\n" +"]]>" +msgstr "" + +#. Tag: para +#: filters.xml:102 +#, no-c-format +msgid "" +"In the HQL above, even though we only explicitly mentioned a salary " +"constraint on the results, because of the enabled filter the query will " +"return only currently active employees who have a salary greater than a " +"million dollars." +msgstr "" +"在上面的HQL中,虽然我们仅仅显式的使用了一个薪水条件,但因为启用了过滤器,查询" +"将仅返回那些目前雇用 关系处于生效期的,并且薪水高于一百万美刀的雇员的数据。" + +#. Tag: para +#: filters.xml:108 +#, no-c-format +msgid "" +"Note: if you plan on using filters with outer joining (either through HQL or " +"load fetching) be careful of the direction of the condition expression. Its " +"safest to set this up for left outer joining; in general, place the " +"parameter first followed by the column name(s) after the operator." +msgstr "" +"注意:如果你打算在使用外连接(或者通过HQL或load fetching)的同时使用过滤器," +"要注意条件表达式的方向(左还是右)。 最安全的方式是使用左外连接(left outer " +"joining)。并且通常来说,先写参数, 然后是操作符,最后写数据库字段名。" + +#. Tag: para +#: filters.xml:115 +#, no-c-format +msgid "" +"After being defined a filter might be attached to multiple entities and/or " +"collections each with its own condition. That can be tedious when the " +"conditions are the same each time. Thus <filter-def/> allows defining a default condition, either as an attribute or " +"CDATA:" +msgstr "" +"在Filter定义之后,它可能被附加到多个实体和/或集合类,每个都有自己的条件。假若这" +"些条件都是一样的,每次都要定义就显得很繁琐。因此,<filter-def/" +">被用来定义一个默认条件,它可能作为属性或者CDATA出现:" + +#. Tag: programlisting +#: filters.xml:122 +#, no-c-format +msgid "" +" xyz\">...\n" +"abc=xyz]]>" +msgstr "" + +#. Tag: para +#: filters.xml:124 +#, no-c-format +msgid "" +"This default condition will then be used whenever the filter is attached to " +"something without specifying a condition. Note that this means you can give " +"a specific condition as part of the attachment of the filter which overrides " +"the default condition in that particular case." +msgstr "" +"当这个filter被附加到任何目的地,而又没有指明条件时,这个条件就会被使用。注" +"意,换句话说,你可以通过给filter附加特别的条件来重载默认条件。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/inheritance_mapping.po b/documentation/envers/src/main/docbook/zh-CN/content/inheritance_mapping.po new file mode 100644 index 0000000000..857ed5f38f --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/inheritance_mapping.po @@ -0,0 +1,820 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: inheritance_mapping.xml:29 +#, no-c-format +msgid "Inheritance Mapping" +msgstr "继承映射(Inheritance Mappings)" + +#. Tag: title +#: inheritance_mapping.xml:32 +#, no-c-format +msgid "The Three Strategies" +msgstr "三种策略" + +#. Tag: para +#: inheritance_mapping.xml:34 +#, no-c-format +msgid "Hibernate supports the three basic inheritance mapping strategies:" +msgstr "Hibernate支持三种基本的继承映射策略:" + +#. Tag: para +#: inheritance_mapping.xml:40 +#, no-c-format +msgid "table per class hierarchy" +msgstr "每个类分层结构一张表(table per class hierarchy)" + +#. Tag: para +#: inheritance_mapping.xml:45 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"每个子类一张表(table per subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"每个子类一张表" + +#. Tag: para +#: inheritance_mapping.xml:50 +#, no-c-format +msgid "table per concrete class" +msgstr "每个具体类一张表(table per concrete class)" + +#. Tag: para +#: inheritance_mapping.xml:56 +#, no-c-format +msgid "" +"In addition, Hibernate supports a fourth, slightly different kind of " +"polymorphism:" +msgstr "此外,Hibernate还支持第四种稍有不同的多态映射策略:" + +#. Tag: para +#: inheritance_mapping.xml:63 +#, no-c-format +msgid "implicit polymorphism" +msgstr "隐式多态(implicit polymorphism)" + +#. Tag: para +#: inheritance_mapping.xml:69 +#, no-c-format +msgid "" +"It is possible to use different mapping strategies for different branches of " +"the same inheritance hierarchy, and then make use of implicit polymorphism " +"to achieve polymorphism across the whole hierarchy. However, Hibernate does " +"not support mixing <subclass>, and <" +"joined-subclass> and <union-subclass> " +"mappings under the same root <class> element. It is " +"possible to mix together the table per hierarchy and table per subclass " +"strategies, under the the same <class> element, by " +"combining the <subclass> and <join> elements (see below)." +msgstr "" +"对于同一个继承层次内的不同分支,可以采用不同的映射策略,然后用隐式多 态来完成" +"跨越整个层次的多态。但是在同一个<class>根元素 下," +"Hibernate不支持混合了元素<subclass><" +"joined-subclass><union-subclass> 的映" +"射。在同一个<class>元素下,可以混合使用 “每个类分层" +"结构一张表”(table per hierarchy) 和“每个子类一张表”(table per subclass) " +"这两种映射策略,这是通过结合元素<subclass>和 " +"<join>来实现的(见后)。" + +#. Tag: para +#: inheritance_mapping.xml:83 +#, no-c-format +msgid "" +"It is possible to define subclass, union-" +"subclass, and joined-subclass mappings in " +"separate mapping documents, directly beneath hibernate-mapping. This allows you to extend a class hierachy just by adding a new " +"mapping file. You must specify an extends attribute in " +"the subclass mapping, naming a previously mapped superclass. Note: " +"Previously this feature made the ordering of the mapping documents " +"important. Since Hibernate3, the ordering of mapping files does not matter " +"when using the extends keyword. The ordering inside a single mapping file " +"still needs to be defined as superclasses before subclasses." +msgstr "" +"在多个映射文件中,可以直接在hibernate-mapping根下定义" +"subclassunion-subclass和" +"joined-subclass。也就是说,你可以仅加入一个新的映射文件来" +"扩展类层次。你必须在subclass的映射中指明extends属性,给出" +"一个之前定义的超类的名字。注意,在以前,这一功能对映射文件的顺序有严格的要" +"求,从Hibernate 3开始,使用extends关键字的时侯,对映射文件的顺序不再有要求;" +"但在每个映射文件里,超类必须在子类之前定义。" + +#. Tag: programlisting +#: inheritance_mapping.xml:94 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" ]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:98 +#, no-c-format +msgid "Table per class hierarchy" +msgstr "每个类分层结构一张表(Table per class hierarchy)" + +#. Tag: para +#: inheritance_mapping.xml:100 +#, no-c-format +msgid "" +"Suppose we have an interface Payment, with implementors " +"CreditCardPayment, CashPayment, " +"ChequePayment. The table per hierarchy mapping would look " +"like:" +msgstr "" +"假设我们有接口Payment和它的几个实现类: " +"CreditCardPayment, CashPayment, 和" +"ChequePayment。则“每个类分层结构一张表”(Table per class " +"hierarchy)的映射代码如下所示:" + +#. Tag: programlisting +#: inheritance_mapping.xml:107 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:109 +#, no-c-format +msgid "" +"Exactly one table is required. There is one big limitation of this mapping " +"strategy: columns declared by the subclasses, such as CCTYPE, may not have NOT NULL constraints." +msgstr "" +"采用这种策略只需要一张表即可。它有一个很大的限制:要求那些由子类定义的字段, " +"如CCTYPE,不能有非空(NOT NULL)约束。" + +#. Tag: title +#: inheritance_mapping.xml:118 +#, no-c-format +msgid "Table per subclass" +msgstr "每个子类一张表(Table per subclass)" + +#. Tag: para +#: inheritance_mapping.xml:120 +#, no-c-format +msgid "A table per subclass mapping would look like:" +msgstr "对于上例中的几个类而言,采用“每个子类一张表”的映射策略,代码如下所示:" + +#. Tag: programlisting +#: inheritance_mapping.xml:124 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:126 +#, 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 "" +"需要四张表。三个子类表通过主键关联到超类表(因而关系模型实际上是一对一关联)。" + +#. Tag: title +#: inheritance_mapping.xml:135 +#, no-c-format +msgid "Table per subclass, using a discriminator" +msgstr "每个子类一张表(Table per subclass),使用辨别标志(Discriminator)" + +#. Tag: para +#: inheritance_mapping.xml:137 +#, no-c-format +msgid "" +"Note that Hibernate's implementation of table per subclass requires no " +"discriminator column. Other object/relational mappers use a different " +"implementation of table per subclass which 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 would like to use a discriminator column with the table per " +"subclass strategy, you may combine the use of <subclass> and <join>, as follow:" +msgstr "" +"注意,对“每个子类一张表”的映射策略,Hibernate的实现不需要辨别字段,而其他 的" +"对象/关系映射工具使用了一种不同于Hibernate的实现方法,该方法要求在超类 表中有" +"一个类型辨别字段(type discriminator column)。Hibernate采用的方法更 难实现,但" +"从关系(数据库)的角度来看,按理说它更正确。若你愿意使用带有辨别字 段的“每个" +"子类一张表”的策略,你可以结合使用<subclass> 与" +"<join>,如下所示:" + +#. Tag: programlisting +#: inheritance_mapping.xml:149 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:151 +#, no-c-format +msgid "" +"The optional fetch=\"select\" declaration tells Hibernate " +"not to fetch the ChequePayment subclass data using an " +"outer join when querying the superclass." +msgstr "" +"可选的声明fetch=\"select\",是用来告诉Hibernate,在查询超" +"类时, 不要使用外部连接(outer join)来抓取子类ChequePayment" +"的数据。" + +#. Tag: title +#: inheritance_mapping.xml:160 +#, no-c-format +msgid "Mixing table per class hierarchy with table per subclass" +msgstr "混合使用“每个类分层结构一张表”和“每个子类一张表”" + +#. Tag: para +#: inheritance_mapping.xml:162 +#, no-c-format +msgid "" +"You may even mix the table per hierarchy and table per subclass strategies " +"using this approach:" +msgstr "" +"你甚至可以采取如下方法混和使用“每个类分层结构一张表”和“每个子类一张表”这两种" +"策略:" + +#. Tag: programlisting +#: inheritance_mapping.xml:167 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:169 +#, no-c-format +msgid "" +"For any of these mapping strategies, a polymorphic association to the root " +"Payment class is mapped using <many-to-one>" +"." +msgstr "" +"对上述任何一种映射策略而言,指向根类Payment的 关联是使用" +"<many-to-one>进行映射的。" + +#. Tag: programlisting +#: inheritance_mapping.xml:175 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:180 +#, no-c-format +msgid "Table per concrete class" +msgstr "每个具体类一张表(Table per concrete class)" + +#. Tag: para +#: inheritance_mapping.xml:182 +#, no-c-format +msgid "" +"There are two ways we could go about mapping the table per concrete class " +"strategy. The first is to use <union-subclass>." +msgstr "" +"对于“每个具体类一张表”的映射策略,可以采用两种方法。第一种方法是使用 " +"<union-subclass>。" + +#. Tag: programlisting +#: inheritance_mapping.xml:187 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:189 +#, 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 +#: inheritance_mapping.xml:194 +#, 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. (We " +"might relax this in a future release of Hibernate.) The identity generator " +"strategy is not allowed in union subclass inheritance, indeed the primary " +"key seed has to be shared accross all unioned subclasses of a hierarchy." +msgstr "" +"这种方式的局限在于,如果一个属性在超类中做了映射,其字段名必须与所有子类 表中" +"定义的相同。(我们可能会在Hibernate的后续发布版本中放宽此限制。) 不允许在联合" +"子类(union subclass)的继承层次中使用标识生成器策略(identity generator " +"strategy), 实际上, 主键的种子(primary key seed)不得不为同一继承层次中的全部被" +"联合子类所共用." + +#. Tag: para +#: inheritance_mapping.xml:203 +#, no-c-format +msgid "" +"If your superclass is abstract, map it with abstract=\"true\". Of course, if it is not abstract, an additional table (defaults to " +"PAYMENT in the example above) is needed to hold instances " +"of the superclass." +msgstr "" +"假若超类是抽象类,请使用abstract=\"true\"。当然,假若它不" +"是抽象的,需要一个额外的表(上面的例子中,默认是PAYMENT),来保存超类的实例。" + +#. Tag: title +#: inheritance_mapping.xml:213 +#, no-c-format +msgid "Table per concrete class, using implicit polymorphism" +msgstr "每个具体类一张表,使用隐式多态" + +#. Tag: para +#: inheritance_mapping.xml:215 +#, no-c-format +msgid "An alternative approach is to make use of implicit polymorphism:" +msgstr "另一种可供选择的方法是采用隐式多态:" + +#. Tag: programlisting +#: inheritance_mapping.xml:219 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:221 +#, no-c-format +msgid "" +"Notice that nowhere do we mention the Payment interface " +"explicitly. Also notice that properties of Payment are " +"mapped in each of the subclasses. If you want to avoid duplication, consider " +"using XML entities (e.g. [ <!ENTITY allproperties SYSTEM " +"\"allproperties.xml\"> ] in the DOCTYPE " +"declartion and &allproperties; in the mapping)." +msgstr "" +"注意,我们没有在任何地方明确的提及接口Payment。同时注意 " +"Payment的属性在每个子类中都进行了映射。如果你想避免重复, " +"可以考虑使用XML实体(例如:位于DOCTYPE声明内的 " +"[ <!ENTITY allproperties SYSTEM \"allproperties.xml\"> ] 和映" +"射中的&allproperties;)。" + +#. Tag: para +#: inheritance_mapping.xml:231 +#, no-c-format +msgid "" +"The disadvantage of this approach is that Hibernate does not generate SQL " +"UNIONs when performing polymorphic queries." +msgstr "" +"这种方法的缺陷在于,在Hibernate执行多态查询时(polymorphic queries)无法生成带 " +"UNION的SQL语句。" + +#. Tag: para +#: inheritance_mapping.xml:236 +#, no-c-format +msgid "" +"For this mapping strategy, a polymorphic association to Payment is usually mapped using <any>." +msgstr "" +"对于这种映射策略而言,通常用<any>来实现到 " +"Payment的多态关联映射。" + +#. Tag: programlisting +#: inheritance_mapping.xml:241 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: inheritance_mapping.xml:246 +#, no-c-format +msgid "Mixing implicit polymorphism with other inheritance mappings" +msgstr "隐式多态和其他继承映射混合使用" + +#. Tag: para +#: inheritance_mapping.xml:248 +#, no-c-format +msgid "" +"There is one further thing to notice about this mapping. Since the " +"subclasses are each mapped in their own <class> " +"element (and since Payment is just an interface), each of " +"the subclasses could easily be part of another inheritance hierarchy! (And " +"you can still use polymorphic queries against the Payment " +"interface.)" +msgstr "" +"对这一映射还有一点需要注意。因为每个子类都在各自独立的元素<" +"class> 中映射(并且Payment只是一个接口),每个" +"子类可以很容易的成为另一 个继承体系中的一部分!(你仍然可以对接口" +"Payment使用多态查询。)" + +#. Tag: programlisting +#: inheritance_mapping.xml:256 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: inheritance_mapping.xml:258 +#, no-c-format +msgid "" +"Once again, we don't mention Payment explicitly. If we " +"execute a query against the Payment interface - for " +"example, from Payment - Hibernate automatically returns " +"instances of CreditCardPayment (and its subclasses, since " +"they also implement Payment), CashPayment and ChequePayment but not instances of " +"NonelectronicTransaction." +msgstr "" +"我们还是没有明确的提到Payment。 如果我们针对接口" +"Payment执行查询 ——如from Payment—— " +"Hibernate 自动返回CreditCardPayment(和它的子类,因为 它们" +"也实现了接口Payment)、 CashPayment和" +"Chequepayment的实例, 但不返回" +"NonelectronicTransaction的实例。" + +#. Tag: title +#: inheritance_mapping.xml:273 +#, no-c-format +msgid "Limitations" +msgstr "限制" + +#. Tag: para +#: inheritance_mapping.xml:275 +#, no-c-format +msgid "" +"There are certain limitations to the \"implicit polymorphism\" approach to " +"the table per concrete-class mapping strategy. There are somewhat less " +"restrictive limitations to <union-subclass> " +"mappings." +msgstr "" +"对“每个具体类映射一张表”(table per concrete-class)的映射策略而言,隐式多态" +"的 方式有一定的限制。而<union-subclass>映射的限制则" +"没有那 么严格。" + +#. Tag: para +#: inheritance_mapping.xml:282 +#, no-c-format +msgid "" +"The following table shows the limitations of table per concrete-class " +"mappings, and of implicit polymorphism, in Hibernate." +msgstr "下面表格中列出了在Hibernte中“每个具体类一张表”的策略和隐式多态的限制。" + +#. Tag: title +#: inheritance_mapping.xml:288 +#, no-c-format +msgid "Features of inheritance mappings" +msgstr "继承映射特性(Features of inheritance mappings)" + +#. Tag: entry +#: inheritance_mapping.xml:300 +#, no-c-format +msgid "Inheritance strategy" +msgstr "继承策略(Inheritance strategy)" + +#. Tag: entry +#: inheritance_mapping.xml:301 +#, no-c-format +msgid "Polymorphic many-to-one" +msgstr "多态多对一" + +#. Tag: entry +#: inheritance_mapping.xml:302 +#, no-c-format +msgid "Polymorphic one-to-one" +msgstr "多态一对一" + +#. Tag: entry +#: inheritance_mapping.xml:303 +#, no-c-format +msgid "Polymorphic one-to-many" +msgstr "多态一对多" + +#. Tag: entry +#: inheritance_mapping.xml:304 +#, no-c-format +msgid "Polymorphic many-to-many" +msgstr "多态多对多" + +#. Tag: entry +#: inheritance_mapping.xml:305 +#, no-c-format +msgid "Polymorphic load()/get()" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:306 +#, no-c-format +msgid "Polymorphic queries" +msgstr "多态查询" + +#. Tag: entry +#: inheritance_mapping.xml:307 +#, no-c-format +msgid "Polymorphic joins" +msgstr "多态连接(join)" + +#. Tag: entry +#: inheritance_mapping.xml:308 +#, no-c-format +msgid "Outer join fetching" +msgstr "外连接(Outer join)读取" + +#. Tag: entry +#: inheritance_mapping.xml:313 +#, no-c-format +msgid "table per class-hierarchy" +msgstr "每个类分层结构一张表" + +#. Tag: literal +#: inheritance_mapping.xml:314 inheritance_mapping.xml:325 +#: inheritance_mapping.xml:336 +#, no-c-format +msgid "<many-to-one>" +msgstr "<many-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:315 inheritance_mapping.xml:326 +#: inheritance_mapping.xml:337 +#, no-c-format +msgid "<one-to-one>" +msgstr "<one-to-one>" + +#. Tag: literal +#: inheritance_mapping.xml:316 inheritance_mapping.xml:327 +#, no-c-format +msgid "<one-to-many>" +msgstr "<one-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:317 inheritance_mapping.xml:328 +#: inheritance_mapping.xml:339 +#, no-c-format +msgid "<many-to-many>" +msgstr "<many-to-many>" + +#. Tag: literal +#: inheritance_mapping.xml:318 inheritance_mapping.xml:329 +#: inheritance_mapping.xml:340 +#, no-c-format +msgid "s.get(Payment.class, id)" +msgstr "s.get(Payment.class, id)" + +#. Tag: literal +#: inheritance_mapping.xml:319 inheritance_mapping.xml:330 +#: inheritance_mapping.xml:341 inheritance_mapping.xml:352 +#, no-c-format +msgid "from Payment p" +msgstr "from Payment p" + +#. Tag: literal +#: inheritance_mapping.xml:320 inheritance_mapping.xml:331 +#: inheritance_mapping.xml:342 +#, no-c-format +msgid "from Order o join o.payment p" +msgstr "from Order o join o.payment p" + +#. Tag: emphasis +#: inheritance_mapping.xml:321 inheritance_mapping.xml:332 +#: inheritance_mapping.xml:343 +#, no-c-format +msgid "supported" +msgstr "支持" + +#. Tag: entry +#: inheritance_mapping.xml:324 +#, fuzzy, no-c-format +msgid "table per subclass" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"每个子类一张表(table per subclass)\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"每个子类一张表" + +#. Tag: entry +#: inheritance_mapping.xml:335 +#, no-c-format +msgid "table per concrete-class (union-subclass)" +msgstr "每个具体类一张表(union-subclass)" + +#. Tag: entry +#: inheritance_mapping.xml:338 +#, no-c-format +msgid "" +"<one-to-many> (for inverse=\"true\" only)" +msgstr "" + +#. Tag: entry +#: inheritance_mapping.xml:346 +#, no-c-format +msgid "table per concrete class (implicit polymorphism)" +msgstr "每个具体类一张表(隐式多态)" + +#. Tag: literal +#: inheritance_mapping.xml:347 +#, no-c-format +msgid "<any>" +msgstr "<any>" + +#. Tag: emphasis +#: inheritance_mapping.xml:348 inheritance_mapping.xml:349 +#: inheritance_mapping.xml:353 inheritance_mapping.xml:354 +#, no-c-format +msgid "not supported" +msgstr "不支持" + +#. Tag: literal +#: inheritance_mapping.xml:350 +#, no-c-format +msgid "<many-to-any>" +msgstr "<many-to-any>" + +#. Tag: literal +#: inheritance_mapping.xml:351 +#, no-c-format +msgid "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" +msgstr "" +"s.createCriteria(Payment.class).add( Restrictions.idEq(id) ).uniqueResult()" + +#~ msgid "load()/get()" +#~ msgstr "load()/get()" + +#~ msgid "Polymorphic " +#~ msgstr "多态 " + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid " (for only)" +#~ msgstr " (仅对于的情况)" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/performance.po b/documentation/envers/src/main/docbook/zh-CN/content/performance.po new file mode 100644 index 0000000000..984bb91d57 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/performance.po @@ -0,0 +1,2463 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: performance.xml:29 +#, no-c-format +msgid "Improving performance" +msgstr "提升性能" + +#. Tag: title +#: performance.xml:32 +#, no-c-format +msgid "Fetching strategies" +msgstr "抓取策略(Fetching strategies)" + +#. Tag: para +#: performance.xml:34 +#, no-c-format +msgid "" +"A fetching strategy is the strategy Hibernate will use " +"for retrieving associated objects if the application needs to navigate the " +"association. Fetch strategies may be declared in the O/R mapping metadata, " +"or over-ridden by a particular HQL or Criteria query." +msgstr "" +"抓取策略(fetching strategy) 是指:当应用程序需要在" +"(Hibernate实体对象图的)关联关系间进行导航的时候, Hibernate如何获取关联对象" +"的策略。抓取策略可以在O/R映射的元数据中声明,也可以在特定的HQL 或条" +"件查询(Criteria Query)中重载声明。" + +#. Tag: para +#: performance.xml:41 +#, no-c-format +msgid "Hibernate3 defines the following fetching strategies:" +msgstr "Hibernate3 定义了如下几种抓取策略:" + +#. Tag: para +#: performance.xml:47 +#, no-c-format +msgid "" +"Join fetching - Hibernate retrieves the associated " +"instance or collection in the same SELECT, using an " +"OUTER JOIN." +msgstr "" +"连接抓取(Join fetching) - Hibernate通过 在" +"SELECT语句使用OUTER JOIN(外连接)来 获" +"得对象的关联实例或者关联集合。" + +#. Tag: para +#: performance.xml:54 +#, no-c-format +msgid "" +"Select fetching - a second SELECT is " +"used to retrieve the associated entity or collection. Unless you explicitly " +"disable lazy fetching by specifying lazy=\"false\", this " +"second select will only be executed when you actually access the association." +msgstr "" +"查询抓取(Select fetching) - 另外发送一条 " +"SELECT 语句抓取当前对象的关联实体或集合。除非你显式的指定" +"lazy=\"false\"禁止 延迟抓取(lazy fetching),否则只有当你" +"真正访问关联关系的时候,才会执行第二条select语句。" + +#. Tag: para +#: performance.xml:63 +#, no-c-format +msgid "" +"Subselect fetching - a second SELECT " +"is used to retrieve the associated collections for all entities retrieved in " +"a previous query or fetch. Unless you explicitly disable lazy fetching by " +"specifying lazy=\"false\", this second select will only " +"be executed when you actually access the association." +msgstr "" +"子查询抓取(Subselect fetching) - 另外发送一条" +"SELECT 语句抓取在前面查询到(或者抓取到)的所有实体对象的" +"关联集合。除非你显式的指定lazy=\"false\" 禁止延迟抓取" +"(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条select语" +"句。" + +#. Tag: para +#: performance.xml:72 +#, no-c-format +msgid "" +"Batch fetching - an optimization strategy for select " +"fetching - Hibernate retrieves a batch of entity instances or collections in " +"a single SELECT, by specifying a list of primary keys or " +"foreign keys." +msgstr "" +"批量抓取(Batch fetching) - 对查询抓取的优化方案, 通过" +"指定一个主键或外键列表,Hibernate使用单条SELECT语句获取一" +"批对象实例或集合。" + +#. Tag: para +#: performance.xml:81 +#, no-c-format +msgid "Hibernate also distinguishes between:" +msgstr "Hibernate会区分下列各种情况:" + +#. Tag: para +#: performance.xml:87 +#, no-c-format +msgid "" +"Immediate fetching - an association, collection or " +"attribute is fetched immediately, when the owner is loaded." +msgstr "" +"Immediate fetching,立即抓取 - 当宿主被加载时,关联、集" +"合或属性被立即抓取。" + +#. Tag: para +#: performance.xml:93 +#, no-c-format +msgid "" +"Lazy collection fetching - a collection is fetched when " +"the application invokes an operation upon that collection. (This is the " +"default for collections.)" +msgstr "" +"Lazy collection fetching,延迟集合抓取- 直到应用程序对集" +"合进行了一次操作时,集合才被抓取。(对集合而言这是默认行为。)" + +#. Tag: para +#: performance.xml:100 +#, no-c-format +msgid "" +"\"Extra-lazy\" collection fetching - individual " +"elements of the collection are accessed from the database as needed. " +"Hibernate tries not to fetch the whole collection into memory unless " +"absolutely needed (suitable for very large collections)" +msgstr "" +"\"Extra-lazy\" collection fetching,\"Extra-lazy\"集合抓取 -对集合类中的每个元素而言,都是直到需要时才去访问数据库。除非绝对必" +"要,Hibernate不会试图去把整个集合都抓取到内存里来(适用于非常大的集合)。" + +#. Tag: para +#: performance.xml:108 +#, no-c-format +msgid "" +"Proxy fetching - a single-valued association is fetched " +"when a method other than the identifier getter is invoked upon the " +"associated object." +msgstr "" +"Proxy fetching,代理抓取 - 对返回单值的关联而言,当其某" +"个方法被调用,而非对其关键字进行get操作时才抓取。" + +#. Tag: para +#: performance.xml:115 +#, no-c-format +msgid "" +"\"No-proxy\" fetching - a single-valued association is " +"fetched when the instance variable is accessed. Compared to proxy fetching, " +"this approach is less lazy (the association is fetched even when only the " +"identifier is accessed) but more transparent, since no proxy is visible to " +"the application. This approach requires buildtime bytecode instrumentation " +"and is rarely necessary." +msgstr "" +"\"No-proxy\" fetching,非代理抓取 - 对返回单值的关联而" +"言,当实例变量被访问的时候进行抓取。与上面的代理抓取相比,这种方法没有那么“延" +"迟”得厉害(就算只访问标识符,也会导致关联抓取)但是更加透明,因为对应用程序来" +"说,不再看到proxy。这种方法需要在编译期间进行字节码增强操作,因此很少需要用" +"到。" + +#. Tag: para +#: performance.xml:125 +#, no-c-format +msgid "" +"Lazy attribute fetching - an attribute or single valued " +"association is fetched when the instance variable is accessed. This approach " +"requires buildtime bytecode instrumentation and is rarely necessary." +msgstr "" +"Lazy attribute fetching,属性延迟加载 - 对属性或返回单值" +"的关联而言,当其实例变量被访问的时候进行抓取。需要编译期字节码强化,因此这一" +"方法很少是必要的。" + +#. Tag: para +#: performance.xml:134 +#, no-c-format +msgid "" +"We have two orthogonal notions here: when is the " +"association fetched, and how is it fetched (what SQL is " +"used). Don't confuse them! We use fetch to tune " +"performance. We may use lazy to define a contract for " +"what data is always available in any detached instance of a particular class." +msgstr "" +"这里有两个正交的概念:关联何时被抓取,以及被如" +"何抓取(会采用什么样的SQL语句)。不要混淆它们!我们使用抓" +"取来改善性能。我们使用延迟来定义一些契约,对某特" +"定类的某个脱管的实例,知道有哪些数据是可以使用的。" + +#. Tag: title +#: performance.xml:143 +#, no-c-format +msgid "Working with lazy associations" +msgstr "操作延迟加载的关联" + +#. Tag: para +#: performance.xml:145 +#, no-c-format +msgid "" +"By default, Hibernate3 uses lazy select fetching for collections and lazy " +"proxy fetching for single-valued associations. These defaults make sense for " +"almost all associations in almost all applications." +msgstr "" +"默认情况下,Hibernate 3对集合使用延迟select抓取,对返回单值的关联使用延迟代理" +"抓取。对几乎是所有的应用而言,其绝大多数的关联,这种策略都是有效的。" + +#. Tag: para +#: performance.xml:151 +#, no-c-format +msgid "" +"Note: if you set hibernate." +"default_batch_fetch_size, Hibernate will use the batch fetch " +"optimization for lazy fetching (this optimization may also be enabled at a " +"more granular level)." +msgstr "" +"注意:假若你设置了hibernate." +"default_batch_fetch_size,Hibernate会对延迟加载采取批量抓取优化措施" +"(这种优化也可能会在更细化的级别打开)。" + +#. Tag: para +#: performance.xml:158 +#, no-c-format +msgid "" +"However, lazy fetching poses one problem that you must be aware of. Access " +"to a lazy association outside of the context of an open Hibernate session " +"will result in an exception. For example:" +msgstr "" +"然而,你必须了解延迟抓取带来的一个问题。在一个打开的Hibernate session上下文之" +"外调用延迟集合会导致一次意外。比如:" + +#. Tag: programlisting +#: performance.xml:164 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:166 +#, no-c-format +msgid "" +"Since the permissions collection was not initialized when the " +"Session was closed, the collection will not be able to " +"load its state. Hibernate does not support lazy initialization for " +"detached objects. The fix is to move the code that reads from the " +"collection to just before the transaction is committed." +msgstr "" +"在Session关闭后,permessions集合将是未实例化的、不再可用," +"因此无法正常载入其状态。 Hibernate对脱管对象不支持延迟实例化. 这里的修改方法是:将permissions读取数据的代码 移到tx.commit()之" +"前。" + +#. Tag: para +#: performance.xml:174 +#, no-c-format +msgid "" +"Alternatively, we could use a non-lazy collection or association, by " +"specifying lazy=\"false\" for the association mapping. " +"However, it is intended that lazy initialization be used for almost all " +"collections and associations. If you define too many non-lazy associations " +"in your object model, Hibernate will end up needing to fetch the entire " +"database into memory in every transaction!" +msgstr "" +"除此之外,通过对关联映射指定lazy=\"false\",我们也可以使用" +"非延迟的集合或关联。但是, 对绝大部分集合来说,更推荐使用延迟方式抓取数据。如" +"果在你的对象模型中定义了太多的非延迟关联,Hibernate最终几乎需要在每个事务中载" +"入整个数据库到内存中!" + +#. Tag: para +#: performance.xml:183 +#, no-c-format +msgid "" +"On the other hand, we often want to choose join fetching (which is non-lazy " +"by nature) instead of select fetching in a particular transaction. We'll now " +"see how to customize the fetching strategy. In Hibernate3, the mechanisms " +"for choosing a fetch strategy are identical for single-valued associations " +"and collections." +msgstr "" +"但是,另一方面,在一些特殊的事务中,我们也经常需要使用到连接抓取(它本身上就" +"是非延迟的),以代替查询抓取。 下面我们将会很快明白如何具体的定制Hibernate中" +"的抓取策略。在Hibernate3中,具体选择哪种抓取策略的机制是和选择 单值关联或集合" +"关联相一致的。" + +#. Tag: title +#: performance.xml:194 +#, no-c-format +msgid "Tuning fetch strategies" +msgstr "调整抓取策略(Tuning fetch strategies)" + +#. Tag: para +#: performance.xml:196 +#, no-c-format +msgid "" +"Select fetching (the default) is extremely vulnerable to N+1 selects " +"problems, so we might want to enable join fetching in the mapping document:" +msgstr "" +"查询抓取(默认的)在N+1查询的情况下是极其脆弱的,因此我们可能会要求在映射文档" +"中定义使用连接抓取:" + +#. Tag: programlisting +#: performance.xml:201 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:203 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: performance.xml:205 +#, no-c-format +msgid "" +"The fetch strategy defined in the mapping document " +"affects:" +msgstr "" +"在映射文档中定义的抓取策略将会对以下列表条目产生影响:" + +#. Tag: para +#: performance.xml:211 +#, no-c-format +msgid "retrieval via get() or load()" +msgstr "通过get()load()方法取得数据。" + +#. Tag: para +#: performance.xml:216 +#, no-c-format +msgid "retrieval that happens implicitly when an association is navigated" +msgstr "只有在关联之间进行导航时,才会隐式的取得数据。" + +#. Tag: para +#: performance.xml:221 +#, no-c-format +msgid "Criteria queries" +msgstr "条件查询" + +#. Tag: para +#: performance.xml:226 +#, no-c-format +msgid "HQL queries if subselect fetching is used" +msgstr "使用了subselect抓取的HQL查询" + +#. Tag: para +#: performance.xml:232 +#, no-c-format +msgid "" +"No matter what fetching strategy you use, the defined non-lazy graph is " +"guaranteed to be loaded into memory. Note that this might result in several " +"immediate selects being used to execute a particular HQL query." +msgstr "" +"不管你使用哪种抓取策略,定义为非延迟的类图会被保证一定装载入内存。注意这可能" +"意味着在一条HQL查询后紧跟着一系列的查询。" + +#. Tag: para +#: performance.xml:238 +#, no-c-format +msgid "" +"Usually, we don't use the mapping document to customize fetching. Instead, " +"we keep the default behavior, and override it for a particular transaction, " +"using left join fetch in HQL. This tells Hibernate to " +"fetch the association eagerly in the first select, using an outer join. In " +"the Criteria query API, you would use " +"setFetchMode(FetchMode.JOIN)." +msgstr "" +"通常情况下,我们并不使用映射文档进行抓取策略的定制。更多的是,保持其默认值," +"然后在特定的事务中, 使用HQL的左连接抓取(left join fetch) 对其进行重载。这将通知 Hibernate在第一次查询中使用外部关联(outer " +"join),直接得到其关联数据。 在条件查询 API中,应该调用 " +"setFetchMode(FetchMode.JOIN)语句。" + +#. Tag: para +#: performance.xml:247 +#, no-c-format +msgid "" +"If you ever feel like you wish you could change the fetching strategy used " +"by get() or load(), simply use a " +"Criteria query, for example:" +msgstr "" +"也许你喜欢仅仅通过条件查询,就可以改变get() 或 " +"load()语句中的数据抓取策略。例如:" + +#. Tag: programlisting +#: performance.xml:253 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:255 +#, no-c-format +msgid "" +"(This is Hibernate's equivalent of what some ORM solutions call a \"fetch " +"plan\".)" +msgstr "" +"(这就是其他ORM解决方案的“抓取计划(fetch plan)”在Hibernate中的等价物。)" + +#. Tag: para +#: performance.xml:259 +#, no-c-format +msgid "" +"A completely different way to avoid problems with N+1 selects is to use the " +"second-level cache." +msgstr "截然不同的一种避免N+1次查询的方法是,使用二级缓存。" + +#. Tag: title +#: performance.xml:267 +#, no-c-format +msgid "Single-ended association proxies" +msgstr "单端关联代理(Single-ended association proxies)" + +#. Tag: para +#: performance.xml:269 +#, no-c-format +msgid "" +"Lazy fetching for collections is implemented using Hibernate's own " +"implementation of persistent collections. However, a different mechanism is " +"needed for lazy behavior in single-ended associations. The target entity of " +"the association must be proxied. Hibernate implements lazy initializing " +"proxies for persistent objects using runtime bytecode enhancement (via the " +"excellent CGLIB library)." +msgstr "" +"在Hinerbate中,对集合的延迟抓取的采用了自己的实现方法。但是,对于单端关联的延" +"迟抓取,则需要采用 其他不同的机制。单端关联的目标实体必须使用代理,Hihernate" +"在运行期二进制级(通过优异的CGLIB库), 为持久对象实现了延迟载入代理。" + +#. Tag: para +#: performance.xml:277 +#, no-c-format +msgid "" +"By default, Hibernate3 generates proxies (at startup) for all persistent " +"classes and uses them to enable lazy fetching of many-to-one and one-to-one associations." +msgstr "" +"默认的,Hibernate3将会为所有的持久对象产生代理(在启动阶段),然后使用他们实" +"现 多对一(many-to-one)关联和一对一(one-to-" +"one) 关联的延迟抓取。" + +#. Tag: para +#: performance.xml:283 +#, no-c-format +msgid "" +"The mapping file may declare an interface to use as the proxy interface for " +"that class, with the proxy attribute. By default, " +"Hibernate uses a subclass of the class. Note that the proxied " +"class must implement a default constructor with at least package visibility. " +"We recommend this constructor for all persistent classes!" +msgstr "" +"在映射文件中,可以通过设置proxy属性为目标class声明一个接口" +"供代理接口使用。 默认的,Hibernate将会使用该类的一个子类。 注意:被" +"代理的类必须实现一个至少包可见的默认构造函数,我们建议所有的持久类都应拥有这" +"样的构造函数" + +#. Tag: para +#: performance.xml:290 +#, no-c-format +msgid "" +"There are some gotchas to be aware of when extending this approach to " +"polymorphic classes, eg." +msgstr "在如此方式定义一个多态类的时候,有许多值得注意的常见性的问题,例如:" + +#. Tag: programlisting +#: performance.xml:295 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:297 +#, no-c-format +msgid "" +"Firstly, instances of Cat will never be castable to " +"DomesticCat, even if the underlying instance is an " +"instance of DomesticCat:" +msgstr "" +"首先,Cat实例永远不可以被强制转换为DomesticCat, 即使它本身就是DomesticCat实例。" + +#. Tag: programlisting +#: performance.xml:303 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:305 +#, no-c-format +msgid "Secondly, it is possible to break proxy ==." +msgstr "其次,代理的“==”可能不再成立。" + +#. Tag: programlisting +#: performance.xml:309 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:311 +#, no-c-format +msgid "" +"However, the situation is not quite as bad as it looks. Even though we now " +"have two references to different proxy objects, the underlying instance will " +"still be the same object:" +msgstr "" +"虽然如此,但实际情况并没有看上去那么糟糕。虽然我们现在有两个不同的引用,分别" +"指向这两个不同的代理对象, 但实际上,其底层应该是同一个实例对象:" + +#. Tag: programlisting +#: performance.xml:316 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:318 +#, no-c-format +msgid "" +"Third, you may not use a CGLIB proxy for a final class or " +"a class with any final methods." +msgstr "第三,你不能对“final类”或“具有final方法的类”使用CGLIB代理。" + +#. Tag: para +#: performance.xml:323 +#, no-c-format +msgid "" +"Finally, if your persistent object acquires any resources upon instantiation " +"(eg. in initializers or default constructor), then those resources will also " +"be acquired by the proxy. The proxy class is an actual subclass of the " +"persistent class." +msgstr "" +"最后,如果你的持久化对象在实例化时需要某些资源(例如,在实例化方法、默认构造" +"方法中), 那么代理对象也同样需要使用这些资源。实际上,代理类是持久化类的子" +"类。" + +#. Tag: para +#: performance.xml:329 +#, no-c-format +msgid "" +"These problems are all due to fundamental limitations in Java's single " +"inheritance model. If you wish to avoid these problems your persistent " +"classes must each implement an interface that declares its business methods. " +"You should specify these interfaces in the mapping file. eg." +msgstr "" +"这些问题都源于Java的单根继承模型的天生限制。如果你希望避免这些问题,那么你的" +"每个持久化类必须实现一个接口, 在此接口中已经声明了其业务方法。然后,你需要在" +"映射文档中再指定这些接口。例如:" + +#. Tag: programlisting +#: performance.xml:335 +#, no-c-format +msgid "" +"\n" +" ......\n" +" \n" +" .....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:337 +#, no-c-format +msgid "" +"where CatImpl implements the interface Cat and DomesticCatImpl implements the interface " +"DomesticCat. Then proxies for instances of Cat and DomesticCat may be returned by load" +"() or iterate(). (Note that list() does not usually return proxies.)" +msgstr "" +"这里CatImpl实现了Cat接口, " +"DomesticCatImpl实现DomesticCat接口。 在" +"load()iterate()方法中就会返回 " +"CatDomesticCat的代理对象。 (注意" +"list()并不会返回代理对象。)" + +#. Tag: programlisting +#: performance.xml:345 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:347 +#, no-c-format +msgid "" +"Relationships are also lazily initialized. This means you must declare any " +"properties to be of type Cat, not CatImpl." +msgstr "" +"这里,对象之间的关系也将被延迟载入。这就意味着,你应该将属性声明为" +"Cat,而不是CatImpl。" + +#. Tag: para +#: performance.xml:352 +#, no-c-format +msgid "" +"Certain operations do not require proxy initialization" +msgstr "但是,在有些方法中是不需要使用代理的。例如:" + +#. Tag: para +#: performance.xml:358 +#, no-c-format +msgid "" +"equals(), if the persistent class does not override " +"equals()" +msgstr "" +"equals()方法,如果持久类没有重载equals()方法。" + +#. Tag: para +#: performance.xml:364 +#, no-c-format +msgid "" +"hashCode(), if the persistent class does not override " +"hashCode()" +msgstr "" +"hashCode()方法,如果持久类没有重载hashCode()方法。" + +#. Tag: para +#: performance.xml:370 +#, no-c-format +msgid "The identifier getter method" +msgstr "标志符的getter方法。" + +#. Tag: para +#: performance.xml:376 +#, no-c-format +msgid "" +"Hibernate will detect persistent classes that override equals() or hashCode()." +msgstr "" +"Hibernate将会识别出那些重载了equals()、或hashCode" +"()方法的持久化类。" + +#. Tag: para +#: performance.xml:381 +#, no-c-format +msgid "" +"By choosing lazy=\"no-proxy\" instead of the default " +"lazy=\"proxy\", we can avoid the problems associated with " +"typecasting. However, we will require buildtime bytecode instrumentation, " +"and all operations will result in immediate proxy initialization." +msgstr "" +"若选择lazy=\"no-proxy\"而非默认的lazy=\"proxy\",我们可以避免类型转换带来的问题。然而,这样我们就需要编译期字节码增" +"强,并且所有的操作都会导致立刻进行代理初始化。" + +#. Tag: title +#: performance.xml:391 +#, no-c-format +msgid "Initializing collections and proxies" +msgstr "实例化集合和代理(Initializing collections and proxies)" + +#. Tag: para +#: performance.xml:393 +#, no-c-format +msgid "" +"A LazyInitializationException will be thrown by Hibernate " +"if an uninitialized collection or proxy is accessed outside of the scope of " +"the Session, ie. when the entity owning the collection or " +"having the reference to the proxy is in the detached state." +msgstr "" +"在Session范围之外访问未初始化的集合或代理,Hibernate将会抛" +"出LazyInitializationException异常。 也就是说,在分离状态" +"下,访问一个实体所拥有的集合,或者访问其指向代理的属性时,会引发此异常。" + +#. Tag: para +#: performance.xml:399 +#, no-c-format +msgid "" +"Sometimes we need to ensure that a proxy or collection is initialized before " +"closing the Session. Of course, we can alway force " +"initialization by calling cat.getSex() or cat." +"getKittens().size(), for example. But that is confusing to readers " +"of the code and is not convenient for generic code." +msgstr "" +"有时候我们需要保证某个代理或者集合在Session关闭前就已经被初始化了。 当然,我" +"们可以通过强行调用cat.getSex()或者cat.getKittens" +"().size()之类的方法来确保这一点。 但是这样的程序会造成读者的疑惑," +"也不符合通常的代码规范。" + +#. Tag: para +#: performance.xml:406 +#, no-c-format +msgid "" +"The static methods Hibernate.initialize() and " +"Hibernate.isInitialized() provide the application with a " +"convenient way of working with lazily initialized collections or proxies. " +"Hibernate.initialize(cat) will force the initialization " +"of a proxy, cat, as long as its Session is still open. Hibernate.initialize( cat.getKittens() ) has a similar effect for the collection of kittens." +msgstr "" +"静态方法Hibernate.initialized() 为你的应用程序提供了一个便" +"捷的途径来延迟加载集合或代理。 只要它的Session处于open状态," +"Hibernate.initialize(cat) 将会为cat强制对代理实例化。 同" +"样,Hibernate.initialize( cat.getKittens() ) 对kittens的集" +"合具有同样的功能。" + +#. Tag: para +#: performance.xml:415 +#, no-c-format +msgid "" +"Another option is to keep the Session open until all " +"needed collections and proxies have been loaded. In some application " +"architectures, particularly where the code that accesses data using " +"Hibernate, and the code that uses it are in different application layers or " +"different physical processes, it can be a problem to ensure that the " +"Session is open when a collection is initialized. There " +"are two basic ways to deal with this issue:" +msgstr "" +"还有另外一种选择,就是保持Session一直处于open状态,直到所" +"有需要的集合或代理都被载入。 在某些应用架构中,特别是对于那些使用Hibernate进" +"行数据访问的代码,以及那些在不同应用层和不同物理进程中使用Hibernate的代码。 " +"在集合实例化时,如何保证Session处于open状态经常会是一个问" +"题。有两种方法可以解决此问题:" + +#. Tag: para +#: performance.xml:426 +#, no-c-format +msgid "" +"In a web-based application, a servlet filter can be used to close the " +"Session only at the very end of a user request, once the " +"rendering of the view is complete (the Open Session in View pattern). Of course, this places heavy demands on the correctness " +"of the exception handling of your application infrastructure. It is vitally " +"important that the Session is closed and the transaction " +"ended before returning to the user, even when an exception occurs during " +"rendering of the view. See the Hibernate Wiki for examples of this \"Open " +"Session in View\" pattern." +msgstr "" +"在一个基于Web的应用中,可以利用servlet过滤器(filter),在用户请求(request)" +"结束、页面生成 结束时关闭Session(这里使用了在展" +"示层保持打开Session模式(Open Session in View)), 当然,这将依赖" +"于应用框架中异常需要被正确的处理。在返回界面给用户之前,乃至在生成界面过程中" +"发生异常的情况下, 正确关闭Session和结束事务将是非常重要" +"的, 请参见Hibernate wiki上的\"Open Session in View\"模式,你可以找到示例。" + +#. Tag: para +#: performance.xml:439 +#, no-c-format +msgid "" +"In an application with a separate business tier, the business logic must " +"\"prepare\" all collections that will be needed by the web tier before " +"returning. This means that the business tier should load all the data and " +"return all the data already initialized to the presentation/web tier that is " +"required for a particular use case. Usually, the application calls " +"Hibernate.initialize() for each collection that will be " +"needed in the web tier (this call must occur before the session is closed) " +"or retrieves the collection eagerly using a Hibernate query with a " +"FETCH clause or a FetchMode.JOIN in " +"Criteria. This is usually easier if you adopt the " +"Command pattern instead of a Session Facade." +msgstr "" +"在一个拥有单独业务层的应用中,业务层必须在返回之前,为web层“准备”好其所需的数" +"据集合。这就意味着 业务层应该载入所有表现层/web层所需的数据,并将这些已实例化" +"完毕的数据返回。通常,应用程序应该 为web层所需的每个集合调用" +"Hibernate.initialize()(这个调用必须发生咱session关闭之" +"前); 或者使用带有FETCH从句,或FetchMode.JOIN的Hibernate查询, 事先取得所有的数据集合。如果你在应用中使用了" +"Command模式,代替Session Facade , " +"那么这项任务将会变得简单的多。" + +#. Tag: para +#: performance.xml:454 +#, no-c-format +msgid "" +"You may also attach a previously loaded object to a new Session with merge() or lock() before " +"accessing uninitialized collections (or other proxies). No, Hibernate does " +"not, and certainly should not do this automatically, " +"since it would introduce ad hoc transaction semantics!" +msgstr "" +"你也可以通过merge()lock()方法,在访问" +"未实例化的集合(或代理)之前, 为先前载入的对象绑定一个新的Session。 显然,Hibernate将不会,也不应该自动完成这些任" +"务,因为这将引入一个特殊的事务语义。" + +#. Tag: para +#: performance.xml:464 +#, no-c-format +msgid "" +"Sometimes you don't want to initialize a large collection, but still need " +"some information about it (like its size) or a subset of the data." +msgstr "" +"有时候,你并不需要完全实例化整个大的集合,仅需要了解它的部分信息(例如其大" +"小)、或者集合的部分内容。" + +#. Tag: para +#: performance.xml:469 +#, no-c-format +msgid "" +"You can use a collection filter to get the size of a collection without " +"initializing it:" +msgstr "你可以使用集合过滤器得到其集合的大小,而不必实例化整个集合:" + +#. Tag: programlisting +#: performance.xml:473 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:475 +#, no-c-format +msgid "" +"The createFilter() method is also used to efficiently " +"retrieve subsets of a collection without needing to initialize the whole " +"collection:" +msgstr "" +"这里的createFilter()方法也可以被用来有效的抓取集合的部分内" +"容,而无需实例化整个集合:" + +#. Tag: programlisting +#: performance.xml:480 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:485 +#, no-c-format +msgid "Using batch fetching" +msgstr "使用批量抓取(Using batch fetching)" + +#. Tag: para +#: performance.xml:487 +#, no-c-format +msgid "" +"Hibernate can make efficient use of batch fetching, that is, Hibernate can " +"load several uninitialized proxies if one proxy is accessed (or collections. " +"Batch fetching is an optimization of the lazy select fetching strategy. " +"There are two ways you can tune batch fetching: on the class and the " +"collection level." +msgstr "" +"Hibernate可以充分有效的使用批量抓取,也就是说,如果仅一个访问代理(或集合)," +"那么Hibernate将不载入其他未实例化的代理。 批量抓取是延迟查询抓取的优化方案," +"你可以在两种批量抓取方案之间进行选择:在类级别和集合级别。" + +#. Tag: para +#: performance.xml:493 +#, no-c-format +msgid "" +"Batch fetching for classes/entities is easier to understand. Imagine you " +"have the following situation at runtime: You have 25 Cat " +"instances loaded in a Session, each Cat has a reference to its owner, a Person. The Person class is mapped with a proxy, " +"lazy=\"true\". If you now iterate through all cats and " +"call getOwner() on each, Hibernate will by default " +"execute 25 SELECT statements, to retrieve the proxied " +"owners. You can tune this behavior by specifying a batch-size in the mapping of Person:" +msgstr "" +"类/实体级别的批量抓取很容易理解。假设你在运行时将需要面对下面的问题:你在一个" +"Session中载入了25个 Cat实例,每个" +"Cat实例都拥有一个引用成员owner, 其指向" +"Person,而Person类是代理,同时" +"lazy=\"true\"。 如果你必须遍历整个cats集合,对每个元素调用" +"getOwner()方法,Hibernate将会默认的执行25次" +"SELECT查询, 得到其owner的代理对象。这时,你可以通过在映射" +"文件的Person属性,显式声明batch-size," +"改变其行为:" + +#. Tag: programlisting +#: performance.xml:503 +#, no-c-format +msgid "...]]>" +msgstr "" + +#. Tag: para +#: performance.xml:505 +#, no-c-format +msgid "" +"Hibernate will now execute only three queries, the pattern is 10, 10, 5." +msgstr "随之,Hibernate将只需要执行三次查询,分别为10、10、 5。" + +#. Tag: para +#: performance.xml:509 +#, fuzzy, no-c-format +msgid "" +"You may also enable batch fetching of collections. For example, if each " +"Person has a lazy collection of Cats, " +"and 10 persons are currently loaded in the Session, " +"iterating through all persons will generate 10 SELECTs, " +"one for every call to getCats(). If you enable batch " +"fetching for the cats collection in the mapping of " +"Person, Hibernate can pre-fetch collections:" +msgstr "" +"你也可以在集合级别定义批量抓取。例如,如果每个Person都拥有" +"一个延迟载入的Cats集合, 现在,Sesssion" +"中载入了10个person对象,遍历person集合将会引起10次SELECT查" +"询, 每次查询都会调用getCats()方法。如果你在" +"Person的映射定义部分,允许对cats批量抓" +"取, 那么,Hibernate将可以预先抓取整个集合。请看例子:" + +#. Tag: programlisting +#: performance.xml:518 +#, no-c-format +msgid "" +"\n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:520 +#, no-c-format +msgid "" +"With a batch-size of 3, Hibernate will load 3, 3, 3, 1 " +"collections in four SELECTs. Again, the value of the " +"attribute depends on the expected number of uninitialized collections in a " +"particular Session." +msgstr "" +"如果整个的batch-size是3(笔误?),那么Hibernate将会分四次" +"执行SELECT查询, 按照3、3、3、1的大小分别载入数据。这里的" +"每次载入的数据量还具体依赖于当前Session中未实例化集合的个" +"数。" + +#. Tag: para +#: performance.xml:526 +#, no-c-format +msgid "" +"Batch fetching of collections is particularly useful if you have a nested " +"tree of items, ie. the typical bill-of-materials pattern. (Although a " +"nested set or a materialized path " +"might be a better option for read-mostly trees.)" +msgstr "" +"如果你的模型中有嵌套的树状结构,例如典型的帐单-原料结构(bill-of-materials " +"pattern),集合的批量抓取是非常有用的。 (尽管在更多情况下对树进行读取时," +"嵌套集合(nested set)原料路径(materialized " +"path)(××) 是更好的解决方法。)" + +#. Tag: title +#: performance.xml:535 +#, no-c-format +msgid "Using subselect fetching" +msgstr "使用子查询抓取(Using subselect fetching)" + +#. Tag: para +#: performance.xml:537 +#, no-c-format +msgid "" +"If one lazy collection or single-valued proxy has to be fetched, Hibernate " +"loads all of them, re-running the original query in a subselect. This works " +"in the same way as batch-fetching, without the piecemeal loading." +msgstr "" +"假若一个延迟集合或单值代理需要抓取,Hibernate会使用一个subselect重新运行原来" +"的查询,一次性读入所有的实例。这和批量抓取的实现方法是一样的,不会有破碎的加" +"载。" + +#. Tag: title +#: performance.xml:548 +#, no-c-format +msgid "Using lazy property fetching" +msgstr "使用延迟属性抓取(Using lazy property fetching)" + +#. Tag: para +#: performance.xml:550 +#, no-c-format +msgid "" +"Hibernate3 supports the lazy fetching of individual properties. This " +"optimization technique is also known as fetch groups. " +"Please note that this is mostly a marketing feature, as in practice, " +"optimizing row reads is much more important than optimization of column " +"reads. However, only loading some properties of a class might be useful in " +"extreme cases, when legacy tables have hundreds of columns and the data " +"model can not be improved." +msgstr "" +"Hibernate3对单独的属性支持延迟抓取,这项优化技术也被称为组抓取" +"(fetch groups)。 请注意,该技术更多的属于市场特性。在实际应用" +"中,优化行读取比优化列读取更重要。但是,仅载入类的部分属性在某些特定情况下会" +"有用,例如在原有表中拥有几百列数据、数据模型无法改动的情况下。" + +#. Tag: para +#: performance.xml:559 +#, no-c-format +msgid "" +"To enable lazy property loading, set the lazy attribute " +"on your particular property mappings:" +msgstr "" +"可以在映射文件中对特定的属性设置lazy,定义该属性为延迟载" +"入。" + +#. Tag: programlisting +#: performance.xml:564 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:566 +#, no-c-format +msgid "" +"Lazy property loading requires buildtime bytecode instrumentation! If your " +"persistent classes are not enhanced, Hibernate will silently ignore lazy " +"property settings and fall back to immediate fetching." +msgstr "" +"属性的延迟载入要求在其代码构建时加入二进制指示指令(bytecode " +"instrumentation),如果你的持久类代码中未含有这些指令, Hibernate将会忽略这些" +"属性的延迟设置,仍然将其直接载入。" + +#. Tag: para +#: performance.xml:572 +#, no-c-format +msgid "For bytecode instrumentation, use the following Ant task:" +msgstr "你可以在Ant的Task中,进行如下定义,对持久类代码加入“二进制指令。”" + +#. Tag: programlisting +#: performance.xml:576 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:578 +#, fuzzy, no-c-format +msgid "" +"A different (better?) way to avoid unnecessary column reads, at least for " +"read-only transactions is to use the projection features of HQL or Criteria " +"queries. This avoids the need for buildtime bytecode processing and is " +"certainly a preferred solution." +msgstr "" +"还有一种可以优化的方法,它使用HQL或条件查询的投影(projection)特性,可以避免" +"读取非必要的列, 这一点至少对只读事务是非常有用的。它无需在代码构建时“二进制" +"指令”处理,因此是一个更加值得选择的解决方法。" + +#. Tag: para +#: performance.xml:585 +#, no-c-format +msgid "" +"You may force the usual eager fetching of properties using fetch " +"all properties in HQL." +msgstr "" +"有时你需要在HQL中通过抓取所有属性,强行抓取所有内容。" + +#. Tag: title +#: performance.xml:595 +#, no-c-format +msgid "The Second Level Cache" +msgstr "二级缓存(The Second Level Cache)" + +#. Tag: para +#: performance.xml:597 +#, no-c-format +msgid "" +"A Hibernate Session is a transaction-level cache of " +"persistent data. It is possible to configure a cluster or JVM-level " +"(SessionFactory-level) cache on a class-by-class and " +"collection-by-collection basis. You may even plug in a clustered cache. Be " +"careful. Caches are never aware of changes made to the persistent store by " +"another application (though they may be configured to regularly expire " +"cached data)." +msgstr "" +"Hibernate的Session在事务级别进行持久化数据的缓存操作。 当" +"然,也有可能分别为每个类(或集合),配置集群、或JVM级别" +"(SessionFactory级别)的缓存。 你甚至可以为之插入一个集群的" +"缓存。注意,缓存永远不知道其他应用程序对持久化仓库(数据库)可能进行的修改 " +"(即使可以将缓存数据设定为定期失效)。" + +#. Tag: para +#: performance.xml:605 +#, no-c-format +msgid "" +"You have the option to tell Hibernate which caching implementation to use by " +"specifying the name of a class that implements org.hibernate.cache." +"CacheProvider using the property hibernate.cache." +"provider_class. Hibernate comes bundled with a number of built-in " +"integrations with open-source cache providers (listed below); additionally, " +"you could implement your own and plug it in as outlined above. Note that " +"versions prior to 3.2 defaulted to use EhCache as the default cache " +"provider; that is no longer the case as of 3.2." +msgstr "" +"通过在hibernate.cache.provider_class属性中指定" +"org.hibernate.cache.CacheProvider的某个实现的类名,你可以选" +"择让Hibernate使用哪个缓存实现。Hibernate打包一些开源缓存实现,提供对它们的内" +"置支持(见下表)。除此之外,你也可以实现你自己的实现,将它们插入到系统中。注" +"意,在3.2版本之前,默认使用EhCache 作为缓存实现,但从3.2起就不再这样了。" + +#. Tag: title +#: performance.xml:616 +#, no-c-format +msgid "Cache Providers" +msgstr "缓存策略提供商(Cache Providers)" + +#. Tag: entry +#: performance.xml:625 performance.xml:813 +#, no-c-format +msgid "Cache" +msgstr "Cache" + +#. Tag: entry +#: performance.xml:626 +#, no-c-format +msgid "Provider class" +msgstr "Provider class" + +#. Tag: entry +#: performance.xml:627 +#, no-c-format +msgid "Type" +msgstr "Type" + +#. Tag: entry +#: performance.xml:628 +#, no-c-format +msgid "Cluster Safe" +msgstr "Cluster Safe" + +#. Tag: entry +#: performance.xml:629 +#, no-c-format +msgid "Query Cache Supported" +msgstr "Query Cache Supported" + +#. Tag: entry +#: performance.xml:634 performance.xml:822 +#, no-c-format +msgid "Hashtable (not intended for production use)" +msgstr "Hashtable (not intended for production use)" + +#. Tag: literal +#: performance.xml:635 +#, no-c-format +msgid "org.hibernate.cache.HashtableCacheProvider" +msgstr "org.hibernate.cache.HashtableCacheProvider" + +#. Tag: entry +#: performance.xml:636 +#, no-c-format +msgid "memory" +msgstr "memory" + +#. Tag: entry +#: performance.xml:638 performance.xml:645 performance.xml:652 +#: performance.xml:823 performance.xml:824 performance.xml:825 +#: performance.xml:830 performance.xml:831 performance.xml:832 +#: performance.xml:837 performance.xml:838 performance.xml:839 +#: performance.xml:844 performance.xml:845 performance.xml:851 +#: performance.xml:854 performance.xml:858 performance.xml:861 +#, no-c-format +msgid "yes" +msgstr "" + +#. Tag: entry +#: performance.xml:641 performance.xml:829 +#, no-c-format +msgid "EHCache" +msgstr "EHCache" + +#. Tag: literal +#: performance.xml:642 +#, no-c-format +msgid "org.hibernate.cache.EhCacheProvider" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:643 performance.xml:650 +#, no-c-format +msgid "memory, disk" +msgstr "memory, disk" + +#. Tag: entry +#: performance.xml:648 performance.xml:836 +#, no-c-format +msgid "OSCache" +msgstr "OSCache" + +#. Tag: literal +#: performance.xml:649 +#, no-c-format +msgid "org.hibernate.cache.OSCacheProvider" +msgstr "org.hibernate.cache.OSCacheProvider" + +#. Tag: entry +#: performance.xml:655 performance.xml:843 +#, no-c-format +msgid "SwarmCache" +msgstr "SwarmCache" + +#. Tag: literal +#: performance.xml:656 +#, no-c-format +msgid "org.hibernate.cache.SwarmCacheProvider" +msgstr "org.hibernate.cache.SwarmCacheProvider" + +#. Tag: entry +#: performance.xml:657 +#, no-c-format +msgid "clustered (ip multicast)" +msgstr "clustered (ip multicast)" + +#. Tag: entry +#: performance.xml:658 +#, no-c-format +msgid "yes (clustered invalidation)" +msgstr "yes (clustered invalidation)" + +#. Tag: entry +#: performance.xml:662 performance.xml:850 +#, fuzzy, no-c-format +msgid "JBoss Cache 1.x" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:663 +#, no-c-format +msgid "org.hibernate.cache.TreeCacheProvider" +msgstr "org.hibernate.cache.TreeCacheProvider" + +#. Tag: entry +#: performance.xml:664 performance.xml:671 +#, no-c-format +msgid "clustered (ip multicast), transactional" +msgstr "clustered (ip multicast), transactional" + +#. Tag: entry +#: performance.xml:665 +#, no-c-format +msgid "yes (replication)" +msgstr "yes (replication)" + +#. Tag: entry +#: performance.xml:666 performance.xml:673 +#, no-c-format +msgid "yes (clock sync req.)" +msgstr "yes (clock sync req.)" + +#. Tag: entry +#: performance.xml:669 performance.xml:857 +#, fuzzy, no-c-format +msgid "JBoss Cache 2" +msgstr "JBoss TreeCache" + +#. Tag: literal +#: performance.xml:670 +#, fuzzy, no-c-format +msgid "org.hibernate.cache.jbc2.JBossCacheRegionFactory" +msgstr "org.hibernate.cache.EhCacheProvider" + +#. Tag: entry +#: performance.xml:672 +#, fuzzy, no-c-format +msgid "yes (replication or invalidation)" +msgstr "yes (clustered invalidation)" + +#. Tag: title +#: performance.xml:680 +#, no-c-format +msgid "Cache mappings" +msgstr "缓存映射(Cache mappings)" + +#. Tag: para +#: performance.xml:682 +#, no-c-format +msgid "" +"The <cache> element of a class or collection " +"mapping has the following form:" +msgstr "类或者集合映射的“<cache>元素”可以有下列形式:" + +#. Tag: programlisting +#: performance.xml:693 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: performance.xml:696 +#, no-c-format +msgid "" +"usage (required) specifies the caching strategy: " +"transactional, read-write, " +"nonstrict-read-write or read-only" +msgstr "" +"usage(必须)说明了缓存的策略: transactionalread-writenonstrict-read-writeread-only。" + +#. Tag: para +#: performance.xml:705 +#, no-c-format +msgid "" +"region (optional, defaults to the class or collection " +"role name) specifies the name of the second level cache region" +msgstr "" +"region (可选, 默认为类或者集合的名字(class or collection " +"role name)) 指定第二级缓存的区域名(name of the second level cache region)" + +#. Tag: para +#: performance.xml:712 +#, no-c-format +msgid "" +"include (optional, defaults to all) " +"non-lazy specifies that properties of the entity mapped " +"with lazy=\"true\" may not be cached when attribute-level " +"lazy fetching is enabled" +msgstr "" +"include (可选,默认为 all) non-" +"lazy 当属性级延迟抓取打开时, 标记为lazy=\"true\"" +"的实体的属性可能无法被缓存" + +#. Tag: para +#: performance.xml:722 +#, fuzzy, no-c-format +msgid "" +"Alternatively (preferably?), you may specify <class-cache> and <collection-cache> elements in " +"hibernate.cfg.xml." +msgstr "" +"另外(首选?), 你可以在hibernate.cfg.xml中指定<class-cache><collection-cache> 元素。" + +#. Tag: para +#: performance.xml:727 +#, no-c-format +msgid "" +"The usage attribute specifies a cache " +"concurrency strategy." +msgstr "" +"这里的usage 属性指明了缓存并发策略(cache " +"concurrency strategy)。" + +#. Tag: title +#: performance.xml:734 +#, no-c-format +msgid "Strategy: read only" +msgstr "策略:只读缓存(Strategy: read only)" + +#. Tag: para +#: performance.xml:736 +#, no-c-format +msgid "" +"If your application needs to read but never modify instances of a persistent " +"class, a read-only cache may be used. This is the " +"simplest and best performing strategy. It's even perfectly safe for use in a " +"cluster." +msgstr "" +"如果你的应用程序只需读取一个持久化类的实例,而无需对其修改, 那么就可以对其进" +"行只读 缓存。这是最简单,也是实用性最好的方法。甚至在集群" +"中,它也能完美地运作。" + +#. Tag: programlisting +#: performance.xml:742 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:748 +#, no-c-format +msgid "Strategy: read/write" +msgstr "策略:读/写缓存(Strategy: read/write)" + +#. Tag: para +#: performance.xml:750 +#, no-c-format +msgid "" +"If the application needs to update data, a read-write " +"cache might be appropriate. This cache strategy should never be used if " +"serializable transaction isolation level is required. If the cache is used " +"in a JTA environment, you must specify the property hibernate." +"transaction.manager_lookup_class, naming a strategy for obtaining " +"the JTA TransactionManager. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called. If you wish " +"to use this strategy in a cluster, you should ensure that the underlying " +"cache implementation supports locking. The built-in cache providers do " +"not." +msgstr "" +"如果应用程序需要更新数据,那么使用读/写缓存 比较合适。 如" +"果应用程序要求“序列化事务”的隔离级别(serializable transaction isolation " +"level),那么就决不能使用这种缓存策略。 如果在JTA环境中使用缓存,你必须指定" +"hibernate.transaction.manager_lookup_class属性的值, 通过" +"它,Hibernate才能知道该应用程序中JTA的TransactionManager的" +"具体策略。 在其它环境中,你必须保证在Session.close()、或" +"Session.disconnect()调用前, 整个事务已经结束。 如果你想在" +"集群环境中使用此策略,你必须保证底层的缓存实现支持锁定(locking)。Hibernate内" +"置的缓存策略并不支持锁定功能。" + +#. Tag: programlisting +#: performance.xml:761 +#, no-c-format +msgid "" +"\n" +" \n" +" ....\n" +" \n" +" \n" +" ....\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: performance.xml:766 +#, no-c-format +msgid "Strategy: nonstrict read/write" +msgstr "策略:非严格读/写缓存(Strategy: nonstrict read/write)" + +#. Tag: para +#: performance.xml:768 +#, no-c-format +msgid "" +"If the application only occasionally needs to update data (ie. if it is " +"extremely unlikely that two transactions would try to update the same item " +"simultaneously) and strict transaction isolation is not required, a " +"nonstrict-read-write cache might be appropriate. If the " +"cache is used in a JTA environment, you must specify hibernate." +"transaction.manager_lookup_class. In other environments, you " +"should ensure that the transaction is completed when Session.close()" +" or Session.disconnect() is called." +msgstr "" +"如果应用程序只偶尔需要更新数据(也就是说,两个事务同时更新同一记录的情况很不" +"常见),也不需要十分严格的事务隔离, 那么比较适合使用非严格读/写缓存" +"策略。如果在JTA环境中使用该策略, 你必须为其指定hibernate." +"transaction.manager_lookup_class属性的值, 在其它环境中,你必须保证" +"在Session.close()、或Session.disconnect()调用前, 整个事务已经结束。" + +#. Tag: title +#: performance.xml:780 +#, no-c-format +msgid "Strategy: transactional" +msgstr "策略:事务缓存(transactional)" + +#. Tag: para +#: performance.xml:782 +#, no-c-format +msgid "" +"The transactional cache strategy provides support for " +"fully transactional cache providers such as JBoss TreeCache. Such a cache " +"may only be used in a JTA environment and you must specify " +"hibernate.transaction.manager_lookup_class." +msgstr "" +"Hibernate的事务缓存策略提供了全事务的缓存支持, 例如对" +"JBoss TreeCache的支持。这样的缓存只能用于JTA环境中,你必须指定 为其" +"hibernate.transaction.manager_lookup_class属性。" + +#. Tag: title +#: performance.xml:791 +#, fuzzy, no-c-format +msgid "Cache-provider/concurrency-strategy compatibility" +msgstr "" +"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)" + +#. Tag: para +#: performance.xml:794 +#, fuzzy, no-c-format +msgid "" +"None of the cache providers support all of the cache concurrency strategies." +msgstr "" +"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及" +"其各自适用的并发策略。" + +#. Tag: para +#: performance.xml:799 +#, fuzzy, no-c-format +msgid "" +"The following table shows which providers are compatible with which " +"concurrency strategies." +msgstr "" +"没有一种缓存提供商能够支持上列的所有缓存并发策略。下表中列出了各种提供器、及" +"其各自适用的并发策略。" + +#. Tag: title +#: performance.xml:804 +#, no-c-format +msgid "Cache Concurrency Strategy Support" +msgstr "" +"各种缓存提供商对缓存并发策略的支持情况(Cache Concurrency Strategy Support)" + +#. Tag: entry +#: performance.xml:814 +#, no-c-format +msgid "read-only" +msgstr "read-only" + +#. Tag: entry +#: performance.xml:815 +#, no-c-format +msgid "nonstrict-read-write" +msgstr "nonstrict-read-write" + +#. Tag: entry +#: performance.xml:816 +#, no-c-format +msgid "read-write" +msgstr "read-write" + +#. Tag: entry +#: performance.xml:817 +#, no-c-format +msgid "transactional" +msgstr "transactional" + +#. Tag: title +#: performance.xml:872 +#, no-c-format +msgid "Managing the caches" +msgstr "管理缓存(Managing the caches)" + +#. Tag: para +#: performance.xml:874 +#, no-c-format +msgid "" +"Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an " +"object using load(), get(), " +"list(), iterate() or scroll()" +", that object is added to the internal cache of the " +"Session." +msgstr "" +"无论何时,当你给save()update()或 " +"saveOrUpdate()方法传递一个对象时,或使用load()get()list()、" +"iterate()scroll()方法获得一个对象" +"时, 该对象都将被加入到Session的内部缓存中。" + +#. Tag: para +#: performance.xml:881 +#, no-c-format +msgid "" +"When flush() is subsequently called, the state of that " +"object will be synchronized with the database. If you do not want this " +"synchronization to occur or if you are processing a huge number of objects " +"and need to manage memory efficiently, the evict() method " +"may be used to remove the object and its collections from the first-level " +"cache." +msgstr "" +"当随后flush()方法被调用时,对象的状态会和数据库取得同步。 如果你不希望此同步" +"操作发生,或者你正处理大量对象、需要对有效管理内存时,你可以调用" +"evict() 方法,从一级缓存中去掉这些对象及其集合。" + +#. Tag: programlisting +#: performance.xml:889 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:891 +#, no-c-format +msgid "" +"The Session also provides a contains() " +"method to determine if an instance belongs to the session cache." +msgstr "" +"Session还提供了一个contains()方法,用来判断某个实例是否处" +"于当前session的缓存中。" + +#. Tag: para +#: performance.xml:896 +#, no-c-format +msgid "" +"To completely evict all objects from the session cache, call " +"Session.clear()" +msgstr "" +"如若要把所有的对象从session缓存中彻底清除,则需要调用Session.clear()" +"。" + +#. Tag: para +#: performance.xml:900 +#, no-c-format +msgid "" +"For the second-level cache, there are methods defined on " +"SessionFactory for evicting the cached state of an " +"instance, entire class, collection instance or entire collection role." +msgstr "" +"对于二级缓存来说,在SessionFactory中定义了许多方法, 清除" +"缓存中实例、整个类、集合实例或者整个集合。" + +#. Tag: programlisting +#: performance.xml:906 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:908 +#, no-c-format +msgid "" +"The CacheMode controls how a particular session interacts " +"with the second-level cache." +msgstr "" +"CacheMode参数用于控制具体的Session如何与二级缓存进行交互。" + +#. Tag: para +#: performance.xml:915 +#, no-c-format +msgid "" +"CacheMode.NORMAL - read items from and write items to the " +"second-level cache" +msgstr "CacheMode.NORMAL - 从二级缓存中读、写数据。" + +#. Tag: para +#: performance.xml:920 +#, no-c-format +msgid "" +"CacheMode.GET - read items from the second-level cache, " +"but don't write to the second-level cache except when updating data" +msgstr "" +"CacheMode.GET - 从二级缓存中读取数据,仅在数据更新时对二级" +"缓存写数据。" + +#. Tag: para +#: performance.xml:926 +#, no-c-format +msgid "" +"CacheMode.PUT - write items to the second-level cache, " +"but don't read from the second-level cache" +msgstr "" +"CacheMode.PUT - 仅向二级缓存写数据,但不从二级缓存中读数" +"据。" + +#. Tag: para +#: performance.xml:932 +#, no-c-format +msgid "" +"CacheMode.REFRESH - write items to the second-level " +"cache, but don't read from the second-level cache, bypass the effect of " +"hibernate.cache.use_minimal_puts, forcing a refresh of " +"the second-level cache for all items read from the database" +msgstr "" +"CacheMode.REFRESH - 仅向二级缓存写数据,但不从二级缓存中读" +"数据。通过 hibernate.cache.use_minimal_puts的设置,强制二" +"级缓存从数据库中读取数据,刷新缓存内容。" + +#. Tag: para +#: performance.xml:940 +#, no-c-format +msgid "" +"To browse the contents of a second-level or query cache region, use the " +"Statistics API:" +msgstr "" +"如若需要查看二级缓存或查询缓存区域的内容,你可以使用统计" +"(Statistics) API。" + +#. Tag: programlisting +#: performance.xml:945 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:947 +#, no-c-format +msgid "" +"You'll need to enable statistics, and, optionally, force Hibernate to keep " +"the cache entries in a more human-understandable format:" +msgstr "" +"此时,你必须手工打开统计选项。可选的,你可以让Hibernate更人工可读的方式维护缓" +"存内容。" + +#. Tag: programlisting +#: performance.xml:952 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:957 +#, no-c-format +msgid "The Query Cache" +msgstr "查询缓存(The Query Cache)" + +#. Tag: para +#: performance.xml:959 +#, no-c-format +msgid "" +"Query result sets may also be cached. This is only useful for queries that " +"are run frequently with the same parameters. To use the query cache you must " +"first enable it:" +msgstr "" +"查询的结果集也可以被缓存。只有当经常使用同样的参数进行查询时,这才会有些用" +"处。 要使用查询缓存,首先你必须打开它:" + +#. Tag: programlisting +#: performance.xml:964 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: performance.xml:966 +#, no-c-format +msgid "" +"This setting causes the creation of two new cache regions - one holding " +"cached query result sets (org.hibernate.cache.StandardQueryCache), the other holding timestamps of the most recent updates to " +"queryable tables (org.hibernate.cache.UpdateTimestampsCache). Note that the query cache does not cache the state of the actual " +"entities in the result set; it caches only identifier values and results of " +"value type. So the query cache should always be used in conjunction with the " +"second-level cache." +msgstr "" +"该设置将会创建两个缓存区域 - 一个用于保存查询结果集(org.hibernate." +"cache.StandardQueryCache); 另一个则用于保存最近查询的一系列表的时" +"间戳(org.hibernate.cache.UpdateTimestampsCache)。 请注意:" +"在查询缓存中,它并不缓存结果集中所包含的实体的确切状态;它只缓存这些实体的标" +"识符属性的值、以及各值类型的结果。 所以查询缓存通常会和二级缓存一起使用。" + +#. Tag: para +#: performance.xml:976 +#, no-c-format +msgid "" +"Most queries do not benefit from caching, so by default queries are not " +"cached. To enable caching, call Query.setCacheable(true). " +"This call allows the query to look for existing cache results or add its " +"results to the cache when it is executed." +msgstr "" +"绝大多数的查询并不能从查询缓存中受益,所以Hibernate默认是不进行查询缓存的。如" +"若需要进行缓存,请调用 Query.setCacheable(true)方法。这个" +"调用会让查询在执行过程中时先从缓存中查找结果, 并将自己的结果集放到缓存中去。" + +#. Tag: para +#: performance.xml:983 +#, no-c-format +msgid "" +"If you require fine-grained control over query cache expiration policies, " +"you may specify a named cache region for a particular query by calling " +"Query.setCacheRegion()." +msgstr "" +"如果你要对查询缓存的失效政策进行精确的控制,你必须调用Query." +"setCacheRegion()方法, 为每个查询指定其命名的缓存区域。" + +#. Tag: programlisting +#: performance.xml:989 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:991 +#, no-c-format +msgid "" +"If the query should force a refresh of its query cache region, you should " +"call Query.setCacheMode(CacheMode.REFRESH). This is " +"particularly useful in cases where underlying data may have been updated via " +"a separate process (i.e., not modified through Hibernate) and allows the " +"application to selectively refresh particular query result sets. This is a " +"more efficient alternative to eviction of a query cache region via " +"SessionFactory.evictQueries()." +msgstr "" +"如果查询需要强行刷新其查询缓存区域,那么你应该调用Query.setCacheMode" +"(CacheMode.REFRESH)方法。 这对在其他进程中修改底层数据(例如,不通" +"过Hibernate修改数据),或对那些需要选择性更新特定查询结果集的情况特别有用。 " +"这是对SessionFactory.evictQueries()的更为有效的替代方案," +"同样可以清除查询缓存区域。" + +#. Tag: title +#: performance.xml:1003 +#, no-c-format +msgid "Understanding Collection performance" +msgstr "理解集合性能(Understanding Collection performance)" + +#. Tag: para +#: performance.xml:1005 +#, no-c-format +msgid "" +"We've already spent quite some time talking about collections. In this " +"section we will highlight a couple more issues about how collections behave " +"at runtime." +msgstr "" +"前面我们已经对集合进行了足够的讨论。本段中,我们将着重讲述集合在运行时的事" +"宜。" + +#. Tag: title +#: performance.xml:1012 +#, no-c-format +msgid "Taxonomy" +msgstr "分类(Taxonomy)" + +#. Tag: para +#: performance.xml:1014 +#, no-c-format +msgid "Hibernate defines three basic kinds of collections:" +msgstr "Hibernate定义了三种基本类型的集合:" + +#. Tag: para +#: performance.xml:1018 +#, no-c-format +msgid "collections of values" +msgstr "值数据集合" + +#. Tag: para +#: performance.xml:1021 +#, no-c-format +msgid "one to many associations" +msgstr "一对多关联" + +#. Tag: para +#: performance.xml:1024 +#, no-c-format +msgid "many to many associations" +msgstr "多对多关联" + +#. Tag: para +#: performance.xml:1028 +#, no-c-format +msgid "" +"This classification distinguishes the various table and foreign key " +"relationships but does not tell us quite everything we need to know about " +"the relational model. To fully understand the relational structure and " +"performance characteristics, we must also consider the structure of the " +"primary key that is used by Hibernate to update or delete collection rows. " +"This suggests the following classification:" +msgstr "" +"这个分类是区分了不同的表和外键关系类型,但是它没有告诉我们关系模型的所有内" +"容。 要完全理解他们的关系结构和性能特点,我们必须同时考虑“用于Hibernate更新或" +"删除集合行数据的主键的结构”。 因此得到了如下的分类:" + +#. Tag: para +#: performance.xml:1039 +#, no-c-format +msgid "indexed collections" +msgstr "有序集合类" + +#. Tag: para +#: performance.xml:1042 +#, no-c-format +msgid "sets" +msgstr "集合(sets)" + +#. Tag: para +#: performance.xml:1045 +#, no-c-format +msgid "bags" +msgstr "包(bags)" + +#. Tag: para +#: performance.xml:1049 +#, no-c-format +msgid "" +"All indexed collections (maps, lists, arrays) have a primary key consisting " +"of the <key> and <index> " +"columns. In this case collection updates are usually extremely efficient - " +"the primary key may be efficiently indexed and a particular row may be " +"efficiently located when Hibernate tries to update or delete it." +msgstr "" +"所有的有序集合类(maps, lists, arrays)都拥有一个由<key><index>组成的主键。 这种情况下集合类的更" +"新是非常高效的——主键已经被有效的索引,因此当Hibernate试图更新或删除一行时,可" +"以迅速找到该行数据。" + +#. Tag: para +#: performance.xml:1057 +#, fuzzy, no-c-format +msgid "" +"Sets have a primary key consisting of <key> and " +"element columns. This may be less efficient for some types of collection " +"element, particularly composite elements or large text or binary fields; the " +"database may not be able to index a complex primary key as efficiently. On " +"the other hand, for one to many or many to many associations, particularly " +"in the case of synthetic identifiers, it is likely to be just as efficient. " +"(Side-note: if you want SchemaExport to actually create " +"the primary key of a <set> for you, you must " +"declare all columns as not-null=\"true\".)" +msgstr "" +"集合(sets)的主键由<key>和其他元素字段构成。 对于有些" +"元素类型来说,这很低效,特别是组合元素或者大文本、大二进制字段; 数据库可能无" +"法有效的对复杂的主键进行索引。 另一方面,对于一对多、多对多关联,特别是合成的" +"标识符来说,集合也可以达到同样的高效性能。( 附注:如果你希望" +"SchemaExport为你的<set>创建主" +"键, 你必须把所有的字段都声明为not-null=\"true\"。)" + +#. Tag: para +#: performance.xml:1068 +#, no-c-format +msgid "" +"<idbag> mappings define a surrogate key, so they " +"are always very efficient to update. In fact, they are the best case." +msgstr "" +"<idbag>映射定义了代理键,因此它总是可以很高效的被更" +"新。事实上, <idbag>拥有着最好的性能表现。" + +#. Tag: para +#: performance.xml:1073 +#, no-c-format +msgid "" +"Bags are the worst case. Since a bag permits duplicate element values and " +"has no index column, no primary key may be defined. Hibernate has no way of " +"distinguishing between duplicate rows. Hibernate resolves this problem by " +"completely removing (in a single DELETE) and recreating " +"the collection whenever it changes. This might be very inefficient." +msgstr "" +"Bag是最差的。因为bag允许重复的元素值,也没有索引字段,因此不可能定义主键。 " +"Hibernate无法判断出重复的行。当这种集合被更改时,Hibernate将会先完整地移除 " +"(通过一个(in a single DELETE))整个集合,然后再重新创建整" +"个集合。 因此Bag是非常低效的。" + +#. Tag: para +#: performance.xml:1081 +#, no-c-format +msgid "" +"Note that for a one-to-many association, the \"primary key\" may not be the " +"physical primary key of the database table - but even in this case, the " +"above classification is still useful. (It still reflects how Hibernate " +"\"locates\" individual rows of the collection.)" +msgstr "" +"请注意:对于一对多关联来说,“主键”很可能并不是数据库表的物理主键。 但就算在此" +"情况下,上面的分类仍然是有用的。(它仍然反映了Hibernate在集合的各数据行中是如" +"何进行“定位”的。)" + +#. Tag: title +#: performance.xml:1091 +#, no-c-format +msgid "" +"Lists, maps, idbags and sets are the most efficient collections to update" +msgstr "Lists, maps 和sets用于更新效率最高" + +#. Tag: para +#: performance.xml:1093 +#, no-c-format +msgid "" +"From the discussion above, it should be clear that indexed collections and " +"(usually) sets allow the most efficient operation in terms of adding, " +"removing and updating elements." +msgstr "" +"根据我们上面的讨论,显然有序集合类型和大多数set都可以在增加、删除、修改元素中" +"拥有最好的性能。" + +#. Tag: para +#: performance.xml:1099 +#, no-c-format +msgid "" +"There is, arguably, one more advantage that indexed collections have over " +"sets for many to many associations or collections of values. Because of the " +"structure of a Set, Hibernate doesn't ever " +"UPDATE a row when an element is \"changed\". Changes to a " +"Set always work via INSERT and " +"DELETE (of individual rows). Once again, this " +"consideration does not apply to one to many associations." +msgstr "" +"可论证的是对于多对多关联、值数据集合而言,有序集合类比集合(set)有一个好处。因" +"为Set的内在结构, 如果“改变”了一个元素,Hibernate并不会" +"更新(UPDATE)这一行。 对于Set来说,只" +"有在插入(INSERT)删除(DELETE) 操作" +"时“改变”才有效。再次强调:这段讨论对“一对多关联”并不适用。" + +#. Tag: para +#: performance.xml:1108 +#, no-c-format +msgid "" +"After observing that arrays cannot be lazy, we would conclude that lists, " +"maps and idbags are the most performant (non-inverse) collection types, with " +"sets not far behind. Sets are expected to be the most common kind of " +"collection in Hibernate applications. This is because the \"set\" semantics " +"are most natural in the relational model." +msgstr "" +"注意到数组无法延迟载入,我们可以得出结论,list, map和idbags是最高效的(非反" +"向)集合类型,set则紧随其后。 在Hibernate中,set应该时最通用的集合类型,这时" +"因为“set”的语义在关系模型中是最自然的。" + +#. Tag: para +#: performance.xml:1116 +#, no-c-format +msgid "" +"However, in well-designed Hibernate domain models, we usually see that most " +"collections are in fact one-to-many associations with inverse=\"true" +"\". For these associations, the update is handled by the many-to-" +"one end of the association, and so considerations of collection update " +"performance simply do not apply." +msgstr "" +"但是,在设计良好的Hibernate领域模型中,我们通常可以看到更多的集合事实上是带有" +"inverse=\"true\" 的一对多的关联。对于这些关联,更新操作将" +"会在多对一的这一端进行处理。因此对于此类情况,无需考虑其集合的更新性能。" + +#. Tag: title +#: performance.xml:1126 +#, no-c-format +msgid "Bags and lists are the most efficient inverse collections" +msgstr "Bag和list是反向集合类中效率最高的" + +#. Tag: para +#: performance.xml:1128 +#, no-c-format +msgid "" +"Just before you ditch bags forever, there is a particular case in which bags " +"(and also lists) are much more performant than sets. For a collection with " +"inverse=\"true\" (the standard bidirectional one-to-many " +"relationship idiom, for example) we can add elements to a bag or list " +"without needing to initialize (fetch) the bag elements! This is because " +"Collection.add() or Collection.addAll() must always return true for a bag or List " +"(unlike a Set). This can make the following common code " +"much faster." +msgstr "" +"在把bag扔进水沟之前,你必须了解,在一种情况下,bag的性能(包括list)要比set高得" +"多: 对于指明了inverse=\"true\"的集合类(比如说,标准的双" +"向的一对多关联), 我们可以在未初始化(fetch)包元素的情况下直接向bag或list添加" +"新元素! 这是因为Collection.add())或者Collection." +"addAll() 方法 对bag或者List总是返回true(这点与与Set不同)。因此对" +"于下面的相同代码来说,速度会快得多。" + +#. Tag: programlisting +#: performance.xml:1138 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: performance.xml:1143 +#, no-c-format +msgid "One shot delete" +msgstr "一次性删除(One shot delete)" + +#. Tag: para +#: performance.xml:1145 +#, no-c-format +msgid "" +"Occasionally, deleting collection elements one by one can be extremely " +"inefficient. Hibernate isn't completely stupid, so it knows not to do that " +"in the case of an newly-empty collection (if you called list.clear()" +", for example). In this case, Hibernate will issue a single " +"DELETE and we are done!" +msgstr "" +"偶尔的,逐个删除集合类中的元素是相当低效的。Hibernate并没那么笨, 如果你想要" +"把整个集合都删除(比如说调用list.clear()),Hibernate只需要一个DELETE就搞定" +"了。" + +#. Tag: para +#: performance.xml:1152 +#, no-c-format +msgid "" +"Suppose we add a single element to a collection of size twenty and then " +"remove two elements. Hibernate will issue one INSERT " +"statement and two DELETE statements (unless the " +"collection is a bag). This is certainly desirable." +msgstr "" +"假设我们在一个长度为20的集合类中新增加了一个元素,然后再删除两个。 Hibernate" +"会安排一条INSERT语句和两条DELETE语句" +"(除非集合类是一个bag)。 这当然是显而易见的。" + +#. Tag: para +#: performance.xml:1158 +#, no-c-format +msgid "" +"However, suppose that we remove eighteen elements, leaving two and then add " +"thee new elements. There are two possible ways to proceed" +msgstr "" +"但是,假设我们删除了18个数据,只剩下2个,然后新增3个。则有两种处理方式:" + +#. Tag: para +#: performance.xml:1165 +#, no-c-format +msgid "delete eighteen rows one by one and then insert three rows" +msgstr "逐一的删除这18个数据,再新增三个;" + +#. Tag: para +#: performance.xml:1168 +#, no-c-format +msgid "" +"remove the whole collection (in one SQL DELETE) and " +"insert all five current elements (one by one)" +msgstr "删除整个集合类(只用一句DELETE语句),然后增加5个数据。" + +#. Tag: para +#: performance.xml:1173 +#, no-c-format +msgid "" +"Hibernate isn't smart enough to know that the second option is probably " +"quicker in this case. (And it would probably be undesirable for Hibernate to " +"be that smart; such behaviour might confuse database triggers, etc.)" +msgstr "" +"Hibernate还没那么聪明,知道第二种选择可能会比较快。 (也许让Hibernate不这么聪" +"明也是好事,否则可能会引发意外的“数据库触发器”之类的问题。)" + +#. Tag: para +#: performance.xml:1179 +#, no-c-format +msgid "" +"Fortunately, you can force this behaviour (ie. the second strategy) at any " +"time by discarding (ie. dereferencing) the original collection and returning " +"a newly instantiated collection with all the current elements. This can be " +"very useful and powerful from time to time." +msgstr "" +"幸运的是,你可以强制使用第二种策略。你需要取消原来的整个集合类(解除其引" +"用), 然后再返回一个新的实例化的集合类,只包含需要的元素。有些时候这是非常有" +"用的。" + +#. Tag: para +#: performance.xml:1185 +#, no-c-format +msgid "" +"Of course, one-shot-delete does not apply to collections mapped " +"inverse=\"true\"." +msgstr "" +"显然,一次性删除并不适用于被映射为inverse=\"true\"的集合。" + +#. Tag: title +#: performance.xml:1194 +#, no-c-format +msgid "Monitoring performance" +msgstr "监测性能(Monitoring performance)" + +#. Tag: para +#: performance.xml:1196 +#, no-c-format +msgid "" +"Optimization is not much use without monitoring and access to performance " +"numbers. Hibernate provides a full range of figures about its internal " +"operations. Statistics in Hibernate are available per " +"SessionFactory." +msgstr "" +"没有监测和性能参数而进行优化是毫无意义的。Hibernate为其内部操作提供了一系列的" +"示意图,因此可以从 每个SessionFactory抓取其统计数据。" + +#. Tag: title +#: performance.xml:1203 +#, no-c-format +msgid "Monitoring a SessionFactory" +msgstr "监测SessionFactory" + +#. Tag: para +#: performance.xml:1205 +#, no-c-format +msgid "" +"You can access SessionFactory metrics in two ways. Your " +"first option is to call sessionFactory.getStatistics() " +"and read or display the Statistics yourself." +msgstr "" +"你可以有两种方式访问SessionFactory的数据记录,第一种就是自" +"己直接调用 sessionFactory.getStatistics()方法读取、显示" +"统计数据。" + +#. Tag: para +#: performance.xml:1211 +#, no-c-format +msgid "" +"Hibernate can also use JMX to publish metrics if you enable the " +"StatisticsService MBean. You may enable a single MBean " +"for all your SessionFactory or one per factory. See the " +"following code for minimalistic configuration examples:" +msgstr "" +"此外,如果你打开StatisticsService MBean选项,那么Hibernate" +"则可以使用JMX技术 发布其数据记录。你可以让应用中所有的" +"SessionFactory同时共享一个MBean,也可以每个 SessionFactory" +"分配一个MBean。下面的代码即是其演示代码:" + +#. Tag: programlisting +#: performance.xml:1218 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: performance.xml:1221 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1223 +#, no-c-format +msgid "" +"TODO: This doesn't make sense: In the first case, we retrieve and use the " +"MBean directly. In the second one, we must give the JNDI name in which the " +"session factory is held before using it. Use hibernateStatsBean." +"setSessionFactoryJNDIName(\"my/JNDI/Name\")" +msgstr "" +"TODO:仍需要说明的是:在第一个例子中,我们直接得到和使用MBean;而在第二个例子" +"中,在使用MBean之前 我们则需要给出SessionFactory的JNDI名,使用" +"hibernateStatsBean.setSessionFactoryJNDIName(\"my/JNDI/Name\") 得到SessionFactory,然后将MBean保存于其中。" + +#. Tag: para +#: performance.xml:1228 +#, no-c-format +msgid "" +"You can (de)activate the monitoring for a SessionFactory" +msgstr "" +"你可以通过以下方法打开或关闭SessionFactory的监测功能:" + +#. Tag: para +#: performance.xml:1233 +#, no-c-format +msgid "" +"at configuration time, set hibernate.generate_statistics " +"to false" +msgstr "" +"在配置期间,将hibernate.generate_statistics设置为" +"truefalse;" + +#. Tag: para +#: performance.xml:1240 +#, no-c-format +msgid "" +"at runtime: sf.getStatistics().setStatisticsEnabled(true) " +"or hibernateStatsBean.setStatisticsEnabled(true)" +msgstr "" +"在运行期间,则可以可以通过sf.getStatistics().setStatisticsEnabled" +"(true)hibernateStatsBean.setStatisticsEnabled(true)" + +#. Tag: para +#: performance.xml:1247 +#, fuzzy, no-c-format +msgid "" +"Statistics can be reset programmatically using the clear() method. A summary can be sent to a logger (info level) using the " +"logSummary() method." +msgstr "" +"你也可以在程序中调用clear()方法重置统计数据,调用" +"logSummary() 在日志中记录(info级别)其总结。" + +#. Tag: title +#: performance.xml:1256 +#, no-c-format +msgid "Metrics" +msgstr "数据记录(Metrics)" + +#. Tag: para +#: performance.xml:1258 +#, no-c-format +msgid "" +"Hibernate provides a number of metrics, from very basic to the specialized " +"information only relevant in certain scenarios. All available counters are " +"described in the Statistics interface API, in three " +"categories:" +msgstr "" +"Hibernate提供了一系列数据记录,其记录的内容包括从最基本的信息到与具体场景的特" +"殊信息。所有的测量值都可以由 Statistics接口进行访问,主要" +"分为三类:" + +#. Tag: para +#: performance.xml:1265 +#, no-c-format +msgid "" +"Metrics related to the general Session usage, such as " +"number of open sessions, retrieved JDBC connections, etc." +msgstr "" +"使用Session的普通数据记录,例如打开的Session的个数、取得的" +"JDBC的连接数等;" + +#. Tag: para +#: performance.xml:1271 +#, no-c-format +msgid "" +"Metrics related to he entities, collections, queries, and caches as a whole " +"(aka global metrics)," +msgstr "实体、集合、查询、缓存等内容的统一数据记录" + +#. Tag: para +#: performance.xml:1277 +#, no-c-format +msgid "" +"Detailed metrics related to a particular entity, collection, query or cache " +"region." +msgstr "和具体实体、集合、查询、缓存相关的详细数据记录" + +#. Tag: para +#: performance.xml:1284 +#, fuzzy, no-c-format +msgid "" +"For example, you can check the cache hit, miss, and put ratio of entities, " +"collections and queries, and the average time a query needs. Beware that the " +"number of milliseconds is subject to approximation in Java. Hibernate is " +"tied to the JVM precision, on some platforms this might even only be " +"accurate to 10 seconds." +msgstr "" +"例如:你可以检查缓存的命中成功次数,缓存的命中失败次数,实体、集合和查询的使" +"用概率,查询的平均时间等。请注意 Java中时间的近似精度是毫秒。Hibernate的数据" +"精度和具体的JVM有关,在有些平台上其精度甚至只能精确到10秒。" + +#. Tag: para +#: performance.xml:1291 +#, no-c-format +msgid "" +"Simple getters are used to access the global metrics (i.e. not tied to a " +"particular entity, collection, cache region, etc.). You can access the " +"metrics of a particular entity, collection or cache region through its name, " +"and through its HQL or SQL representation for queries. Please refer to the " +"Statistics, EntityStatistics, " +"CollectionStatistics, " +"SecondLevelCacheStatistics, and QueryStatistics API Javadoc for more information. The following code shows a simple " +"example:" +msgstr "" +"你可以直接使用getter方法得到全局数据记录(例如,和具体的实体、集合、缓存区无" +"关的数据),你也可以在具体查询中通过标记实体名、 或HQL、SQL语句得到某实体的数" +"据记录。请参考StatisticsEntityStatisticsCollectionStatistics、" +"SecondLevelCacheStatistics、 和QueryStatistics的API文档以抓取更多信息。下面的代码则是个简单的例子:" + +#. Tag: programlisting +#: performance.xml:1301 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: performance.xml:1303 +#, no-c-format +msgid "" +"To work on all entities, collections, queries and region caches, you can " +"retrieve the list of names of entities, collections, queries and region " +"caches with the following methods: getQueries(), " +"getEntityNames(), getCollectionRoleNames(), and getSecondLevelCacheRegionNames()." +msgstr "" +"如果你想得到所有实体、集合、查询和缓存区的数据,你可以通过以下方法获得实体、" +"集合、查询和缓存区列表: getQueries()、" +"getEntityNames()getCollectionRoleNames()getSecondLevelCacheRegionNames()。" + +#~ msgid "yes" +#~ msgstr "yes" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/persistent_classes.po b/documentation/envers/src/main/docbook/zh-CN/content/persistent_classes.po new file mode 100644 index 0000000000..de1862db4c --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/persistent_classes.po @@ -0,0 +1,815 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: persistent_classes.xml:29 +#, no-c-format +msgid "Persistent Classes" +msgstr "持久化类(Persistent Classes)" + +#. Tag: para +#: persistent_classes.xml:31 +#, no-c-format +msgid "" +"Persistent classes are classes in an application that implement the entities " +"of the business problem (e.g. Customer and Order in an E-commerce " +"application). Not all instances of a persistent class are considered to be " +"in the persistent state - an instance may instead be transient or detached." +msgstr "" +"在应用程序中,用来实现业务问题实体的(如,在电子商务应用程序中的Customer和" +"Order) 类就是持久化类。不能认为所有的持久化类的实例都是持久的状态——一个实例" +"的状态也可能 是瞬时的或脱管的。" + +#. Tag: para +#: persistent_classes.xml:38 +#, no-c-format +msgid "" +"Hibernate works best if these classes follow some simple rules, also known " +"as the Plain Old Java Object (POJO) programming model. However, none of " +"these rules are hard requirements. Indeed, Hibernate3 assumes very little " +"about the nature of your persistent objects. You may express a domain model " +"in other ways: using trees of Map instances, for example." +msgstr "" +"如果这些持久化类遵循一些简单的规则,Hibernate能够工作得更好,这些规则也被称" +"作 简单传统Java对象(POJO:Plain Old Java Object)编程模型。但是这些规则并不是必" +"需的。 实际上,Hibernate3对于你的持久化类几乎不做任何设想。你可以用其他的方法" +"来表达领域模型: 比如,使用Map实例的树型结构。" + +#. Tag: title +#: persistent_classes.xml:47 +#, no-c-format +msgid "A simple POJO example" +msgstr "一个简单的POJO例子" + +#. Tag: para +#: persistent_classes.xml:49 +#, no-c-format +msgid "Most Java applications require a persistent class representing felines." +msgstr "大多数Java程序需要用一个持久化类来表示猫科动物。" + +#. Tag: programlisting +#: persistent_classes.xml:53 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:55 +#, no-c-format +msgid "There are four main rules to follow here:" +msgstr "这里要遵循四条主要的规则:" + +#. Tag: title +#: persistent_classes.xml:61 +#, no-c-format +msgid "Implement a no-argument constructor" +msgstr "实现一个默认的(即无参数的)构造方法(constructor)" + +#. Tag: para +#: persistent_classes.xml:63 +#, no-c-format +msgid "" +"Cat has a no-argument constructor. All persistent classes " +"must have a default constructor (which may be non-public) so that Hibernate " +"can instantiate them using Constructor.newInstance(). We " +"strongly recommend having a default constructor with at least " +"package visibility for runtime proxy generation in " +"Hibernate." +msgstr "" +"Cat有一个无参数的构造方法。所有的持久化类都必须有一个 默认" +"的构造方法(可以不是public的),这样的话Hibernate就可以使用 " +"Constructor.newInstance()来实例化它们。 我们强烈建议,在" +"Hibernate中,为了运行期代理的生成,构造方法至少是 包(package)内可见的。" + +#. Tag: title +#: persistent_classes.xml:73 +#, no-c-format +msgid "Provide an identifier property (optional)" +msgstr "提供一个标识属性(identifier property)(可选)" + +#. Tag: para +#: persistent_classes.xml:75 +#, no-c-format +msgid "" +"Cat has a property called id. This " +"property maps to the primary key column of a database table. The property " +"might have been called anything, and its type might have been any primitive " +"type, any primitive \"wrapper\" type, java.lang.String or " +"java.util.Date. (If your legacy database table has " +"composite keys, you can even use a user-defined class with properties of " +"these types - see the section on composite identifiers later.)" +msgstr "" +"Cat有一个属性叫做id。这个属性映射数据库" +"表的主 键字段。这个属性可以叫任何名字,其类型可以是任何的原始类型、原始类型的" +"包装类型、 java.lang.String 或者是 java.util." +"Date。 (如果你的遗留数据库表有联合主键,你甚至可以用一个用户自定义" +"的类,该类拥有这些类型 的属性。参见后面的关于联合标识符的章节。)" + +#. Tag: para +#: persistent_classes.xml:84 +#, no-c-format +msgid "" +"The identifier property is strictly optional. You can leave them off and let " +"Hibernate keep track of object identifiers internally. We do not recommend " +"this, however." +msgstr "" +"标识符属性是可选的。可以不用管它,让Hibernate内部来追踪对象的识别。 但是我们" +"并不推荐这样做。" + +#. Tag: para +#: persistent_classes.xml:89 +#, no-c-format +msgid "" +"In fact, some functionality is available only to classes which declare an " +"identifier property:" +msgstr "实际上,一些功能只对那些声明了标识符属性的类起作用:" + +#. Tag: para +#: persistent_classes.xml:96 +#, fuzzy, no-c-format +msgid "" +"Transitive reattachment for detached objects (cascade update or cascade " +"merge) - see" +msgstr "" +"托管对象的传播性再连接(级联更新或级联合并) ——参阅 " + +#. Tag: literal +#: persistent_classes.xml:103 +#, no-c-format +msgid "Session.saveOrUpdate()" +msgstr "Session.saveOrUpdate()" + +#. Tag: literal +#: persistent_classes.xml:108 +#, no-c-format +msgid "Session.merge()" +msgstr "Session.merge()" + +#. Tag: para +#: persistent_classes.xml:113 +#, no-c-format +msgid "" +"We recommend you declare consistently-named identifier properties on " +"persistent classes. We further recommend that you use a nullable (ie. non-" +"primitive) type." +msgstr "" +"我们建议你对持久化类声明命名一致的标识属性。我们还建议你使用一 个可以为空(也" +"就是说,不是原始类型)的类型。" + +#. Tag: title +#: persistent_classes.xml:120 +#, no-c-format +msgid "Prefer non-final classes (optional)" +msgstr "使用非final的类 (可选)" + +#. Tag: para +#: persistent_classes.xml:121 +#, no-c-format +msgid "" +"A central feature of Hibernate, proxies, depends upon " +"the persistent class being either non-final, or the implementation of an " +"interface that declares all public methods." +msgstr "" +"代理(proxies)是Hibernate的一个重要的功能,它依赖的条件" +"是,持久 化类或者是非final的,或者是实现了一个所有方法都声明为public的接口。" + +#. Tag: para +#: persistent_classes.xml:126 +#, no-c-format +msgid "" +"You can persist final classes that do not implement an " +"interface with Hibernate, but you won't be able to use proxies for lazy " +"association fetching - which will limit your options for performance tuning." +msgstr "" +"你可以用Hibernate持久化一个没有实现任何接口的final类,但是" +"你 不能使用代理来延迟关联加载,这会限制你进行性能优化的选择。" + +#. Tag: para +#: persistent_classes.xml:131 +#, no-c-format +msgid "" +"You should also avoid declaring public final methods on " +"the non-final classes. If you want to use a class with a public " +"final method, you must explicitly disable proxying by setting " +"lazy=\"false\"." +msgstr "" +"你也应该避免在非final类中声明 public final的方法。如果你想" +"使用一 个有public final方法的类,你必须通过设置" +"lazy=\"false\" 来明确地禁用代理。" + +#. Tag: title +#: persistent_classes.xml:139 +#, no-c-format +msgid "Declare accessors and mutators for persistent fields (optional)" +msgstr "为持久化字段声明访问器(accessors)和是否可变的标志(mutators)(可选)" + +#. Tag: para +#: persistent_classes.xml:141 +#, no-c-format +msgid "" +"Cat declares accessor methods for all its persistent " +"fields. Many other ORM tools directly persist instance variables. We believe " +"it is better to provide an indirection between the relational schema and " +"internal data structures of the class. By default, Hibernate persists " +"JavaBeans style properties, and recognizes method names of the form " +"getFoo, isFoo and setFoo. You may switch to direct field access for particular properties, " +"if needed." +msgstr "" +"Cat为它的所有持久化字段声明了访问方法。很多其他ORM工具直接" +"对 实例变量进行持久化。我们相信,在关系数据库schema和类的内部数据结构之间引入" +"间接层(原文为\"非直接\",indirection)会好一些。默认情况下Hibernate持久化" +"JavaBeans风格的属性,认可 getFooisFoosetFoo这种形式的方法名。 如果需要,你可以对某" +"些特定属性实行直接字段访问。" + +#. Tag: para +#: persistent_classes.xml:151 +#, no-c-format +msgid "" +"Properties need not be declared public - Hibernate can " +"persist a property with a default, protected or " +"private get / set pair." +msgstr "" +"属性不需要要声明为public的。Hibernate可以持久化一个有 " +"defaultprotectedprivate的get/set方法对 的属性进行持久化。" + +#. Tag: title +#: persistent_classes.xml:162 +#, no-c-format +msgid "Implementing inheritance" +msgstr "实现继承(Inheritance)" + +#. Tag: para +#: persistent_classes.xml:164 +#, no-c-format +msgid "" +"A subclass must also observe the first and second rules. It inherits its " +"identifier property from the superclass, Cat." +msgstr "" +"子类也必须遵守第一条和第二条规则。它从超类Cat继承了标识属" +"性。" + +#. Tag: programlisting +#: persistent_classes.xml:169 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:173 +#, no-c-format +msgid "" +"Implementing equals() and hashCode()" +msgstr "实现equals()hashCode()" + +#. Tag: para +#: persistent_classes.xml:175 +#, no-c-format +msgid "" +"You have to override the equals() and hashCode()" +" methods if you" +msgstr "" +"如果你有如下需求,你必须重载 equals()hashCode" +"()方法:" + +#. Tag: para +#: persistent_classes.xml:181 +#, no-c-format +msgid "" +"intend to put instances of persistent classes in a Set " +"(the recommended way to represent many-valued associations) and" +msgstr "" +"想把持久类的实例放入Set中(当表示多值关联时,推荐这么做)" + +#. Tag: para +#: persistent_classes.xml:188 +#, no-c-format +msgid "intend to use reattachment of detached instances" +msgstr "想重用脱管实例" + +#. Tag: para +#: persistent_classes.xml:194 +#, no-c-format +msgid "" +"Hibernate guarantees equivalence of persistent identity (database row) and " +"Java identity only inside a particular session scope. So as soon as we mix " +"instances retrieved in different sessions, we must implement equals" +"() and hashCode() if we wish to have meaningful " +"semantics for Sets." +msgstr "" +"Hibernate保证,仅在特定会话范围内,持久化标识(数据库的行)和Java标识是等价" +"的。因此,一旦 我们混合了从不同会话中获取的实例,如果希望Set有明确的语义,就必 须实现equals() 和" +"hashCode()。" + +#. Tag: para +#: persistent_classes.xml:202 +#, no-c-format +msgid "" +"The most obvious way is to implement equals()/" +"hashCode() by comparing the identifier value of both " +"objects. If the value is the same, both must be the same database row, they " +"are therefore equal (if both are added to a Set, we will " +"only have one element in the Set). Unfortunately, we " +"can't use that approach with generated identifiers! Hibernate will only " +"assign identifier values to objects that are persistent, a newly created " +"instance will not have any identifier value! Furthermore, if an instance is " +"unsaved and currently in a Set, saving it will assign an " +"identifier value to the object. If equals() and " +"hashCode() are based on the identifier value, the hash " +"code would change, breaking the contract of the Set. See " +"the Hibernate website for a full discussion of this problem. Note that this " +"is not a Hibernate issue, but normal Java semantics of object identity and " +"equality." +msgstr "" +"实现equals()/hashCode()最显而易见的方法" +"是比较两个对象 标识符的值。如果值相同,则两个对象对应于数据库的同一行,因此它" +"们是相等的(如果都被添加到 Set,则在Set" +"中只有一个元素)。不幸的是,对生成的标识不能 使用这种方法。Hibernate仅对那些" +"持久化对象赋标识值,一个新创建的实例将不会有任何标识值。此外, 如果一个实例没" +"有被保存(unsaved),并且它当前正在一个Set中,保存它将会给这" +"个对象 赋一个标识值。如果equals()hashCode()是基于标识值 实现的,则其哈希码将会改变,这违反了Set的契约。建议去Hibernate的站点阅读关于这个 问题的全部讨论。注意,这不" +"是Hibernate的问题,而是一般的Java对象标识和Java对象等价的语义问题。" + +#. Tag: para +#: persistent_classes.xml:216 +#, no-c-format +msgid "" +"We recommend implementing equals() and hashCode()" +" using Business key equality. Business key " +"equality means that the equals() method compares only the " +"properties that form the business key, a key that would identify our " +"instance in the real world (a natural candidate key):" +msgstr "" +"我们建议使用业务键值相等(Business key equality)来实现" +"equals()hashCode()。业务键值相等的" +"意思是,equals()方法 仅仅比较形成业务键的属性,它能在现实" +"世界里标识我们的实例(是一个自然的候选码)。" + +#. Tag: programlisting +#: persistent_classes.xml:224 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:226 +#, no-c-format +msgid "" +"Note that a business key does not have to be as solid as a database primary " +"key candidate (see ). " +"Immutable or unique properties are usually good candidates for a business " +"key." +msgstr "" +"注意,业务键不必像数据库的主键那样固定不变(参见)。 对业务键而言,不可变或唯一的属性是不错的选择。" + +#. Tag: title +#: persistent_classes.xml:236 +#, no-c-format +msgid "Dynamic models" +msgstr "动态模型(Dynamic models)" + +#. Tag: emphasis +#: persistent_classes.xml:239 +#, no-c-format +msgid "" +"Note that the following features are currently considered experimental and " +"may change in the near future." +msgstr "注意,以下特性在当前处于试验阶段,将来可能会有变化。" + +#. Tag: para +#: persistent_classes.xml:243 +#, no-c-format +msgid "" +"Persistent entities don't necessarily have to be represented as POJO classes " +"or as JavaBean objects at runtime. Hibernate also supports dynamic models " +"(using Maps of Maps at runtime) and " +"the representation of entities as DOM4J trees. With this approach, you don't " +"write persistent classes, only mapping files." +msgstr "" +"运行期的持久化实体没有必要一定表示为像POJO类或JavaBean对象那样的形式。" +"Hibernate也支持动态模型 (在运行期使用MapMap)和象DOM4J的树模型那 样的实体表示。使用这种方法,你不用写持久化类," +"只写映射文件就行了。" + +#. Tag: para +#: persistent_classes.xml:251 +#, no-c-format +msgid "" +"By default, Hibernate works in normal POJO mode. You may set a default " +"entity representation mode for a particular SessionFactory using the default_entity_mode configuration " +"option (see ." +msgstr "" +"Hibernate默认工作在普通POJO模式。你可以使用配置选项" +"default_entity_mode, 对特定的SessionFactory,设置一个默认的实体表示模式。 (参见。)" + +#. Tag: para +#: persistent_classes.xml:258 +#, no-c-format +msgid "" +"The following examples demonstrates the representation using Maps. First, in the mapping file, an entity-name has " +"to be declared instead of (or in addition to) a class name:" +msgstr "" +"下面是用Map来表示的例子。首先,在映射文件中,要声明 " +"entity-name来代替一个类名(或作为一种附属)。" + +#. Tag: programlisting +#: persistent_classes.xml:264 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:266 +#, no-c-format +msgid "" +"Note that even though associations are declared using target class names, " +"the target type of an associations may also be a dynamic entity instead of a " +"POJO." +msgstr "" +"注意,虽然是用目标类名来声明关联的,但是关联的目标类型除了是POJO之外,也可以 " +"是一个动态的实体。" + +#. Tag: para +#: persistent_classes.xml:273 +#, no-c-format +msgid "" +"After setting the default entity mode to dynamic-map for " +"the SessionFactory, we can at runtime work with " +"Maps of Maps:" +msgstr "" +"在使用dynamic-mapSessionFactory 设置" +"了默认的实体模式之后,可以在运行期使用MapMap。" + +#. Tag: programlisting +#: persistent_classes.xml:279 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:281 +#, no-c-format +msgid "" +"The advantages of a dynamic mapping are quick turnaround time for " +"prototyping without the need for entity class implementation. However, you " +"lose compile-time type checking and will very likely deal with many " +"exceptions at runtime. Thanks to the Hibernate mapping, the database schema " +"can easily be normalized and sound, allowing to add a proper domain model " +"implementation on top later on." +msgstr "" +"动态映射的好处是,变化所需要的时间少了,因为原型不需要实现实体类。然而,你无" +"法进行 编译期的类型检查,并可能由此会处理很多的运行期异常。幸亏有了Hibernate" +"映射,它使得数 据库的schema能容易的规格化和合理化,并允许稍后在此之上添加合适" +"的领域模型实现。" + +#. Tag: para +#: persistent_classes.xml:289 +#, no-c-format +msgid "" +"Entity representation modes can also be set on a per Session basis:" +msgstr "实体表示模式也能在每个Session的基础上设置:" + +#. Tag: programlisting +#: persistent_classes.xml:294 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:297 +#, no-c-format +msgid "" +"Please note that the call to getSession() using an " +"EntityMode is on the Session API, not " +"the SessionFactory. That way, the new Session shares the underlying JDBC connection, transaction, and other " +"context information. This means you don't have tocall flush() and close() on the secondary Session, and also leave the transaction and connection handling to the " +"primary unit of work." +msgstr "" +"请注意,用EntityMode调用getSession()是" +"在 Session的API中,而不是SessionFactory。 这样,新的Session共享底层的JDBC连接,事务,和其" +"他的上下文信 息。这意味着,你不需要在第二个Session中调用 " +"flush()close(),同样的,把事务和连接" +"的处理 交给原来的工作单元。" + +#. Tag: para +#: persistent_classes.xml:307 +#, no-c-format +msgid "" +"More information about the XML representation capabilities can be found in " +"." +msgstr "关于XML表示能力的更多信息可以在中找到。" + +#. Tag: title +#: persistent_classes.xml:315 +#, no-c-format +msgid "Tuplizers" +msgstr "元组片断映射(Tuplizers)" + +#. Tag: para +#: persistent_classes.xml:317 +#, no-c-format +msgid "" +"org.hibernate.tuple.Tuplizer, and its sub-interfaces, are " +"responsible for managing a particular representation of a piece of data, " +"given that representation's org.hibernate.EntityMode. If " +"a given piece of data is thought of as a data structure, then a tuplizer is " +"the thing which knows how to create such a data structure and how to extract " +"values from and inject values into such a data structure. For example, for " +"the POJO entity mode, the correpsonding tuplizer knows how create the POJO " +"through its constructor and how to access the POJO properties using the " +"defined property accessors. There are two high-level types of Tuplizers, " +"represented by the org.hibernate.tuple.entity.EntityTuplizer and org.hibernate.tuple.component.ComponentTuplizer interfaces. EntityTuplizers are responsible for " +"managing the above mentioned contracts in regards to entities, while " +"ComponentTuplizers do the same for components." +msgstr "" +"org.hibernate.tuple.Tuplizer,以及其子接口,负责根据给定的" +"org.hibernate.EntityMode,来复现片断数据。如果给定的片断数" +"据被认为其是一种数据结构,\"tuplizer\"就是一个知道如何创建这样的数据结构,以" +"及如何给这个数据结构赋值的东西。比如说,对于POJO这种Entity Mode,对应的" +"tuplizer知道通过其构造方法来创建一个POJO,再通过其属性访问器来访问POJO属性。" +"有两大类高层Tuplizer,分别是org.hibernate.tuple.entity." +"EntityTuplizerorg.hibernate.tuple.entity." +"ComponentTuplizer接口。EntityTuplizer负责管理上" +"面提到的实体的契约,而ComponentTuplizer则是针对组件的。" + +#. Tag: para +#: persistent_classes.xml:332 +#, no-c-format +msgid "" +"Users may also plug in their own tuplizers. Perhaps you require that a " +"java.util.Map implementation other than java." +"util.HashMap be used while in the dynamic-map entity-mode; or " +"perhaps you need to define a different proxy generation strategy than the " +"one used by default. Both would be achieved by defining a custom tuplizer " +"implementation. Tuplizers definitions are attached to the entity or " +"component mapping they are meant to manage. Going back to the example of our " +"customer entity:" +msgstr "" +"用户也可以插入其自定义的tuplizer。或许您需要一种不同于dynamic-map entity-mode" +"中使用的java.util.HashMapjava.util.Map实现;或许您需要与默认策略不同的代理生成策略(proxy generation " +"strategy)。通过自定义tuplizer实现,这两个目标您都可以达到。Tuplizer定义被附加" +"到它们期望管理的entity或者component映射中。回到我们的customer entity例子:" + +#. Tag: programlisting +#: persistent_classes.xml:341 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" ...\n" +" \n" +"\n" +"\n" +"\n" +"public class CustomMapTuplizerImpl\n" +" extends org.hibernate.tuple.entity.DynamicMapEntityTuplizer {\n" +" // override the buildInstantiator() method to plug in our custom map...\n" +" protected final Instantiator buildInstantiator(\n" +" org.hibernate.mapping.PersistentClass mappingInfo) {\n" +" return new CustomMapInstantiator( mappingInfo );\n" +" }\n" +"\n" +" private static final class CustomMapInstantiator\n" +" extends org.hibernate.tuple.DynamicMapInstantitor {\n" +" // override the generateMap() method to return our custom map...\n" +" protected final Map generateMap() {\n" +" return new CustomMap();\n" +" }\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: title +#: persistent_classes.xml:347 +#, no-c-format +msgid "Extentsions" +msgstr "" + +#. Tag: para +#: persistent_classes.xml:348 +#, no-c-format +msgid "" +"TODO: Document user-extension framework in the property and proxy packages" +msgstr "TODO:property和proxy包里的用户扩展框架文档。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/preface.po b/documentation/envers/src/main/docbook/zh-CN/content/preface.po new file mode 100644 index 0000000000..e47b9f1c7e --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/preface.po @@ -0,0 +1,180 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: preface.xml:21 +#, no-c-format +msgid "Preface" +msgstr "前言" + +#. Tag: para +#: preface.xml:23 +#, no-c-format +msgid "" +"Working with object-oriented software and a relational database can be " +"cumbersome and time consuming in today's enterprise environments. Hibernate " +"is an object/relational mapping tool for Java environments. The term object/" +"relational mapping (ORM) refers to the technique of mapping a data " +"representation from an object model to a relational data model with a SQL-" +"based schema." +msgstr "" +"在今日的企业环境中,把面向对象的软件和关系数据库一起使用可能是相当麻烦、浪费" +"时间的。Hibernate是一个面向Java环境的对象/关系数据库映射工具。对象/关系数据库" +"映射(object/relational mapping (ORM))这个术语表示一种技术,用来把对象模型表示" +"的对象映射到基于SQL的关系模型数据结构中去。" + +#. Tag: para +#: preface.xml:31 +#, no-c-format +msgid "" +"Hibernate not only takes care of the mapping from Java classes to database " +"tables (and from Java data types to SQL data types), but also provides data " +"query and retrieval facilities and can significantly reduce development time " +"otherwise spent with manual data handling in SQL and JDBC." +msgstr "" +"Hibernate不仅仅管理Java类到数据库表的映射(包括Java数据类型到SQL数据类型的映" +"射),还提供数据查询和获取数据的方法,可以大幅度减少开发时人工使用SQL和JDBC处" +"理数据的时间。" + +#. Tag: para +#: preface.xml:38 +#, no-c-format +msgid "" +"Hibernates goal is to relieve the developer from 95 percent of common data " +"persistence related programming tasks. Hibernate may not be the best " +"solution for data-centric applications that only use stored-procedures to " +"implement the business logic in the database, it is most useful with object-" +"oriented domain models and business logic in the Java-based middle-tier. " +"However, Hibernate can certainly help you to remove or encapsulate vendor-" +"specific SQL code and will help with the common task of result set " +"translation from a tabular representation to a graph of objects." +msgstr "" +"Hibernate的目标是对于开发者通常的数据持久化相关的编程任务,解放其中的95%。对" +"于以数据为中心的程序来说,它们往往只在数据库中使用存储过程来实现商业逻辑," +"Hibernate可能不是最好的解决方案;对于那些在基于Java的中间层应用中,它们实现面" +"向对象的业务模型和商业逻辑的应用,Hibernate是最有用的。不管怎样,Hibernate一" +"定可以帮助你消除或者包装那些针对特定厂商的SQL代码,并且帮你把结果集从表格式的" +"表示形式转换到一系列的对象去。" + +#. Tag: para +#: preface.xml:48 +#, no-c-format +msgid "" +"If you are new to Hibernate and Object/Relational Mapping or even Java, " +"please follow these steps:" +msgstr "" +"如果你对Hibernate和对象/关系数据库映射还是个新手,或者甚至对Java也不熟悉,请" +"按照下面的步骤来学习。" + +#. Tag: para +#: preface.xml:55 +#, no-c-format +msgid "" +"Read for a tutorial with step-by-step " +"instructions. The source code for the tutorial is included in the " +"distribution in the doc/reference/tutorial/ directory." +msgstr "" +"阅读,这是一篇包含详细的逐步指导的指南。本指南的" +"源代码包含在发行包中,你可以在doc/reference/tutorial/目录" +"下找到。" + +#. Tag: para +#: preface.xml:63 +#, no-c-format +msgid "" +"Read to understand the environments where " +"Hibernate can be used." +msgstr "阅读来理解Hibernate可以使用的环境。" + +#. Tag: para +#: preface.xml:69 +#, no-c-format +msgid "" +"Have a look at the eg/ directory in the Hibernate " +"distribution, it contains a simple standalone application. Copy your JDBC " +"driver to the lib/ directory and edit etc/" +"hibernate.properties, specifying correct values for your database. " +"From a command prompt in the distribution directory, type ant eg (using Ant), or under Windows, type build eg." +msgstr "" +"查看Hibernate发行包中的eg/目录,里面有一个简单的独立运行的" +"程序。把你的JDBC驱动拷贝到lib/目录下,修改一下" +"src/hibernate.properties,指定其中你的数据库的信息。进入命" +"令行,切换到你的发行包的目录,输入ant eg(使用了Ant),或者" +"在Windows操作系统中使用build eg。" + +#. Tag: para +#: preface.xml:80 +#, no-c-format +msgid "" +"Use this reference documentation as your primary source of information. " +"Consider reading Java Persistence with Hibernate " +"(http://www.manning.com/bauer2) if you need more help with application " +"design or if you prefer a step-by-step tutorial. Also visit http://" +"caveatemptor.hibernate.org and download the example application for Java " +"Persistence with Hibernate." +msgstr "把这份参考文档作为你学习的主要信息来源。" + +#. Tag: para +#: preface.xml:90 +#, no-c-format +msgid "FAQs are answered on the Hibernate website." +msgstr "在Hibernate 的网站上可以找到经常提问的问题与解答(FAQ)。" + +#. Tag: para +#: preface.xml:95 +#, no-c-format +msgid "" +"Third party demos, examples, and tutorials are linked on the Hibernate " +"website." +msgstr "在Hibernate网站上还有第三方的演示、示例和教程的链接。" + +#. Tag: para +#: preface.xml:101 +#, no-c-format +msgid "" +"The Community Area on the Hibernate website is a good resource for design " +"patterns and various integration solutions (Tomcat, JBoss AS, Struts, EJB, " +"etc.)." +msgstr "" +"Hibernate网站的“社区(Community Area)”是讨论关于设计模式以及很多整合方案" +"(Tomcat, JBoss AS, Struts, EJB,等等)的好地方。" + +#. Tag: para +#: preface.xml:109 +#, no-c-format +msgid "" +"If you have questions, use the user forum linked on the Hibernate website. " +"We also provide a JIRA issue trackings system for bug reports and feature " +"requests. If you are interested in the development of Hibernate, join the " +"developer mailing list. If you are interested in translating this " +"documentation into your language, contact us on the developer mailing list." +msgstr "" +"如果你有问题,请使用Hibernate网站上链接的用户论坛。我们也提供一个JIRA问题追踪" +"系统,来搜集bug报告和新功能请求。如果你对开发Hibernate有兴趣,请加入开发者的" +"邮件列表。(Hibernate网站上的用户论坛有一个中文版面,JavaEye也有Hibernate中文" +"版面,您可以在那里交流问题与经验。)" + +#. Tag: para +#: preface.xml:117 +#, no-c-format +msgid "" +"Commercial development support, production support, and training for " +"Hibernate is available through JBoss Inc. (see http://www.hibernate.org/" +"SupportTraining/). Hibernate is a Professional Open Source project and a " +"critical component of the JBoss Enterprise Middleware System (JEMS) suite of " +"products." +msgstr "" +"商业开发、产品支持和Hibernate培训可以通过JBoss Inc.获得。(请查阅:http://" +"www.hibernate.org/SupportTraining/)。 Hibernate是一个专业的开放源代码项目" +"(Professional Open Source project),也是JBoss Enterprise Middleware System" +"(JEMS),JBoss企业级中间件系统的一个核心组件。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/query_criteria.po b/documentation/envers/src/main/docbook/zh-CN/content/query_criteria.po new file mode 100644 index 0000000000..f296594f47 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/query_criteria.po @@ -0,0 +1,750 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_criteria.xml:29 +#, no-c-format +msgid "Criteria Queries" +msgstr "条件查询(Criteria Queries)" + +#. Tag: para +#: query_criteria.xml:31 +#, no-c-format +msgid "Hibernate features an intuitive, extensible criteria query API." +msgstr "具有一个直观的、可扩展的条件查询API是Hibernate的特色。" + +#. Tag: title +#: query_criteria.xml:36 +#, no-c-format +msgid "Creating a Criteria instance" +msgstr "创建一个Criteria 实例" + +#. Tag: para +#: query_criteria.xml:38 +#, no-c-format +msgid "" +"The interface org.hibernate.Criteria represents a query " +"against a particular persistent class. The Session is a " +"factory for Criteria instances." +msgstr "" +"org.hibernate.Criteria接口表示特定持久类的一个查询。" +"SessionCriteria实例的工厂。" + +#. Tag: programlisting +#: query_criteria.xml:44 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:49 +#, no-c-format +msgid "Narrowing the result set" +msgstr "限制结果集内容" + +#. Tag: para +#: query_criteria.xml:51 +#, no-c-format +msgid "" +"An individual query criterion is an instance of the interface org." +"hibernate.criterion.Criterion. The class org.hibernate." +"criterion.Restrictions defines factory methods for obtaining " +"certain built-in Criterion types." +msgstr "" +"一个单独的查询条件是org.hibernate.criterion.Criterion 接口" +"的一个实例。org.hibernate.criterion.Restrictions类 定义了" +"获得某些内置Criterion类型的工厂方法。" + +#. Tag: programlisting +#: query_criteria.xml:59 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:61 +#, no-c-format +msgid "Restrictions may be grouped logically." +msgstr "约束可以按逻辑分组。" + +#. Tag: programlisting +#: query_criteria.xml:65 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:67 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:69 +#, no-c-format +msgid "" +"There are quite a range of built-in criterion types (Restrictions subclasses), but one that is especially useful lets you specify SQL " +"directly." +msgstr "" +"Hibernate提供了相当多的内置criterion类型(Restrictions 子" +"类), 但是尤其有用的是可以允许你直接使用SQL。" + +#. Tag: programlisting +#: query_criteria.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:76 +#, no-c-format +msgid "" +"The {alias} placeholder with be replaced by the row alias " +"of the queried entity." +msgstr "{alias}占位符应当被替换为被查询实体的列别名。" + +#. Tag: para +#: query_criteria.xml:81 +#, no-c-format +msgid "" +"An alternative approach to obtaining a criterion is to get it from a " +"Property instance. You can create a Property by calling Property.forName()." +msgstr "" +"Property实例是获得一个条件的另外一种途径。你可以通过调用" +"Property.forName() 创建一个Property。" + +#. Tag: programlisting +#: query_criteria.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:92 +#, no-c-format +msgid "Ordering the results" +msgstr "结果集排序" + +#. Tag: para +#: query_criteria.xml:94 +#, no-c-format +msgid "" +"You may order the results using org.hibernate.criterion.Order." +msgstr "" +"你可以使用org.hibernate.criterion.Order来为查询结果排序。" + +#. Tag: programlisting +#: query_criteria.xml:98 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:100 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:105 +#, no-c-format +msgid "Associations" +msgstr "关联" + +#. Tag: para +#: query_criteria.xml:107 +#, no-c-format +msgid "" +"You may easily specify constraints upon related entities by navigating " +"associations using createCriteria()." +msgstr "" +"你可以使用createCriteria()非常容易的在互相关联的实体间建" +"立 约束。" + +#. Tag: programlisting +#: query_criteria.xml:112 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:114 +#, no-c-format +msgid "" +"note that the second createCriteria() returns a new " +"instance of Criteria, which refers to the elements of the " +"kittens collection." +msgstr "" +"注意第二个 createCriteria()返回一个新的 " +"Criteria实例,该实例引用kittens 集合中" +"的元素。" + +#. Tag: para +#: query_criteria.xml:120 +#, no-c-format +msgid "The following, alternate form is useful in certain circumstances." +msgstr "接下来,替换形态在某些情况下也是很有用的。" + +#. Tag: programlisting +#: query_criteria.xml:124 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:126 +#, no-c-format +msgid "" +"(createAlias() does not create a new instance of " +"Criteria.)" +msgstr "" +"(createAlias()并不创建一个新的 Criteria" +"实例。)" + +#. Tag: para +#: query_criteria.xml:131 +#, no-c-format +msgid "" +"Note that the kittens collections held by the Cat " +"instances returned by the previous two queries are not " +"pre-filtered by the criteria! If you wish to retrieve just the kittens that " +"match the criteria, you must use a ResultTransformer." +msgstr "" +"Cat实例所保存的之前两次查询所返回的kittens集合是 " +"没有被条件预过滤的。如果你希望只获得符合条件的kittens, " +"你必须使用ResultTransformer。" + +#. Tag: programlisting +#: query_criteria.xml:138 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:143 +#, no-c-format +msgid "Dynamic association fetching" +msgstr "动态关联抓取" + +#. Tag: para +#: query_criteria.xml:145 +#, no-c-format +msgid "" +"You may specify association fetching semantics at runtime using " +"setFetchMode()." +msgstr "" +"你可以使用setFetchMode()在运行时定义动态关联抓取的语义。" + +#. Tag: programlisting +#: query_criteria.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:152 +#, no-c-format +msgid "" +"This query will fetch both mate and kittens by outer join. See for " +"more information." +msgstr "" +"这个查询可以通过外连接抓取matekittens。 查看可以获得更多信息。" + +#. Tag: title +#: query_criteria.xml:160 +#, no-c-format +msgid "Example queries" +msgstr "查询示例" + +#. Tag: para +#: query_criteria.xml:162 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Example allows you to " +"construct a query criterion from a given instance." +msgstr "" +"org.hibernate.criterion.Example类允许你通过一个给定实例 构" +"建一个条件查询。" + +#. Tag: programlisting +#: query_criteria.xml:167 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:169 +#, no-c-format +msgid "" +"Version properties, identifiers and associations are ignored. By default, " +"null valued properties are excluded." +msgstr "版本属性、标识符和关联被忽略。默认情况下值为null的属性将被排除。" + +#. Tag: para +#: query_criteria.xml:174 +#, no-c-format +msgid "You can adjust how the Example is applied." +msgstr "你可以自行调整Example使之更实用。" + +#. Tag: programlisting +#: query_criteria.xml:178 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:180 +#, no-c-format +msgid "You can even use examples to place criteria upon associated objects." +msgstr "你甚至可以使用examples在关联对象上放置条件。" + +#. Tag: programlisting +#: query_criteria.xml:184 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:189 +#, no-c-format +msgid "Projections, aggregation and grouping" +msgstr "投影(Projections)、聚合(aggregation)和分组(grouping)" + +#. Tag: para +#: query_criteria.xml:190 +#, no-c-format +msgid "" +"The class org.hibernate.criterion.Projections is a " +"factory for Projection instances. We apply a projection " +"to a query by calling setProjection()." +msgstr "" +"org.hibernate.criterion.Projections是 " +"Projection 的实例工厂。我们通过调用 setProjection" +"()应用投影到一个查询。" + +#. Tag: programlisting +#: query_criteria.xml:196 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:198 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:200 +#, no-c-format +msgid "" +"There is no explicit \"group by\" necessary in a criteria query. Certain " +"projection types are defined to be grouping projections, which also appear in the SQL group by clause." +msgstr "" +"在一个条件查询中没有必要显式的使用 \"group by\" 。某些投影类型就是被定义为" +" 分组投影,他们也出现在SQL的group by" +"子句中。" + +#. Tag: para +#: query_criteria.xml:206 +#, no-c-format +msgid "" +"An alias may optionally be assigned to a projection, so that the projected " +"value may be referred to in restrictions or orderings. Here are two " +"different ways to do this:" +msgstr "" +"你可以选择把一个别名指派给一个投影,这样可以使投影值被约束或排序所引用。下面" +"是两种不同的实现方式:" + +#. Tag: programlisting +#: query_criteria.xml:212 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:214 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:216 +#, no-c-format +msgid "" +"The alias() and as() methods simply " +"wrap a projection instance in another, aliased, instance of " +"Projection. As a shortcut, you can assign an alias when " +"you add the projection to a projection list:" +msgstr "" +"alias()as()方法简便的将一个投影实例包" +"装到另外一个 别名的Projection实例中。简而言之,当你添加一" +"个投影到一个投影列表中时 你可以为它指定一个别名:" + +#. Tag: programlisting +#: query_criteria.xml:223 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:225 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:227 +#, no-c-format +msgid "" +"You can also use Property.forName() to express " +"projections:" +msgstr "你也可以使用Property.forName()来表示投影:" + +#. Tag: programlisting +#: query_criteria.xml:231 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:233 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:238 +#, no-c-format +msgid "Detached queries and subqueries" +msgstr "离线(detached)查询和子查询" + +#. Tag: para +#: query_criteria.xml:239 +#, no-c-format +msgid "" +"The DetachedCriteria class lets you create a query " +"outside the scope of a session, and then later execute it using some " +"arbitrary Session." +msgstr "" +"DetachedCriteria类使你在一个session范围之外创建一个查询," +"并且可以使用任意的 Session来执行它。" + +#. Tag: programlisting +#: query_criteria.xml:244 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:246 +#, no-c-format +msgid "" +"A DetachedCriteria may also be used to express a " +"subquery. Criterion instances involving subqueries may be obtained via " +"Subqueries or Property." +msgstr "" +"DetachedCriteria也可以用以表示子查询。条件实例包含子查询可" +"以通过 Subqueries或者Property获得。" + +#. Tag: programlisting +#: query_criteria.xml:252 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_criteria.xml:254 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_criteria.xml:256 +#, no-c-format +msgid "Even correlated subqueries are possible:" +msgstr "甚至相互关联的子查询也是有可能的:" + +#. Tag: programlisting +#: query_criteria.xml:260 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_criteria.xml:269 +#, no-c-format +msgid "Queries by natural identifier" +msgstr "根据自然标识查询(Queries by natural identifier)" + +#. Tag: para +#: query_criteria.xml:271 +#, no-c-format +msgid "" +"For most queries, including criteria queries, the query cache is not very " +"efficient, because query cache invalidation occurs too frequently. However, " +"there is one special kind of query where we can optimize the cache " +"invalidation algorithm: lookups by a constant natural key. In some " +"applications, this kind of query occurs frequently. The criteria API " +"provides special provision for this use case." +msgstr "" +"对大多数查询,包括条件查询而言,因为查询缓存的失效(invalidation)发生得太频" +"繁,查询缓存不是非常高效。然而,有一种特别的查询,可以通过不变的自然键优化缓" +"存的失效算法。在某些应用中,这种类型的查询比较常见。条件查询API对这种用例提供" +"了特别规约。" + +#. Tag: para +#: query_criteria.xml:279 +#, no-c-format +msgid "" +"First, you should map the natural key of your entity using <" +"natural-id>, and enable use of the second-level cache." +msgstr "" +"首先,你应该对你的entity使用<natural-id>来映射自然" +"键,然后打开第二级缓存。" + +#. Tag: programlisting +#: query_criteria.xml:284 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_criteria.xml:286 +#, no-c-format +msgid "" +"Note that this functionality is not intended for use with entities with " +"mutable natural keys." +msgstr "注意,此功能对具有mutable自然键的entity并不适用。" + +#. Tag: para +#: query_criteria.xml:291 +#, no-c-format +msgid "Next, enable the Hibernate query cache." +msgstr "然后,打开Hibernate 查询缓存。" + +#. Tag: para +#: query_criteria.xml:295 +#, no-c-format +msgid "" +"Now, Restrictions.naturalId() allows us to make use of " +"the more efficient cache algorithm." +msgstr "" +"现在,我们可以用Restrictions.naturalId()来使用更加高效的缓" +"存算法。" + +#. Tag: programlisting +#: query_criteria.xml:300 +#, no-c-format +msgid "" +"" +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/query_hql.po b/documentation/envers/src/main/docbook/zh-CN/content/query_hql.po new file mode 100644 index 0000000000..4c26c3583c --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/query_hql.po @@ -0,0 +1,2347 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_hql.xml:29 +#, no-c-format +msgid "HQL: The Hibernate Query Language" +msgstr "HQL: Hibernate查询语言" + +#. Tag: para +#: query_hql.xml:31 +#, no-c-format +msgid "" +"Hibernate is equipped with an extremely powerful query language that (quite " +"intentionally) looks very much like SQL. But don't be fooled by the syntax; " +"HQL is fully object-oriented, understanding notions like inheritence, " +"polymorphism and association." +msgstr "" +"Hibernate配备了一种非常强大的查询语言,这种语言看上去很像SQL。但是不要被语法" +"结构 上的相似所迷惑,HQL是非常有意识的被设计为完全面向对象的查询,它可以理解" +"如继承、多态 和关联之类的概念。" + +#. Tag: title +#: query_hql.xml:38 +#, no-c-format +msgid "Case Sensitivity" +msgstr "大小写敏感性问题" + +#. Tag: para +#: query_hql.xml:40 +#, no-c-format +msgid "" +"Queries are case-insensitive, except for names of Java classes and " +"properties. So SeLeCT is the same as sELEct is the same as SELECT but org.hibernate." +"eg.FOO is not org.hibernate.eg.Foo and " +"foo.barSet is not foo.BARSET." +msgstr "" +"除了Java类与属性的名称外,查询语句对大小写并不敏感。 所以 SeLeCTsELEct 以及 SELECT 是相同" +"的,但是 org.hibernate.eg.FOO 并不等价于 org." +"hibernate.eg.Foo 并且 foo.barSet 也不等价于 " +"foo.BARSET。" + +#. Tag: para +#: query_hql.xml:51 +#, no-c-format +msgid "" +"This manual uses lowercase HQL keywords. Some users find queries with " +"uppercase keywords more readable, but we find this convention ugly when " +"embedded in Java code." +msgstr "" +"本手册中的HQL关键字将使用小写字母. 很多用户发现使用完全大写的关键字会使查询语" +"句 的可读性更强, 但我们发现,当把查询语句嵌入到Java语句中的时候使用大写关键字" +"比较难看。" + +#. Tag: title +#: query_hql.xml:59 +#, no-c-format +msgid "The from clause" +msgstr "from子句" + +#. Tag: para +#: query_hql.xml:61 +#, no-c-format +msgid "The simplest possible Hibernate query is of the form:" +msgstr "Hibernate中最简单的查询语句的形式如下:" + +#. Tag: programlisting +#: query_hql.xml:65 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:67 +#, no-c-format +msgid "" +"which simply returns all instances of the class eg.Cat. " +"We don't usually need to qualify the class name, since auto-import is the default. So we almost always just write:" +msgstr "" +"该子句简单的返回eg.Cat类的所有实例。 通常我们不需要使用类" +"的全限定名, 因为 auto-import(自动引入) 是缺省的情况。 所" +"以我们几乎只使用如下的简单写法:" + +#. Tag: programlisting +#: query_hql.xml:73 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:75 +#, no-c-format +msgid "" +"Most of the time, you will need to assign an alias, " +"since you will want to refer to the Cat in other parts of " +"the query." +msgstr "" +"大多数情况下, 你需要指定一个别名, 原因是你可能需要 在查" +"询语句的其它部分引用到Cat" + +#. Tag: programlisting +#: query_hql.xml:81 query_hql.xml:396 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:83 +#, no-c-format +msgid "" +"This query assigns the alias cat to Cat instances, so we could use that alias later in the query. The " +"as keyword is optional; we could also write:" +msgstr "" +"这个语句把别名cat指定给类Cat 的实例, 这" +"样我们就可以在随后的查询中使用此别名了。 关键字as 是可选" +"的,我们也可以这样写:" + +#. Tag: programlisting +#: query_hql.xml:89 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:91 +#, no-c-format +msgid "" +"Multiple classes may appear, resulting in a cartesian product or \"cross\" " +"join." +msgstr "" +"子句中可以同时出现多个类, 其查询结果是产生一个笛卡儿积或产生跨表的连接。" + +#. Tag: programlisting +#: query_hql.xml:95 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:96 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:98 +#, no-c-format +msgid "" +"It is considered good practice to name query aliases using an initial " +"lowercase, consistent with Java naming standards for local variables (eg. " +"domesticCat)." +msgstr "" +"查询语句中别名的开头部分小写被认为是实践中的好习惯, 这样做与Java变量的命名标" +"准保持了一致 (比如,domesticCat)。" + +#. Tag: title +#: query_hql.xml:107 +#, no-c-format +msgid "Associations and joins" +msgstr "关联(Association)与连接(Join)" + +#. Tag: para +#: query_hql.xml:109 +#, no-c-format +msgid "" +"We may also assign aliases to associated entities, or even to elements of a " +"collection of values, using a join." +msgstr "" +"我们也可以为相关联的实体甚至是对一个集合中的全部元素指定一个别名, 这时要使用" +"关键字join。" + +#. Tag: programlisting +#: query_hql.xml:114 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:116 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:118 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:120 +#, no-c-format +msgid "The supported join types are borrowed from ANSI SQL" +msgstr "受支持的连接类型是从ANSI SQL中借鉴来的。" + +#. Tag: literal +#: query_hql.xml:127 +#, no-c-format +msgid "inner join" +msgstr "inner join(内连接)" + +#. Tag: literal +#: query_hql.xml:132 +#, no-c-format +msgid "left outer join" +msgstr "left outer join(左外连接)" + +#. Tag: literal +#: query_hql.xml:137 +#, no-c-format +msgid "right outer join" +msgstr "right outer join(右外连接)" + +#. Tag: para +#: query_hql.xml:141 +#, no-c-format +msgid "full join (not usually useful)" +msgstr "full join (全连接,并不常用)" + +#. Tag: para +#: query_hql.xml:147 +#, no-c-format +msgid "" +"The inner join, left outer join and " +"right outer join constructs may be abbreviated." +msgstr "" +"语句inner join, left outer join 以及 " +"right outer join 可以简写。" + +#. Tag: programlisting +#: query_hql.xml:152 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:154 +#, no-c-format +msgid "" +"You may supply extra join conditions using the HQL with " +"keyword." +msgstr "通过HQL的with关键字,你可以提供额外的join条件。" + +#. Tag: programlisting +#: query_hql.xml:159 +#, no-c-format +msgid "" +" 10.0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:161 +#, no-c-format +msgid "" +"In addition, a \"fetch\" join allows associations or collections of values " +"to be initialized along with their parent objects, using a single select. " +"This is particularly useful in the case of a collection. It effectively " +"overrides the outer join and lazy declarations of the mapping file for " +"associations and collections. See " +"for more information." +msgstr "" +"还有,一个\"fetch\"连接允许仅仅使用一个选择语句就将相关联的对象或一组值的集合" +"随着他们的父对象的初始化而被初始化,这种方法在使用到集合的情况下尤其有用,对" +"于关联和集合来说,它有效的代替了映射文件中的外联接 与延迟声明(lazy " +"declarations). 查看 以获得等多的信" +"息。" + +#. Tag: programlisting +#: query_hql.xml:169 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:171 +#, no-c-format +msgid "" +"A fetch join does not usually need to assign an alias, because the " +"associated objects should not be used in the where clause " +"(or any other clause). Also, the associated objects are not returned " +"directly in the query results. Instead, they may be accessed via the parent " +"object. The only reason we might need an alias is if we are recursively join " +"fetching a further collection:" +msgstr "" +"一个fetch连接通常不需要被指定别名, 因为相关联的对象不应当被用在 " +"where 子句 (或其它任何子句)中。同时,相关联的对象 并不在查" +"询的结果中直接返回,但可以通过他们的父对象来访问到他们。" + +#. Tag: programlisting +#: query_hql.xml:179 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:181 +#, no-c-format +msgid "" +"Note that the fetch construct may not be used in queries " +"called using iterate() (though scroll() can be used). Nor should fetch be used together " +"with setMaxResults() or setFirstResult() as these operations are based on the result rows, which usually " +"contain duplicates for eager collection fetching, hence, the number of rows " +"is not what you'd expect. Nor may fetch be used together " +"with an ad hoc with condition. It is possible to create a " +"cartesian product by join fetching more than one collection in a query, so " +"take care in this case. Join fetching multiple collection roles also " +"sometimes gives unexpected results for bag mappings, so be careful about how " +"you formulate your queries in this case. Finally, note that full " +"join fetch and right join fetch are not " +"meaningful." +msgstr "" +"假若使用iterate()来调用查询,请注意fetch构造是不能使用的(scroll() 可以使用)。" +"fetch也不应该与setMaxResults() 或" +"setFirstResult()共用,这是因为这些操作是基于结果集的,而在" +"预先抓取集合类时可能包含重复的数据,也就是说无法预先知道精确的行数。" +"fetch还不能与独立的 with条件一起使用。" +"通过在一次查询中fetch多个集合,可以制造出笛卡尔积,因此请多加注意。对bag映射" +"来说,同时join fetch多个集合角色可能在某些情况下给出并非预期的结果,也请小" +"心。最后注意,使用full join fetchright join " +"fetch是没有意义的。" + +#. Tag: para +#: query_hql.xml:196 +#, no-c-format +msgid "" +"If you are using property-level lazy fetching (with bytecode " +"instrumentation), it is possible to force Hibernate to fetch the lazy " +"properties immediately (in the first query) using fetch all " +"properties." +msgstr "" +"如果你使用属性级别的延迟获取(lazy fetching)(这是通过重新编写字节码实现" +"的),可以使用 fetch all properties 来强制Hibernate立即取" +"得那些原本需要延迟加载的属性(在第一个查询中)。" + +#. Tag: programlisting +#: query_hql.xml:202 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:203 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:208 +#, no-c-format +msgid "Forms of join syntax" +msgstr "join 语法的形式" + +#. Tag: para +#: query_hql.xml:210 +#, no-c-format +msgid "" +"HQL supports two forms of association joining: implicit " +"and explicit." +msgstr "" +"HQL支持两种关联join的形式:implicit(隐式) 与" +"explicit(显式)。" + +#. Tag: para +#: query_hql.xml:214 +#, no-c-format +msgid "" +"The queries shown in the previous section all use the explicit form where the join keyword is explicitly used in the from clause. " +"This is the recommended form." +msgstr "" +"上一节中给出的查询都是使用explicit(显式)形式的,其中form子" +"句中明确给出了join关键字。这是建议使用的方式。" + +#. Tag: para +#: query_hql.xml:219 +#, no-c-format +msgid "" +"The implicit form does not use the join keyword. Instead, " +"the associations are \"dereferenced\" using dot-notation. implicit joins can appear in any of the HQL clauses. implicit join result in inner joins in the resulting SQL statement." +msgstr "" +"implicit(隐式)形式不使用join关键字。关联使用\"点号\"来进" +"行“引用”。implicit join可以在任何HQL子句中出现." +"implicit join在最终的SQL语句中以inner join的方式出现。" + +#. Tag: programlisting +#: query_hql.xml:226 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#: query_hql.xml:230 +#, no-c-format +msgid "Refering to identifier property" +msgstr "Refering to identifier property" + +#. Tag: para +#: query_hql.xml:232 +#, no-c-format +msgid "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" +msgstr "" +"There are, generally speaking, 2 ways to refer to an entity's identifier " +"property:" + +#. Tag: para +#: query_hql.xml:237 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." +msgstr "" +"The special property (lowercase) id may be used to " +"reference the identifier property of an entity provided that " +"entity does not define a non-identifier property named id." + +#. Tag: para +#: query_hql.xml:244 +#, no-c-format +msgid "" +"If the entity defines a named identifier property, you may use that property " +"name." +msgstr "" +"If the entity defines a named identifier property, you may use that property " +"name." + +#. Tag: para +#: query_hql.xml:250 +#, no-c-format +msgid "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." +msgstr "" +"References to composite identifier properties follow the same naming rules. " +"If the entity has a non-identifier property named id, the composite " +"identifier property can only be referenced by its defined named; otherwise, " +"the special id property can be used to rerference the " +"identifier property." + +#. Tag: para +#: query_hql.xml:257 +#, fuzzy, no-c-format +msgid "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, id always referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." +msgstr "" +"Note: this has changed significantly starting in version 3.2.2. In previous " +"versions, idalways referred to the " +"identifier property no matter what its actual name. A ramification of that " +"decision was that non-identifier properties named id " +"could never be referenced in Hibernate queries." + +#. Tag: title +#: query_hql.xml:266 +#, no-c-format +msgid "The select clause" +msgstr "select子句" + +#. Tag: para +#: query_hql.xml:268 +#, no-c-format +msgid "" +"The select clause picks which objects and properties to " +"return in the query result set. Consider:" +msgstr "" +"select 子句选择将哪些对象与属性返 回到查询结果集中. 考虑如" +"下情况:" + +#. Tag: programlisting +#: query_hql.xml:273 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:275 +#, no-c-format +msgid "" +"The query will select mates of other Cats. Actually, you may express this query more compactly as:" +msgstr "" +"该语句将选择mates of other Cats。(其他" +"猫的配偶) 实际上, 你可以更简洁的用以下的查询语句表达相同的含义:" + +#. Tag: programlisting +#: query_hql.xml:280 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:282 +#, no-c-format +msgid "" +"Queries may return properties of any value type including properties of " +"component type:" +msgstr "" +"查询语句可以返回值为任何类型的属性,包括返回类型为某种组件(Component)的属性:" + +#. Tag: programlisting +#: query_hql.xml:286 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:288 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:290 +#, no-c-format +msgid "" +"Queries may return multiple objects and/or properties as an array of type " +"Object[]," +msgstr "" +"查询语句可以返回多个对象和(或)属性,存放在 Object[]队列" +"中," + +#. Tag: programlisting +#: query_hql.xml:295 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:297 +#, no-c-format +msgid "or as a List," +msgstr "或存放在一个List对象中," + +#. Tag: programlisting +#: query_hql.xml:301 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:303 +#, no-c-format +msgid "or as an actual typesafe Java object," +msgstr "也可能直接返回一个实际的类型安全的Java对象," + +#. Tag: programlisting +#: query_hql.xml:307 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:309 +#, no-c-format +msgid "" +"assuming that the class Family has an appropriate " +"constructor." +msgstr "假设类Family有一个合适的构造函数." + +#. Tag: para +#: query_hql.xml:313 +#, no-c-format +msgid "" +"You may assign aliases to selected expressions using as:" +msgstr "你可以使用关键字as给“被选择了的表达式”指派别名:" + +#. Tag: programlisting +#: query_hql.xml:317 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:319 +#, no-c-format +msgid "" +"This is most useful when used together with select new map:" +msgstr "这种做法在与子句select new map一起使用时最有用:" + +#. Tag: programlisting +#: query_hql.xml:323 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:325 +#, no-c-format +msgid "" +"This query returns a Map from aliases to selected values." +msgstr "" +"该查询返回了一个Map的对象,内容是别名与被选择的值组成的名-" +"值映射。" + +#. Tag: title +#: query_hql.xml:332 +#, no-c-format +msgid "Aggregate functions" +msgstr "聚集函数" + +#. Tag: para +#: query_hql.xml:334 +#, no-c-format +msgid "" +"HQL queries may even return the results of aggregate functions on properties:" +msgstr "HQL查询甚至可以返回作用于属性之上的聚集函数的计算结果:" + +#. Tag: programlisting +#: query_hql.xml:338 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:349 +#, no-c-format +msgid "The supported aggregate functions are" +msgstr "受支持的聚集函数如下:" + +#. Tag: literal +#: query_hql.xml:356 +#, no-c-format +msgid "avg(...), sum(...), min(...), max(...)" +msgstr "avg(...), sum(...), min(...), max(...)" + +#. Tag: literal +#: query_hql.xml:361 +#, no-c-format +msgid "count(*)" +msgstr "count(*)" + +#. Tag: literal +#: query_hql.xml:366 +#, no-c-format +msgid "count(...), count(distinct ...), count(all...)" +msgstr "count(...), count(distinct ...), count(all...)" + +#. Tag: para +#: query_hql.xml:371 +#, no-c-format +msgid "" +"You may use arithmetic operators, concatenation, and recognized SQL " +"functions in the select clause:" +msgstr "你可以在选择子句中使用数学操作符、连接以及经过验证的SQL函数:" + +#. Tag: programlisting +#: query_hql.xml:376 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:378 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:380 +#, no-c-format +msgid "" +"The distinct and all keywords may be " +"used and have the same semantics as in SQL." +msgstr "" +"关键字distinctall 也可以使用,它们具" +"有与SQL相同的语义." + +#. Tag: programlisting +#: query_hql.xml:385 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:390 +#, no-c-format +msgid "Polymorphic queries" +msgstr "多态查询" + +#. Tag: para +#: query_hql.xml:392 +#, no-c-format +msgid "A query like:" +msgstr "一个如下的查询语句:" + +#. Tag: para +#: query_hql.xml:398 +#, no-c-format +msgid "" +"returns instances not only of Cat, but also of subclasses " +"like DomesticCat. Hibernate queries may name " +"any Java class or interface in the from clause. The query will return instances of all persistent classes " +"that extend that class or implement the interface. The following query would " +"return all persistent objects:" +msgstr "" +"不仅返回Cat类的实例, 也同时返回子类 DomesticCat的实例. Hibernate 可以在from子句中指定任" +"何 Java 类或接口. 查询会返回继承了该类的所有持久化子类 的实例或返" +"回声明了该接口的所有持久化类的实例。下面的查询语句返回所有的被持久化的对象:" + +#. Tag: programlisting +#: query_hql.xml:406 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:408 +#, no-c-format +msgid "" +"The interface Named might be implemented by various " +"persistent classes:" +msgstr "接口Named 可能被各种各样的持久化类声明:" + +#. Tag: programlisting +#: query_hql.xml:413 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:415 +#, no-c-format +msgid "" +"Note that these last two queries will require more than one SQL " +"SELECT. This means that the order by " +"clause does not correctly order the whole result set. (It also means you " +"can't call these queries using Query.scroll().)" +msgstr "" +"注意,最后的两个查询将需要超过一个的SQL SELECT.这表明" +"order by子句 没有对整个结果集进行正确的排序. (这也说明你不" +"能对这样的查询使用Query.scroll()方法.)" + +#. Tag: title +#: query_hql.xml:424 +#, no-c-format +msgid "The where clause" +msgstr "where子句" + +#. Tag: para +#: query_hql.xml:426 +#, no-c-format +msgid "" +"The where clause allows you to narrow the list of " +"instances returned. If no alias exists, you may refer to properties by name:" +msgstr "" +"where子句允许你将返回的实例列表的范围缩小. 如果没有指定别" +"名,你可以使用属性名来直接引用属性:" + +#. Tag: programlisting +#: query_hql.xml:431 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:433 +#, no-c-format +msgid "If there is an alias, use a qualified property name:" +msgstr "如果指派了别名,需要使用完整的属性名:" + +#. Tag: programlisting +#: query_hql.xml:437 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:439 +#, no-c-format +msgid "returns instances of Cat named 'Fritz'." +msgstr "返回名为(属性name等于)'Fritz'的Cat类的实例。" + +#. Tag: programlisting +#: query_hql.xml:443 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:445 +#, no-c-format +msgid "" +"will return all instances of Foo for which there exists " +"an instance of bar with a date " +"property equal to the startDate property of the " +"Foo. Compound path expressions make the where clause extremely powerful. Consider:" +msgstr "" +"将返回所有满足下面条件的Foo类的实例: 存在如下的" +"bar的一个实例,其date属性等于 " +"FoostartDate属性。 复合路径表达式使得" +"where子句非常的强大,考虑如下情况:" + +#. Tag: programlisting +#: query_hql.xml:454 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:456 +#, no-c-format +msgid "" +"This query translates to an SQL query with a table (inner) join. If you were " +"to write something like" +msgstr "" +"该查询将被翻译成为一个含有表连接(内连接)的SQL查询。如果你打算写像这样的查询" +"语句" + +#. Tag: programlisting +#: query_hql.xml:461 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:463 +#, no-c-format +msgid "" +"you would end up with a query that would require four table joins in SQL." +msgstr "在SQL中,你为达此目的将需要进行一个四表连接的查询。" + +#. Tag: para +#: query_hql.xml:467 +#, no-c-format +msgid "" +"The = operator may be used to compare not only " +"properties, but also instances:" +msgstr "" +"=运算符不仅可以被用来比较属性的值,也可以用来比较实例:" + +#. Tag: programlisting +#: query_hql.xml:472 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:474 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:476 +#, no-c-format +msgid "" +"The special property (lowercase) id may be used to " +"reference the unique identifier of an object. See for more information." +msgstr "" +"特殊属性(小写)id可以用来表示一个对象的唯一的标识符。(你" +"也可以使用该对象的属性名。)" + +#. Tag: programlisting +#: query_hql.xml:482 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:484 +#, no-c-format +msgid "The second query is efficient. No table join is required!" +msgstr "第二个查询是有效的。此时不需要进行表连接!" + +#. Tag: para +#: query_hql.xml:488 +#, no-c-format +msgid "" +"Properties of composite identifiers may also be used. Suppose " +"Person has a composite identifier consisting of " +"country and medicareNumber. Again, see " +" for more information " +"regarding referencing identifier properties." +msgstr "" +"同样也可以使用复合标识符。比如Person类有一个复合标识符,它" +"由country属性 与medicareNumber属性组" +"成。" + +#. Tag: programlisting +#: query_hql.xml:495 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:497 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:499 +#, no-c-format +msgid "Once again, the second query requires no table join." +msgstr "第二个查询也不需要进行表连接。" + +#. Tag: para +#: query_hql.xml:503 +#, no-c-format +msgid "" +"Likewise, the special property class accesses the " +"discriminator value of an instance in the case of polymorphic persistence. A " +"Java class name embedded in the where clause will be translated to its " +"discriminator value." +msgstr "" +"同样的,特殊属性class在进行多态持久化的情况下被用来存取一" +"个实例的鉴别值(discriminator value)。 一个嵌入到where子句中的Java类的名字将" +"被转换为该类的鉴别值。" + +#. Tag: programlisting +#: query_hql.xml:509 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:511 +#, fuzzy, no-c-format +msgid "" +"You may also use components or composite user types, or properties of said " +"component types. See for more " +"details." +msgstr "" +"你也可以声明一个属性的类型是组件或者复合用户类型(以及由组件构成的组件等" +"等)。永远不要尝试使用以组件类型来结尾的路径表达式(path-expression) (与此" +"相反,你应当使用组件的一个属性来结尾)。 举例来说,如果store.owner含有一个包含了组件的实体address" + +#. Tag: para +#: query_hql.xml:516 +#, no-c-format +msgid "" +"An \"any\" type has the special properties id and " +"class, allowing us to express a join in the following way " +"(where AuditLog.item is a property mapped with " +"<any>)." +msgstr "" +"一个“任意”类型有两个特殊的属性idclass, 来允许我们按照下面的方式表达一个连接(AuditLog.item 是一个属性,该属性被映射为<any>)。" + +#. Tag: programlisting +#: query_hql.xml:522 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:524 +#, no-c-format +msgid "" +"Notice that log.item.class and payment.class would refer to the values of completely different database columns " +"in the above query." +msgstr "" +"注意,在上面的查询与句中,log.item.class 和 " +"payment.class 将涉及到完全不同的数据库中的列。" + +#. Tag: title +#: query_hql.xml:532 +#, no-c-format +msgid "Expressions" +msgstr "表达式" + +#. Tag: para +#: query_hql.xml:534 +#, no-c-format +msgid "" +"Expressions allowed in the where clause include most of " +"the kind of things you could write in SQL:" +msgstr "" +"在where子句中允许使用的表达式包括 大多数你可以在SQL使用的" +"表达式种类:" + +#. Tag: para +#: query_hql.xml:541 +#, no-c-format +msgid "mathematical operators +, -, *, /" +msgstr "数学运算符+, -, *, /" + +#. Tag: para +#: query_hql.xml:546 +#, no-c-format +msgid "" +"binary comparison operators =, >=, <=, <>, !=, like" +msgstr "二进制比较运算符=, >=, <=, <>, !=, like" + +#. Tag: para +#: query_hql.xml:551 +#, no-c-format +msgid "logical operations and, or, not" +msgstr "逻辑运算符and, or, not" + +#. Tag: para +#: query_hql.xml:556 +#, no-c-format +msgid "Parentheses ( ), indicating grouping" +msgstr "Parentheses ( ), indicating grouping" + +#. Tag: para +#: query_hql.xml:561 +#, no-c-format +msgid "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" +msgstr "" +"in, not in, between, is null, is not null, " +"is empty, is not empty, " +"member of and not member of" + +#. Tag: para +#: query_hql.xml:574 +#, no-c-format +msgid "" +"\"Simple\" case, case ... when ... then ... else ... end, " +"and \"searched\" case, case when ... then ... else ... end" +msgstr "" +"\"简单的\" case, case ... when ... then ... else ... end," +"和 \"搜索\" case, case when ... then ... else ... end" + +#. Tag: para +#: query_hql.xml:580 +#, no-c-format +msgid "" +"string concatenation ...||... or concat(...,...)" +"" +msgstr "" +"字符串连接符...||... or concat(...,...)" + +#. Tag: para +#: query_hql.xml:585 +#, no-c-format +msgid "" +"current_date(), current_time(), " +"current_timestamp()" +msgstr "" +"current_date(), current_time(), " +"current_timestamp()" + +#. Tag: para +#: query_hql.xml:591 +#, no-c-format +msgid "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," +msgstr "" +"second(...), minute(...), hour" +"(...), day(...), month(...), " +"year(...)," + +#. Tag: para +#: query_hql.xml:598 +#, no-c-format +msgid "" +"Any function or operator defined by EJB-QL 3.0: substring(), trim" +"(), lower(), upper(), length(), locate(), abs(), sqrt(), bit_length(), mod()" +"" +msgstr "" +"EJB-QL 3.0定义的任何函数或操作:substring(), trim(), lower(), upper" +"(), length(), locate(), abs(), sqrt(), bit_length(), mod()" + +#. Tag: para +#: query_hql.xml:604 +#, no-c-format +msgid "coalesce() and nullif()" +msgstr "coalesce()nullif()" + +#. Tag: para +#: query_hql.xml:609 +#, no-c-format +msgid "" +"str() for converting numeric or temporal values to a " +"readable string" +msgstr "str() 把数字或者时间值转换为可读的字符串" + +#. Tag: para +#: query_hql.xml:615 +#, no-c-format +msgid "" +"cast(... as ...), where the second argument is the name " +"of a Hibernate type, and extract(... from ...) if ANSI " +"cast() and extract() is supported by " +"the underlying database" +msgstr "" +"cast(... as ...), 其第二个参数是某Hibernate类型的名字,以" +"及extract(... from ...),只要ANSI cast()extract() 被底层数据库支持" + +#. Tag: para +#: query_hql.xml:623 +#, no-c-format +msgid "" +"the HQL index() function, that applies to aliases of a " +"joined indexed collection" +msgstr "HQL index() 函数,作用于join的有序集合的别名。" + +#. Tag: para +#: query_hql.xml:629 +#, no-c-format +msgid "" +"HQL functions that take collection-valued path expressions: size(), " +"minelement(), maxelement(), minindex(), maxindex(), along with the " +"special elements() and indices " +"functions which may be quantified using some, all, exists, any, in." +msgstr "" +"HQL函数,把集合作为参数:size(), minelement(), maxelement(), minindex" +"(), maxindex(),还有特别的elements() 和" +"indices函数,可以与数量词加以限定:some, all, " +"exists, any, in。" + +#. Tag: para +#: query_hql.xml:637 +#, no-c-format +msgid "" +"Any database-supported SQL scalar function like sign(), " +"trunc(), rtrim(), sin()" +msgstr "" +"任何数据库支持的SQL标量函数,比如sign(), trunc()" +", rtrim(), sin()" + +#. Tag: para +#: query_hql.xml:643 +#, no-c-format +msgid "JDBC-style positional parameters ?" +msgstr "JDBC风格的参数传入 ?" + +#. Tag: para +#: query_hql.xml:648 +#, no-c-format +msgid "" +"named parameters :name, :start_date, " +":x1" +msgstr "" +"命名参数:name, :start_date, :" +"x1" + +#. Tag: para +#: query_hql.xml:653 +#, no-c-format +msgid "" +"SQL literals 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" +msgstr "" +"SQL 直接常量 'foo', 69, 6.66E" +"+2, '1970-01-01 10:00:01.0'" + +#. Tag: para +#: query_hql.xml:659 +#, no-c-format +msgid "" +"Java public static final constants eg.Color." +"TABBY" +msgstr "" +"Java public static final 类型的常量 eg.Color." +"TABBY" + +#. Tag: para +#: query_hql.xml:665 +#, no-c-format +msgid "" +"in and between may be used as follows:" +msgstr "" +"关键字inbetween可按如下方法使用:" + +#. Tag: programlisting +#: query_hql.xml:669 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:671 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:673 +#, no-c-format +msgid "and the negated forms may be written" +msgstr "而且否定的格式也可以如下书写:" + +#. Tag: programlisting +#: query_hql.xml:677 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:679 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:681 +#, no-c-format +msgid "" +"Likewise, is null and is not null may " +"be used to test for null values." +msgstr "" +"同样, 子句is nullis not null可以被用" +"来测试空值(null)." + +#. Tag: para +#: query_hql.xml:686 +#, no-c-format +msgid "" +"Booleans may be easily used in expressions by declaring HQL query " +"substitutions in Hibernate configuration:" +msgstr "" +"在Hibernate配置文件中声明HQL“查询替代(query substitutions)”之后, 布尔表达" +"式(Booleans)可以在其他表达式中轻松的使用:" + +#. Tag: programlisting +#: query_hql.xml:691 +#, no-c-format +msgid "" +"true 1, false 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:693 +#, no-c-format +msgid "" +"This will replace the keywords true and false with the literals 1 and 0 in " +"the translated SQL from this HQL:" +msgstr "" +"系统将该HQL转换为SQL语句时,该设置表明将用字符 1 和 " +"0 来 取代关键字truefalse:" + +#. Tag: programlisting +#: query_hql.xml:698 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:700 +#, no-c-format +msgid "" +"You may test the size of a collection with the special property " +"size, or the special size() function." +msgstr "" +"你可以用特殊属性size, 或是特殊函数size()测试一个集合的大小。" + +#. Tag: programlisting +#: query_hql.xml:705 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:707 +#, no-c-format +msgid " 0]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:709 +#, no-c-format +msgid "" +"For indexed collections, you may refer to the minimum and maximum indices " +"using minindex and maxindex functions. " +"Similarly, you may refer to the minimum and maximum elements of a collection " +"of basic type using the minelement and " +"maxelement functions." +msgstr "" +"对于索引了(有序)的集合,你可以使用minindex 与 " +"maxindex函数来引用到最小与最大的索引序数。 同理,你可以使" +"用minelementmaxelement函数来 引用到" +"一个基本数据类型的集合中最小与最大的元素。" + +#. Tag: programlisting +#: query_hql.xml:717 +#, no-c-format +msgid "" +" current_date]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:719 +#, no-c-format +msgid " 100]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:721 +#, no-c-format +msgid " 10000]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:723 +#, no-c-format +msgid "" +"The SQL functions any, some, all, exists, in are " +"supported when passed the element or index set of a collection " +"(elements and indices functions) or " +"the result of a subquery (see below)." +msgstr "" +"在传递一个集合的索引集或者是元素集(elements与" +"indices 函数) 或者传递一个子查询的结果的时候,可以使用SQL" +"函数any, some, all, exists, in" + +#. Tag: programlisting +#: query_hql.xml:729 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:731 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:733 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:735 +#, no-c-format +msgid " all elements(p.scores)]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:737 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:739 +#, no-c-format +msgid "" +"Note that these constructs - size, elements, indices, minindex, " +"maxindex, minelement, " +"maxelement - may only be used in the where clause in " +"Hibernate3." +msgstr "" +"注意,在Hibernate3种,这些结构变量- size, " +"elements, indices, minindex, maxindex, minelement, " +"maxelement - 只能在where子句中使用。" + +#. Tag: para +#: query_hql.xml:746 +#, no-c-format +msgid "" +"Elements of indexed collections (arrays, lists, maps) may be referred to by " +"index (in a where clause only):" +msgstr "" +"一个被索引过的(有序的)集合的元素(arrays, lists, maps)可以在其他索引中被引用" +"(只能在where子句中):" + +#. Tag: programlisting +#: query_hql.xml:751 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:753 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:755 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:757 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:759 +#, no-c-format +msgid "" +"The expression inside [] may even be an arithmetic " +"expression." +msgstr "在[]中的表达式甚至可以是一个算数表达式。" + +#. Tag: programlisting +#: query_hql.xml:763 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:765 +#, no-c-format +msgid "" +"HQL also provides the built-in index() function, for " +"elements of a one-to-many association or collection of values." +msgstr "" +"对于一个一对多的关联(one-to-many association)或是值的集合中的元素, HQL也提" +"供内建的index()函数," + +#. Tag: programlisting +#: query_hql.xml:770 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:772 +#, no-c-format +msgid "Scalar SQL functions supported by the underlying database may be used" +msgstr "如果底层数据库支持标量的SQL函数,它们也可以被使用" + +#. Tag: programlisting +#: query_hql.xml:776 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:778 +#, no-c-format +msgid "" +"If you are not yet convinced by all this, think how much longer and less " +"readable the following query would be in SQL:" +msgstr "" +"如果你还不能对所有的这些深信不疑,想想下面的查询。如果使用SQL,语句长度会增长" +"多少,可读性会下降多少:" + +#. Tag: programlisting +#: query_hql.xml:783 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:785 +#, no-c-format +msgid "Hint: something like" +msgstr "提示: 会像如下的语句" + +#. Tag: programlisting +#: query_hql.xml:789 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:794 +#, no-c-format +msgid "The order by clause" +msgstr "order by子句" + +#. Tag: para +#: query_hql.xml:796 +#, no-c-format +msgid "" +"The list returned by a query may be ordered by any property of a returned " +"class or components:" +msgstr "" +"查询返回的列表(list)可以按照一个返回的类或组件(components)中的任何属性" +"(property)进行排序:" + +#. Tag: programlisting +#: query_hql.xml:800 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:802 +#, no-c-format +msgid "" +"The optional asc or desc indicate " +"ascending or descending order respectively." +msgstr "" +"可选的ascdesc关键字指明了按照升序或降" +"序进行排序." + +#. Tag: title +#: query_hql.xml:809 +#, no-c-format +msgid "The group by clause" +msgstr "group by子句" + +#. Tag: para +#: query_hql.xml:811 +#, no-c-format +msgid "" +"A query that returns aggregate values may be grouped by any property of a " +"returned class or components:" +msgstr "" +"一个返回聚集值(aggregate values)的查询可以按照一个返回的类或组件(components)" +"中的任何属性(property)进行分组:" + +#. Tag: programlisting +#: query_hql.xml:815 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:817 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:819 +#, no-c-format +msgid "A having clause is also allowed." +msgstr "having子句在这里也允许使用." + +#. Tag: programlisting +#: query_hql.xml:823 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:825 +#, no-c-format +msgid "" +"SQL functions and aggregate functions are allowed in the having and order by clauses, if supported by the " +"underlying database (eg. not in MySQL)." +msgstr "" +"如果底层的数据库支持的话(例如不能在MySQL中使用),SQL的一般函数与聚集函数也可" +"以出现 在havingorder by 子句中。" + +#. Tag: programlisting +#: query_hql.xml:831 +#, no-c-format +msgid "" +" 100\n" +"order by count(kitten) asc, sum(kitten.weight) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:833 +#, no-c-format +msgid "" +"Note that neither the group by clause nor the " +"order by clause may contain arithmetic expressions. Also " +"note that Hibernate currently does not expand a grouped entity, so you can't " +"write group by cat if all properties of cat are non-aggregated. You have to list all non-aggregated properties " +"explicitly." +msgstr "" +"注意group by子句与 order by子句中都不能" +"包含算术表达式(arithmetic expressions). 也要注意Hibernate目前不会扩展group" +"的实体,因此你不能写group by cat,除非cat" +"的所有属性都不是聚集的(non-aggregated)。你必须明确的列出所有的非聚集属性。" + +#. Tag: title +#: query_hql.xml:845 +#, no-c-format +msgid "Subqueries" +msgstr "子查询" + +#. Tag: para +#: query_hql.xml:847 +#, no-c-format +msgid "" +"For databases that support subselects, Hibernate supports subqueries within " +"queries. A subquery must be surrounded by parentheses (often by an SQL " +"aggregate function call). Even correlated subqueries (subqueries that refer " +"to an alias in the outer query) are allowed." +msgstr "" +"对于支持子查询的数据库,Hibernate支持在查询中使用子查询。一个子查询必须被圆括" +"号包围起来(经常是SQL聚集函数的圆括号)。 甚至相互关联的子查询(引用到外部查" +"询中的别名的子查询)也是允许的。" + +#. Tag: programlisting +#: query_hql.xml:853 +#, no-c-format +msgid "" +" (\n" +" select avg(cat.weight) from DomesticCat cat\n" +")]]>" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:855 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:857 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:859 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:863 +#, no-c-format +msgid "Note that HQL subqueries may occur only in the select or where clauses." +msgstr "注意,HQL自查询只可以在select或者where子句中出现。" + +#. Tag: para +#: query_hql.xml:867 +#, no-c-format +msgid "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." +msgstr "" +"Note that subqueries can also utilize row value constructor syntax. See for more details." + +#. Tag: title +#: query_hql.xml:875 +#, no-c-format +msgid "HQL examples" +msgstr "HQL示例" + +#. Tag: para +#: query_hql.xml:877 +#, no-c-format +msgid "" +"Hibernate queries can be quite powerful and complex. In fact, the power of " +"the query language is one of Hibernate's main selling points. Here are some " +"example queries very similar to queries that I used on a recent project. " +"Note that most queries you will write are much simpler than these!" +msgstr "" +"Hibernate查询可以非常的强大与复杂。实际上,Hibernate的一个主要卖点就是查询语" +"句的威力。这里有一些例子,它们与我在最近的 一个项目中使用的查询非常相似。注意" +"你能用到的大多数查询比这些要简单的多!" + +#. Tag: para +#: query_hql.xml:883 +#, no-c-format +msgid "" +"The following query returns the order id, number of items and total value of " +"the order for all unpaid orders for a particular customer and given minimum " +"total value, ordering the results by total value. In determining the prices, " +"it uses the current catalog. The resulting SQL query, against the " +"ORDER, ORDER_LINE, PRODUCT, CATALOG and PRICE tables has " +"four inner joins and an (uncorrelated) subselect." +msgstr "" +"下面的查询对于某个特定的客户的所有未支付的账单,在给定给最小总价值的情况下," +"返回订单的id,条目的数量和总价值, 返回值按照总价值的结果进行排序。为了决定价" +"格,查询使用了当前目录。作为转换结果的SQL查询,使用了ORDER, ORDER_LINE, PRODUCT, " +"CATALOGPRICE 库表。" + +#. Tag: programlisting +#: query_hql.xml:892 +#, no-c-format +msgid "" +"= all (\n" +" select cat.effectiveDate\n" +" from Catalog as cat\n" +" where cat.effectiveDate < sysdate\n" +" )\n" +"group by order\n" +"having sum(price.amount) > :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:894 +#, no-c-format +msgid "" +"What a monster! Actually, in real life, I'm not very keen on subqueries, so " +"my query was really more like this:" +msgstr "" +"这简直是一个怪物!实际上,在现实生活中,我并不热衷于子查询,所以我的查询语句" +"看起来更像这个:" + +#. Tag: programlisting +#: query_hql.xml:899 +#, no-c-format +msgid "" +" :minAmount\n" +"order by sum(price.amount) desc]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:901 +#, no-c-format +msgid "" +"The next query counts the number of payments in each status, excluding all " +"payments in the AWAITING_APPROVAL status where the most " +"recent status change was made by the current user. It translates to an SQL " +"query with two inner joins and a correlated subselect against the " +"PAYMENT, PAYMENT_STATUS and " +"PAYMENT_STATUS_CHANGE tables." +msgstr "" +"下面一个查询计算每一种状态下的支付的数目,除去所有处于" +"AWAITING_APPROVAL状态的支付,因为在该状态下 当前的用户作出" +"了状态的最新改变。该查询被转换成含有两个内连接以及一个相关联的子选择的SQL查" +"询,该查询使用了表 PAYMENT, PAYMENT_STATUS 以及 PAYMENT_STATUS_CHANGE。" + +#. Tag: programlisting +#: query_hql.xml:909 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or (\n" +" statusChange.timeStamp = (\n" +" select max(change.timeStamp)\n" +" from PaymentStatusChange change\n" +" where change.payment = payment\n" +" )\n" +" and statusChange.user <> :currentUser\n" +" )\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:911 +#, no-c-format +msgid "" +"If I would have mapped the statusChanges collection as a " +"list, instead of a set, the query would have been much simpler to write." +msgstr "" +"如果我把statusChanges实例集映射为一个列表(list)而不是一" +"个集合(set), 书写查询语句将更加简单." + +#. Tag: programlisting +#: query_hql.xml:916 +#, no-c-format +msgid "" +" PaymentStatus.AWAITING_APPROVAL\n" +" or payment.statusChanges[ maxIndex(payment.statusChanges) ].user <> :" +"currentUser\n" +"group by status.name, status.sortOrder\n" +"order by status.sortOrder]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:918 +#, no-c-format +msgid "" +"The next query uses the MS SQL Server isNull() function " +"to return all the accounts and unpaid payments for the organization to which " +"the current user belongs. It translates to an SQL query with three inner " +"joins, an outer join and a subselect against the ACCOUNT, " +"PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION and " +"ORG_USER tables." +msgstr "" +"下面一个查询使用了MS SQL Server的 isNull()函数用以返回当前" +"用户所属组织的组织帐号及组织未支付的账。 它被转换成一个对表ACCOUNT, PAYMENT, PAYMENT_STATUS, " +"ACCOUNT_TYPE, ORGANIZATION 以及 " +"ORG_USER进行的三个内连接, 一个外连接和一个子选择的SQL查" +"询。" + +#. Tag: programlisting +#: query_hql.xml:927 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:929 +#, no-c-format +msgid "" +"For some databases, we would need to do away with the (correlated) subselect." +msgstr "对于一些数据库,我们需要弃用(相关的)子选择。" + +#. Tag: programlisting +#: query_hql.xml:933 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:938 +#, no-c-format +msgid "Bulk update and delete" +msgstr "批量的UPDATE和DELETE" + +#. Tag: para +#: query_hql.xml:940 +#, no-c-format +msgid "" +"HQL now supports update, delete and " +"insert ... select ... statements. See for details." +msgstr "" +"HQL现在支持 update, delete 和 " +"insert ... select ...语句. 查阅 以获得更多信息。" + +#. Tag: title +#: query_hql.xml:948 +#, no-c-format +msgid "Tips & Tricks" +msgstr "小技巧 & 小窍门" + +#. Tag: para +#: query_hql.xml:950 +#, no-c-format +msgid "" +"You can count the number of query results without actually returning them:" +msgstr "你可以统计查询结果的数目而不必实际的返回他们:" + +#. Tag: programlisting +#: query_hql.xml:954 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:956 +#, no-c-format +msgid "To order a result by the size of a collection, use the following query:" +msgstr "若想根据一个集合的大小来进行排序,可以使用如下的语句:" + +#. Tag: programlisting +#: query_hql.xml:960 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:962 +#, no-c-format +msgid "" +"If your database supports subselects, you can place a condition upon " +"selection size in the where clause of your query:" +msgstr "" +"如果你的数据库支持子选择,你可以在你的查询的where子句中为选择的大小" +"(selection size)指定一个条件:" + +#. Tag: programlisting +#: query_hql.xml:967 +#, no-c-format +msgid "= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:969 +#, no-c-format +msgid "If your database doesn't support subselects, use the following query:" +msgstr "如果你的数据库不支持子选择语句,使用下面的查询:" + +#. Tag: programlisting +#: query_hql.xml:973 +#, no-c-format +msgid "" +"= 1]]>" +msgstr "" + +#. Tag: para +#: query_hql.xml:975 +#, no-c-format +msgid "" +"As this solution can't return a User with zero messages " +"because of the inner join, the following form is also useful:" +msgstr "" +"因为内连接(inner join)的原因,这个解决方案不能返回含有零个信息的" +"User 类的实例, 所以这种情况下使用下面的格式将是有帮助的:" + +#. Tag: programlisting +#: query_hql.xml:980 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:982 +#, no-c-format +msgid "Properties of a JavaBean can be bound to named query parameters:" +msgstr "JavaBean的属性可以被绑定到一个命名查询(named query)的参数上:" + +#. Tag: programlisting +#: query_hql.xml:986 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:988 +#, no-c-format +msgid "" +"Collections are pageable by using the Query interface " +"with a filter:" +msgstr "" +"通过将接口Query与一个过滤器(filter)一起使用,集合" +"(Collections)是可以分页的:" + +#. Tag: programlisting +#: query_hql.xml:992 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:994 +#, no-c-format +msgid "Collection elements may be ordered or grouped using a query filter:" +msgstr "" +"通过使用查询过滤器(query filter)可以将集合(Collection)的原素分组或排序:" + +#. Tag: programlisting +#: query_hql.xml:998 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1000 +#, no-c-format +msgid "You can find the size of a collection without initializing it:" +msgstr "不用通过初始化,你就可以知道一个集合(Collection)的大小:" + +#. Tag: programlisting +#: query_hql.xml:1004 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_hql.xml:1009 +#, no-c-format +msgid "Components" +msgstr "translator-credits" + +#. Tag: para +#: query_hql.xml:1011 +#, no-c-format +msgid "" +"Components might be used in just about every way that simple value types can " +"be used in HQL queries. They can appear in the select " +"clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1016 query_hql.xml:1062 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1017 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1019 +#, no-c-format +msgid "" +"where the Person's name property is a component. Components can also be used " +"in the where clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1024 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1025 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1027 +#, no-c-format +msgid "Components can also be used in the order by clause:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1031 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1032 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1034 +#, no-c-format +msgid "" +"Another common use of components is in row " +"value constructors." +msgstr "" + +#. Tag: title +#: query_hql.xml:1040 +#, no-c-format +msgid "Row value constructor syntax" +msgstr "" + +#. Tag: para +#: query_hql.xml:1042 +#, no-c-format +msgid "" +"HQL supports the use of ANSI SQL row value constructor " +"syntax (sometimes called tuple syntax), even though the " +"underlying database may not support that notion. Here we are generally " +"referring to multi-valued comparisons, typically associated with components. " +"Consider an entity Person which defines a name component:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1049 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1051 +#, no-c-format +msgid "" +"That's valid syntax, although a little verbose. It be nice to make this a " +"bit more concise and use row value constructor syntax:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1056 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: query_hql.xml:1058 +#, no-c-format +msgid "" +"It can also be useful to specify this in the select " +"clause:" +msgstr "" + +#. Tag: para +#: query_hql.xml:1064 +#, no-c-format +msgid "" +"Another time using row value constructor syntax can be " +"beneficial is when using subqueries needing to compare against multiple " +"values:" +msgstr "" + +#. Tag: programlisting +#: query_hql.xml:1069 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_hql.xml:1071 +#, no-c-format +msgid "" +"One thing to consider when deciding if you want to use this syntax is that " +"the query will be dependent upon the ordering of the component sub-" +"properties in the metadata." +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/query_sql.po b/documentation/envers/src/main/docbook/zh-CN/content/query_sql.po new file mode 100644 index 0000000000..fd20bab74e --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/query_sql.po @@ -0,0 +1,1426 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: query_sql.xml:5 +#, no-c-format +msgid "Native SQL" +msgstr "Native SQL查询" + +#. Tag: para +#: query_sql.xml:7 +#, no-c-format +msgid "" +"You may also express queries in the native SQL dialect of your database. " +"This is useful if you want to utilize database specific features such as " +"query hints or the CONNECT keyword in Oracle. It also " +"provides a clean migration path from a direct SQL/JDBC based application to " +"Hibernate." +msgstr "" +"你也可以使用你的数据库的Native SQL语言来查询数据。这对你在要使用数据库的某些" +"特性的时候(比如说在查询提示或者Oracle中的 CONNECT关键字)," +"这是非常有用的。这就能够扫清你把原来直接使用SQL/JDBC 的程序迁移到基于 " +"Hibernate应用的道路上的障碍。" + +#. Tag: para +#: query_sql.xml:13 +#, no-c-format +msgid "" +"Hibernate3 allows you to specify handwritten SQL (including stored " +"procedures) for all create, update, delete, and load operations." +msgstr "" +"Hibernate3允许你使用手写的sql来完成所有的create,update,delete,和load操作(包" +"括存储过程)" + +#. Tag: title +#: query_sql.xml:17 +#, no-c-format +msgid "Using a SQLQuery" +msgstr "使用SQLQuery" + +#. Tag: para +#: query_sql.xml:19 +#, no-c-format +msgid "" +"Execution of native SQL queries is controlled via the SQLQuery interface, which is obtained by calling Session." +"createSQLQuery(). The following describes how to use this API for " +"querying." +msgstr "" +"对原生SQL查询执行的控制是通过SQLQuery接口进行的,通过执行" +"Session.createSQLQuery()获取这个接口。下面来描述如何使用这" +"个API进行查询。" + +#. Tag: title +#: query_sql.xml:25 +#, no-c-format +msgid "Scalar queries" +msgstr "标量查询(Scalar queries)" + +#. Tag: para +#: query_sql.xml:27 +#, no-c-format +msgid "The most basic SQL query is to get a list of scalars (values)." +msgstr "最基本的SQL查询就是获得一个标量(数值)的列表。" + +#. Tag: programlisting +#: query_sql.xml:30 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:32 +#, no-c-format +msgid "" +"These will both return a List of Object arrays (Object[]) with scalar values " +"for each column in the CATS table. Hibernate will use ResultSetMetadata to " +"deduce the actual order and types of the returned scalar values." +msgstr "" +"它们都将返回一个Object数组(Object[])组成的List,数组每个元素都是CATS表的一个" +"字段值。Hibernate会使用ResultSetMetadata来判定返回的标量值的实际顺序和类型。" + +#. Tag: para +#: query_sql.xml:37 +#, no-c-format +msgid "" +"To avoid the overhead of using ResultSetMetadata or " +"simply to be more explicit in what is returned one can use addScalar" +"()." +msgstr "" +"如果要避免过多的使用ResultSetMetadata,或者只是为了更加明确" +"的指名返回值,可以使用addScalar()。" + +#. Tag: programlisting +#: query_sql.xml:41 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:43 query_sql.xml:89 query_sql.xml:170 query_sql.xml:321 +#, fuzzy, no-c-format +msgid "This query specified:" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"这个查询指定了:\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"这个查询指定:\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"这个查询指明:\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"这个查询指定:" + +#. Tag: para +#: query_sql.xml:47 query_sql.xml:93 query_sql.xml:325 +#, no-c-format +msgid "the SQL query string" +msgstr "SQL查询字符串" + +#. Tag: para +#: query_sql.xml:51 +#, no-c-format +msgid "the columns and types to return" +msgstr "要返回的字段和类型" + +#. Tag: para +#: query_sql.xml:55 +#, no-c-format +msgid "" +"This will still return Object arrays, but now it will not use " +"ResultSetMetdata but will instead explicitly get the ID, " +"NAME and BIRTHDATE column as respectively a Long, String and a Short from " +"the underlying resultset. This also means that only these three columns will " +"be returned, even though the query is using * and could " +"return more than the three listed columns." +msgstr "" +"它仍然会返回Object数组,但是此时不再使用ResultSetMetdata,而" +"是明确的将ID,NAME和BIRTHDATE按照Long,String和Short类型从resultset中取出。同" +"时,也指明了就算query是使用*来查询的,可能获得超过列出的这" +"三个字段,也仅仅会返回这三个字段。" + +#. Tag: para +#: query_sql.xml:63 +#, no-c-format +msgid "" +"It is possible to leave out the type information for all or some of the " +"scalars." +msgstr "对全部或者部分的标量值不设置类型信息也是可以的。" + +#. Tag: programlisting +#: query_sql.xml:66 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:68 +#, no-c-format +msgid "" +"This is essentially the same query as before, but now " +"ResultSetMetaData is used to decide the type of NAME and " +"BIRTHDATE where as the type of ID is explicitly specified." +msgstr "" +"基本上这和前面一个查询相同,只是此时使用ResultSetMetaData来" +"决定NAME和BIRTHDATE的类型,而ID的类型是明确指出的。" + +#. Tag: para +#: query_sql.xml:72 +#, no-c-format +msgid "" +"How the java.sql.Types returned from ResultSetMetaData is mapped to " +"Hibernate types is controlled by the Dialect. If a specific type is not " +"mapped or does not result in the expected type it is possible to customize " +"it via calls to registerHibernateType in the Dialect." +msgstr "" +"关于从ResultSetMetaData返回的java.sql.Types是如何映射到Hibernate类型,是由方" +"言(Dialect)控制的。假若某个指定的类型没有被映射,或者不是你所预期的类型,你可" +"以通过Dialet的registerHibernateType调用自行定义。" + +#. Tag: title +#: query_sql.xml:80 +#, no-c-format +msgid "Entity queries" +msgstr "实体查询(Entity queries)" + +#. Tag: para +#: query_sql.xml:82 +#, no-c-format +msgid "" +"The above queries were all about returning scalar values, basically " +"returning the \"raw\" values from the resultset. The following shows how to " +"get entity objects from a native sql query via addEntity()." +msgstr "" +"上面的查询都是返回标量值的,也就是从resultset中返回的“裸”数据。下面展示如何通" +"过addEntity()让原生查询返回实体对象。" + +#. Tag: programlisting +#: query_sql.xml:87 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:97 +#, no-c-format +msgid "the entity returned by the query" +msgstr "要返回的实体" + +#. Tag: para +#: query_sql.xml:101 +#, no-c-format +msgid "" +"Assuming that Cat is mapped as a class with the columns ID, NAME and " +"BIRTHDATE the above queries will both return a List where each element is a " +"Cat entity." +msgstr "" +"假设Cat被映射为拥有ID,NAME和BIRTHDATE三个字段的类,以上的两个查询都返回一个" +"List,每个元素都是一个Cat实体。" + +#. Tag: para +#: query_sql.xml:105 +#, no-c-format +msgid "" +"If the entity is mapped with a many-to-one to another " +"entity it is required to also return this when performing the native query, " +"otherwise a database specific \"column not found\" error will occur. The " +"additional columns will automatically be returned when using the * notation, " +"but we prefer to be explicit as in the following example for a many-" +"to-one to a Dog:" +msgstr "" +"假若实体在映射时有一个many-to-one的关联指向另外一个实体," +"在查询时必须也返回那个实体,否则会导致发生一个\"column not found\"的数据库错" +"误。这些附加的字段可以使用*标注来自动返回,但我们希望还是明确指明,看下面这个" +"具有指向Dogmany-to-one的例子:" + +#. Tag: programlisting +#: query_sql.xml:113 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:115 +#, no-c-format +msgid "This will allow cat.getDog() to function properly." +msgstr "这样cat.getDog()就能正常运作。" + +#. Tag: title +#: query_sql.xml:119 +#, no-c-format +msgid "Handling associations and collections" +msgstr "处理关联和集合类(Handling associations and collections)" + +#. Tag: para +#: query_sql.xml:121 +#, no-c-format +msgid "" +"It is possible to eagerly join in the Dog to avoid the " +"possible extra roundtrip for initializing the proxy. This is done via the " +"addJoin() method, which allows you to join in an " +"association or collection." +msgstr "" +"通过提前抓取将Dog连接获得,而避免初始化proxy带来的额外开销" +"也是可能的。这是通过addJoin()方法进行的,这个方法可以让你" +"将关联或集合连接进来。" + +#. Tag: programlisting +#: query_sql.xml:126 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:128 +#, no-c-format +msgid "" +"In this example the returned Cat's will have their " +"dog property fully initialized without any extra " +"roundtrip to the database. Notice that we added a alias name (\"cat\") to be " +"able to specify the target property path of the join. It is possible to do " +"the same eager joining for collections, e.g. if the Cat " +"had a one-to-many to Dog instead." +msgstr "" +"上面这个例子中,返回的Cat对象,其dog属" +"性被完全初始化了,不再需要数据库的额外操作。注意,我们加了一个别名(\"cat\")," +"以便指明join的目标属性路径。通过同样的提前连接也可以作用于集合类,例如,假若" +"Cat有一个指向Dog的一对多关联。" + +#. Tag: programlisting +#: query_sql.xml:136 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: p +#: query_sql.xml:138 +#, no-c-format +msgid "" +"At this stage we are reaching the limits of what is possible with native " +"queries without starting to enhance the sql queries to make them usable in " +"Hibernate; the problems starts to arise when returning multiple entities of " +"the same type or when the default alias/column names are not enough." +msgstr "" +"到此为止,我们碰到了天花板:若不对SQL查询进行增强,这些已经是在Hibernate中使" +"用原生SQL查询所能做到的最大可能了。下面的问题即将出现:返回多个同样类型的实体" +"怎么办?或者默认的别名/字段不够又怎么办?" + +#. Tag: title +#: query_sql.xml:146 +#, no-c-format +msgid "Returning multiple entities" +msgstr "返回多个实体(Returning multiple entities)" + +#. Tag: para +#: query_sql.xml:148 +#, no-c-format +msgid "" +"Until now the result set column names are assumed to be the same as the " +"column names specified in the mapping document. This can be problematic for " +"SQL queries which join multiple tables, since the same column names may " +"appear in more than one table." +msgstr "" +"到目前为止,结果集字段名被假定为和映射文件中指定的的字段名是一致的。假若SQL查" +"询连接了多个表,同一个字段名可能在多个表中出现多次,这就会造成问题。" + +#. Tag: para +#: query_sql.xml:153 +#, no-c-format +msgid "" +"Column alias injection is needed in the following query (which most likely " +"will fail):" +msgstr "下面的查询中需要使用字段别名注射(这个例子本身会失败):" + +#. Tag: programlisting +#: query_sql.xml:156 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:158 +#, no-c-format +msgid "" +"The intention for this query is to return two Cat instances per row, a cat " +"and its mother. This will fail since there is a conflict of names since they " +"are mapped to the same column names and on some databases the returned " +"column aliases will most likely be on the form \"c.ID\", \"c.NAME\", etc. " +"which are not equal to the columns specificed in the mappings (\"ID\" and " +"\"NAME\")." +msgstr "" +"这个查询的本意是希望每行返回两个Cat实例,一个是cat,另一个是它的妈妈。但是因为" +"它们的字段名被映射为相同的,而且在某些数据库中,返回的字段别名是“c.ID”,\"c." +"NAME\"这样的形式,而它们和在映射文件中的名字(\"ID\"和\"NAME\")不匹配,这就" +"会造成失败。" + +#. Tag: para +#: query_sql.xml:165 +#, no-c-format +msgid "The following form is not vulnerable to column name duplication:" +msgstr "下面的形式可以解决字段名重复:" + +#. Tag: programlisting +#: query_sql.xml:168 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:174 +#, no-c-format +msgid "" +"the SQL query string, with placeholders for Hibernate to inject column " +"aliases" +msgstr "SQL查询语句,其中包含占位附来让Hibernate注射字段别名" + +#. Tag: para +#: query_sql.xml:179 +#, no-c-format +msgid "the entities returned by the query" +msgstr "查询返回的实体" + +#. Tag: para +#: query_sql.xml:183 +#, no-c-format +msgid "" +"The {cat.*} and {mother.*} notation used above is a shorthand for \"all " +"properties\". Alternatively, you may list the columns explicity, but even in " +"this case we let Hibernate inject the SQL column aliases for each property. " +"The placeholder for a column alias is just the property name qualified by " +"the table alias. In the following example, we retrieve Cats and their " +"mothers from a different table (cat_log) to the one declared in the mapping " +"metadata. Notice that we may even use the property aliases in the where " +"clause if we like." +msgstr "" +"上面使用的{cat.*}和{mother.*}标记是作为“所有属性”的简写形式出现的。当然你也可" +"以明确地罗列出字段名,但在这个例子里面我们让Hibernate来为每个属性注射SQL字段" +"别名。字段别名的占位符是属性名加上表别名的前缀。在下面的例子中,我们从另外一" +"个表(cat_log)中通过映射元数据中的指定获取Cat和它的妈妈。注意,要是我们愿" +"意,我们甚至可以在where子句中使用属性别名。" + +#. Tag: programlisting +#: query_sql.xml:192 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:195 +#, no-c-format +msgid "Alias and property references" +msgstr "别名和属性引用(Alias and property references)" + +#. Tag: para +#: query_sql.xml:197 +#, no-c-format +msgid "" +"For most cases the above alias injection is needed, but for queries relating " +"to more complex mappings like composite properties, inheritance " +"discriminators, collections etc. there are some specific aliases to use to " +"allow Hibernate to inject the proper aliases." +msgstr "" +"大多数情况下,都需要上面的属性注射,但在使用更加复杂的映射,比如复合属性、通" +"过标识符构造继承树,以及集合类等等情况下,也有一些特别的别名,来允许Hibernate" +"注射合适的别名。" + +#. Tag: para +#: query_sql.xml:202 +#, no-c-format +msgid "" +"The following table shows the different possibilities of using the alias " +"injection. Note: the alias names in the result are examples, each alias will " +"have a unique and probably different name when used." +msgstr "" +"下表列出了使用别名注射参数的不同可能性。注意:下面结果中的别名只是示例,实用" +"时每个别名需要唯一并且不同的名字。" + +#. Tag: title +#: query_sql.xml:208 +#, no-c-format +msgid "Alias injection names" +msgstr "别名注射(alias injection names)" + +#. Tag: entry +#: query_sql.xml:219 +#, no-c-format +msgid "Description" +msgstr "描述" + +#. Tag: entry +#: query_sql.xml:221 +#, no-c-format +msgid "Syntax" +msgstr "语法" + +#. Tag: entry +#: query_sql.xml:223 +#, no-c-format +msgid "Example" +msgstr "示例" + +#. Tag: entry +#: query_sql.xml:229 +#, no-c-format +msgid "A simple property" +msgstr "简单属性" + +#. Tag: literal +#: query_sql.xml:231 +#, no-c-format +msgid "{[aliasname].[propertyname]" +msgstr "{[aliasname].[propertyname]" + +#. Tag: literal +#: query_sql.xml:233 +#, no-c-format +msgid "A_NAME as {item.name}" +msgstr "A_NAME as {item.name}" + +#. Tag: entry +#: query_sql.xml:237 +#, no-c-format +msgid "A composite property" +msgstr "复合属性" + +#. Tag: literal +#: query_sql.xml:239 +#, no-c-format +msgid "{[aliasname].[componentname].[propertyname]}" +msgstr "{[aliasname].[componentname].[propertyname]}" + +#. Tag: literal +#: query_sql.xml:241 +#, no-c-format +msgid "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" +msgstr "CURRENCY as {item.amount.currency}, VALUE as {item.amount.value}" + +#. Tag: entry +#: query_sql.xml:246 +#, no-c-format +msgid "Discriminator of an entity" +msgstr "实体辨别器(Discriminator of an entity)" + +#. Tag: literal +#: query_sql.xml:248 +#, no-c-format +msgid "{[aliasname].class}" +msgstr "{[aliasname].class}" + +#. Tag: literal +#: query_sql.xml:250 +#, no-c-format +msgid "DISC as {item.class}" +msgstr "DISC as {item.class}" + +#. Tag: entry +#: query_sql.xml:254 +#, no-c-format +msgid "All properties of an entity" +msgstr "实体的所有属性" + +#. Tag: literal +#: query_sql.xml:256 query_sql.xml:304 +#, no-c-format +msgid "{[aliasname].*}" +msgstr "{[aliasname].*}" + +#. Tag: literal +#: query_sql.xml:258 +#, no-c-format +msgid "{item.*}" +msgstr "{item.*}" + +#. Tag: entry +#: query_sql.xml:262 +#, no-c-format +msgid "A collection key" +msgstr "集合键(collection key)" + +#. Tag: literal +#: query_sql.xml:264 +#, no-c-format +msgid "{[aliasname].key}" +msgstr "{[aliasname].key}" + +#. Tag: literal +#: query_sql.xml:266 +#, no-c-format +msgid "ORGID as {coll.key}" +msgstr "ORGID as {coll.key}" + +#. Tag: entry +#: query_sql.xml:270 +#, no-c-format +msgid "The id of an collection" +msgstr "集合id" + +#. Tag: literal +#: query_sql.xml:272 +#, no-c-format +msgid "{[aliasname].id}" +msgstr "{[aliasname].id}" + +#. Tag: literal +#: query_sql.xml:274 +#, no-c-format +msgid "EMPID as {coll.id}" +msgstr "EMPID as {coll.id}" + +#. Tag: entry +#: query_sql.xml:278 +#, no-c-format +msgid "The element of an collection" +msgstr "集合元素" + +#. Tag: literal +#: query_sql.xml:280 +#, no-c-format +msgid "{[aliasname].element}" +msgstr "{[aliasname].element}" + +#. Tag: literal +#: query_sql.xml:282 +#, no-c-format +msgid "XID as {coll.element}" +msgstr "XID as {coll.element}" + +#. Tag: entry +#: query_sql.xml:286 +#, no-c-format +msgid "roperty of the element in the collection" +msgstr "集合元素的属性" + +#. Tag: literal +#: query_sql.xml:288 +#, no-c-format +msgid "{[aliasname].element.[propertyname]}" +msgstr "{[aliasname].element.[propertyname]}" + +#. Tag: literal +#: query_sql.xml:290 +#, no-c-format +msgid "NAME as {coll.element.name}" +msgstr "NAME as {coll.element.name}" + +#. Tag: entry +#: query_sql.xml:294 +#, no-c-format +msgid "All properties of the element in the collection" +msgstr "集合元素的所有属性" + +#. Tag: literal +#: query_sql.xml:296 +#, no-c-format +msgid "{[aliasname].element.*}" +msgstr "{[aliasname].element.*}" + +#. Tag: literal +#: query_sql.xml:298 +#, no-c-format +msgid "{coll.element.*}" +msgstr "{coll.element.*}" + +#. Tag: entry +#: query_sql.xml:302 +#, no-c-format +msgid "All properties of the the collection" +msgstr "集合的所有属性" + +#. Tag: literal +#: query_sql.xml:306 +#, no-c-format +msgid "{coll.*}" +msgstr "{coll.*}" + +#. Tag: title +#: query_sql.xml:315 +#, no-c-format +msgid "Returning non-managed entities" +msgstr "返回非受管实体(Returning non-managed entities)" + +#. Tag: para +#: query_sql.xml:317 +#, no-c-format +msgid "" +"It is possible to apply a ResultTransformer to native sql queries. Allowing " +"it to e.g. return non-managed entities." +msgstr "" +"可以对原生sql 查询使用ResultTransformer。这会返回不受Hibernate管理的实体。" + +#. Tag: programlisting +#: query_sql.xml:319 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:329 +#, no-c-format +msgid "a result transformer" +msgstr "结果转换器(result transformer)" + +#. Tag: para +#: query_sql.xml:333 +#, no-c-format +msgid "" +"The above query will return a list of CatDTO which has " +"been instantiated and injected the values of NAME and BIRTHNAME into its " +"corresponding properties or fields." +msgstr "" +"上面的查询将会返回CatDTO的列表,它将被实例化并且将NAME和" +"BIRTHDAY的值注射入对应的属性或者字段。" + +#. Tag: title +#: query_sql.xml:340 +#, no-c-format +msgid "Handling inheritance" +msgstr "处理继承(Handling inheritance)" + +#. Tag: para +#: query_sql.xml:342 +#, no-c-format +msgid "" +"Native sql queries which query for entities that is mapped as part of an " +"inheritance must include all properties for the baseclass and all it " +"subclasses." +msgstr "" +"原生SQL查询假若其查询结果实体是继承树中的一部分,它必须包含基类和所有子类的所" +"有属性。" + +#. Tag: title +#: query_sql.xml:348 +#, no-c-format +msgid "Parameters" +msgstr "参数(Parameters)" + +#. Tag: para +#: query_sql.xml:350 +#, no-c-format +msgid "Native sql queries support positional as well as named parameters:" +msgstr "原生查询支持位置参数和命名参数:" + +#. Tag: programlisting +#: query_sql.xml:353 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:361 +#, no-c-format +msgid "Named SQL queries" +msgstr "命名SQL查询" + +#. Tag: para +#: query_sql.xml:363 +#, no-c-format +msgid "" +"Named SQL queries may be defined in the mapping document and called in " +"exactly the same way as a named HQL query. In this case, we do " +"not need to call addEntity()." +msgstr "" +"可以在映射文档中定义查询的名字,然后就可以象调用一个命名的HQL查询一样直接调用" +"命名SQL查询.在这种情况下,我们 需要调用" +"addEntity()方法." + +#. Tag: programlisting +#: query_sql.xml:368 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex}\n" +" FROM PERSON person\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:370 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:372 +#, no-c-format +msgid "" +"The <return-join> and <load-" +"collection> elements are used to join associations and define " +"queries which initialize collections, respectively." +msgstr "" +"<return-join><load-collection> 元素是用来连接关联以及将查询定义为预先初始化各个集合的。" + +#. Tag: programlisting +#: query_sql.xml:377 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:379 +#, no-c-format +msgid "" +"A named SQL query may return a scalar value. You must declare the column " +"alias and Hibernate type using the <return-scalar> " +"element:" +msgstr "" +"一个命名查询可能会返回一个标量值.你必须使用<return-scalar>元素来指定字段的别名和 Hibernate类型" + +#. Tag: programlisting +#: query_sql.xml:383 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT p.NAME AS name,\n" +" p.AGE AS age,\n" +" FROM PERSON p WHERE p.NAME LIKE 'Hiber%'\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:385 +#, no-c-format +msgid "" +"You can externalize the resultset mapping informations in a <" +"resultset> element to either reuse them accross several named " +"queries or through the setResultSetMapping() API." +msgstr "" +"你可以把结果集映射的信息放在外部的<resultset>元素" +"中,这样就可以在多个命名查询间,或者通过setResultSetMapping()API来访问。(此处原文即存疑。原文为:You can externalize the " +"resultset mapping informations in a <resultset> " +"element to either reuse them accross several named queries or through the " +"setResultSetMapping() API.)" + +#. Tag: programlisting +#: query_sql.xml:390 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"\n" +"\n" +"\n" +" SELECT person.NAME AS {person.name},\n" +" person.AGE AS {person.age},\n" +" person.SEX AS {person.sex},\n" +" address.STREET AS {address.street},\n" +" address.CITY AS {address.city},\n" +" address.STATE AS {address.state},\n" +" address.ZIP AS {address.zip}\n" +" FROM PERSON person\n" +" JOIN ADDRESS address\n" +" ON person.ID = address.PERSON_ID AND address.TYPE='MAILING'\n" +" WHERE person.NAME LIKE :namePattern\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:392 +#, no-c-format +msgid "" +"You can alternatively use the resultset mapping information in your hbm " +"files directly in java code." +msgstr "另外,你可以在java代码中直接使用hbm文件中的结果集定义信息。" + +#. Tag: programlisting +#: query_sql.xml:395 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:398 +#, no-c-format +msgid "Using return-property to explicitly specify column/alias names" +msgstr "使用return-property来明确地指定字段/别名" + +#. Tag: para +#: query_sql.xml:401 +#, no-c-format +msgid "" +"With <return-property> you can explicitly tell " +"Hibernate what column aliases to use, instead of using the {}-syntax to let Hibernate inject its own aliases." +msgstr "" +"使用<return-property>你可以明确的告诉Hibernate使用哪" +"些字段别名,这取代了使用{}-语法 来让Hibernate注入它自己的别" +"名." + +#. Tag: programlisting +#: query_sql.xml:406 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT person.NAME AS myName,\n" +" person.AGE AS myAge,\n" +" person.SEX AS mySex,\n" +" FROM PERSON person WHERE person.NAME LIKE :name\n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:408 +#, no-c-format +msgid "" +"<return-property> also works with multiple columns. " +"This solves a limitation with the {}-syntax which can not " +"allow fine grained control of multi-column properties." +msgstr "" +"<return-property>也可用于多个字段,它解决了使用" +"{}-语法不能细粒度控制多个字段的限制" + +#. Tag: programlisting +#: query_sql.xml:413 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" SELECT EMPLOYEE AS {emp.employee}, EMPLOYER AS {emp.employer},\n" +" STARTDATE AS {emp.startDate}, ENDDATE AS {emp.endDate},\n" +" REGIONCODE as {emp.regionCode}, EID AS {emp.id}, VALUE, CURRENCY\n" +" FROM EMPLOYMENT\n" +" WHERE EMPLOYER = :id AND ENDDATE IS NULL\n" +" ORDER BY STARTDATE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:415 +#, no-c-format +msgid "" +"Notice that in this example we used <return-property> in combination with the {}-syntax for injection. " +"Allowing users to choose how they want to refer column and properties." +msgstr "" +"注意在这个例子中,我们使用了<return-property>结合" +"{}的注入语法. 允许用户来选择如何引用字段以及属性." + +#. Tag: para +#: query_sql.xml:420 +#, no-c-format +msgid "" +"If your mapping has a discriminator you must use <return-" +"discriminator> to specify the discriminator column." +msgstr "" +"如果你映射一个识别器(discriminator),你必须使用<return-" +"discriminator> 来指定识别器字段" + +#. Tag: title +#: query_sql.xml:426 +#, no-c-format +msgid "Using stored procedures for querying" +msgstr "使用存储过程来查询" + +#. Tag: para +#: query_sql.xml:428 +#, no-c-format +msgid "" +"Hibernate 3 introduces support for queries via stored procedures and " +"functions. Most of the following documentation is equivalent for both. The " +"stored procedure/function must return a resultset as the first out-parameter " +"to be able to work with Hibernate. An example of such a stored function in " +"Oracle 9 and higher is as follows:" +msgstr "" +"Hibernate 3引入了对存储过程查询(stored procedure)和函数(function)的支持.以下" +"的说明中,这二者一般都适用。 存储过程/函数必须返回一个结果集,作为Hibernate能" +"够使用的第一个外部参数. 下面是一个Oracle9和更高版本的存储过程例子." + +#. Tag: programlisting +#: query_sql.xml:434 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: query_sql.xml:436 +#, no-c-format +msgid "To use this query in Hibernate you need to map it via a named query." +msgstr "在Hibernate里要要使用这个查询,你需要通过命名查询来映射它." + +#. Tag: programlisting +#: query_sql.xml:439 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" { ? = call selectAllEmployments() }\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:441 +#, no-c-format +msgid "" +"Notice stored procedures currently only return scalars and entities. " +"<return-join> and <load-collection> are not supported." +msgstr "" +"注意存储过程当前仅仅返回标量和实体.现在不支持<return-join><load-collection>" + +#. Tag: title +#: query_sql.xml:446 +#, no-c-format +msgid "Rules/limitations for using stored procedures" +msgstr "使用存储过程的规则和限制" + +#. Tag: para +#: query_sql.xml:448 +#, no-c-format +msgid "" +"To use stored procedures with Hibernate the procedures/functions have to " +"follow some rules. If they do not follow those rules they are not usable " +"with Hibernate. If you still want to use these procedures you have to " +"execute them via session.connection(). The rules are " +"different for each database, since database vendors have different stored " +"procedure semantics/syntax." +msgstr "" +"为了在Hibernate中使用存储过程,你必须遵循一些规则.不遵循这些规则的存储过程将不" +"可用.如果你仍然想要使用他们, 你必须通过session.connection()来执行他们.这些规则针对于不同的数据库.因为数据库 提供商有各种不同的存" +"储过程语法和语义." + +#. Tag: para +#: query_sql.xml:455 +#, no-c-format +msgid "" +"Stored procedure queries can't be paged with setFirstResult()/" +"setMaxResults()." +msgstr "" +"对存储过程进行的查询无法使用setFirstResult()/setMaxResults()进行分页。" + +#. Tag: para +#: query_sql.xml:458 +#, no-c-format +msgid "" +"Recommended call form is standard SQL92: { ? = call functionName" +"(<parameters>) } or { ? = call procedureName(<" +"parameters>}. Native call syntax is not supported." +msgstr "" +"建议采用的调用方式是标准SQL92: { ? = call functionName(<" +"parameters>) } 或者 { ? = call procedureName(<" +"parameters>}.原生调用语法不被支持。" + +#. Tag: para +#: query_sql.xml:463 +#, no-c-format +msgid "For Oracle the following rules apply:" +msgstr "对于Oracle有如下规则:" + +#. Tag: para +#: query_sql.xml:467 +#, no-c-format +msgid "" +"A function must return a result set. The first parameter of a procedure must " +"be an OUT that returns a result set. This is done by " +"using a SYS_REFCURSOR type in Oracle 9 or 10. In Oracle " +"you need to define a REF CURSOR type, see Oracle " +"literature." +msgstr "" +"函数必须返回一个结果集。存储过程的第一个参数必须是OUT,它" +"返回一个结果集。这是通过Oracle 9或10的SYS_REFCURSOR类型来" +"完成的。在Oracle中你需要定义一个REF CURSOR类型,参见Oracle" +"的手册。" + +#. Tag: para +#: query_sql.xml:476 +#, no-c-format +msgid "For Sybase or MS SQL server the following rules apply:" +msgstr "对于Sybase或者MS SQL server有如下规则:" + +#. Tag: para +#: query_sql.xml:480 +#, no-c-format +msgid "" +"The procedure must return a result set. Note that since these servers can/" +"will return multiple result sets and update counts, Hibernate will iterate " +"the results and take the first result that is a result set as its return " +"value. Everything else will be discarded." +msgstr "" +"存储过程必须返回一个结果集。.注意这些servers可能返回多个结果集以及更新的数目." +"Hibernate将取出第一条结果集作为它的返回值, 其他将被丢弃。" + +#. Tag: para +#: query_sql.xml:488 +#, no-c-format +msgid "" +"If you can enable SET NOCOUNT ON in your procedure it " +"will probably be more efficient, but this is not a requirement." +msgstr "" +"如果你能够在存储过程里设定SET NOCOUNT ON,这可能会效率更" +"高,但这不是必需的。" + +#. Tag: title +#: query_sql.xml:498 +#, no-c-format +msgid "Custom SQL for create, update and delete" +msgstr "定制SQL用来create,update和delete" + +#. Tag: para +#: query_sql.xml:500 +#, no-c-format +msgid "" +"Hibernate3 can use custom SQL statements for create, update, and delete " +"operations. The class and collection persisters in Hibernate already contain " +"a set of configuration time generated strings (insertsql, deletesql, " +"updatesql etc.). The mapping tags <sql-insert>, " +"<sql-delete>, and <sql-update> override these strings:" +msgstr "" +"Hibernate3能够使用定制的SQL语句来执行create,update和delete操作。在Hibernate" +"中,持久化的类和集合已经 包含了一套配置期产生的语句(insertsql, deletesql, " +"updatesql等等),这些映射标记 <sql-insert>, " +"<sql-delete>, and <sql-update>重载了 这些语句。" + +#. Tag: programlisting +#: query_sql.xml:508 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" INSERT INTO PERSON (NAME, ID) VALUES ( UPPER(?), ? )\n" +" UPDATE PERSON SET NAME=UPPER(?) WHERE ID=?\n" +" DELETE FROM PERSON WHERE ID=?\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:510 +#, no-c-format +msgid "" +"The SQL is directly executed in your database, so you are free to use any " +"dialect you like. This will of course reduce the portability of your mapping " +"if you use database specific SQL." +msgstr "" +"这些SQL直接在你的数据库里执行,所以你可以自由的使用你喜欢的任意语法。但如果你" +"使用数据库特定的语法, 这当然会降低你映射的可移植性。" + +#. Tag: para +#: query_sql.xml:514 +#, no-c-format +msgid "" +"Stored procedures are supported if the callable attribute " +"is set:" +msgstr "如果设定callable,则能够支持存储过程了。" + +#. Tag: programlisting +#: query_sql.xml:517 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" {call createPerson (?, ?)}\n" +" {? = call deletePerson (?)}\n" +" {? = call updatePerson (?, ?)}\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:519 +#, no-c-format +msgid "" +"The order of the positional parameters are currently vital, as they must be " +"in the same sequence as Hibernate expects them." +msgstr "参数的位置顺序是非常重要的,他们必须和Hibernate所期待的顺序相同。" + +#. Tag: para +#: query_sql.xml:522 +#, no-c-format +msgid "" +"You can see the expected order by enabling debug logging for the " +"org.hibernate.persister.entity level. With this level " +"enabled Hibernate will print out the static SQL that is used to create, " +"update, delete etc. entities. (To see the expected sequence, remember to not " +"include your custom SQL in the mapping files as that will override the " +"Hibernate generated static sql.)" +msgstr "" +"你能够通过设定日志调试级别为org.hiberante.persister.entity,来查看Hibernate所期待的顺序。在这个级别下, Hibernate将会打印出" +"create,update和delete实体的静态SQL。(如果想看到预计的顺序。记得不要将定制SQL" +"包含在映射文件里, 因为他们会重载Hibernate生成的静态SQL。)" + +#. Tag: para +#: query_sql.xml:529 +#, no-c-format +msgid "" +"The stored procedures are in most cases (read: better do it than not) " +"required to return the number of rows inserted/updated/deleted, as Hibernate " +"has some runtime checks for the success of the statement. Hibernate always " +"registers the first statement parameter as a numeric output parameter for " +"the CUD operations:" +msgstr "" +"在大多数情况下(最好这么做),存储过程需要返回插入/更新/删除的行数,因为" +"Hibernate对语句的成功执行有些运行时的检查。 Hibernate常会把进行CUD操作的语句" +"的第一个参数注册为一个数值型输出参数。" + +#. Tag: programlisting +#: query_sql.xml:535 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: query_sql.xml:539 +#, no-c-format +msgid "Custom SQL for loading" +msgstr "定制装载SQL" + +#. Tag: para +#: query_sql.xml:541 +#, no-c-format +msgid "You may also declare your own SQL (or HQL) queries for entity loading:" +msgstr "你可能需要声明你自己的SQL(或HQL)来装载实体" + +#. Tag: programlisting +#: query_sql.xml:544 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT NAME AS {pers.name}, ID AS {pers.id}\n" +" FROM PERSON\n" +" WHERE ID=?\n" +" FOR UPDATE\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:546 +#, no-c-format +msgid "" +"This is just a named query declaration, as discussed earlier. You may " +"reference this named query in a class mapping:" +msgstr "这只是一个前面讨论过的命名查询声明,你可以在类映射里引用这个命名查询。" + +#. Tag: programlisting +#: query_sql.xml:549 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:551 +#, no-c-format +msgid "This even works with stored procedures." +msgstr "这也可以用于存储过程" + +#. Tag: para +#: query_sql.xml:553 +#, no-c-format +msgid "You may even define a query for collection loading:" +msgstr "你甚至可以定一个用于集合装载的查询:" + +#. Tag: programlisting +#: query_sql.xml:555 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: query_sql.xml:557 +#, no-c-format +msgid "" +"\n" +" \n" +" SELECT {emp.*}\n" +" FROM EMPLOYMENT emp\n" +" WHERE EMPLOYER = :id\n" +" ORDER BY STARTDATE ASC, EMPLOYEE ASC\n" +"]]>" +msgstr "" + +#. Tag: para +#: query_sql.xml:559 +#, no-c-format +msgid "" +"You could even define an entity loader that loads a collection by join " +"fetching:" +msgstr "你甚至还可以定义一个实体装载器,它通过连接抓取装载一个集合:" + +#. Tag: programlisting +#: query_sql.xml:562 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" SELECT NAME AS {pers.*}, {emp.*}\n" +" FROM PERSON pers\n" +" LEFT OUTER JOIN EMPLOYMENT emp\n" +" ON pers.ID = emp.PERSON_ID\n" +" WHERE ID=?\n" +"]]>" +msgstr "" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/quickstart.po b/documentation/envers/src/main/docbook/zh-CN/content/quickstart.po new file mode 100644 index 0000000000..cd14d33057 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/quickstart.po @@ -0,0 +1,12 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" + diff --git a/documentation/envers/src/main/docbook/zh-CN/content/session_api.po b/documentation/envers/src/main/docbook/zh-CN/content/session_api.po new file mode 100644 index 0000000000..703b1db83e --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/session_api.po @@ -0,0 +1,2127 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: session_api.xml:29 +#, no-c-format +msgid "Working with objects" +msgstr "与对象共事" + +#. Tag: para +#: session_api.xml:31 +#, no-c-format +msgid "" +"Hibernate is a full object/relational mapping solution that not only shields " +"the developer from the details of the underlying database management system, " +"but also offers state management of objects. This is, " +"contrary to the management of SQL statements in common " +"JDBC/SQL persistence layers, a very natural object-oriented view of " +"persistence in Java applications." +msgstr "" +"Hibernate是完整的对象/关系映射解决方案,它提供了对象状态管理(state " +"management)的功能,使开发者不再需要理会底层数据库系统的细节。 也就" +"是说,相对于常见的JDBC/SQL持久层方案中需要管理SQL语句," +"Hibernate采用了更自然的面向对象的视角来持久化Java应用中的数据。" + +#. Tag: para +#: session_api.xml:40 +#, no-c-format +msgid "" +"In other words, Hibernate application developers should always think about " +"the state of their objects, and not necessarily about " +"the execution of SQL statements. This part is taken care of by Hibernate and " +"is only relevant for the application developer when tuning the performance " +"of the system." +msgstr "" +"换句话说,使用Hibernate的开发者应该总是关注对象的状态(state),不必考虑SQL语句的执行。 这部分细节已经由Hibernate掌管妥当,只有开" +"发者在进行系统性能调优的时候才需要进行了解。" + +#. Tag: title +#: session_api.xml:48 +#, no-c-format +msgid "Hibernate object states" +msgstr "Hibernate对象状态(object states)" + +#. Tag: para +#: session_api.xml:50 +#, no-c-format +msgid "Hibernate defines and supports the following object states:" +msgstr "Hibernate定义并支持下列对象状态(state):" + +#. Tag: para +#: session_api.xml:56 +#, no-c-format +msgid "" +"Transient - an object is transient if it has just been " +"instantiated using the new operator, and it is not " +"associated with a Hibernate Session. It has no persistent " +"representation in the database and no identifier value has been assigned. " +"Transient instances will be destroyed by the garbage collector if the " +"application doesn't hold a reference anymore. Use the Hibernate " +"Session to make an object persistent (and let Hibernate " +"take care of the SQL statements that need to be executed for this " +"transition)." +msgstr "" +"瞬时(Transient) - 由new操作符创建,且" +"尚未与Hibernate Session 关联的对象被认定为瞬时(Transient)" +"的。瞬时(Transient)对象不会被持久化到数据库中,也不会被赋予持久化标识" +"(identifier)。 如果瞬时(Transient)对象在程序中没有被引用,它会被垃圾回收器" +"(garbage collector)销毁。 使用Hibernate Session可以将其变" +"为持久(Persistent)状态。(Hibernate会自动执行必要的SQL语句)" + +#. Tag: para +#: session_api.xml:68 +#, no-c-format +msgid "" +"Persistent - a persistent instance has a representation " +"in the database and an identifier value. It might just have been saved or " +"loaded, however, it is by definition in the scope of a Session. Hibernate will detect any changes made to an object in persistent " +"state and synchronize the state with the database when the unit of work " +"completes. Developers don't execute manual UPDATE " +"statements, or DELETE statements when an object should be " +"made transient." +msgstr "" +"持久(Persistent) - 持久(Persistent)的实例在数据库中有对" +"应的记录,并拥有一个持久化标识(identifier)。 持久(Persistent)的实例可能是刚被" +"保存的,或刚被加载的,无论哪一种,按定义,它存在于相关联的Session作用范围内。 Hibernate会检测到处于持久(Persistent)状态的对象的任何改" +"动,在当前操作单元(unit of work)执行完毕时将对象数据(state)与数据库同步" +"(synchronize)。 开发者不需要手动执行UPDATE。将对象从持久" +"(Persistent)状态变成瞬时(Transient)状态同样也不需要手动执行DELETE语句。" + +#. Tag: para +#: session_api.xml:79 +#, no-c-format +msgid "" +"Detached - a detached instance is an object that has " +"been persistent, but its Session has been closed. The " +"reference to the object is still valid, of course, and the detached instance " +"might even be modified in this state. A detached instance can be reattached " +"to a new Session at a later point in time, making it (and " +"all the modifications) persistent again. This feature enables a programming " +"model for long running units of work that require user think-time. We call " +"them application transactions, i.e. a unit of work from " +"the point of view of the user." +msgstr "" +"脱管(Detached) - 与持久(Persistent)对象关联的" +"Session被关闭后,对象就变为脱管(Detached)的。 对脱管" +"(Detached)对象的引用依然有效,对象可继续被修改。脱管(Detached)对象如果重新关" +"联到某个新的Session上, 会再次转变为持久(Persistent)的(在" +"Detached其间的改动将被持久化到数据库)。 这个功能使得一种编程模型,即中间会给" +"用户思考时间(user think-time)的长时间运行的操作单元(unit of work)的编程模型成" +"为可能。 我们称之为应用程序事务,即从用户观点看是一个操" +"作单元(unit of work)。" + +#. Tag: para +#: session_api.xml:93 +#, no-c-format +msgid "" +"We'll now discuss the states and state transitions (and the Hibernate " +"methods that trigger a transition) in more detail." +msgstr "" +"接下来我们来细致的讨论下状态(states)及状态间的转换(state transitions)(以及触" +"发状态转换的Hibernate方法)。" + +#. Tag: title +#: session_api.xml:101 +#, no-c-format +msgid "Making objects persistent" +msgstr "使对象持久化" + +#. Tag: para +#: session_api.xml:103 +#, no-c-format +msgid "" +"Newly instantiated instances of a a persistent class are considered " +"transient by Hibernate. We can make a transient " +"instance persistent by associating it with a session:" +msgstr "" +"Hibernate认为持久化类(persistent class)新实例化的对象是瞬时" +"(Transient)的。 我们可通过将瞬时(Transient)对象与session关联而把它" +"变为持久(Persistent)的。" + +#. Tag: programlisting +#: session_api.xml:110 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:112 +#, no-c-format +msgid "" +"If Cat has a generated identifier, the identifier is " +"generated and assigned to the cat when save() is called. If Cat has an assigned identifier, or a composite key, the identifier should be assigned " +"to the cat instance before calling save(). You may also use persist() instead of " +"save(), with the semantics defined in the EJB3 early " +"draft." +msgstr "" +"如果Cat的持久化标识(identifier)是generated类型的, 那么该标识(identifier)会自动在save()被调" +"用时产生并分配给cat。 如果Cat的持久化标" +"识(identifier)是assigned类型的,或是一个复合主键" +"(composite key), 那么该标识(identifier)应当在调用save()之" +"前手动赋予给cat。 你也可以按照EJB3 early draft中定义的语" +"义,使用persist()替代save()。" + +#. Tag: para +#: session_api.xml:124 +#, no-c-format +msgid "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." +msgstr "" +"persist() makes a transient instance persistent. However, " +"it doesn't guarantee that the identifier value will be assigned to the " +"persistent instance immediately, the assignment might happen at flush time. " +"persist() also guarantees that it will not execute an " +"INSERT statement if it is called outside of transaction " +"boundaries. This is useful in long-running conversations with an extended " +"Session/persistence context." + +#. Tag: para +#: session_api.xml:135 +#, no-c-format +msgid "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." +msgstr "" +"save() does guarantee to return an identifier. If an " +"INSERT has to be executed to get the identifier ( e.g. \"identity\" " +"generator, not \"sequence\"), this INSERT happens immediately, no matter if " +"you are inside or outside of a transaction. This is problematic in a long-" +"running conversation with an extended Session/persistence context." + +#. Tag: para +#: session_api.xml:145 +#, no-c-format +msgid "" +"Alternatively, you may assign the identifier using an overloaded version of " +"save()." +msgstr "此外,你可以用一个重载版本的save()方法。" + +#. Tag: programlisting +#: session_api.xml:150 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:152 +#, no-c-format +msgid "" +"If the object you make persistent has associated objects (e.g. the " +"kittens collection in the previous example), these " +"objects may be made persistent in any order you like unless you have a " +"NOT NULL constraint upon a foreign key column. There is " +"never a risk of violating foreign key constraints. However, you might " +"violate a NOT NULL constraint if you save() the objects in the wrong order." +msgstr "" +"如果你持久化的对象有关联的对象(associated objects)(例如上例中的" +"kittens集合) 那么对这些对象(译注:pk和kittens)进行持久" +"化的顺序是任意的(也就是说可以先对kittens进行持久化也可以先对pk进行持久" +"化), 除非你在外键列上有NOT NULL约束。 Hibernate不会违反" +"外键约束,但是如果你用错误的顺序持久化对象(译注:在pk持久化之前持久化" +"kitten),那么可能会违反NOT NULL约束。" + +#. Tag: para +#: session_api.xml:162 +#, no-c-format +msgid "" +"Usually you don't bother with this detail, as you'll very likely use " +"Hibernate's transitive persistence feature to save the " +"associated objects automatically. Then, even NOT NULL " +"constraint violations don't occur - Hibernate will take care of everything. " +"Transitive persistence is discussed later in this chapter." +msgstr "" +"通常你不会为这些细节烦心,因为你很可能会使用Hibernate的 传播性持久" +"化(transitive persistence)功能自动保存相关联那些对象。 这样连违反" +"NOT NULL约束的情况都不会出现了 - Hibernate会管好所有的事" +"情。 传播性持久化(transitive persistence)将在本章稍后讨论。" + +#. Tag: title +#: session_api.xml:173 +#, no-c-format +msgid "Loading an object" +msgstr "装载对象" + +#. Tag: para +#: session_api.xml:175 +#, no-c-format +msgid "" +"The load() methods of Session gives " +"you a way to retrieve a persistent instance if you already know its " +"identifier. load() takes a class object and will load the " +"state into a newly instantiated instance of that class, in persistent state." +msgstr "" +"如果你知道某个实例的持久化标识(identifier),你就可以使用Sessionload()方法 来获取它。 load()" +"的另一个参数是指定类的.class对象。 本方法会创建指定类的持久化实例,并从数据库" +"加载其数据(state)。" + +#. Tag: programlisting +#: session_api.xml:182 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:184 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:186 +#, no-c-format +msgid "Alternatively, you can load state into a given instance:" +msgstr "" +"此外, 你可以把数据(state)加载到指定的对象实例上(覆盖掉该实例原来的数据)。" + +#. Tag: programlisting +#: session_api.xml:190 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:192 +#, no-c-format +msgid "" +"Note that load() will throw an unrecoverable exception if " +"there is no matching database row. If the class is mapped with a proxy, " +"load() just returns an uninitialized proxy and does not " +"actually hit the database until you invoke a method of the proxy. This " +"behaviour is very useful if you wish to create an association to an object " +"without actually loading it from the database. It also allows multiple " +"instances to be loaded as a batch if batch-size is " +"defined for the class mapping." +msgstr "" +"请注意如果没有匹配的数据库记录,load()方法可能抛出无法恢复" +"的异常(unrecoverable exception)。 如果类的映射使用了代理(proxy)," +"load()方法会返回一个未初始化的代理,直到你调用该代理的某方" +"法时才会去访问数据库。 若你希望在某对象中创建一个指向另一个对象的关联,又不想" +"在从数据库中装载该对象时同时装载相关联的那个对象,那么这种操作方式就用得上的" +"了。 如果为相应类映射关系设置了batch-size, 那么使用这种操" +"作方式允许多个对象被一批装载(因为返回的是代理,无需从数据库中抓取所有对象的" +"数据)。" + +#. Tag: para +#: session_api.xml:203 +#, no-c-format +msgid "" +"If you are not certain that a matching row exists, you should use the " +"get() method, which hits the database immediately and " +"returns null if there is no matching row." +msgstr "" +"如果你不确定是否有匹配的行存在,应该使用get()方法,它会立" +"刻访问数据库,如果没有对应的记录,会返回null。" + +#. Tag: programlisting +#: session_api.xml:209 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:211 +#, no-c-format +msgid "" +"You may even load an object using an SQL SELECT ... FOR UPDATE, using a LockMode. See the API documentation for " +"more information." +msgstr "" +"你甚至可以选用某个LockMode,用SQL的SELECT ... " +"FOR UPDATE装载对象。 请查阅API文档以获取更多信息。" + +#. Tag: programlisting +#: session_api.xml:216 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:218 +#, no-c-format +msgid "" +"Note that any associated instances or contained collections are " +"not selected FOR UPDATE, unless you " +"decide to specify lock or all as a " +"cascade style for the association." +msgstr "" +"注意,任何关联的对象或者包含的集合都不会被以" +"FOR UPDATE方式返回, 除非你指定了lock或" +"者all作为关联(association)的级联风格(cascade style)。" + +#. Tag: para +#: session_api.xml:225 +#, no-c-format +msgid "" +"It is possible to re-load an object and all its collections at any time, " +"using the refresh() method. This is useful when database " +"triggers are used to initialize some of the properties of the object." +msgstr "" +"任何时候都可以使用refresh()方法强迫装载对象和它的集合。如" +"果你使用数据库触发器功能来处理对象的某些属性,这个方法就很有用了。" + +#. Tag: programlisting +#: session_api.xml:231 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:233 +#, no-c-format +msgid "" +"An important question usually appears at this point: How much does Hibernate " +"load from the database and how many SQL SELECTs will it " +"use? This depends on the fetching strategy and is " +"explained in ." +msgstr "" +"此处通常会出现一个重要问题: Hibernate会从数据库中装载多少东西?会执行多少条相" +"应的SQLSELECT语句? 这取决于抓取策略(fetching " +"strategy),会在中解释。" + +#. Tag: title +#: session_api.xml:243 +#, no-c-format +msgid "Querying" +msgstr "查询" + +#. Tag: para +#: session_api.xml:245 +#, no-c-format +msgid "" +"If you don't know the identifiers of the objects you are looking for, you " +"need a query. Hibernate supports an easy-to-use but powerful object oriented " +"query language (HQL). For programmatic query creation, Hibernate supports a " +"sophisticated Criteria and Example query feature (QBC and QBE). You may also " +"express your query in the native SQL of your database, with optional support " +"from Hibernate for result set conversion into objects." +msgstr "" +"如果不知道所要寻找的对象的持久化标识,那么你需要使用查询。Hibernate支持强大且" +"易于使用的面向对象查询语言(HQL)。 如果希望通过编程的方式创建查询,Hibernate提" +"供了完善的按条件(Query By Criteria, QBC)以及按样例(Query By Example, QBE)进行" +"查询的功能。 你也可以用原生SQL(native SQL)描述查询,Hibernate额外提供了将结果" +"集(result set)转化为对象的支持。" + +#. Tag: title +#: session_api.xml:255 +#, no-c-format +msgid "Executing queries" +msgstr "执行查询" + +#. Tag: para +#: session_api.xml:257 +#, no-c-format +msgid "" +"HQL and native SQL queries are represented with an instance of org." +"hibernate.Query. This interface offers methods for parameter " +"binding, result set handling, and for the execution of the actual query. You " +"always obtain a Query using the current Session:" +msgstr "" +"HQL和原生SQL(native SQL)查询要通过为org.hibernate.Query的" +"实例来表达。 这个接口提供了参数绑定、结果集处理以及运行实际查询的方法。 你总" +"是可以通过当前Session获取一个Query对" +"象:" + +#. Tag: programlisting +#: session_api.xml:264 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:266 +#, no-c-format +msgid "" +"A query is usually executed by invoking list(), the " +"result of the query will be loaded completely into a collection in memory. " +"Entity instances retrieved by a query are in persistent state. The " +"uniqueResult() method offers a shortcut if you know your " +"query will only return a single object. Note that queries that make use of " +"eager fetching of collections usually return duplicates of the root objects " +"(but with their collections initialized). You can filter these duplicates " +"simply through a Set." +msgstr "" +"一个查询通常在调用list()时被执行,执行结果会完全装载进内存" +"中的一个集合(collection)。 查询返回的对象处于持久(persistent)状态。如果你知道" +"的查询只会返回一个对象,可使用list()的快捷方式" +"uniqueResult()。 注意,使用集合预先抓取的查询往往会返回多" +"次根对象(他们的集合类都被初始化了)。你可以通过一个集合来过滤这些重复对象。" + +#. Tag: title +#: session_api.xml:278 +#, no-c-format +msgid "Iterating results" +msgstr "迭代式获取结果(Iterating results)" + +#. Tag: para +#: session_api.xml:280 +#, no-c-format +msgid "" +"Occasionally, you might be able to achieve better performance by executing " +"the query using the iterate() method. This will only " +"usually be the case if you expect that the actual entity instances returned " +"by the query will already be in the session or second-level cache. If they " +"are not already cached, iterate() will be slower than " +"list() and might require many database hits for a simple " +"query, usually 1 for the initial select which only " +"returns identifiers, and n additional selects to " +"initialize the actual instances." +msgstr "" +"某些情况下,你可以使用iterate()方法得到更好的性能。 这通常" +"是你预期返回的结果在session,或二级缓存(second-level cache)中已经存在时的情" +"况。 如若不然,iterate()会比list()慢," +"而且可能简单查询也需要进行多次数据库访问: iterate()会首先" +"使用1条语句得到所有对象的持久化标识(identifiers),再根据" +"持久化标识执行n条附加的select语句实例化实际的对象。" + +#. Tag: programlisting +#: session_api.xml:292 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:296 +#, no-c-format +msgid "Queries that return tuples" +msgstr "返回元组(tuples)的查询" + +#. Tag: para +#: session_api.xml:298 +#, no-c-format +msgid "" +"Hibernate queries sometimes return tuples of objects, in which case each " +"tuple is returned as an array:" +msgstr "" +"(译注:元组(tuples)指一条结果行包含多个对象) Hibernate查询有时返回元组" +"(tuples),每个元组(tuples)以数组的形式返回:" + +#. Tag: programlisting +#: session_api.xml:303 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:308 +#, no-c-format +msgid "Scalar results" +msgstr "标量(Scalar)结果" + +#. Tag: para +#: session_api.xml:310 +#, no-c-format +msgid "" +"Queries may specify a property of a class in the select " +"clause. They may even call SQL aggregate functions. Properties or aggregates " +"are considered \"scalar\" results (and not entities in persistent state)." +msgstr "" +"查询可在select从句中指定类的属性,甚至可以调用SQL统计" +"(aggregate)函数。 属性或统计结果被认定为\"标量(Scalar)\"的结果(而不是持久" +"(persistent state)的实体)。" + +#. Tag: programlisting +#: session_api.xml:316 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:321 +#, no-c-format +msgid "Bind parameters" +msgstr "绑定参数" + +#. Tag: para +#: session_api.xml:323 +#, no-c-format +msgid "" +"Methods on Query are provided for binding values to named " +"parameters or JDBC-style ? parameters. Contrary " +"to JDBC, Hibernate numbers parameters from zero. Named parameters " +"are identifiers of the form :name in the query string. " +"The advantages of named parameters are:" +msgstr "" +"接口Query提供了对命名参数(named parameters)、JDBC风格的" +"问号(?)参数进行绑定的方法。 不同于JDBC," +"Hibernate对参数从0开始计数。 命名参数(named parameters)在查询字符" +"串中是形如:name的标识符。 命名参数(named parameters)的优点" +"是:" + +#. Tag: para +#: session_api.xml:333 +#, no-c-format +msgid "" +"named parameters are insensitive to the order they occur in the query string" +msgstr "命名参数(named parameters)与其在查询串中出现的顺序无关" + +#. Tag: para +#: session_api.xml:339 +#, no-c-format +msgid "they may occur multiple times in the same query" +msgstr "它们可在同一查询串中多次出现" + +#. Tag: para +#: session_api.xml:344 +#, no-c-format +msgid "they are self-documenting" +msgstr "它们本身是自我说明的" + +#. Tag: programlisting +#: session_api.xml:350 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:354 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:359 +#, no-c-format +msgid "Pagination" +msgstr "分页" + +#. Tag: para +#: session_api.xml:361 +#, no-c-format +msgid "" +"If you need to specify bounds upon your result set (the maximum number of " +"rows you want to retrieve and / or the first row you want to retrieve) you " +"should use methods of the Query interface:" +msgstr "" +"如果你需要指定结果集的范围(希望返回的最大行数/或开始的行数),应该使用" +"Query接口提供的方法:" + +#. Tag: programlisting +#: session_api.xml:367 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:369 +#, no-c-format +msgid "" +"Hibernate knows how to translate this limit query into the native SQL of " +"your DBMS." +msgstr "" +"Hibernate 知道如何将这个有限定条件的查询转换成你的数据库的原生SQL(native " +"SQL)。" + +#. Tag: title +#: session_api.xml:377 +#, no-c-format +msgid "Scrollable iteration" +msgstr "可滚动遍历(Scrollable iteration)" + +#. Tag: para +#: session_api.xml:379 +#, no-c-format +msgid "" +"If your JDBC driver supports scrollable ResultSets, the " +"Query interface may be used to obtain a " +"ScrollableResults object, which allows flexible " +"navigation of the query results." +msgstr "" +"如果你的JDBC驱动支持可滚动的ResuleSetQuery接口可以使用ScrollableResults,允许你在查询结果中" +"灵活游走。" + +#. Tag: programlisting +#: session_api.xml:386 +#, no-c-format +msgid "" +" i++ ) && cats.next() ) pageOfCats.add( cats.get" +"(1) );\n" +"\n" +"}\n" +"cats.close()]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:388 +#, no-c-format +msgid "" +"Note that an open database connection (and cursor) is required for this " +"functionality, use setMaxResult()/setFirstResult" +"() if you need offline pagination functionality." +msgstr "" +"请注意,使用此功能需要保持数据库连接(以及游标(cursor))处于一直打开状态。 如" +"果你需要断开连接使用分页功能,请使用setMaxResult()/" +"setFirstResult()" + +#. Tag: title +#: session_api.xml:397 +#, no-c-format +msgid "Externalizing named queries" +msgstr "外置命名查询(Externalizing named queries)" + +#. Tag: para +#: session_api.xml:399 +#, no-c-format +msgid "" +"You may also define named queries in the mapping document. (Remember to use " +"a CDATA section if your query contains characters that " +"could be interpreted as markup.)" +msgstr "" +"你可以在映射文件中定义命名查询(named queries)。 (如果你的查询串中包含可能被" +"解释为XML标记(markup)的字符,别忘了用CDATA包裹起来。)" + +#. Tag: programlisting +#: session_api.xml:405 +#, no-c-format +msgid "" +" ?\n" +"] ]>]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:407 +#, no-c-format +msgid "Parameter binding and executing is done programatically:" +msgstr "参数绑定及执行以编程方式(programatically)完成:" + +#. Tag: programlisting +#: session_api.xml:411 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:413 +#, no-c-format +msgid "" +"Note that the actual program code is independent of the query language that " +"is used, you may also define native SQL queries in metadata, or migrate " +"existing queries to Hibernate by placing them in mapping files." +msgstr "" +"请注意实际的程序代码与所用的查询语言无关,你也可在元数据中定义原生SQL(native " +"SQL)查询, 或将原有的其他的查询语句放在配置文件中,这样就可以让Hibernate统一" +"管理,达到迁移的目的。" + +#. Tag: para +#: session_api.xml:419 +#, no-c-format +msgid "" +"Also note that a query declaration inside a <hibernate-" +"mapping> element requires a global unique name for the query, " +"while a query declaration inside a <class> element " +"is made unique automatically by prepending the fully qualified name of the " +"class, for example eg.Cat.ByNameAndMaximumWeight." +msgstr "" +"也请注意在<hibernate-mapping>元素中声明的查询必须有" +"一个全局唯一的名字,而在<class>元素中声明的查询自动具" +"有全局名,是通过类的全名加以限定的。比如eg.Cat." +"ByNameAndMaximumWeight。" + +#. Tag: title +#: session_api.xml:432 +#, no-c-format +msgid "Filtering collections" +msgstr "过滤集合" + +#. Tag: para +#: session_api.xml:433 +#, no-c-format +msgid "" +"A collection filter is a special type of query that may " +"be applied to a persistent collection or array. The query string may refer " +"to this, meaning the current collection element." +msgstr "" +"集合过滤器(filter)是一种用于一个持久化集合或者数组的特殊" +"的查询。查询字符串中可以使用\"this\"来引用集合中的当前元" +"素。" + +#. Tag: programlisting +#: session_api.xml:439 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:441 +#, no-c-format +msgid "" +"The returned collection is considered a bag, and it's a copy of the given " +"collection. The original collection is not modified (this is contrary to the " +"implication of the name \"filter\", but consistent with expected behavior)." +msgstr "" +"返回的集合可以被认为是一个包(bag, 无顺序可重复的集合(collection)),它是所给集" +"合的副本。 原来的集合不会被改动(这与“过滤器(filter)”的隐含的含义不符,不过与" +"我们期待的行为一致)。" + +#. Tag: para +#: session_api.xml:447 +#, no-c-format +msgid "" +"Observe that filters do not require a from clause (though " +"they may have one if required). Filters are not limited to returning the " +"collection elements themselves." +msgstr "" +"请注意过滤器(filter)并不需要from子句(当然需要的话它们也可" +"以加上)。过滤器(filter)不限定于只能返回集合元素本身。" + +#. Tag: programlisting +#: session_api.xml:452 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:454 +#, no-c-format +msgid "" +"Even an empty filter query is useful, e.g. to load a subset of elements in a " +"huge collection:" +msgstr "" +"即使无条件的过滤器(filter)也是有意义的。例如,用于加载一个大集合的子集:" + +#. Tag: programlisting +#: session_api.xml:459 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: session_api.xml:464 +#, no-c-format +msgid "Criteria queries" +msgstr "条件查询(Criteria queries)" + +#. Tag: para +#: session_api.xml:466 +#, no-c-format +msgid "" +"HQL is extremely powerful but some developers prefer to build queries " +"dynamically, using an object-oriented API, rather than building query " +"strings. Hibernate provides an intuitive Criteria query " +"API for these cases:" +msgstr "" +"HQL极为强大,但是有些人希望能够动态的使用一种面向对象API创建查询,而非在他们" +"的Java代码中嵌入字符串。对于那部分人来说,Hibernate提供了直观的" +"Criteria查询API。" + +#. Tag: programlisting +#: session_api.xml:472 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:474 +#, no-c-format +msgid "" +"The Criteria and the associated Example API are discussed in more detail in ." +msgstr "" +"Criteria以及相关的样例(Example)API将会" +"再中详细讨论。" + +#. Tag: title +#: session_api.xml:482 +#, no-c-format +msgid "Queries in native SQL" +msgstr "使用原生SQL的查询" + +#. Tag: para +#: session_api.xml:484 +#, no-c-format +msgid "" +"You may express a query in SQL, using createSQLQuery() " +"and let Hibernate take care of the mapping from result sets to objects. Note " +"that you may at any time call session.connection() and " +"use the JDBC Connection directly. If you chose to use the " +"Hibernate API, you must enclose SQL aliases in braces:" +msgstr "" +"你可以使用createSQLQuery()方法,用SQL来描述查询,并由" +"Hibernate将结果集转换成对象。 请注意,你可以在任何时候调用session." +"connection()来获得并使用JDBC Connection对象。 如" +"果你选择使用Hibernate的API, 你必须把SQL别名用大括号包围起来:" + +#. Tag: programlisting +#: session_api.xml:492 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: session_api.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:496 +#, no-c-format +msgid "" +"SQL queries may contain named and positional parameters, just like Hibernate " +"queries. More information about native SQL queries in Hibernate can be found " +"in ." +msgstr "" +"和Hibernate查询一样,SQL查询也可以包含命名参数和占位参数。 可以在找到更多关于Hibernate中原生SQL(native SQL)的信息。" + +#. Tag: title +#: session_api.xml:507 +#, no-c-format +msgid "Modifying persistent objects" +msgstr "修改持久对象" + +#. Tag: para +#: session_api.xml:509 +#, no-c-format +msgid "" +"Transactional persistent instances (ie. objects loaded, " +"saved, created or queried by the Session) may be " +"manipulated by the application and any changes to persistent state will be " +"persisted when the Session is flushed (discussed later in this chapter). There is no need to call a " +"particular method (like update(), which has a different " +"purpose) to make your modifications persistent. So the most straightforward " +"way to update the state of an object is to load() it, and " +"then manipulate it directly, while the Session is open:" +msgstr "" +"事务中的持久实例(就是通过session装" +"载、保存、创建或者查询出的对象) 被应用程序操作所造成的任何修改都会在" +"Session刷出(flushed)的时候被持久" +"化(本章后面会详细讨论)。 这里不需要调用某个特定的方法(比如update" +"(),设计它的目的是不同的)将你的修改持久化。 所以最直接的更新一个对" +"象的方法就是在Session处于打开状态时load()它,然后直接修改即可:" + +#. Tag: programlisting +#: session_api.xml:520 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:522 +#, no-c-format +msgid "" +"Sometimes this programming model is inefficient since it would require both " +"an SQL SELECT (to load an object) and an SQL " +"UPDATE (to persist its updated state) in the same " +"session. Therefore Hibernate offers an alternate approach, using detached " +"instances." +msgstr "" +"有时这种程序模型效率低下,因为它在同一Session里需要一条SQL SELECT语句(用于加载对象) 以及一条SQL UPDATE语句(持久化" +"更新的状态)。 为此Hibernate提供了另一种途径,使用脱管(detached)实例。" + +#. Tag: emphasis +#: session_api.xml:530 +#, fuzzy, no-c-format +msgid "" +"Note that Hibernate does not offer its own API for direct execution of " +"UPDATE or DELETE statements. Hibernate " +"is a state management service, you don't have to think " +"in statements to use it. JDBC is a perfect API for " +"executing SQL statements, you can get a JDBC Connection " +"at any time by calling session.connection(). Furthermore, " +"the notion of mass operations conflicts with object/relational mapping for " +"online transaction processing-oriented applications. Future versions of " +"Hibernate may however provide special mass operation functions. See for some possible batch operation tricks." +msgstr "" +"请注意Hibernate本身不提供直接执行语句的" +"API。 Hibernate提供的是服务,你不必考虑要使用的。 JDBC是出色的执行SQL语句的API,任何时候调用你都可以得到" +"一个JDBC 对象。 此外,在联机事务处理(OLTP)程序中,大量操作" +"(mass operations)与对象/关系映射的观点是相冲突的。 Hibernate的将来版本可能会" +"提供专门的进行大量操作(mass operation)的功能。 参考,寻找一些可用的批量(batch)操作技巧。" + +#. Tag: title +#: session_api.xml:545 +#, no-c-format +msgid "Modifying detached objects" +msgstr "修改脱管(Detached)对象" + +#. Tag: para +#: session_api.xml:547 +#, no-c-format +msgid "" +"Many applications need to retrieve an object in one transaction, send it to " +"the UI layer for manipulation, then save the changes in a new transaction. " +"Applications that use this kind of approach in a high-concurrency " +"environment usually use versioned data to ensure isolation for the \"long\" " +"unit of work." +msgstr "" +"很多程序需要在某个事务中获取对象,然后将对象发送到界面层去操作,最后在一个新" +"的事务保存所做的修改。 在高并发访问的环境中使用这种方式,通常使用附带版本信息" +"的数据来保证这些“长“工作单元之间的隔离。" + +#. Tag: para +#: session_api.xml:554 +#, no-c-format +msgid "" +"Hibernate supports this model by providing for reattachment of detached " +"instances using the Session.update() or Session." +"merge() methods:" +msgstr "" +"Hibernate通过提供Session.update()Session.merge" +"() 重新关联脱管实例的办法来支持这种模型。" + +#. Tag: programlisting +#: session_api.xml:560 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:562 +#, no-c-format +msgid "" +"If the Cat with identifier catId had " +"already been loaded by secondSession when the application " +"tried to reattach it, an exception would have been thrown." +msgstr "" +"如果具有catId持久化标识的Cat之前已经被" +"另一Session(secondSession)装载了, 应用程序进行重关联操作" +"(reattach)的时候会抛出一个异常。" + +#. Tag: para +#: session_api.xml:568 +#, no-c-format +msgid "" +"Use update() if you are sure that the session does not " +"contain an already persistent instance with the same identifier, and " +"merge() if you want to merge your modifications at any " +"time without consideration of the state of the session. In other words, " +"update() is usually the first method you would call in a " +"fresh session, ensuring that reattachment of your detached instances is the " +"first operation that is executed." +msgstr "" +"如果你确定当前session没有包含与之具有相同持久化标识的持久实例,使用" +"update()。 如果想随时合并你的的改动而不考虑session的状态," +"使用merge()。 换句话说,在一个新session中通常第一个调用的" +"是update()方法,以便保证重新关联脱管(detached)对象的操作首" +"先被执行。" + +#. Tag: para +#: session_api.xml:577 +#, no-c-format +msgid "" +"The application should individually update() detached " +"instances reachable from the given detached instance if and only if it wants their state also updated. This can be automated of " +"course, using transitive persistence, see ." +msgstr "" +"如果希望相关联的脱管对象(通过引用“可到达”的脱管对象)的数据也要更新到数据库" +"时(并且也仅仅在这种情况), 可以对该相关联的脱管对象单" +"独调用update() 当然这些可以自动完成,即通过使用" +"传播性持久化(transitive persistence),请看。" + +#. Tag: para +#: session_api.xml:584 +#, no-c-format +msgid "" +"The lock() method also allows an application to " +"reassociate an object with a new session. However, the detached instance has " +"to be unmodified!" +msgstr "" +"lock()方法也允许程序重新关联某个对象到一个新session上。不" +"过,该脱管(detached)的对象必须是没有修改过的!" + +#. Tag: programlisting +#: session_api.xml:589 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:591 +#, no-c-format +msgid "" +"Note that lock() can be used with various " +"LockModes, see the API documentation and the chapter on " +"transaction handling for more information. Reattachment is not the only " +"usecase for lock()." +msgstr "" +"请注意,lock()可以搭配多种LockMode, 更" +"多信息请阅读API文档以及关于事务处理(transaction handling)的章节。重新关联不是" +"lock()的唯一用途。" + +#. Tag: para +#: session_api.xml:598 +#, no-c-format +msgid "" +"Other models for long units of work are discussed in ." +msgstr "" +"其他用于长时间工作单元的模型会在中" +"讨论。" + +#. Tag: title +#: session_api.xml:605 +#, no-c-format +msgid "Automatic state detection" +msgstr "自动状态检测" + +#. Tag: para +#: session_api.xml:607 +#, no-c-format +msgid "" +"Hibernate users have requested a general purpose method that either saves a " +"transient instance by generating a new identifier or updates/reattaches the " +"detached instances associated with its current identifier. The " +"saveOrUpdate() method implements this functionality." +msgstr "" +"Hibernate的用户曾要求一个既可自动分配新持久化标识(identifier)保存瞬时" +"(transient)对象,又可更新/重新关联脱管(detached)实例的通用方法。 " +"saveOrUpdate()方法实现了这个功能。" + +#. Tag: programlisting +#: session_api.xml:614 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:616 +#, no-c-format +msgid "" +"The usage and semantics of saveOrUpdate() seems to be " +"confusing for new users. Firstly, so long as you are not trying to use " +"instances from one session in another new session, you should not need to " +"use update(), saveOrUpdate(), or " +"merge(). Some whole applications will never use either of " +"these methods." +msgstr "" +"saveOrUpdate()用途和语义可能会使新用户感到迷惑。 首先,只" +"要你没有尝试在某个session中使用来自另一session的实例,你就应该不需要使用" +"update()saveOrUpdate(),或" +"merge()。有些程序从来不用这些方法。" + +#. Tag: para +#: session_api.xml:624 +#, no-c-format +msgid "" +"Usually update() or saveOrUpdate() are " +"used in the following scenario:" +msgstr "" +"通常下面的场景会使用update()saveOrUpdate():" + +#. Tag: para +#: session_api.xml:631 +#, no-c-format +msgid "the application loads an object in the first session" +msgstr "程序在第一个session中加载对象" + +#. Tag: para +#: session_api.xml:636 +#, no-c-format +msgid "the object is passed up to the UI tier" +msgstr "该对象被传递到表现层" + +#. Tag: para +#: session_api.xml:641 +#, no-c-format +msgid "some modifications are made to the object" +msgstr "对象发生了一些改动" + +#. Tag: para +#: session_api.xml:646 +#, no-c-format +msgid "the object is passed back down to the business logic tier" +msgstr "该对象被返回到业务逻辑层" + +#. Tag: para +#: session_api.xml:651 +#, no-c-format +msgid "" +"the application persists these modifications by calling update() in a second session" +msgstr "程序调用第二个session的update()方法持久这些改动" + +#. Tag: para +#: session_api.xml:658 +#, no-c-format +msgid "saveOrUpdate() does the following:" +msgstr "saveOrUpdate()做下面的事:" + +#. Tag: para +#: session_api.xml:664 +#, no-c-format +msgid "if the object is already persistent in this session, do nothing" +msgstr "如果对象已经在本session中持久化了,不做任何事" + +#. Tag: para +#: session_api.xml:669 +#, no-c-format +msgid "" +"if another object associated with the session has the same identifier, throw " +"an exception" +msgstr "" +"如果另一个与本session关联的对象拥有相同的持久化标识(identifier),抛出一个异常" + +#. Tag: para +#: session_api.xml:675 +#, no-c-format +msgid "if the object has no identifier property, save() it" +msgstr "" +"如果对象没有持久化标识(identifier)属性,对其调用save()" + +#. Tag: para +#: session_api.xml:680 +#, no-c-format +msgid "" +"if the object's identifier has the value assigned to a newly instantiated " +"object, save() it" +msgstr "" +"如果对象的持久标识(identifier)表明其是一个新实例化的对象,对其调用" +"save()" + +#. Tag: para +#: session_api.xml:686 +#, no-c-format +msgid "" +"if the object is versioned (by a <version> or " +"<timestamp>), and the version property value is the " +"same value assigned to a newly instantiated object, save() it" +msgstr "" +"如果对象是附带版本信息的(通过<version>或" +"<timestamp>) 并且版本属性的值表明其是一个新实例化的" +"对象,save()它。" + +#. Tag: para +#: session_api.xml:694 +#, no-c-format +msgid "otherwise update() the object" +msgstr "否则update() 这个对象" + +#. Tag: para +#: session_api.xml:700 +#, no-c-format +msgid "and merge() is very different:" +msgstr "merge()可非常不同:" + +#. Tag: para +#: session_api.xml:706 +#, no-c-format +msgid "" +"if there is a persistent instance with the same identifier currently " +"associated with the session, copy the state of the given object onto the " +"persistent instance" +msgstr "" +"如果session中存在相同持久化标识(identifier)的实例,用用户给出的对象的状态覆盖" +"旧有的持久实例" + +#. Tag: para +#: session_api.xml:713 +#, no-c-format +msgid "" +"if there is no persistent instance currently associated with the session, " +"try to load it from the database, or create a new persistent instance" +msgstr "" +"如果session没有相应的持久实例,则尝试从数据库中加载,或创建新的持久化实例" + +#. Tag: para +#: session_api.xml:719 +#, no-c-format +msgid "the persistent instance is returned" +msgstr "最后返回该持久实例" + +#. Tag: para +#: session_api.xml:724 +#, no-c-format +msgid "" +"the given instance does not become associated with the session, it remains " +"detached" +msgstr "用户给出的这个对象没有被关联到session上,它依旧是脱管的" + +#. Tag: title +#: session_api.xml:734 +#, no-c-format +msgid "Deleting persistent objects" +msgstr "删除持久对象" + +#. Tag: para +#: session_api.xml:736 +#, no-c-format +msgid "" +"Session.delete() will remove an object's state from the " +"database. Of course, your application might still hold a reference to a " +"deleted object. It's best to think of delete() as making " +"a persistent instance transient." +msgstr "" +"使用Session.delete()会把对象的状态从数据库中移除。 当然," +"你的应用程序可能仍然持有一个指向已删除对象的引用。所以,最好这样理解:" +"delete()的用途是把一个持久实例变成瞬时(transient)实例。" + +#. Tag: programlisting +#: session_api.xml:743 +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#: session_api.xml:745 +#, no-c-format +msgid "" +"You may delete objects in any order you like, without risk of foreign key " +"constraint violations. It is still possible to violate a NOT NULL constraint on a foreign key column by deleting objects in the wrong " +"order, e.g. if you delete the parent, but forget to delete the children." +msgstr "" +"你可以用你喜欢的任何顺序删除对象,不用担心外键约束冲突。当然,如果你搞错了顺" +"序,还是有可能引发在外键字段定义的NOT NULL约束冲突。 例如" +"你删除了父对象,但是忘记删除孩子们。" + +#. Tag: title +#: session_api.xml:756 +#, no-c-format +msgid "Replicating object between two different datastores" +msgstr "在两个不同数据库间复制对象" + +#. Tag: para +#: session_api.xml:758 +#, no-c-format +msgid "" +"It is occasionally useful to be able to take a graph of persistent instances " +"and make them persistent in a different datastore, without regenerating " +"identifier values." +msgstr "" +"偶尔会用到不重新生成持久化标识(identifier),将持久实例以及其关联的实例持久到" +"不同的数据库中的操作。" + +#. Tag: programlisting +#: session_api.xml:764 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:766 +#, no-c-format +msgid "" +"The ReplicationMode determines how replicate() will deal with conflicts with existing rows in the database." +msgstr "" +"ReplicationMode决定在和数据库中已存在记录由冲突时," +"replicate()如何处理。" + +#. Tag: para +#: session_api.xml:773 +#, no-c-format +msgid "" +"ReplicationMode.IGNORE - ignore the object when there is " +"an existing database row with the same identifier" +msgstr "ReplicationMode.IGNORE - 忽略它" + +#. Tag: para +#: session_api.xml:779 +#, no-c-format +msgid "" +"ReplicationMode.OVERWRITE - overwrite any existing " +"database row with the same identifier" +msgstr "ReplicationMode.OVERWRITE - 覆盖相同的行" + +#. Tag: para +#: session_api.xml:785 +#, no-c-format +msgid "" +"ReplicationMode.EXCEPTION - throw an exception if there " +"is an existing database row with the same identifier" +msgstr "ReplicationMode.EXCEPTION - 抛出异常" + +#. Tag: para +#: session_api.xml:791 +#, no-c-format +msgid "" +"ReplicationMode.LATEST_VERSION - overwrite the row if its " +"version number is earlier than the version number of the object, or ignore " +"the object otherwise" +msgstr "" +"ReplicationMode.LATEST_VERSION - 如果当前的版本较新,则覆" +"盖,否则忽略" + +#. Tag: para +#: session_api.xml:799 +#, no-c-format +msgid "" +"Usecases for this feature include reconciling data entered into different " +"database instances, upgrading system configuration information during " +"product upgrades, rolling back changes made during non-ACID transactions and " +"more." +msgstr "" +"这个功能的用途包括使录入的数据在不同数据库中一致,产品升级时升级系统配置信" +"息,回滚non-ACID事务中的修改等等。 (译注,non-ACID,非ACID;ACID,Atomic," +"Consistent,Isolated and Durable的缩写)" + +#. Tag: title +#: session_api.xml:808 +#, no-c-format +msgid "Flushing the Session" +msgstr "Session刷出(flush)" + +#. Tag: para +#: session_api.xml:810 +#, no-c-format +msgid "" +"From time to time the Session will execute the SQL " +"statements needed to synchronize the JDBC connection's state with the state " +"of objects held in memory. This process, flush, occurs " +"by default at the following points" +msgstr "" +"每间隔一段时间,Session会执行一些必需的SQL语句来把内存中的" +"对象的状态同步到JDBC连接中。这个过程被称为刷出(flush)," +"默认会在下面的时间点执行:" + +#. Tag: para +#: session_api.xml:819 +#, no-c-format +msgid "before some query executions" +msgstr "在某些查询执行之前" + +#. Tag: para +#: session_api.xml:824 +#, no-c-format +msgid "from org.hibernate.Transaction.commit()" +msgstr "在调用org.hibernate.Transaction.commit()的时候" + +#. Tag: para +#: session_api.xml:829 +#, no-c-format +msgid "from Session.flush()" +msgstr "在调用Session.flush()的时候" + +#. Tag: para +#: session_api.xml:835 +#, no-c-format +msgid "The SQL statements are issued in the following order" +msgstr "涉及的SQL语句会按照下面的顺序发出执行:" + +#. Tag: para +#: session_api.xml:841 +#, no-c-format +msgid "" +"all entity insertions, in the same order the corresponding objects were " +"saved using Session.save()" +msgstr "" +"所有对实体进行插入的语句,其顺序按照对象执行Session.save()" +"的时间顺序" + +#. Tag: para +#: session_api.xml:847 +#, no-c-format +msgid "all entity updates" +msgstr "所有对实体进行更新的语句" + +#. Tag: para +#: session_api.xml:852 +#, no-c-format +msgid "all collection deletions" +msgstr "所有进行集合删除的语句" + +#. Tag: para +#: session_api.xml:857 +#, no-c-format +msgid "all collection element deletions, updates and insertions" +msgstr "所有对集合元素进行删除,更新或者插入的语句" + +#. Tag: para +#: session_api.xml:862 +#, no-c-format +msgid "all collection insertions" +msgstr "所有进行集合插入的语句" + +#. Tag: para +#: session_api.xml:867 +#, no-c-format +msgid "" +"all entity deletions, in the same order the corresponding objects were " +"deleted using Session.delete()" +msgstr "" +"所有对实体进行删除的语句,其顺序按照对象执行Session.delete()的时间顺序" + +#. Tag: para +#: session_api.xml:874 +#, no-c-format +msgid "" +"(An exception is that objects using native ID generation " +"are inserted when they are saved.)" +msgstr "" +"(有一个例外是,如果对象使用native方式来生成ID(持久化标" +"识)的话,它们一执行save就会被插入。)" + +#. Tag: para +#: session_api.xml:879 +#, no-c-format +msgid "" +"Except when you explicity flush(), there are absolutely " +"no guarantees about when the Session " +"executes the JDBC calls, only the order in which they " +"are executed. However, Hibernate does guarantee that the Query.list" +"(..) will never return stale data; nor will they return the wrong " +"data." +msgstr "" +"除非你明确地发出了flush()指令,关于Session何时会执行这些JDBC调用是完全无法保证的,只能保证它们执行的前后顺序。 当" +"然,Hibernate保证,Query.list(..)绝对不会返回已经失效的数" +"据,也不会返回错误数据。" + +#. Tag: para +#: session_api.xml:887 +#, no-c-format +msgid "" +"It is possible to change the default behavior so that flush occurs less " +"frequently. The FlushMode class defines three different " +"modes: only flush at commit time (and only when the Hibernate " +"Transaction API is used), flush automatically using the " +"explained routine, or never flush unless flush() is " +"called explicitly. The last mode is useful for long running units of work, " +"where a Session is kept open and disconnected for a long " +"time (see )." +msgstr "" +"也可以改变默认的设置,来让刷出(flush)操作发生的不那么频繁。 " +"FlushMode类定义了三种不同的方式。 仅在提交时刷出(仅当" +"Hibernate的Transaction API被使用时有效), 按照刚才说的方式" +"刷出, 以及除非明确使用flush()否则从不刷出。 最后一种模式" +"对于那些需要长时间保持Session为打开或者断线状态的长时间运" +"行的工作单元很有用。 (参见 )." + +#. Tag: programlisting +#: session_api.xml:897 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: session_api.xml:899 +#, no-c-format +msgid "" +"During flush, an exception might occur (e.g. if a DML operation violates a " +"constraint). Since handling exceptions involves some understanding of " +"Hibernate's transactional behavior, we discuss it in ." +msgstr "" +"刷出(flush)期间,可能会抛出异常。(例如一个DML操作违反了约束) 异常处理涉及到" +"对Hibernate事务性行为的理解,因此我们将在中讨" +"论。" + +#. Tag: title +#: session_api.xml:908 +#, no-c-format +msgid "Transitive persistence" +msgstr "传播性持久化(transitive persistence)" + +#. Tag: para +#: session_api.xml:910 +#, no-c-format +msgid "" +"It is quite cumbersome to save, delete, or reattach individual objects, " +"especially if you deal with a graph of associated objects. A common case is " +"a parent/child relationship. Consider the following example:" +msgstr "" +"对每一个对象都要执行保存,删除或重关联操作让人感觉有点麻烦,尤其是在处理许多" +"彼此关联的对象的时候。 一个常见的例子是父子关系。考虑下面的例子:" + +#. Tag: para +#: session_api.xml:916 +#, no-c-format +msgid "" +"If the children in a parent/child relationship would be value typed (e.g. a " +"collection of addresses or strings), their life cycle would depend on the " +"parent and no further action would be required for convenient \"cascading\" " +"of state changes. When the parent is saved, the value-typed child objects " +"are saved as well, when the parent is deleted, the children will be deleted, " +"etc. This even works for operations such as the removal of a child from the " +"collection; Hibernate will detect this and, since value-typed objects can't " +"have shared references, delete the child from the database." +msgstr "" +"如果一个父子关系中的子对象是值类型(value typed)(例如,地址或字符串的集合)" +"的,他们的生命周期会依赖于父对象,可以享受方便的级联操作(Cascading),不需要额" +"外的动作。 父对象被保存时,这些值类型(value typed)子对象也将被保存;父对象被" +"删除时,子对象也将被删除。 这对将一个子对象从集合中移除是同样有效:Hibernate" +"会检测到,并且因为值类型(value typed)的对象不可能被其他对象引用,所以" +"Hibernate会在数据库中删除这个子对象。" + +#. Tag: para +#: session_api.xml:927 +#, no-c-format +msgid "" +"Now consider the same scenario with parent and child objects being entities, " +"not value-types (e.g. categories and items, or parent and child cats). " +"Entities have their own life cycle, support shared references (so removing " +"an entity from the collection does not mean it can be deleted), and there is " +"by default no cascading of state from one entity to any other associated " +"entities. Hibernate does not implement persistence by " +"reachability by default." +msgstr "" +"现在考虑同样的场景,不过父子对象都是实体(entities)类型,而非值类型(value " +"typed)(例如,类别与个体,或母猫和小猫)。 实体有自己的生命期,允许共享对其的" +"引用(因此从集合中移除一个实体,不意味着它可以被删除), 并且实体到其他关联实" +"体之间默认没有级联操作的设置。 Hibernate默认不实现所谓的可到达即持" +"久化(persistence by reachability)的策略。" + +#. Tag: para +#: session_api.xml:936 +#, no-c-format +msgid "" +"For each basic operation of the Hibernate session - including " +"persist(), merge(), saveOrUpdate(), delete(), lock(), refresh(), " +"evict(), replicate() - there is a corresponding cascade style. " +"Respectively, the cascade styles are named create, merge, save-" +"update, delete, lock, refresh, evict, replicate. If you want an " +"operation to be cascaded along an association, you must indicate that in the " +"mapping document. For example:" +msgstr "" +"每个Hibernate session的基本操作 - 包括 persist(), merge(), " +"saveOrUpdate(), delete(), lock(), refresh(), evict(), replicate() " +"- 都有对应的级联风格(cascade style)。 这些级联风格(cascade style)风格分别命名" +"为 create, merge, save-update, delete, lock, refresh, evict, " +"replicate。 如果你希望一个操作被顺着关联关系级联传播,你必须在映射" +"文件中指出这一点。例如:" + +#. Tag: programlisting +#: session_api.xml:945 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:947 +#, no-c-format +msgid "Cascade styles my be combined:" +msgstr "级联风格(cascade style)是可组合的:" + +#. Tag: programlisting +#: session_api.xml:951 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: session_api.xml:953 +#, no-c-format +msgid "" +"You may even use cascade=\"all\" to specify that " +"all operations should be cascaded along the " +"association. The default cascade=\"none\" specifies that " +"no operations are to be cascaded." +msgstr "" +"你可以使用cascade=\"all\"来指定全部操" +"作都顺着关联关系级联(cascaded)。 默认值是cascade=\"none\",即任何操作都不会被级联(cascaded)。" + +#. Tag: para +#: session_api.xml:959 +#, no-c-format +msgid "" +"A special cascade style, delete-orphan, applies only to " +"one-to-many associations, and indicates that the delete() " +"operation should be applied to any child object that is removed from the " +"association." +msgstr "" +"注意有一个特殊的级联风格(cascade style) delete-orphan,只" +"应用于one-to-many关联,表明delete()操作 应该被应用于所有从" +"关联中删除的对象。" + +#. Tag: para +#: session_api.xml:966 +#, no-c-format +msgid "Recommendations:" +msgstr "建议:" + +#. Tag: para +#: session_api.xml:972 +#, no-c-format +msgid "" +"It doesn't usually make sense to enable cascade on a <many-to-" +"one> or <many-to-many> association. " +"Cascade is often useful for <one-to-one> and " +"<one-to-many> associations." +msgstr "" +"通常在<many-to-one><many-to-many>关系中应用级联(cascade)没什么意义。 级联(cascade)通常在 <" +"one-to-one><one-to-many>关系中比较有" +"用。" + +#. Tag: para +#: session_api.xml:980 +#, no-c-format +msgid "" +"If the child object's lifespan is bounded by the lifespan of the parent " +"object, make it a life cycle object by specifying " +"cascade=\"all,delete-orphan\"." +msgstr "" +"如果子对象的寿命限定在父亲对象的寿命之内,可通过指定cascade=\"all," +"delete-orphan\"将其变为自动生命周期管理的对象(life cycle " +"object)。" + +#. Tag: para +#: session_api.xml:987 +#, no-c-format +msgid "" +"Otherwise, you might not need cascade at all. But if you think that you will " +"often be working with the parent and children together in the same " +"transaction, and you want to save yourself some typing, consider using " +"cascade=\"persist,merge,save-update\"." +msgstr "" +"其他情况,你可根本不需要级联(cascade)。但是如果你认为你会经常在某个事务中同时" +"用到父对象与子对象,并且你希望少打点儿字,可以考虑使用cascade=" +"\"persist,merge,save-update\"。" + +#. Tag: para +#: session_api.xml:995 +#, no-c-format +msgid "" +"Mapping an association (either a single valued association, or a collection) " +"with cascade=\"all\" marks the association as a " +"parent/child style relationship where save/update/" +"delete of the parent results in save/update/delete of the child or children." +msgstr "" +"可以使用cascade=\"all\"将一个关联关系(无论是对值对象的关" +"联,或者对一个集合的关联)标记为父/子关系的关联。 这样对" +"父对象进行save/update/delete操作就会导致子对象也进行save/update/delete操作。" + +#. Tag: para +#: session_api.xml:1001 +#, no-c-format +msgid "" +"Futhermore, a mere reference to a child from a persistent parent will result " +"in save/update of the child. This metaphor is incomplete, however. A child " +"which becomes unreferenced by its parent is not " +"automatically deleted, except in the case of a <one-to-many> association mapped with cascade=\"delete-orphan\". The precise semantics of cascading operations for a parent/child " +"relationship are as follows:" +msgstr "" +"此外,一个持久的父对象对子对象的浅引用(mere reference)会导致子对象被同步save/" +"update。 不过,这个隐喻(metaphor)的说法并不完整。除非关联是<one-" +"to-many>关联并且被标记为cascade=\"delete-orphan\", 否则父对象失去对某个子对象的引用不会导致该子" +"对象被自动删除。 父子关系的级联(cascading)操作准确语义如下:" + +#. Tag: para +#: session_api.xml:1012 +#, no-c-format +msgid "" +"If a parent is passed to persist(), all children are " +"passed to persist()" +msgstr "" +"如果父对象被persist(),那么所有子对象也会被" +"persist()" + +#. Tag: para +#: session_api.xml:1018 +#, no-c-format +msgid "" +"If a parent is passed to merge(), all children are passed " +"to merge()" +msgstr "" +"如果父对象被merge(),那么所有子对象也会被merge()" +"" + +#. Tag: para +#: session_api.xml:1024 +#, no-c-format +msgid "" +"If a parent is passed to save(), update() or saveOrUpdate(), all children are passed to " +"saveOrUpdate()" +msgstr "" +"如果父对象被save()update()或 " +"saveOrUpdate(),那么所有子对象则会被saveOrUpdate" +"()" + +#. Tag: para +#: session_api.xml:1030 +#, no-c-format +msgid "" +"If a transient or detached child becomes referenced by a persistent parent, " +"it is passed to saveOrUpdate()" +msgstr "" +"如果某个持久的父对象引用了瞬时(transient)或者脱管(detached)的子对象,那么子对" +"象将会被saveOrUpdate()" + +#. Tag: para +#: session_api.xml:1036 +#, no-c-format +msgid "" +"If a parent is deleted, all children are passed to delete()" +msgstr "如果父对象被删除,那么所有子对象也会被delete()" + +#. Tag: para +#: session_api.xml:1041 +#, no-c-format +msgid "" +"If a child is dereferenced by a persistent parent, nothing special " +"happens - the application should explicitly delete the child if " +"necessary - unless cascade=\"delete-orphan\", in which " +"case the \"orphaned\" child is deleted." +msgstr "" +"除非被标记为cascade=\"delete-orphan\"(删除“孤儿”模式,此" +"时不被任何一个父对象引用的子对象会被删除), 否则子对象失掉父对象对其的引用" +"时,什么事也不会发生。 如果有特殊需要,应用程序可通过显" +"式调用delete()删除子对象。" + +#. Tag: para +#: session_api.xml:1050 +#, no-c-format +msgid "" +"Finally, note that cascading of operations can be applied to an object graph " +"at call time or at flush time. All " +"operations, if enabled, are cascaded to associated entities reachable when " +"the operation is executed. However, save-upate and " +"delete-orphan are transitive for all associated entities " +"reachable during flush of the Session." +msgstr "" +"最后,注意操作的级联可能是在调用期(call time)或者" +"写入期(flush time)作用到对象图上的。所有的操作,如果允" +"许,都在操作被执行的时候级联到可触及的关联实体上。然而,save-upatedelete-orphan是在Session " +"flush的时候才作用到所有可触及的被关联对象上的。" + +#. Tag: title +#: session_api.xml:1062 +#, no-c-format +msgid "Using metadata" +msgstr "使用元数据" + +#. Tag: para +#: session_api.xml:1064 +#, no-c-format +msgid "" +"Hibernate requires a very rich meta-level model of all entity and value " +"types. From time to time, this model is very useful to the application " +"itself. For example, the application might use Hibernate's metadata to " +"implement a \"smart\" deep-copy algorithm that understands which objects " +"should be copied (eg. mutable value types) and which should not (eg. " +"immutable value types and, possibly, associated entities)." +msgstr "" +"Hibernate中有一个非常丰富的元级别(meta-level)的模型,含有所有的实体和值类型数" +"据的元数据。 有时这个模型对应用程序本身也会非常有用。 比如说,应用程序可能在" +"实现一种“智能”的深度拷贝算法时, 通过使用Hibernate的元数据来了解哪些对象应该" +"被拷贝(比如,可变的值类型数据), 那些不应该(不可变的值类型数据,也许还有某" +"些被关联的实体)。" + +#. Tag: para +#: session_api.xml:1071 +#, no-c-format +msgid "" +"Hibernate exposes metadata via the ClassMetadata and " +"CollectionMetadata interfaces and the Type hierarchy. Instances of the metadata interfaces may be obtained " +"from the SessionFactory." +msgstr "" +"Hibernate提供了ClassMetadata接口," +"CollectionMetadata接口和Type层次体系来" +"访问元数据。 可以通过SessionFactory获取元数据接口的实例。" + +#. Tag: programlisting +#: session_api.xml:1078 +#, no-c-format +msgid "" +"" +msgstr "" + +#~ msgid "UPDATE" +#~ msgstr "UPDATE" + +#~ msgid "DELETE" +#~ msgstr "DELETE" + +#~ msgid "state management" +#~ msgstr "状态管理(state management)" + +#~ msgid "statements" +#~ msgstr "语句(statements)" + +#~ msgid "Connection" +#~ msgstr "session.connection()" + +#~ msgid "session.connection()" +#~ msgstr "Connection" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/toolset_guide.po b/documentation/envers/src/main/docbook/zh-CN/content/toolset_guide.po new file mode 100644 index 0000000000..5a5331cde3 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/toolset_guide.po @@ -0,0 +1,1183 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: toolset_guide.xml:29 +#, no-c-format +msgid "Toolset Guide" +msgstr "工具箱指南" + +#. Tag: para +#: toolset_guide.xml:31 +#, no-c-format +msgid "" +"Roundtrip engineering with Hibernate is possible using a set of Eclipse " +"plugins, commandline tools, as well as Ant tasks." +msgstr "" +"可以通过一系列Eclipse插件、命令行工具和Ant任务来进行与Hibernate关联的转换。" + +#. Tag: para +#: toolset_guide.xml:36 +#, no-c-format +msgid "" +"The Hibernate Tools currently include plugins for the " +"Eclipse IDE as well as Ant tasks for reverse engineering of existing " +"databases:" +msgstr "" +"除了Ant任务外,当前的Hibernate Tools也包含了Eclipse IDE" +"的插件,用于与现存数据库的逆向工程。" + +#. Tag: para +#: toolset_guide.xml:42 +#, no-c-format +msgid "" +"Mapping Editor: An editor for Hibernate XML mapping " +"files, supporting auto-completion and syntax highlighting. It also supports " +"semantic auto-completion for class names and property/field names, making it " +"much more versatile than a normal XML editor." +msgstr "" +"Mapping Editor: Hibernate XML映射文件的编辑器,支持自动" +"完成和语法高亮。它也支持对类名和属性/字段名的语义自动完成,比通常的XML编辑器" +"方便得多。" + +#. Tag: para +#: toolset_guide.xml:47 +#, no-c-format +msgid "" +"Console: The console is a new view in Eclipse. In " +"addition to a tree overview of your console configurations, you also get an " +"interactive view of your persistent classes and their relationships. The " +"console allows you to execute HQL queries against your database and browse " +"the result directly in Eclipse." +msgstr "" +"Console: Console是Eclipse的一个新视图。除了对你的console" +"配置的树状概览,你还可以获得对你持久化类及其关联的交互式视图。Console允许你对" +"数据库执行HQL查询,并直接在Eclipse中浏览结果。" + +#. Tag: para +#: toolset_guide.xml:54 +#, no-c-format +msgid "" +"Development Wizards: Several wizards are provided with " +"the Hibernate Eclipse tools; you can use a wizard to quickly generate " +"Hibernate configuration (cfg.xml) files, or you may even completely reverse " +"engineer an existing database schema into POJO source files and Hibernate " +"mapping files. The reverse engineering wizard supports customizable " +"templates." +msgstr "" +"Development Wizards: 在Hibernate Eclipse tools中还提供了" +"几个向导;你可以用向导快速生成Hibernate 配置文件(cfg.xml),你甚至还可以同现" +"存的数据库schema中反向工程出POJO源代码与Hibernate 映射文件。反向工程支持可定" +"制的模版。" + +#. Tag: emphasis +#: toolset_guide.xml:62 +#, no-c-format +msgid "Ant Tasks:" +msgstr "Ant Tasks:" + +#. Tag: para +#: toolset_guide.xml:67 +#, no-c-format +msgid "" +"Please refer to the Hibernate Tools package and it's " +"documentation for more information." +msgstr "" +"要得到更多信息,请查阅 Hibernate Tools 包及其文档。" + +#. Tag: para +#: toolset_guide.xml:72 +#, no-c-format +msgid "" +"However, the Hibernate main package comes bundled with an integrated tool " +"(it can even be used from \"inside\" Hibernate on-the-fly): " +"SchemaExport aka hbm2ddl." +msgstr "" +"同时,Hibernate主发行包还附带了一个集成的工具(它甚至可以在Hibernate“内部”快" +"速运行)SchemaExport ,也就是 hbm2ddl。" + +#. Tag: title +#: toolset_guide.xml:79 +#, no-c-format +msgid "Automatic schema generation" +msgstr "Schema自动生成(Automatic schema generation)" + +#. Tag: para +#: toolset_guide.xml:81 +#, no-c-format +msgid "" +"DDL may be generated from your mapping files by a Hibernate utility. The " +"generated schema includes referential integrity constraints (primary and " +"foreign keys) for entity and collection tables. Tables and sequences are " +"also created for mapped identifier generators." +msgstr "" +"可以从你的映射文件使用一个Hibernate工具生成DDL。 生成的schema包含有对实体和集" +"合类表的完整性引用约束(主键和外键)。涉及到的标示符生成器所需的表和sequence" +"也会同时生成。" + +#. Tag: para +#: toolset_guide.xml:88 +#, no-c-format +msgid "" +"You must specify a SQL Dialect via " +"the hibernate.dialect property when using this tool, as " +"DDL is highly vendor specific." +msgstr "" +"在使用这个工具的时候,你必须 通过hibernate." +"dialet属性指定一个SQL方言(Dialet),因为DDL是与供" +"应商高度相关的。" + +#. Tag: para +#: toolset_guide.xml:94 +#, no-c-format +msgid "First, customize your mapping files to improve the generated schema." +msgstr "首先,要定制你的映射文件,来改善生成的schema。" + +#. Tag: title +#: toolset_guide.xml:99 +#, no-c-format +msgid "Customizing the schema" +msgstr "对schema定制化(Customizing the schema)" + +#. Tag: para +#: toolset_guide.xml:101 +#, no-c-format +msgid "" +"Many Hibernate mapping elements define optional attributes named " +"length, precision and scale. You may set the length, precision and scale of a column with this " +"attribute." +msgstr "" +"很多Hibernate映射元素定义了可选的length、" +"precision 或者 scale属性。你可以通过这" +"个属性设置字段的长度、精度、小数点位数。" + +#. Tag: programlisting +#: toolset_guide.xml:108 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:109 +#, no-c-format +msgid "]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:111 +#, no-c-format +msgid "" +"Some tags also accept a not-null attribute (for " +"generating a NOT NULL constraint on table columns) and a " +"unique attribute (for generating UNIQUE constraint on table columns)." +msgstr "" +"有些tag还接受not-null属性(用来在表字段上生成NOT " +"NULL约束)和unique属性(用来在表字段上生成" +"UNIQUE约束)。" + +#. Tag: programlisting +#: toolset_guide.xml:117 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:119 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:121 +#, no-c-format +msgid "" +"A unique-key attribute may be used to group columns in a " +"single unique key constraint. Currently, the specified value of the " +"unique-key attribute is not used to " +"name the constraint in the generated DDL, only to group the columns in the " +"mapping file." +msgstr "" +"unique-key属性可以对成组的字段指定一个唯一键约束(unique " +"key constraint)。目前,unique-key属性指定的值在生成DDL时" +"并不会被当作这个约束的名字,它们只是在用来在映射文件内部" +"用作区分的。" + +#. Tag: programlisting +#: toolset_guide.xml:129 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:131 +#, no-c-format +msgid "" +"An index attribute specifies the name of an index that " +"will be created using the mapped column or columns. Multiple columns may be " +"grouped into the same index, simply by specifying the same index name." +msgstr "" +"index属性会用对应的字段(一个或多个)生成一个index,它指出" +"了这个index的名字。如果多个字段对应的index名字相同,就会生成包含这些字段的" +"index。" + +#. Tag: programlisting +#: toolset_guide.xml:137 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:139 +#, no-c-format +msgid "" +"A foreign-key attribute may be used to override the name " +"of any generated foreign key constraint." +msgstr "" +"foreign-key属性可以用来覆盖任何生成的外键约束的名字。" + +#. Tag: programlisting +#: toolset_guide.xml:144 +#, no-c-format +msgid "" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:146 +#, no-c-format +msgid "" +"Many mapping elements also accept a child <column> " +"element. This is particularly useful for mapping multi-column types:" +msgstr "" +"很多映射元素还接受<column>子元素。这在定义跨越多字段" +"的类型时特别有用。" + +#. Tag: programlisting +#: toolset_guide.xml:151 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:153 +#, no-c-format +msgid "" +"The default attribute lets you specify a default value " +"for a column (you should assign the same value to the mapped property before " +"saving a new instance of the mapped class)." +msgstr "" +"default属性为字段指定一个默认值 (在保存被映射的类的新实例" +"之前,你应该将同样的值赋于对应的属性)。" + +#. Tag: programlisting +#: toolset_guide.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:161 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:163 +#, no-c-format +msgid "" +"The sql-type attribute allows the user to override the " +"default mapping of a Hibernate type to SQL datatype." +msgstr "" +"sql-type属性允许用户覆盖默认的Hibernate类型到SQL数据类型的" +"映射。" + +#. Tag: programlisting +#: toolset_guide.xml:168 +#, no-c-format +msgid "" +"\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:170 +#, no-c-format +msgid "" +"The check attribute allows you to specify a check " +"constraint." +msgstr "check属性允许用户指定一个约束检查。" + +#. Tag: programlisting +#: toolset_guide.xml:174 +#, no-c-format +msgid "" +"\n" +" 10\"/>\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:176 +#, no-c-format +msgid "" +"\n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:180 +#, no-c-format +msgid "Summary" +msgstr "Summary" + +#. Tag: entry +#: toolset_guide.xml:187 +#, no-c-format +msgid "Attribute" +msgstr "属性(Attribute)" + +#. Tag: entry +#: toolset_guide.xml:188 +#, no-c-format +msgid "Values" +msgstr "值(Values)" + +#. Tag: entry +#: toolset_guide.xml:189 +#, no-c-format +msgid "Interpretation" +msgstr "解释(Interpretation)" + +#. Tag: literal +#: toolset_guide.xml:194 +#, no-c-format +msgid "length" +msgstr "length" + +#. Tag: entry +#: toolset_guide.xml:195 toolset_guide.xml:200 toolset_guide.xml:205 +#, no-c-format +msgid "number" +msgstr "数字" + +#. Tag: entry +#: toolset_guide.xml:196 +#, no-c-format +msgid "column length" +msgstr "字段长度" + +#. Tag: literal +#: toolset_guide.xml:199 +#, no-c-format +msgid "precision" +msgstr "precision" + +#. Tag: entry +#: toolset_guide.xml:201 +#, no-c-format +msgid "column decimal precision" +msgstr "精度(decimal precision)" + +#. Tag: literal +#: toolset_guide.xml:204 +#, no-c-format +msgid "scale" +msgstr "scale" + +#. Tag: entry +#: toolset_guide.xml:206 +#, no-c-format +msgid "column decimal scale" +msgstr "小数点位数(decimal scale)" + +#. Tag: literal +#: toolset_guide.xml:209 +#, no-c-format +msgid "not-null" +msgstr "not-null" + +#. Tag: literal +#: toolset_guide.xml:210 toolset_guide.xml:215 +#, no-c-format +msgid "true|false" +msgstr "true|false" + +#. Tag: entry +#: toolset_guide.xml:211 +#, no-c-format +msgid "specfies that the column should be non-nullable" +msgstr "指明字段是否应该是非空的" + +#. Tag: literal +#: toolset_guide.xml:214 +#, no-c-format +msgid "unique" +msgstr "unique" + +#. Tag: entry +#: toolset_guide.xml:216 +#, no-c-format +msgid "specifies that the column should have a unique constraint" +msgstr "指明是否该字段具有惟一约束" + +#. Tag: literal +#: toolset_guide.xml:219 +#, no-c-format +msgid "index" +msgstr "index" + +#. Tag: literal +#: toolset_guide.xml:220 +#, no-c-format +msgid "index_name" +msgstr "index_name" + +#. Tag: entry +#: toolset_guide.xml:221 +#, no-c-format +msgid "specifies the name of a (multi-column) index" +msgstr "指明一个(多字段)的索引(index)的名字" + +#. Tag: literal +#: toolset_guide.xml:224 +#, no-c-format +msgid "unique-key" +msgstr "unique-key" + +#. Tag: literal +#: toolset_guide.xml:225 +#, no-c-format +msgid "unique_key_name" +msgstr "unique_key_name" + +#. Tag: entry +#: toolset_guide.xml:226 +#, no-c-format +msgid "specifies the name of a multi-column unique constraint" +msgstr "指明多字段惟一约束的名字(参见上面的说明)" + +#. Tag: literal +#: toolset_guide.xml:229 +#, no-c-format +msgid "foreign-key" +msgstr "foreign-key" + +#. Tag: literal +#: toolset_guide.xml:230 +#, no-c-format +msgid "foreign_key_name" +msgstr "foreign_key_name" + +#. Tag: entry +#: toolset_guide.xml:231 +#, fuzzy, no-c-format +msgid "" +"specifies the name of the foreign key constraint generated for an " +"association, for a <one-to-one>, <many-" +"to-one>, <key>, or <many-" +"to-many> mapping element. Note that inverse=\"true\" sides will not be considered by SchemaExport." +msgstr "" +"指明一个外键的名字,它是为关联生成的,或者, , 或者映射元素。注意在" +"时会被忽略。" + +#. Tag: literal +#: toolset_guide.xml:241 +#, no-c-format +msgid "sql-type" +msgstr "sql-type" + +#. Tag: literal +#: toolset_guide.xml:242 +#, no-c-format +msgid "SQL column type" +msgstr "SQL 字段类型" + +#. Tag: entry +#: toolset_guide.xml:243 +#, fuzzy, no-c-format +msgid "" +"overrides the default column type (attribute of <column> element only)" +msgstr "覆盖默认的字段类型(只能用于属性)" + +#. Tag: literal +#: toolset_guide.xml:249 +#, no-c-format +msgid "default" +msgstr "default" + +#. Tag: entry +#: toolset_guide.xml:250 toolset_guide.xml:257 +#, fuzzy, no-c-format +msgid "SQL expression" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"SQL表达式\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"SQL 表达式" + +#. Tag: entry +#: toolset_guide.xml:251 +#, no-c-format +msgid "specify a default value for the column" +msgstr "为字段指定默认值" + +#. Tag: literal +#: toolset_guide.xml:256 +#, no-c-format +msgid "check" +msgstr "check" + +#. Tag: entry +#: toolset_guide.xml:258 +#, no-c-format +msgid "create an SQL check constraint on either column or table" +msgstr "对字段或表加入SQL约束检查" + +#. Tag: para +#: toolset_guide.xml:266 +#, no-c-format +msgid "" +"The <comment> element allows you to specify " +"comments for the generated schema." +msgstr "" +"<comment>元素可以让你在生成的schema中加入注释。" + +#. Tag: programlisting +#: toolset_guide.xml:271 +#, no-c-format +msgid "" +"\n" +" Current customers only\n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: programlisting +#: toolset_guide.xml:273 +#, no-c-format +msgid "" +"\n" +" \n" +" Balance in USD\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: toolset_guide.xml:275 +#, no-c-format +msgid "" +"This results in a comment on table or comment on " +"column statement in the generated DDL (where supported)." +msgstr "" +"结果是在生成的DDL中包含comment on table 或者 " +"comment on column语句(假若支持的话)。" + +#. Tag: title +#: toolset_guide.xml:284 +#, no-c-format +msgid "Running the tool" +msgstr "运行该工具" + +#. Tag: para +#: toolset_guide.xml:286 +#, no-c-format +msgid "" +"The SchemaExport tool writes a DDL script to standard out " +"and/or executes the DDL statements." +msgstr "" +"SchemaExport工具把DDL脚本写到标准输出,同时/或者执行DDL语" +"句。" + +#. Tag: para +#: toolset_guide.xml:291 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaExport options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:297 +#, no-c-format +msgid "SchemaExport Command Line Options" +msgstr "SchemaExport命令行选项" + +#. Tag: entry +#: toolset_guide.xml:303 toolset_guide.xml:453 toolset_guide.xml:522 +#, no-c-format +msgid "Option" +msgstr "选项" + +#. Tag: entry +#: toolset_guide.xml:304 toolset_guide.xml:391 toolset_guide.xml:454 +#: toolset_guide.xml:523 +#, fuzzy, no-c-format +msgid "Description" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"说明\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"说明\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"说明\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"描述" + +#. Tag: literal +#: toolset_guide.xml:309 toolset_guide.xml:459 +#, no-c-format +msgid "--quiet" +msgstr "--quiet" + +#. Tag: entry +#: toolset_guide.xml:310 toolset_guide.xml:460 +#, no-c-format +msgid "don't output the script to stdout" +msgstr "不要把脚本输出到stdout" + +#. Tag: literal +#: toolset_guide.xml:313 +#, no-c-format +msgid "--drop" +msgstr "--drop" + +#. Tag: entry +#: toolset_guide.xml:314 +#, no-c-format +msgid "only drop the tables" +msgstr "只进行drop tables的步骤" + +#. Tag: literal +#: toolset_guide.xml:317 +#, no-c-format +msgid "--create" +msgstr "--create" + +#. Tag: entry +#: toolset_guide.xml:318 +#, no-c-format +msgid "only create the tables" +msgstr "只创建表" + +#. Tag: literal +#: toolset_guide.xml:321 toolset_guide.xml:463 +#, no-c-format +msgid "--text" +msgstr "--text" + +#. Tag: entry +#: toolset_guide.xml:322 +#, no-c-format +msgid "don't export to the database" +msgstr "不执行在数据库中运行的步骤" + +#. Tag: literal +#: toolset_guide.xml:325 +#, no-c-format +msgid "--output=my_schema.ddl" +msgstr "--output=my_schema.ddl" + +#. Tag: entry +#: toolset_guide.xml:326 +#, no-c-format +msgid "output the ddl script to a file" +msgstr "把输出的ddl脚本输出到一个文件" + +#. Tag: literal +#: toolset_guide.xml:329 toolset_guide.xml:467 toolset_guide.xml:528 +#, no-c-format +msgid "--naming=eg.MyNamingStrategy" +msgstr "--naming=eg.MyNamingStrategy" + +#. Tag: entry +#: toolset_guide.xml:330 toolset_guide.xml:468 toolset_guide.xml:529 +#, fuzzy, no-c-format +msgid "select a NamingStrategy" +msgstr "在hibernate.properties文件中" + +#. Tag: literal +#: toolset_guide.xml:333 toolset_guide.xml:475 toolset_guide.xml:536 +#, no-c-format +msgid "--config=hibernate.cfg.xml" +msgstr "--config=hibernate.cfg.xml" + +#. Tag: entry +#: toolset_guide.xml:334 +#, no-c-format +msgid "read Hibernate configuration from an XML file" +msgstr "从XML文件读入Hibernate配置" + +#. Tag: literal +#: toolset_guide.xml:337 toolset_guide.xml:471 toolset_guide.xml:532 +#, no-c-format +msgid "--properties=hibernate.properties" +msgstr "--properties=hibernate.properties" + +#. Tag: entry +#: toolset_guide.xml:338 toolset_guide.xml:472 toolset_guide.xml:533 +#, fuzzy, no-c-format +msgid "read database properties from a file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"从文件读入数据库属性\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"从指定文件读入数据库属性\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"从文件中读取数据库属性" + +#. Tag: literal +#: toolset_guide.xml:341 +#, no-c-format +msgid "--format" +msgstr "--format" + +#. Tag: entry +#: toolset_guide.xml:342 +#, no-c-format +msgid "format the generated SQL nicely in the script" +msgstr "把脚本中的SQL语句对齐和美化" + +#. Tag: literal +#: toolset_guide.xml:345 +#, no-c-format +msgid "--delimiter=;" +msgstr "--delimiter=;" + +#. Tag: entry +#: toolset_guide.xml:346 +#, no-c-format +msgid "set an end of line delimiter for the script" +msgstr "为脚本设置行结束符" + +#. Tag: para +#: toolset_guide.xml:352 +#, no-c-format +msgid "You may even embed SchemaExport in your application:" +msgstr "你甚至可以在你的应用程序中嵌入SchemaExport工具:" + +#. Tag: programlisting +#: toolset_guide.xml:356 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:361 +#, no-c-format +msgid "Properties" +msgstr "属性(Properties)" + +#. Tag: para +#: toolset_guide.xml:363 +#, no-c-format +msgid "Database properties may be specified" +msgstr "可以通过如下方式指定数据库属性:" + +#. Tag: para +#: toolset_guide.xml:369 +#, no-c-format +msgid "" +"as system properties with -D<property>" +msgstr "通过-D<property>系统参数" + +#. Tag: para +#: toolset_guide.xml:372 +#, no-c-format +msgid "in hibernate.properties" +msgstr "在hibernate.properties文件中" + +#. Tag: para +#: toolset_guide.xml:375 +#, no-c-format +msgid "in a named properties file with --properties" +msgstr "" +"位于一个其它名字的properties文件中,然后用 --properties参数" +"指定" + +#. Tag: para +#: toolset_guide.xml:379 +#, no-c-format +msgid "The needed properties are:" +msgstr "所需的参数包括:" + +#. Tag: title +#: toolset_guide.xml:384 +#, no-c-format +msgid "SchemaExport Connection Properties" +msgstr "SchemaExport 连接属性" + +#. Tag: entry +#: toolset_guide.xml:390 +#, no-c-format +msgid "Property Name" +msgstr "属性名" + +#. Tag: literal +#: toolset_guide.xml:396 +#, no-c-format +msgid "hibernate.connection.driver_class" +msgstr "hibernate.connection.driver_class" + +#. Tag: entry +#: toolset_guide.xml:397 +#, no-c-format +msgid "jdbc driver class" +msgstr "jdbc driver class" + +#. Tag: literal +#: toolset_guide.xml:400 +#, no-c-format +msgid "hibernate.connection.url" +msgstr "hibernate.connection.url" + +#. Tag: entry +#: toolset_guide.xml:401 +#, no-c-format +msgid "jdbc url" +msgstr "jdbc url" + +#. Tag: literal +#: toolset_guide.xml:404 +#, no-c-format +msgid "hibernate.connection.username" +msgstr "hibernate.connection.username" + +#. Tag: entry +#: toolset_guide.xml:405 +#, no-c-format +msgid "database user" +msgstr "database user" + +#. Tag: literal +#: toolset_guide.xml:408 +#, no-c-format +msgid "hibernate.connection.password" +msgstr "hibernate.connection.password" + +#. Tag: entry +#: toolset_guide.xml:409 +#, no-c-format +msgid "user password" +msgstr "user password" + +#. Tag: literal +#: toolset_guide.xml:412 +#, no-c-format +msgid "hibernate.dialect" +msgstr "hibernate.dialect" + +#. Tag: entry +#: toolset_guide.xml:413 +#, no-c-format +msgid "dialect" +msgstr "方言(dialect)" + +#. Tag: title +#: toolset_guide.xml:422 +#, no-c-format +msgid "Using Ant" +msgstr "使用Ant(Using Ant)" + +#. Tag: para +#: toolset_guide.xml:424 +#, no-c-format +msgid "" +"You can call SchemaExport from your Ant build script:" +msgstr "你可以在你的Ant build脚本中调用SchemaExport:" + +#. Tag: programlisting +#: toolset_guide.xml:428 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:433 +#, no-c-format +msgid "Incremental schema updates" +msgstr "对schema的增量更新(Incremental schema updates)" + +#. Tag: para +#: toolset_guide.xml:435 +#, no-c-format +msgid "" +"The SchemaUpdate tool will update an existing schema with " +"\"incremental\" changes. Note that SchemaUpdate depends " +"heavily upon the JDBC metadata API, so it will not work with all JDBC " +"drivers." +msgstr "" +"SchemaUpdate工具对已存在的schema采用\"增量\"方式进行更新。" +"注意SchemaUpdate严重依赖于JDBC metadata API,所以它并非对所" +"有JDBC驱动都有效。" + +#. Tag: para +#: toolset_guide.xml:441 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaUpdate options " +"mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:447 +#, no-c-format +msgid "SchemaUpdate Command Line Options" +msgstr "SchemaUpdate命令行选项" + +#. Tag: entry +#: toolset_guide.xml:464 +#, no-c-format +msgid "don't export the script to the database" +msgstr "不把脚本输出到数据库" + +#. Tag: entry +#: toolset_guide.xml:476 toolset_guide.xml:537 +#, fuzzy, no-c-format +msgid "specify a .cfg.xml file" +msgstr "" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"指定一个 文件\n" +"#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +"指定一个文件" + +#. Tag: para +#: toolset_guide.xml:482 +#, no-c-format +msgid "You may embed SchemaUpdate in your application:" +msgstr "你可以在你的应用程序中嵌入SchemaUpdate工具:" + +#. Tag: programlisting +#: toolset_guide.xml:486 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:491 +#, no-c-format +msgid "Using Ant for incremental schema updates" +msgstr "用Ant来增量更新schema(Using Ant for incremental schema updates)" + +#. Tag: para +#: toolset_guide.xml:493 +#, no-c-format +msgid "You can call SchemaUpdate from the Ant script:" +msgstr "你可以在Ant脚本中调用SchemaUpdate:" + +#. Tag: programlisting +#: toolset_guide.xml:497 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:502 +#, no-c-format +msgid "Schema validation" +msgstr "Schema 校验" + +#. Tag: para +#: toolset_guide.xml:504 +#, no-c-format +msgid "" +"The SchemaValidator tool will validate that the existing " +"database schema \"matches\" your mapping documents. Note that " +"SchemaValidator depends heavily upon the JDBC metadata " +"API, so it will not work with all JDBC drivers. This tool is extremely " +"useful for testing." +msgstr "" +"SchemaValidator工具会比较数据库现状是否与映射文档“匹配”。" +"注意,SchemaValidator 严重依赖于JDBC的metadata API,因此不" +"是对所有的JDBC驱动都适用。这一工具在测试的时候特别有用。" + +#. Tag: para +#: toolset_guide.xml:510 +#, no-c-format +msgid "" +"java -cp hibernate_classpaths " +"org.hibernate.tool.hbm2ddl.SchemaValidator " +"options mapping_files" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:516 +#, no-c-format +msgid "SchemaValidator Command Line Options" +msgstr "SchemaValidator命令行参数" + +#. Tag: para +#: toolset_guide.xml:543 +#, no-c-format +msgid "You may embed SchemaValidator in your application:" +msgstr "你可以在你的应用程序中嵌入SchemaValidator:" + +#. Tag: programlisting +#: toolset_guide.xml:547 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: title +#: toolset_guide.xml:552 +#, no-c-format +msgid "Using Ant for schema validation" +msgstr "使用Ant进行schema校验" + +#. Tag: para +#: toolset_guide.xml:554 +#, no-c-format +msgid "You can call SchemaValidator from the Ant script:" +msgstr "你可以在Ant脚本中调用SchemaValidator:" + +#. Tag: programlisting +#: toolset_guide.xml:558 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#~ msgid "<one-to-one>" +#~ msgstr "<one-to-one>" + +#~ msgid "<many-to-one>" +#~ msgstr "<many-to-one>" + +#~ msgid "<key>" +#~ msgstr "<key>" + +#~ msgid "<many-to-many>" +#~ msgstr "<many-to-many>" + +#~ msgid "inverse=\"true\"" +#~ msgstr "inverse=\"true\"" + +#~ msgid "SchemaExport" +#~ msgstr "SchemaExport" + +#~ msgid "<column>" +#~ msgstr "<column>" + +#~ msgid "java -cp" +#~ msgstr "java -cp" + +#~ msgid "hibernate_classpaths" +#~ msgstr "hibernate_classpaths" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaExport" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaExport" + +#~ msgid "options mapping_files" +#~ msgstr "options mapping_files" + +#~ msgid "NamingStrategy" +#~ msgstr "NamingStrategy" + +#, fuzzy +#~ msgid "select a " +#~ msgstr "" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "选择一个命名策略()\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "选择一个命名策略 ()\n" +#~ "#-#-#-#-# - (PACKAGE VERSION) #-#-#-#-#\n" +#~ "选择一个命名策略 ()" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaUpdate" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaUpdate" + +#~ msgid ".cfg.xml" +#~ msgstr ".cfg.xml" + +#~ msgid "org.hibernate.tool.hbm2ddl.SchemaValidator" +#~ msgstr "org.hibernate.tool.hbm2ddl.SchemaValidator" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/transactions.po b/documentation/envers/src/main/docbook/zh-CN/content/transactions.po new file mode 100644 index 0000000000..e61389dbe4 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/transactions.po @@ -0,0 +1,1934 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: transactions.xml:29 +#, no-c-format +msgid "Transactions And Concurrency" +msgstr "事务和并发" + +#. Tag: para +#: transactions.xml:31 +#, no-c-format +msgid "" +"The most important point about Hibernate and concurrency control is that it " +"is very easy to understand. Hibernate directly uses JDBC connections and JTA " +"resources without adding any additional locking behavior. We highly " +"recommend you spend some time with the JDBC, ANSI, and transaction isolation " +"specification of your database management system." +msgstr "" +"Hibernate的事务和并发控制很容易掌握。Hibernate直接使用JDBC连接和JTA资源,不添" +"加任何附加锁定 行为。我们强烈推荐你花点时间了解JDBC编程,ANSI SQL查询语言和你" +"使用 的数据库系统的事务隔离规范。" + +#. Tag: para +#: transactions.xml:38 +#, no-c-format +msgid "" +"Hibernate does not lock objects in memory. Your application can expect the " +"behavior as defined by the isolation level of your database transactions. " +"Note that thanks to the Session, which is also a " +"transaction-scoped cache, Hibernate provides repeatable reads for lookup by " +"identifier and entity queries (not reporting queries that return scalar " +"values)." +msgstr "" +"Hibernate不锁定内存中的对象。你的应用程序会按照你的数据库事务的隔离级别规定的" +"那样运作。幸亏有了Session,使得Hibernate通过标识符查找,和" +"实体查询(不是返回标量值的报表查询)提供了可重复的读取(Repeatable reads)功" +"能,Session同时也是事务范围内的缓存(cache)。" + +#. Tag: para +#: transactions.xml:46 +#, no-c-format +msgid "" +"In addition to versioning for automatic optimistic concurrency control, " +"Hibernate also offers a (minor) API for pessimistic locking of rows, using " +"the SELECT FOR UPDATE syntax. Optimistic concurrency " +"control and this API are discussed later in this chapter." +msgstr "" +"除了对自动乐观并发控制提供版本管理,针对行级悲观锁定,Hibernate也提供了辅助的" +"(较小的)API,它使用了 SELECT FOR UPDATE的SQL语法。本章后" +"面会讨论乐观并发控制和这个API。" + +#. Tag: para +#: transactions.xml:53 +#, no-c-format +msgid "" +"We start the discussion of concurrency control in Hibernate with the " +"granularity of Configuration, SessionFactory, and Session, as well as database transactions " +"and long conversations." +msgstr "" +"我们从Configuration层、SessionFactory" +"层, 和 Session层开始讨论Hibernate的并行控制、数据库事务和" +"应用 程序的长事务。" + +#. Tag: title +#: transactions.xml:60 +#, no-c-format +msgid "Session and transaction scopes" +msgstr "Session和事务范围(transaction scope)" + +#. Tag: para +#: transactions.xml:62 +#, no-c-format +msgid "" +"A SessionFactory is an expensive-to-create, threadsafe " +"object intended to be shared by all application threads. It is created once, " +"usually on application startup, from a Configuration " +"instance." +msgstr "" +"SessionFactory对象的创建代价很昂贵,它是线程安全的对象,它" +"为所有的应用程序线程所共享。它只创建一次,通常是在应用程序启动的时候,由一个" +"Configuraion的实例来创建。" + +#. Tag: para +#: transactions.xml:68 +#, no-c-format +msgid "" +"A Session is an inexpensive, non-threadsafe object that " +"should be used once, for a single request, a conversation, single unit of " +"work, and then discarded. A Session will not obtain a " +"JDBC Connection (or a Datasource) " +"unless it is needed, hence consume no resources until used." +msgstr "" +"Session对象的创建代价比较小,是非线程安全的,对于单个请" +"求,单个会话、单个的 工作单元而言,它只被使用一次,然后就丢弃。只有在需要的时" +"候,一个Session对象 才会获取一个JDBC的" +"Connection(或一个Datasource) 对象,因" +"此假若不使用的时候它不消费任何资源。" + +#. Tag: para +#: transactions.xml:76 +#, no-c-format +msgid "" +"To complete this picture you also have to think about database transactions. " +"A database transaction has to be as short as possible, to reduce lock " +"contention in the database. Long database transactions will prevent your " +"application from scaling to highly concurrent load. Hence, it is almost " +"never good design to hold a database transaction open during user think " +"time, until the unit of work is complete." +msgstr "" +"此外我们还要考虑数据库事务。数据库事务应该尽可能的短,降低数据库中的锁争用。 " +"数据库长事务会阻止你的应用程序扩展到高的并发负载。因此,假若在用户思考期间让" +"数据库事务开着,直到整个工作单元完成才关闭这个事务,这绝不是一个好的设计。" + +#. Tag: para +#: transactions.xml:85 +#, no-c-format +msgid "" +"What is the scope of a unit of work? Can a single Hibernate " +"Session span several database transactions or is this a " +"one-to-one relationship of scopes? When should you open and close a " +"Session and how do you demarcate the database transaction " +"boundaries?" +msgstr "" +"一个操作单元(Unit of work)的范围是多大?单个的Hibernate Session能跨越多个 数据库事务吗?还是一个Session的作用范围" +"对应一个数据库事务的范围?应该何时打开 Session,何时关闭" +"Session?,你又如何划分数据库事务的边界呢?" + +#. Tag: title +#: transactions.xml:93 +#, no-c-format +msgid "Unit of work" +msgstr "操作单元(Unit of work)" + +#. Tag: para +#: transactions.xml:95 +#, no-c-format +msgid "" +"First, don't use the session-per-operation antipattern, " +"that is, don't open and close a Session for every simple " +"database call in a single thread! Of course, the same is true for database " +"transactions. Database calls in an application are made using a planned " +"sequence, they are grouped into atomic units of work. (Note that this also " +"means that auto-commit after every single SQL statement is useless in an " +"application, this mode is intended for ad-hoc SQL console work. Hibernate " +"disables, or expects the application server to do so, auto-commit mode " +"immediately.) Database transactions are never optional, all communication " +"with a database has to occur inside a transaction, no matter if you read or " +"write data. As explained, auto-commit behavior for reading data should be " +"avoided, as many small transactions are unlikely to perform better than one " +"clearly defined unit of work. The latter is also much more maintainable and " +"extensible." +msgstr "" +"首先,别用session-per-operation这种反模式了,也就是说," +"在单个线程中, 不要因为一次简单的数据库调用,就打开和关闭一次" +"Session!数据库事务也是如此。 应用程序中的数据库调用是按照" +"计划好的次序,分组为原子的操作单元。(注意,这也意味着,应用程 序中,在单个的" +"SQL语句发送之后,自动事务提交(auto-commit)模式失效了。这种模式专门为SQL控制台" +"操作设计的。 Hibernate禁止立即自动事务提交模式,或者期望应用服务器禁止立即自" +"动事务提交模式。)数据库事务绝不是可有可无的,任何与数据库之间的通讯都必须在" +"某个事务中进行,不管你是在读还是在写数据。对读数据而言,应该避免auto-commit行" +"为,因为很多小的事务比一个清晰定义的工作单元性能差。后者也更容易维护和扩展。" + +#. Tag: para +#: transactions.xml:111 +#, fuzzy, no-c-format +msgid "" +"The most common pattern in a multi-user client/server application is " +"session-per-request. In this model, a request from the " +"client is sent to the server (where the Hibernate persistence layer runs), a " +"new Hibernate Session is opened, and all database " +"operations are executed in this unit of work. Once the work has been " +"completed (and the response for the client has been prepared), the session " +"is flushed and closed. You would also use a single database transaction to " +"serve the clients request, starting and committing it when you open and " +"close the Session. The relationship between the two is " +"one-to-one and this model is a perfect fit for many applications." +msgstr "" +"在多用户的client/server应用程序中,最常用的模式是 每个请求一个会话" +"(session-per-request)。 在这种模式下,来自客户端的请求被发送到服务" +"器端(即Hibernate持久化层运行的地方),一 个新的Hibernate Session被打开,并且执行这个操作单元中所有的数据库操作。 一旦操作完成(同时对" +"客户端的响应也准备就绪),session被同步,然后关闭。你也可以使用单 个数据库事" +"务来处理客户端请求,在你打开Session之后启动事务,在你关闭 " +"Session之前提交事务。会话和请求之间的关系是一对一的关系," +"这种模式对 于大多数应用程序来说是很棒的。" + +#. Tag: para +#: transactions.xml:123 +#, fuzzy, no-c-format +msgid "" +"The challenge lies in the implementation. Hibernate provides built-in " +"management of the \"current session\" to simplify this pattern. All you have " +"to do is start a transaction when a server request has to be processed, and " +"end the transaction before the response is sent to the client. You can do " +"this in any way you like, common solutions are ServletFilter, AOP interceptor with a pointcut on the service methods, or a proxy/" +"interception container. An EJB container is a standardized way to implement " +"cross-cutting aspects such as transaction demarcation on EJB session beans, " +"declaratively with CMT. If you decide to use programmatic transaction " +"demarcation, prefer the Hibernate Transaction API shown " +"later in this chapter, for ease of use and code portability." +msgstr "" +"实现才是真正的挑战。Hibernate内置了对\"当前session(current session)\" 的管" +"理,用于简化此模式。你要做的一切就是在服务器端要处理请求的时候,开启事务,在" +"响应发送给客户之前结束事务。你可以用任何方式来完成这一操作,通常的方案有" +"ServletFilter,在service方法中进行pointcut的AOP拦截器,或" +"者proxy/interception容器。EJB容器是实现横切诸如EJB session bean上的事务分界," +"用CMT对事务进行声明等方面的标准手段。假若你决定使用编程式的事务分界,请参考本" +"章后面讲到的Hibernate Transaction API,这对易用性和代码可" +"移植性都有好处。" + +#. Tag: para +#: transactions.xml:136 +#, no-c-format +msgid "" +"Your application code can access a \"current session\" to process the " +"request by simply calling sessionFactory.getCurrentSession() anywhere and as often as needed. You will always get a " +"Session scoped to the current database transaction. This " +"has to be configured for either resource-local or JTA environments, see " +"." +msgstr "" +"在任何时间,任何地方,你的应用代码可以通过简单的调用sessionFactory." +"getCurrentSession()来访问\"当前session\",用于处理请求。你总是会得" +"到当前数据库事务范围内的Session。在使用本地资源或JTA环境" +"时,必须配置它,请参见。" + +#. Tag: para +#: transactions.xml:144 +#, no-c-format +msgid "" +"Sometimes it is convenient to extend the scope of a Session and database transaction until the \"view has been rendered\". This " +"is especially useful in servlet applications that utilize a separate " +"rendering phase after the request has been processed. Extending the database " +"transaction until view rendering is complete is easy to do if you implement " +"your own interceptor. However, it is not easily doable if you rely on EJBs " +"with container-managed transactions, as a transaction will be completed when " +"an EJB method returns, before rendering of any view can start. See the " +"Hibernate website and forum for tips and examples around this Open " +"Session in View pattern." +msgstr "" +"有时,将Session和数据库事务的边界延伸到\"展示层被渲染后" +"\"会带来便利。有些serlvet应用程序在对请求进行处理后,有个单独的渲染期,这种延" +"伸对这种程序特别有用。假若你实现你自己的拦截器,把事务边界延伸到展示层渲染结" +"束后非常容易。然而,假若你依赖有容器管理事务的EJB,这就不太容易了,因为事务会" +"在EJB方法返回后结束,而那是在任何展示层渲染开始之前。请访问Hibernate网站和论" +"坛,你可以找到Open Session in View这一模式的提示和示例。" + +#. Tag: title +#: transactions.xml:159 +#, no-c-format +msgid "Long conversations" +msgstr "长对话" + +#. Tag: para +#: transactions.xml:161 +#, no-c-format +msgid "" +"The session-per-request pattern is not the only useful concept you can use " +"to design units of work. Many business processes require a whole series of " +"interactions with the user interleaved with database accesses. In web and " +"enterprise applications it is not acceptable for a database transaction to " +"span a user interaction. Consider the following example:" +msgstr "" +"session-per-request模式不仅仅是一个可以用来设计操作单元的有用概念。很多业务处" +"理都需 要一系列完整的与用户之间的交互,而这些用户是指对数据库有交叉访问的用" +"户。在基于web的应用和企业 应用中,跨用户交互的数据库事务是无法接受的。考虑下" +"面的例子:" + +#. Tag: para +#: transactions.xml:171 +#, no-c-format +msgid "" +"The first screen of a dialog opens, the data seen by the user has been " +"loaded in a particular Session and database transaction. " +"The user is free to modify the objects." +msgstr "" +"在界面的第一屏,打开对话框,用户所看到的数据是被一个特定的 Session 和数据 库事务载入(load)的。用户可以随意修改对话框中的数据对象。" + +#. Tag: para +#: transactions.xml:178 +#, no-c-format +msgid "" +"The user clicks \"Save\" after 5 minutes and expects his modifications to be " +"made persistent; he also expects that he was the only person editing this " +"information and that no conflicting modification can occur." +msgstr "" +"5分钟后,用户点击“保存”,期望所做出的修改被持久化;同时他也期望自己是唯一修改" +"这个信息的人,不会出现 修改冲突。" + +#. Tag: para +#: transactions.xml:186 +#, no-c-format +msgid "" +"We call this unit of work, from the point of view of the user, a long " +"running conversation (or application " +"transaction). There are many ways how you can implement this in " +"your application." +msgstr "" +"从用户的角度来看,我们把这个操作单元称为长时间运行的对话" +"(conversation),或者(or 应用事务,application " +"transaction)。 在你的应用程序中,可以有很多种方法来实现它。" + +#. Tag: para +#: transactions.xml:192 +#, no-c-format +msgid "" +"A first naive implementation might keep the Session and " +"database transaction open during user think time, with locks held in the " +"database to prevent concurrent modification, and to guarantee isolation and " +"atomicity. This is of course an anti-pattern, since lock contention would " +"not allow the application to scale with the number of concurrent users." +msgstr "" +"头一个幼稚的做法是,在用户思考的过程中,保持Session和数据" +"库事务是打开的, 保持数据库锁定,以阻止并发修改,从而保证数据库事务隔离级别和" +"原子操作。这种方式当然是一个反模式, 因为锁争用会导致应用程序无法扩展并发用户" +"的数目。" + +#. Tag: para +#: transactions.xml:200 +#, fuzzy, no-c-format +msgid "" +"Clearly, we have to use several database transactions to implement the " +"conversation. In this case, maintaining isolation of business processes " +"becomes the partial responsibility of the application tier. A single " +"conversation usually spans several database transactions. It will be atomic " +"if only one of these database transactions (the last one) stores the updated " +"data, all others simply read data (e.g. in a wizard-style dialog spanning " +"several request/response cycles). This is easier to implement than it might " +"sound, especially if you use Hibernate's features:" +msgstr "" +"很明显,我们必须使用多个数据库事务来实现这个对话。在这个例子中,维护业务处理" +"的 事务隔离变成了应用程序层的部分责任。一个对话通常跨越多个数据库事务。如果仅" +"仅只有一 个数据库事务(最后的那个事务)保存更新过的数据,而所有其他事务只是单" +"纯的读取数据(例如在一 个跨越多个请求/响应周期的向导风格的对话框中),那么应" +"用程序事务将保证其原子性。这种方式比听 起来还要容易实现,特别是当你使用了" +"Hibernate的下述特性的时候:" + +#. Tag: para +#: transactions.xml:213 +#, fuzzy, no-c-format +msgid "" +"Automatic Versioning - Hibernate can do automatic " +"optimistic concurrency control for you, it can automatically detect if a " +"concurrent modification occurred during user think time. Usually we only " +"check at the end of the conversation." +msgstr "" +"自动版本化 - Hibernate能够自动进行乐观并发控制 ,如果在" +"用户思考 的过程中发生并发修改,Hibernate能够自动检测到。一般我们只在对话结束" +"时才检查。" + +#. Tag: para +#: transactions.xml:221 +#, no-c-format +msgid "" +"Detached Objects - If you decide to use the already " +"discussed session-per-request pattern, all loaded " +"instances will be in detached state during user think time. Hibernate allows " +"you to reattach the objects and persist the modifications, the pattern is " +"called session-per-request-with-detached-objects. " +"Automatic versioning is used to isolate concurrent modifications." +msgstr "" +"脱管对象(Detached Objects)- 如果你决定采用前面已经讨论" +"过的 session-per-request模式,所有载入的实例在用户思考的" +"过程 中都处于与Session脱离的状态。Hibernate允许你把与Session脱离的对象重新关" +"联到Session 上,并且对修改进行持久化,这种模式被称为 session-per-" +"request-with-detached-objects。自动版本化被用来隔离并发修改。" + +#. Tag: para +#: transactions.xml:231 +#, fuzzy, no-c-format +msgid "" +"Extended (or Long) Session - The Hibernate " +"Session may be disconnected from the underlying JDBC " +"connection after the database transaction has been committed, and " +"reconnected when a new client request occurs. This pattern is known as " +"session-per-conversation and makes even reattachment " +"unnecessary. Automatic versioning is used to isolate concurrent " +"modifications and the Session is usually not allowed to " +"be flushed automatically, but explicitly." +msgstr "" +"Extended (or Long) Session - Hibernate 的" +"Session 可以在数据库事务提交之后和底层的JDBC连接断开,当一" +"个新的客户端请求到来的时候,它又重新连接上底层的 JDBC连接。这种模式被称之为" +"session-per-conversation,这种情况可 能会造成不必要的" +"Session和JDBC连接的重新关联。自动版本化被用来隔离并发修改, Session通常不允许自动flush,而是明确flush。" + +#. Tag: para +#: transactions.xml:244 +#, no-c-format +msgid "" +"Both session-per-request-with-detached-objects and " +"session-per-conversation have advantages and " +"disadvantages, we discuss them later in this chapter in the context of " +"optimistic concurrency control." +msgstr "" +"session-per-request-with-detached-objects 和 " +"session-per-conversation 各有优缺点,我们在本章后面乐观" +"并发 控制那部分再进行讨论。" + +#. Tag: title +#: transactions.xml:253 +#, no-c-format +msgid "Considering object identity" +msgstr "关注对象标识(Considering object identity)" + +#. Tag: para +#: transactions.xml:255 +#, no-c-format +msgid "" +"An application may concurrently access the same persistent state in two " +"different Sessions. However, an instance of a persistent " +"class is never shared between two Session instances. " +"Hence there are two different notions of identity:" +msgstr "" +"应用程序可能在两个不同的Session中并发访问同一持久化状态," +"但是, 一个持久化类的实例无法在两个 Session中共享。因此有" +"两种不同的标识语义:" + +#. Tag: term +#: transactions.xml:264 +#, no-c-format +msgid "Database Identity" +msgstr "数据库标识" + +#. Tag: literal +#: transactions.xml:267 +#, no-c-format +msgid "foo.getId().equals( bar.getId() )" +msgstr "foo.getId().equals( bar.getId() )" + +#. Tag: term +#: transactions.xml:272 +#, no-c-format +msgid "JVM Identity" +msgstr "JVM 标识" + +#. Tag: literal +#: transactions.xml:275 +#, no-c-format +msgid "foo==bar" +msgstr "foo==bar" + +#. Tag: para +#: transactions.xml:281 +#, fuzzy, no-c-format +msgid "" +"Then for objects attached to a particular " +"Session (i.e. in the scope of a Session) the two notions are equivalent, and JVM identity for database " +"identity is guaranteed by Hibernate. However, while the application might " +"concurrently access the \"same\" (persistent identity) business object in " +"two different sessions, the two instances will actually be \"different" +"\" (JVM identity). Conflicts are resolved using (automatic versioning) at " +"flush/commit time, using an optimistic approach." +msgstr "" +"对于那些关联到 特定Session (也就是在" +"单个Session的范围内)上的对象来说,这 两种标识的语义是等价" +"的,与数据库标识对应的JVM标识是由Hibernate来保 证的。不过,当应用程序在两个不" +"同的session中并发访问具有同一持久化标 识的业务对象实例的时候,这个业务对象的" +"两个实例事实上是不相同的(从 JVM识别来看)。这种冲突可以通过在同步和提交的时" +"候使用自动版本化和乐 观锁定方法来解决。" + +#. Tag: para +#: transactions.xml:290 +#, no-c-format +msgid "" +"This approach leaves Hibernate and the database to worry about concurrency; " +"it also provides the best scalability, since guaranteeing identity in single-" +"threaded units of work only doesn't need expensive locking or other means of " +"synchronization. The application never needs to synchronize on any business " +"object, as long as it sticks to a single thread per Session. Within a Session the application may safely use " +"== to compare objects." +msgstr "" +"这种方式把关于并发的头疼问题留给了Hibernate和数据库;由于在单个线程内,操作单" +"元中的对象识别不 需要代价昂贵的锁定或其他意义上的同步,因此它同时可以提供最好" +"的可伸缩性。只要在单个线程只持有一个 Session,应用程序就不" +"需要同步任何业务对象。在Session 的范围内,应用程序可以放心" +"的使用==进行对象比较。" + +#. Tag: para +#: transactions.xml:299 +#, no-c-format +msgid "" +"However, an application that uses == outside of a " +"Session, might see unexpected results. This might occur " +"even in some unexpected places, for example, if you put two detached " +"instances into the same Set. Both might have the same " +"database identity (i.e. they represent the same row), but JVM identity is by " +"definition not guaranteed for instances in detached state. The developer has " +"to override the equals() and hashCode() methods in persistent classes and implement his own notion of " +"object equality. There is one caveat: Never use the database identifier to " +"implement equality, use a business key, a combination of unique, usually " +"immutable, attributes. The database identifier will change if a transient " +"object is made persistent. If the transient instance (usually together with " +"detached instances) is held in a Set, changing the " +"hashcode breaks the contract of the Set. Attributes for " +"business keys don't have to be as stable as database primary keys, you only " +"have to guarantee stability as long as the objects are in the same " +"Set. See the Hibernate website for a more thorough " +"discussion of this issue. Also note that this is not a Hibernate issue, but " +"simply how Java object identity and equality has to be implemented." +msgstr "" +"不过,应用程序在Session的外面使用==进行" +"对象比较可能会 导致无法预期的结果。在一些无法预料的场合,例如,如果你把两个脱" +"管对象实例放进同一个 Set的时候,就可能发生。这两个对象实例" +"可能有同一个数据库标识(也就是说, 他们代表了表的同一行数据),从JVM标识的定" +"义上来说,对脱管的对象而言,Hibernate无法保证他们 的的JVM标识一致。开发人员必" +"须覆盖持久化类的equals()方法和 hashCode() 方法,从而实现自定义的对象相等语义。警告:不要使用数据库标识 来实现" +"对象相等,应该使用业务键值,由唯一的,通常不变的属性组成。当一个瞬时对象被持" +"久化的时 候,它的数据库标识会发生改变。如果一个瞬时对象(通常也包括脱管对象实" +"例)被放入一 个Set,改变它的hashcode会导致与这个" +"Set的关系中断。虽 然业务键值的属性不象数据库主键那样稳定不" +"变,但是你只需要保证在同一个Set 中的对象属性的稳定性就足够" +"了。请到Hibernate网站去寻求这个问题更多的详细的讨论。请注意,这不是一 个有关" +"Hibernate的问题,而仅仅是一个关于Java对象标识和判等行为如何实现的问题。" + +#. Tag: title +#: transactions.xml:320 +#, no-c-format +msgid "Common issues" +msgstr "常见问题" + +#. Tag: para +#: transactions.xml:322 +#, no-c-format +msgid "" +"Never use the anti-patterns session-per-user-session or " +"session-per-application (of course, there are rare " +"exceptions to this rule). Note that some of the following issues might also " +"appear with the recommended patterns, make sure you understand the " +"implications before making a design decision:" +msgstr "" +"决不要使用反模式session-per-user-session或者 " +"session-per-application(当然,这个规定几乎没有例外)。请注意, 下" +"述一些问题可能也会出现在我们推荐的模式中,在你作出某个设计决定之前,请务必理" +"解该模式的应用前提。" + +#. Tag: para +#: transactions.xml:331 +#, no-c-format +msgid "" +"A Session is not thread-safe. Things which are supposed " +"to work concurrently, like HTTP requests, session beans, or Swing workers, " +"will cause race conditions if a Session instance would be " +"shared. If you keep your Hibernate Session in your " +"HttpSession (discussed later), you should consider " +"synchronizing access to your Http session. Otherwise, a user that clicks " +"reload fast enough may use the same Session in two " +"concurrently running threads." +msgstr "" +"Session 对象是非线程安全的。如果一个Session 实例允许共享的话,那些支持并发运行的东东,例如HTTP request,session " +"beans,或者是 Swing workers,将会导致出现资源争用(race condition)。如果在" +"HttpSession中有 Hibernate 的Session的话" +"(稍后讨论),你应该考虑同步访问你的Http session。 否则,只要用户足够快的点击" +"浏览器的“刷新”,就会导致两个并发运行线程使用同一个 Session。" + +#. Tag: para +#: transactions.xml:342 +#, no-c-format +msgid "" +"An exception thrown by Hibernate means you have to rollback your database " +"transaction and close the Session immediately (discussed " +"later in more detail). If your Session is bound to the " +"application, you have to stop the application. Rolling back the database " +"transaction doesn't put your business objects back into the state they were " +"at the start of the transaction. This means the database state and the " +"business objects do get out of sync. Usually this is not a problem, because " +"exceptions are not recoverable and you have to start over after rollback " +"anyway." +msgstr "" +"一个由Hibernate抛出的异常意味着你必须立即回滚数据库事务,并立即关闭" +"Session (稍后会展开讨论)。如果你的Session绑定到一个应用程序上,你必 须停止该应用程序。回滚数据库事务并不会把你" +"的业务对象退回到事务启动时候的状态。这 意味着数据库状态和业务对象状态不同步。" +"通常情况下,这不是什么问题,因为异常是不可 恢复的,你必须在回滚之后重新开始执" +"行。" + +#. Tag: para +#: transactions.xml:354 +#, no-c-format +msgid "" +"The Session caches every object that is in persistent " +"state (watched and checked for dirty state by Hibernate). This means it " +"grows endlessly until you get an OutOfMemoryException, if you keep it open " +"for a long time or simply load too much data. One solution for this is to " +"call clear() and evict() to manage the " +"Session cache, but you most likely should consider a " +"Stored Procedure if you need mass data operations. Some solutions are shown " +"in . Keeping a Session open for " +"the duration of a user session also means a high probability of stale data." +msgstr "" +"Session 缓存了处于持久化状态的每个对象(Hibernate会监视和" +"检查脏数据)。 这意味着,如果你让Session打开很长一段时间," +"或是仅仅载入了过多的数据, Session占用的内存会一直增长,直" +"到抛出OutOfMemoryException异常。这个 问题的一个解决方法是调用clear()" +"evict()来管理 Session的缓" +"存,但是如果你需要大批量数据操作的话,最好考虑 使用存储过程。在中有一些解决方案。在用户会话期间一直保持 Session打开也意味着出现脏数据的可能性很高。" + +#. Tag: title +#: transactions.xml:372 +#, no-c-format +msgid "Database transaction demarcation" +msgstr "数据库事务声明" + +#. Tag: para +#: transactions.xml:374 +#, fuzzy, no-c-format +msgid "" +"Database (or system) transaction boundaries are always necessary. No " +"communication with the database can occur outside of a database transaction " +"(this seems to confuse many developers who are used to the auto-commit " +"mode). Always use clear transaction boundaries, even for read-only " +"operations. Depending on your isolation level and database capabilities this " +"might not be required but there is no downside if you always demarcate " +"transactions explicitly. Certainly, a single database transaction is going " +"to perform better than many small transactions, even for reading data." +msgstr "" +"数据库(或者系统)事务的声明总是必须的。在数据库事务之外,就无法和数据库通讯" +"(这可能会让那些习惯于 自动提交事务模式的开发人员感到迷惑)。永远使用清晰的事" +"务声明,即使只读操作也是如此。进行 显式的事务声明并不总是需要的,这取决于你的" +"事务隔离级别和数据库的能力,但不管怎么说,声明事务总归有益无害。当然,一个单" +"独的数据库事务总是比很多琐碎的事务性能更好,即时对读数据而言也是一样。" + +#. Tag: para +#: transactions.xml:384 +#, no-c-format +msgid "" +"A Hibernate application can run in non-managed (i.e. standalone, simple Web- " +"or Swing applications) and managed J2EE environments. In a non-managed " +"environment, Hibernate is usually responsible for its own database " +"connection pool. The application developer has to manually set transaction " +"boundaries, in other words, begin, commit, or rollback database transactions " +"himself. A managed environment usually provides container-managed " +"transactions (CMT), with the transaction assembly defined declaratively in " +"deployment descriptors of EJB session beans, for example. Programmatic " +"transaction demarcation is then no longer necessary." +msgstr "" +"一个Hibernate应用程序可以运行在非托管环境中(也就是独立运行的应用程序,简单" +"Web应用程序, 或者Swing图形桌面应用程序),也可以运行在托管的J2EE环境中。在一" +"个非托管环境中,Hibernate 通常自己负责管理数据库连接池。应用程序开发人员必须" +"手工设置事务声明,换句话说,就是手工启 动,提交,或者回滚数据库事务。一个托管" +"的环境通常提供了容器管理事务(CMT),例如事务装配通过可声 明的方式定义在EJB " +"session beans的部署描述符中。可编程式事务声明不再需要,即使是 " +"Session 的同步也可以自动完成。" + +#. Tag: para +#: transactions.xml:394 +#, fuzzy, no-c-format +msgid "" +"However, it is often desirable to keep your persistence layer portable " +"between non-managed resource-local environments, and systems that can rely " +"on JTA but use BMT instead of CMT. In both cases you'd use programmatic " +"transaction demarcation. Hibernate offers a wrapper API called " +"Transaction that translates into the native transaction " +"system of your deployment environment. This API is actually optional, but we " +"strongly encourage its use unless you are in a CMT session bean." +msgstr "" +"让持久层具备可移植性是人们的理想,这种移植发生在非托管的本地资源环境,与依赖" +"JTA但是使用BMT而非CMT的系统之间。在两种情况下你都可以使用编程式的事务管理。" +"Hibernate提供了一套称为Transaction的封装API, 用来把你的部" +"署环境中的本地事务管理系统转换到Hibernate事务上。这个API是可选的,但是我们强" +"烈 推荐你使用,除非你用CMT session bean。" + +#. Tag: para +#: transactions.xml:403 +#, no-c-format +msgid "" +"Usually, ending a Session involves four distinct phases:" +msgstr "通常情况下,结束 Session 包含了四个不同的阶段:" + +#. Tag: para +#: transactions.xml:409 +#, no-c-format +msgid "flush the session" +msgstr "同步session(flush,刷出到磁盘)" + +#. Tag: para +#: transactions.xml:414 +#, no-c-format +msgid "commit the transaction" +msgstr "提交事务" + +#. Tag: para +#: transactions.xml:419 +#, no-c-format +msgid "close the session" +msgstr "关闭session" + +#. Tag: para +#: transactions.xml:424 +#, no-c-format +msgid "handle exceptions" +msgstr "处理异常" + +#. Tag: para +#: transactions.xml:430 +#, no-c-format +msgid "" +"Flushing the session has been discussed earlier, we'll now have a closer " +"look at transaction demarcation and exception handling in both managed- and " +"non-managed environments." +msgstr "" +"session的同步(flush,刷出)前面已经讨论过了,我们现在进一步考察在托管和非托管" +"环境下的事务声明和异常处理。" + +#. Tag: title +#: transactions.xml:437 +#, no-c-format +msgid "Non-managed environment" +msgstr "非托管环境" + +#. Tag: para +#: transactions.xml:439 +#, no-c-format +msgid "" +"If a Hibernate persistence layer runs in a non-managed environment, database " +"connections are usually handled by simple (i.e. non-DataSource) connection " +"pools from which Hibernate obtains connections as needed. The session/" +"transaction handling idiom looks like this:" +msgstr "" +"如果Hibernat持久层运行在一个非托管环境中,数据库连接通常由Hibernate的简单(即" +"非DataSource)连接池机制 来处理。session/transaction处理方式如下所示:" + +#. Tag: programlisting +#: transactions.xml:446 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:448 +#, fuzzy, no-c-format +msgid "" +"You don't have to flush() the Session " +"explicitly - the call to commit() automatically triggers " +"the synchronization (depending upon the FlushMode for the session. A call to close() " +"marks the end of a session. The main implication of close() is that the JDBC connection will be relinquished by the session. " +"This Java code is portable and runs in both non-managed and JTA environments." +msgstr "" +"你不需要显式flush()Session - 对" +"commit()的调用会自动触发session的同步(取决于session的" +"FlushMode)。调用 close" +"() 标志session的结束。close()方法重要的暗示是," +"session释放了JDBC连接。这段Java代码在非托管环境下和JTA环境" +"下都可以运行。" + +#. Tag: para +#: transactions.xml:457 +#, no-c-format +msgid "" +"A much more flexible solution is Hibernate's built-in \"current session\" " +"context management, as described earlier:" +msgstr "" +"更加灵活的方案是Hibernate内置的\"current session\"上下文管理,前文已经讲过:" + +#. Tag: programlisting +#: transactions.xml:462 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:464 +#, no-c-format +msgid "" +"You will very likely never see these code snippets in a regular application; " +"fatal (system) exceptions should always be caught at the \"top\". In other " +"words, the code that executes Hibernate calls (in the persistence layer) and " +"the code that handles RuntimeException (and usually can " +"only clean up and exit) are in different layers. The current context " +"management by Hibernate can significantly simplify this design, as all you " +"need is access to a SessionFactory. Exception handling is " +"discussed later in this chapter." +msgstr "" +"你很可能从未在一个通常的应用程序的业务代码中见过这样的代码片断:致命的(系" +"统)异常应该总是 在应用程序“顶层”被捕获。换句话说,执行Hibernate调用的代码" +"(在持久层)和处理 RuntimeException异常的代码(通常只能清" +"理和退出应用程序)应该在不同 的应用程序逻辑层。Hibernate的当前上下文管理可以" +"极大地简化这一设计,你所有的一切就是SessionFactory。 异常" +"处理将在本章稍后进行讨论。" + +#. Tag: para +#: transactions.xml:474 +#, no-c-format +msgid "" +"Note that you should select org.hibernate.transaction." +"JDBCTransactionFactory (which is the default), and for the second " +"example \"thread\" as your hibernate." +"current_session_context_class." +msgstr "" +"请注意,你应该选择 org.hibernate.transaction." +"JDBCTransactionFactory (这是默认选项),对第二个例子来说," +"hibernate.current_session_context_class应该是" +"\"thread\"" + +#. Tag: title +#: transactions.xml:483 +#, no-c-format +msgid "Using JTA" +msgstr "使用JTA" + +#. Tag: para +#: transactions.xml:485 +#, no-c-format +msgid "" +"If your persistence layer runs in an application server (e.g. behind EJB " +"session beans), every datasource connection obtained by Hibernate will " +"automatically be part of the global JTA transaction. You can also install a " +"standalone JTA implementation and use it without EJB. Hibernate offers two " +"strategies for JTA integration." +msgstr "" +"如果你的持久层运行在一个应用服务器中(例如,在EJB session beans的后面)," +"Hibernate获取 的每个数据源连接将自动成为全局JTA事务的一部分。 你可以安装一个" +"独立的JTA实现,使用它而不使用EJB。Hibernate提供了两种策略进行JTA集成。" + +#. Tag: para +#: transactions.xml:492 +#, no-c-format +msgid "" +"If you use bean-managed transactions (BMT) Hibernate will tell the " +"application server to start and end a BMT transaction if you use the " +"Transaction API. So, the transaction management code is " +"identical to the non-managed environment." +msgstr "" +"如果你使用bean管理事务(BMT),可以通过使用Hibernate的 Transaction API来告诉 应用服务器启动和结束BMT事务。因此,事务管理代码和在非托管" +"环境下是一样的。" + +#. Tag: programlisting +#: transactions.xml:498 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:500 +#, no-c-format +msgid "" +"If you want to use a transaction-bound Session, that is, " +"the getCurrentSession() functionality for easy context " +"propagation, you will have to use the JTA UserTransaction " +"API directly:" +msgstr "" +"如果你希望使用与事务绑定的Session,也就是使用" +"getCurrentSession()来简化上下文管理,你将不得不直接使用" +"JTA UserTransactionAPI。" + +#. Tag: programlisting +#: transactions.xml:506 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:508 +#, fuzzy, no-c-format +msgid "" +"With CMT, transaction demarcation is done in session bean deployment " +"descriptors, not programmatically, hence, the code is reduced to:" +msgstr "" +"在CMT方式下,事务声明是在session bean的部署描述符中,而不需要编程。 因此,代" +"码被简化为:" + +#. Tag: programlisting +#: transactions.xml:513 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:515 +#, no-c-format +msgid "" +"In a CMT/EJB even rollback happens automatically, since an unhandled " +"RuntimeException thrown by a session bean method tells " +"the container to set the global transaction to rollback. This " +"means you do not need to use the Hibernate Transaction " +"API at all with BMT or CMT, and you get automatic propagation of the " +"\"current\" Session bound to the transaction." +msgstr "" +"在CMT/EJB中甚至会自动rollback,因为假若有未捕获的RuntimeException从session bean方法中抛出,这就会通知容器把全局事务回滚。这" +"就意味着,在BMT或者CMT中,你根本就不需要使用Hibernate Transaction API ,你自动得到了绑定到事务的“当前”Session。 " + +#. Tag: para +#: transactions.xml:523 +#, fuzzy, no-c-format +msgid "" +"Note that you should choose org.hibernate.transaction." +"JTATransactionFactory if you use JTA directly (BMT), and " +"org.hibernate.transaction.CMTTransactionFactory in a CMT " +"session bean, when you configure Hibernate's transaction factory. Remember " +"to also set hibernate.transaction.manager_lookup_class. " +"Furthermore, make sure that your hibernate." +"current_session_context_class is either unset (backwards " +"compatibility), or set to \"jta\"." +msgstr "" +"注意,当你配置Hibernate的transaction factory的时候,在直接使用JTA的时候" +"(BMT),你应该选择org.hibernate.transaction.JTATransactionFactory,在CMT session bean中选择org.hibernate.transaction." +"CMTTransactionFactory。记得也要设置hibernate.transaction." +"manager_lookup_class。还有,确认你的hibernate." +"current_session_context_class未设置(为了向下兼容),或者设置为" +"\"jta\"。" + +#. Tag: para +#: transactions.xml:532 +#, fuzzy, no-c-format +msgid "" +"The getCurrentSession() operation has one downside in a " +"JTA environment. There is one caveat to the use of after_statement connection release mode, which is then used by default. Due to a " +"silly limitation of the JTA spec, it is not possible for Hibernate to " +"automatically clean up any unclosed ScrollableResults or " +"Iterator instances returned by scroll() or iterate(). You must " +"release the underlying database cursor by calling ScrollableResults." +"close() or Hibernate.close(Iterator) explicitly " +"from a finally block. (Of course, most applications can " +"easily avoid using scroll() or iterate() at all from the JTA or CMT code.)" +msgstr "" +"getCurrentSession()在JTA环境中有一个弊端。对" +"after_statement连接释放方式有一个警告,这是被默认使用的。" +"因为JTA规范的一个很愚蠢的限制,Hibernate不可能自动清理任何未关闭的" +"ScrollableResults 或者Iterator,它们是" +"由scroll()iterate()产生的。你" +"must通过在finally块中,显式调用" +"ScrollableResults.close()或者Hibernate.close" +"(Iterator)方法来释放底层数据库游标。(当然,大部分程序完全可以很容易" +"的避免在JTA或CMT代码中出现scroll()iterate()。)" + +#. Tag: title +#: transactions.xml:548 +#, no-c-format +msgid "Exception handling" +msgstr "异常处理" + +#. Tag: para +#: transactions.xml:550 +#, no-c-format +msgid "" +"If the Session throws an exception (including any " +"SQLException), you should immediately rollback the " +"database transaction, call Session.close() and discard " +"the Session instance. Certain methods of " +"Session will not leave the session " +"in a consistent state. No exception thrown by Hibernate can be treated as " +"recoverable. Ensure that the Session will be closed by " +"calling close() in a finally block." +msgstr "" +"如果 Session 抛出异常 (包括任何SQLException), 你应该立即回滚数据库事务,调用 Session.close() ,丢弃该 Session实例。Session" +"的某些方法可能会导致session 处于不一致的状态。所有由Hibernate抛出的异常都视为" +"不可以恢复的。确保在 finally 代码块中调用close()" +"方法,以关闭掉 Session。" + +#. Tag: para +#: transactions.xml:561 +#, no-c-format +msgid "" +"The HibernateException, which wraps most of the errors " +"that can occur in a Hibernate persistence layer, is an unchecked exception " +"(it wasn't in older versions of Hibernate). In our opinion, we shouldn't " +"force the application developer to catch an unrecoverable exception at a low " +"layer. In most systems, unchecked and fatal exceptions are handled in one of " +"the first frames of the method call stack (i.e. in higher layers) and an " +"error message is presented to the application user (or some other " +"appropriate action is taken). Note that Hibernate might also throw other " +"unchecked exceptions which are not a HibernateException. " +"These are, again, not recoverable and appropriate action should be taken." +msgstr "" +"HibernateException是一个非检查期异常(这不同于Hibernate老" +"的版本), 它封装了Hibernate持久层可能出现的大多数错误。我们的观点是,不应该" +"强迫应用程序开发人员 在底层捕获无法恢复的异常。在大多数软件系统中,非检查期异" +"常和致命异常都是在相应方法调用 的堆栈的顶层被处理的(也就是说,在软件上面的逻" +"辑层),并且提供一个错误信息给应用软件的用户 (或者采取其他某些相应的操作)。" +"请注意,Hibernate也有可能抛出其他并不属于 HibernateException的非检查期异常。这些异常同样也是无法恢复的,应该 采取某些相应的操作去" +"处理。" + +#. Tag: para +#: transactions.xml:573 +#, fuzzy, no-c-format +msgid "" +"Hibernate wraps SQLExceptions thrown while interacting " +"with the database in a JDBCException. In fact, Hibernate " +"will attempt to convert the exception into a more meaningful subclass of " +"JDBCException. The underlying SQLException is always available via JDBCException.getCause(). Hibernate converts the SQLException into an " +"appropriate JDBCException subclass using the " +"SQLExceptionConverter attached to the " +"SessionFactory. By default, the " +"SQLExceptionConverter is defined by the configured " +"dialect; however, it is also possible to plug in a custom implementation " +"(see the javadocs for the SQLExceptionConverterFactory " +"class for details). The standard JDBCException subtypes " +"are:" +msgstr "" +"在和数据库进行交互时,Hibernate把捕获的SQLException封装为" +"Hibernate的 JDBCException。事实上,Hibernate尝试把异常转换" +"为更有实际含义 的JDBCException异常的子类。底层的" +"SQLException可以 通过JDBCException.getCause()来得到。Hibernate通过使用关联到 SessionFactory上的" +"SQLExceptionConverter来 把SQLException" +"转换为一个对应的JDBCException 异常的子类。默认情况下," +"SQLExceptionConverter可以通过配置dialect 选项指定;此外," +"也可以使用用户自定义的实现类(参考javadocs " +"SQLExceptionConverterFactory类来了解详情)。标准的 " +"JDBCException子类型是:" + +#. Tag: para +#: transactions.xml:589 +#, no-c-format +msgid "" +"JDBCConnectionException - indicates an error with the " +"underlying JDBC communication." +msgstr "" +"JDBCConnectionException - 指明底层的JDBC通讯出现错误" + +#. Tag: para +#: transactions.xml:595 +#, no-c-format +msgid "" +"SQLGrammarException - indicates a grammar or syntax " +"problem with the issued SQL." +msgstr "" +"SQLGrammarException - 指明发送的SQL语句的语法或者格式错误" + +#. Tag: para +#: transactions.xml:601 +#, no-c-format +msgid "" +"ConstraintViolationException - indicates some form of " +"integrity constraint violation." +msgstr "" +"ConstraintViolationException - 指明某种类型的约束违例错误" + +#. Tag: para +#: transactions.xml:607 +#, no-c-format +msgid "" +"LockAcquisitionException - indicates an error acquiring a " +"lock level necessary to perform the requested operation." +msgstr "" +"LockAcquisitionException - 指明了在执行请求操作时,获取 所" +"需的锁级别时出现的错误。" + +#. Tag: para +#: transactions.xml:613 +#, no-c-format +msgid "" +"GenericJDBCException - a generic exception which did not " +"fall into any of the other categories." +msgstr "GenericJDBCException - 不属于任何其他种类的原生异常" + +#. Tag: title +#: transactions.xml:623 +#, no-c-format +msgid "Transaction timeout" +msgstr "事务超时" + +#. Tag: para +#: transactions.xml:625 +#, fuzzy, no-c-format +msgid "" +"One extremely important feature provided by a managed environment like EJB " +"that is never provided for non-managed code is transaction timeout. " +"Transaction timeouts ensure that no misbehaving transaction can indefinitely " +"tie up resources while returning no response to the user. Outside a managed " +"(JTA) environment, Hibernate cannot fully provide this functionality. " +"However, Hibernate can at least control data access operations, ensuring " +"that database level deadlocks and queries with huge result sets are limited " +"by a defined timeout. In a managed environment, Hibernate can delegate " +"transaction timeout to JTA. This functionality is abstracted by the " +"Hibernate Transaction object." +msgstr "" +"EJB这样的托管环境有一项极为重要的特性,而它从未在非托管环境中提供过,那就是事" +"务超时。在出现错误的事务行为的时候,超时可以确保不会无限挂起资源、对用户没有" +"交代。在托管(JTA)环境之外,Hibernate无法完全提供这一功能。但是,Hiberante至少" +"可以控制数据访问,确保数据库级别的死锁,和返回巨大结果集的查询被限定在一个规" +"定的时间内。在托管环境中,Hibernate会把事务超时转交给JTA。这一功能通过" +"Hibernate Transaction对象进行抽象。" + +#. Tag: programlisting +#: transactions.xml:638 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:640 +#, no-c-format +msgid "" +"Note that setTimeout() may not be called in a CMT bean, " +"where transaction timeouts must be defined declaratively." +msgstr "" +"注意setTimeout()不应该在CMT bean中调用,此时事务超时值应该" +"是被声明式定义的。" + +#. Tag: title +#: transactions.xml:650 +#, no-c-format +msgid "Optimistic concurrency control" +msgstr "乐观并发控制(Optimistic concurrency control)" + +#. Tag: para +#: transactions.xml:652 +#, no-c-format +msgid "" +"The only approach that is consistent with high concurrency and high " +"scalability is optimistic concurrency control with versioning. Version " +"checking uses version numbers, or timestamps, to detect conflicting updates " +"(and to prevent lost updates). Hibernate provides for three possible " +"approaches to writing application code that uses optimistic concurrency. The " +"use cases we show are in the context of long conversations, but version " +"checking also has the benefit of preventing lost updates in single database " +"transactions." +msgstr "" +"唯一能够同时保持高并发和高可伸缩性的方法就是使用带版本化的乐观并发控制。版本" +"检查使用版本号、 或者时间戳来检测更新冲突(并且防止更新丢失)。Hibernate为使" +"用乐观并发控制的代码提供了三种可 能的方法,应用程序在编写这些代码时,可以采用" +"它们。我们已经在前面应用程序对话那部分展示了 乐观并发控制的应用场景,此外,在" +"单个数据库事务范围内,版本检查也提供了防止更新丢失的好处。" + +#. Tag: title +#: transactions.xml:663 +#, no-c-format +msgid "Application version checking" +msgstr "应用程序级别的版本检查(Application version checking)" + +#. Tag: para +#: transactions.xml:665 +#, no-c-format +msgid "" +"In an implementation without much help from Hibernate, each interaction with " +"the database occurs in a new Session and the developer is " +"responsible for reloading all persistent instances from the database before " +"manipulating them. This approach forces the application to carry out its own " +"version checking to ensure conversation transaction isolation. This approach " +"is the least efficient in terms of database access. It is the approach most " +"similar to entity EJBs." +msgstr "" +"未能充分利用Hibernate功能的实现代码中,每次和数据库交互都需要一个新的 " +"Session,而且开发人员必须在显示数据之前从数据库中重 新载入" +"所有的持久化对象实例。这种方式迫使应用程序自己实现版本检查来确保 对话事务的隔" +"离,从数据访问的角度来说是最低效的。这种使用方式和 entity EJB最相似。" + +#. Tag: programlisting +#: transactions.xml:674 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:676 +#, no-c-format +msgid "" +"The version property is mapped using <" +"version>, and Hibernate will automatically increment it during " +"flush if the entity is dirty." +msgstr "" +"version 属性使用 <version>来映" +"射,如果对象 是脏数据,在同步的时候,Hibernate会自动增加版本号。" + +#. Tag: para +#: transactions.xml:682 +#, no-c-format +msgid "" +"Of course, if you are operating in a low-data-concurrency environment and " +"don't require version checking, you may use this approach and just skip the " +"version check. In that case, last commit wins will be " +"the default strategy for your long conversations. Keep in mind that this " +"might confuse the users of the application, as they might experience lost " +"updates without error messages or a chance to merge conflicting changes." +msgstr "" +"当然,如果你的应用是在一个低数据并发环境下,并不需要版本检查的话,你照样可以" +"使用 这种方式,只不过跳过版本检查就是了。在这种情况下,最晚提交生效" +"last commit wins)就是你的长对话的默认处理" +"策略。 请记住这种策略可能会让应用软件的用户感到困惑,因为他们有可能会碰上更新" +"丢失掉却没 有出错信息,或者需要合并更改冲突的情况。" + +#. Tag: para +#: transactions.xml:691 +#, fuzzy, no-c-format +msgid "" +"Clearly, manual version checking is only feasible in very trivial " +"circumstances and not practical for most applications. Often not only single " +"instances, but complete graphs of modified objects have to be checked. " +"Hibernate offers automatic version checking with either an extended " +"Session or detached instances as the design paradigm." +msgstr "" +"很明显,手工进行版本检查只适合于某些软件规模非常小的应用场景,对于大多数软件" +"应用场景 来说并不现实。通常情况下,不仅是单个对象实例需要进行版本检查,整个被" +"修改过的关 联对象图也都需要进行版本检查。作为标准设计范例,Hibernate使用扩展" +"周期的 Session的方式,或者脱管对象实例的方式来提供自动版本" +"检查。" + +#. Tag: title +#: transactions.xml:702 +#, no-c-format +msgid "Extended session and automatic versioning" +msgstr "扩展周期的session和自动版本化" + +#. Tag: para +#: transactions.xml:704 +#, no-c-format +msgid "" +"A single Session instance and its persistent instances " +"are used for the whole conversation, known as session-per-" +"conversation. Hibernate checks instance versions at flush time, " +"throwing an exception if concurrent modification is detected. It's up to the " +"developer to catch and handle this exception (common options are the " +"opportunity for the user to merge changes or to restart the business " +"conversation with non-stale data)." +msgstr "" +"单个 Session实例和它所关联的所有持久化对象实例都被用于整" +"个 对话,这被称为session-per-conversation。Hibernate在同" +"步的时候进行对象实例的版本检查,如果检测到并发修 改则抛出异常。由开发人员来决" +"定是否需要捕获和处理这个异常(通常的抉择是给用户 提供一个合并更改,或者在无脏" +"数据情况下重新进行业务对话的机会)。" + +#. Tag: para +#: transactions.xml:713 +#, no-c-format +msgid "" +"The Session is disconnected from any underlying JDBC " +"connection when waiting for user interaction. This approach is the most " +"efficient in terms of database access. The application need not concern " +"itself with version checking or with reattaching detached instances, nor " +"does it have to reload instances in every database transaction." +msgstr "" +"在等待用户交互的时候, Session 断开底层的JDBC连接。这种方" +"式 以数据库访问的角度来说是最高效的方式。应用程序不需要关心版本检查或脱管对象" +"实例 的重新关联,在每个数据库事务中,应用程序也不需要载入读取对象实例。" + +#. Tag: programlisting +#: transactions.xml:721 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:722 +#, no-c-format +msgid "" +"The foo object still knows which Session it was loaded in. Beginning a new database transaction on an old " +"session obtains a new connection and resumes the session. Committing a " +"database transaction disconnects a session from the JDBC connection and " +"returns the connection to the pool. After reconnection, to force a version " +"check on data you aren't updating, you may call Session.lock() with LockMode.READ on any objects that might " +"have been updated by another transaction. You don't need to lock any data " +"that you are updating. Usually you would set " +"FlushMode.MANUAL on an extended Session, so that only the last database transaction cycle is allowed to " +"actually persist all modifications made in this conversation. Hence, only " +"this last database transaction would include the flush() " +"operation, and then also close() the session to end the " +"conversation." +msgstr "" +"foo对象知道它是在哪个Session中被装入" +"的。在一个旧session中开启一个新的数据库事务,会导致session获取一个新的连接," +"并恢复session的功能。将数据库事务提交,使得session从JDBC连接断开,并将此连接" +"交还给连接池。在重新连接之后,要强制对你没有更新的数据进行一次版本检查,你可" +"以对所有可能被其他事务修改过的对象,使用参数LockMode.READ" +"来调用Session.lock()。你不用lock任何你正在更新的数据。一般你会在扩展的Session上设置" +"FlushMode.MANUAL,因此只有最后一个数据库事务循环才会真正的" +"吧整个对话中发生的修改发送到数据库。因此,只有这最后一次数据库事务才会包含" +"flush()操作,然后在整个对话结束后,还要close()这个session。" + +#. Tag: para +#: transactions.xml:737 +#, no-c-format +msgid "" +"This pattern is problematic if the Session is too big to " +"be stored during user think time, e.g. an HttpSession " +"should be kept as small as possible. As the Session is " +"also the (mandatory) first-level cache and contains all loaded objects, we " +"can probably use this strategy only for a few request/response cycles. You " +"should use a Session only for a single conversation, as " +"it will soon also have stale data." +msgstr "" +"如果在用户思考的过程中,Session因为太大了而不能保存,那么" +"这种模式是有 问题的。举例来说,一个HttpSession应该尽可能的" +"小。由于 Session是一级缓存,并且保持了所有被载入过的对象," +"因此 我们只应该在那些少量的request/response情况下使用这种策略。你应该只把一个" +"Session用于单个对话,因为它很快就会出现脏数据。" + +#. Tag: para +#: transactions.xml:747 +#, no-c-format +msgid "" +"(Note that earlier Hibernate versions required explicit disconnection and " +"reconnection of a Session. These methods are deprecated, " +"as beginning and ending a transaction has the same effect.)" +msgstr "" +"(注意,早期的Hibernate版本需要明确的对Session进行" +"disconnec和reconnect。这些方法现在已经过时了,打开事务和关闭事务会起到同样的" +"效果。)" + +#. Tag: para +#: transactions.xml:753 +#, no-c-format +msgid "" +"Also note that you should keep the disconnected Session " +"close to the persistence layer. In other words, use an EJB stateful session " +"bean to hold the Session in a three-tier environment, and " +"don't transfer it to the web layer (or even serialize it to a separate tier) " +"to store it in the HttpSession." +msgstr "" +"此外,也请注意,你应该让与数据库连接断开的Session对持久层" +"保持 关闭状态。换句话说,在三层环境中,使用有状态的EJB session bean来持有" +"Session, 而不要把它传递到web层(甚至把它序列化到一个单独" +"的层),保存在HttpSession中。" + +#. Tag: para +#: transactions.xml:761 +#, no-c-format +msgid "" +"The extended session pattern, or session-per-conversation, is more difficult to implement with automatic current session " +"context management. You need to supply your own implementation of the " +"CurrentSessionContext for this, see the Hibernate Wiki " +"for examples." +msgstr "" +"扩展session模式,或者被称为每次对话一个session(session-per-" +"conversation), 在与自动管理当前session上下文联用的时候会更困难。你" +"需要提供你自己的CurrentSessionContext实现。请参阅" +"Hibernate Wiki以获得示例。" + +#. Tag: title +#: transactions.xml:771 +#, no-c-format +msgid "Detached objects and automatic versioning" +msgstr "脱管对象(deatched object)和自动版本化" + +#. Tag: para +#: transactions.xml:773 +#, no-c-format +msgid "" +"Each interaction with the persistent store occurs in a new Session. However, the same persistent instances are reused for each " +"interaction with the database. The application manipulates the state of " +"detached instances originally loaded in another Session " +"and then reattaches them using Session.update(), " +"Session.saveOrUpdate(), or Session.merge()." +msgstr "" +"这种方式下,与持久化存储的每次交互都发生在一个新的Session" +"中。 然而,同一持久化对象实例可以在多次与数据库的交互中重用。应用程序操纵脱管" +"对象实例 的状态,这个脱管对象实例最初是在另一个Session 中" +"载入的,然后 调用 Session.update()Session." +"saveOrUpdate(), 或者 Session.merge() 来重新关联" +"该对象实例。" + +#. Tag: programlisting +#: transactions.xml:781 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: transactions.xml:783 +#, fuzzy, no-c-format +msgid "" +"Again, Hibernate will check instance versions during flush, throwing an " +"exception if conflicting updates occurred." +msgstr "" +"Hibernate会再一次在同步的时候检查对象实例的版本,如果发生更新冲突,就抛出异" +"常。" + +#. Tag: para +#: transactions.xml:788 +#, no-c-format +msgid "" +"You may also call lock() instead of update() and use LockMode.READ (performing a version " +"check, bypassing all caches) if you are sure that the object has not been " +"modified." +msgstr "" +"如果你确信对象没有被修改过,你也可以调用lock() 来设置 " +"LockMode.READ(绕过所有的缓存,执行版本检查),从而取 代 " +"update()操作。" + +#. Tag: title +#: transactions.xml:797 +#, no-c-format +msgid "Customizing automatic versioning" +msgstr "定制自动版本化行为" + +#. Tag: para +#: transactions.xml:799 +#, no-c-format +msgid "" +"You may disable Hibernate's automatic version increment for particular " +"properties and collections by setting the optimistic-lock " +"mapping attribute to false. Hibernate will then no longer " +"increment versions if the property is dirty." +msgstr "" +"对于特定的属性和集合,通过为它们设置映射属性optimistic-lock的值 为false,来禁止Hibernate的版本自动增加。这样" +"的话,如果该属性 脏数据,Hibernate将不再增加版本号。" + +#. Tag: para +#: transactions.xml:806 +#, fuzzy, no-c-format +msgid "" +"Legacy database schemas are often static and can't be modified. Or, other " +"applications might also access the same database and don't know how to " +"handle version numbers or even timestamps. In both cases, versioning can't " +"rely on a particular column in a table. To force a version check without a " +"version or timestamp property mapping, with a comparison of the state of all " +"fields in a row, turn on optimistic-lock=\"all\" in the " +"<class> mapping. Note that this conceptually only " +"works if Hibernate can compare the old and new state, i.e. if you use a " +"single long Session and not session-per-request-with-" +"detached-objects." +msgstr "" +"遗留系统的数据库Schema通常是静态的,不可修改的。或者,其他应用程序也可能访问" +"同一数据 库,根本无法得知如何处理版本号,甚至时间戳。在以上的所有场景中,实现" +"版本化不能依靠 数据库表的某个特定列。在<class>的映射" +"中设置 optimistic-lock=\"all\"可以在没有版本或者时间戳属性" +"映射的情况下实现 版本检查,此时Hibernate将比较一行记录的每个字段的状态。请注" +"意,只有当Hibernate能够比 较新旧状态的情况下,这种方式才能生效,也就是说, 你" +"必须使用单个长生命周期Session模式,而不能使用 session-per-" +"request-with-detached-objects模式。" + +#. Tag: para +#: transactions.xml:817 +#, no-c-format +msgid "" +"Sometimes concurrent modification can be permitted as long as the changes " +"that have been made don't overlap. If you set optimistic-lock=" +"\"dirty\" when mapping the <class>, " +"Hibernate will only compare dirty fields during flush." +msgstr "" +"有些情况下,只要更改不发生交错,并发修改也是允许的。当你在<" +"class> 的映射中设置optimistic-lock=\"dirty\",Hibernate在同步的时候将只比较有脏 数据的字段。" + +#. Tag: para +#: transactions.xml:823 +#, fuzzy, no-c-format +msgid "" +"In both cases, with dedicated version/timestamp columns or with full/dirty " +"field comparison, Hibernate uses a single UPDATE " +"statement (with an appropriate WHERE clause) per entity " +"to execute the version check and update the information. If you use " +"transitive persistence to cascade reattachment to associated entities, " +"Hibernate might execute unnecessary updates. This is usually not a problem, " +"but on update triggers in the database might be " +"executed even when no changes have been made to detached instances. You can " +"customize this behavior by setting select-before-update=\"true\" in the <class> mapping, forcing Hibernate " +"to SELECT the instance to ensure that changes did " +"actually occur, before updating the row." +msgstr "" +"在以上所有场景中,不管是专门设置一个版本/时间戳列,还是进行全部字段/脏数据字" +"段比较, Hibernate都会针对每个实体对象发送一条UPDATE(带有" +"相应的 WHERE语句 )的SQL语句来执行版本检查和数据更新。如果" +"你对关联实体 设置级联关系使用传播性持久化(transitive persistence),那么" +"Hibernate可能会执行不必 要的update语句。这通常不是个问题,但是数据库里面对" +"on update点火 的触发器可能在脱管对象没有任何更改的情况下" +"被触发。因此,你可以在 <class>的映射中,通过设置" +"select-before-update=\"true\" 来定制这一行为,强制" +"Hibernate SELECT这个对象实例,从而保证, 在更新记录之前," +"对象的确是被修改过。" + +#. Tag: title +#: transactions.xml:841 +#, no-c-format +msgid "Pessimistic Locking" +msgstr "悲观锁定(Pessimistic Locking)" + +#. Tag: para +#: transactions.xml:843 +#, fuzzy, no-c-format +msgid "" +"It is not intended that users spend much time worrying about locking " +"strategies. It's usually enough to specify an isolation level for the JDBC " +"connections and then simply let the database do all the work. However, " +"advanced users may sometimes wish to obtain exclusive pessimistic locks, or " +"re-obtain locks at the start of a new transaction." +msgstr "" +"用户其实并不需要花很多精力去担心锁定策略的问题。通常情况下,只要为JDBC连接指" +"定一下隔 离级别,然后让数据库去搞定一切就够了。然而,高级用户有时候希望进行一" +"个排它的悲观锁定, 或者在一个新的事务启动的时候,重新进行锁定。" + +#. Tag: para +#: transactions.xml:850 +#, no-c-format +msgid "" +"Hibernate will always use the locking mechanism of the database, never lock " +"objects in memory!" +msgstr "Hibernate总是使用数据库的锁定机制,从不在内存中锁定对象!" + +#. Tag: para +#: transactions.xml:855 +#, no-c-format +msgid "" +"The LockMode class defines the different lock levels that " +"may be acquired by Hibernate. A lock is obtained by the following mechanisms:" +msgstr "" +"类LockMode 定义了Hibernate所需的不同的锁定级别。一个锁定 " +"可以通过以下的机制来设置:" + +#. Tag: para +#: transactions.xml:862 +#, no-c-format +msgid "" +"LockMode.WRITE is acquired automatically when Hibernate " +"updates or inserts a row." +msgstr "" +"当Hibernate更新或者插入一行记录的时候,锁定级别自动设置为LockMode." +"WRITE。" + +#. Tag: para +#: transactions.xml:868 +#, no-c-format +msgid "" +"LockMode.UPGRADE may be acquired upon explicit user " +"request using SELECT ... FOR UPDATE on databases which " +"support that syntax." +msgstr "" +"当用户显式的使用数据库支持的SQL格式SELECT ... FOR UPDATE " +"发送SQL的时候,锁定级别设置为LockMode.UPGRADE" + +#. Tag: para +#: transactions.xml:874 +#, no-c-format +msgid "" +"LockMode.UPGRADE_NOWAIT may be acquired upon explicit " +"user request using a SELECT ... FOR UPDATE NOWAIT under " +"Oracle." +msgstr "" +"当用户显式的使用Oracle数据库的SQL语句SELECT ... FOR UPDATE NOWAIT 的时候,锁定级别设置LockMode.UPGRADE_NOWAIT" + +#. Tag: para +#: transactions.xml:880 +#, no-c-format +msgid "" +"LockMode.READ is acquired automatically when Hibernate " +"reads data under Repeatable Read or Serializable isolation level. May be re-" +"acquired by explicit user request." +msgstr "" +"当Hibernate在“可重复读”或者是“序列化”数据库隔离级别下读取数据的时候,锁定模" +"式 自动设置为LockMode.READ。这种模式也可以通过用户显式指定" +"进行设置。" + +#. Tag: para +#: transactions.xml:887 +#, no-c-format +msgid "" +"LockMode.NONE represents the absence of a lock. All " +"objects switch to this lock mode at the end of a Transaction. Objects associated with the session via a call to update()" +" or saveOrUpdate() also start out in this lock " +"mode." +msgstr "" +"LockMode.NONE 代表无需锁定。在Transaction结束时, 所有的对象都切换到该模式上来。与session相关联的对象通过调用" +"update() 或者saveOrUpdate()脱离该模式。" + +#. Tag: para +#: transactions.xml:896 +#, no-c-format +msgid "" +"The \"explicit user request\" is expressed in one of the following ways:" +msgstr "\"显式的用户指定\"可以通过以下几种方式之一来表示:" + +#. Tag: para +#: transactions.xml:902 +#, no-c-format +msgid "" +"A call to Session.load(), specifying a LockMode." +msgstr "" +"调用 Session.load()的时候指定锁定模式(LockMode)。" + +#. Tag: para +#: transactions.xml:907 +#, no-c-format +msgid "A call to Session.lock()." +msgstr "调用Session.lock()。" + +#. Tag: para +#: transactions.xml:912 +#, no-c-format +msgid "A call to Query.setLockMode()." +msgstr "调用Query.setLockMode()。" + +#. Tag: para +#: transactions.xml:918 +#, no-c-format +msgid "" +"If Session.load() is called with UPGRADE or UPGRADE_NOWAIT, and the requested object was " +"not yet loaded by the session, the object is loaded using " +"SELECT ... FOR UPDATE. If load() is " +"called for an object that is already loaded with a less restrictive lock " +"than the one requested, Hibernate calls lock() for that " +"object." +msgstr "" +"如果在UPGRADE或者UPGRADE_NOWAIT锁定模式" +"下调 用Session.load(),并且要读取的对象尚未被session载入" +"过,那么对象 通过SELECT ... FOR UPDATE这样的SQL语句被载" +"入。如果为一个对象调用 load()方法时,该对象已经在另一个较" +"少限制的锁定模式下被载入了,那 么Hibernate就对该对象调用lock() 方法。" + +#. Tag: para +#: transactions.xml:927 +#, no-c-format +msgid "" +"Session.lock() performs a version number check if the " +"specified lock mode is READ, UPGRADE " +"or UPGRADE_NOWAIT. (In the case of UPGRADE or UPGRADE_NOWAIT, SELECT ... FOR " +"UPDATE is used.)" +msgstr "" +"如果指定的锁定模式是READ, UPGRADE 或 " +"UPGRADE_NOWAIT,那么Session.lock()就 执" +"行版本号检查。(在UPGRADE 或者UPGRADE_NOWAIT 锁定模式下,执行SELECT ... FOR UPDATE这样的SQL语" +"句。)" + +#. Tag: para +#: transactions.xml:934 +#, no-c-format +msgid "" +"If the database does not support the requested lock mode, Hibernate will use " +"an appropriate alternate mode (instead of throwing an exception). This " +"ensures that applications will be portable." +msgstr "" +"如果数据库不支持用户设置的锁定模式,Hibernate将使用适当的替代模式(而不是扔出" +"异常)。 这一点可以确保应用程序的可移植性。" + +#. Tag: title +#: transactions.xml:943 +#, no-c-format +msgid "Connection Release Modes" +msgstr "连接释放模式(Connection Release Modes)" + +#. Tag: para +#: transactions.xml:945 +#, no-c-format +msgid "" +"The legacy (2.x) behavior of Hibernate in regards to JDBC connection " +"management was that a Session would obtain a connection " +"when it was first needed and then hold unto that connection until the " +"session was closed. Hibernate 3.x introduced the notion of connection " +"release modes to tell a session how to handle its JDBC connections. Note " +"that the following discussion is pertinent only to connections provided " +"through a configured ConnectionProvider; user-supplied " +"connections are outside the breadth of this discussion. The different " +"release modes are identified by the enumerated values of org." +"hibernate.ConnectionReleaseMode:" +msgstr "" +"Hibernate关于JDBC连接管理的旧(2.x)行为是,Session在第一次" +"需要的时候获取一个连接,在session关闭之前一直会持有这个连接。Hibernate引入了" +"连接释放的概念,来告诉session如何处理它的JDBC连接。注意,下面的讨论只适用于采" +"用配置ConnectionProvider来提供连接的情况,用户自己提供的连" +"接与这里的讨论无关。通过org.hibernate.ConnectionReleaseMode的不同枚举值来使用不用的释放模式:" + +#. Tag: para +#: transactions.xml:959 +#, fuzzy, no-c-format +msgid "" +"ON_CLOSE - is essentially the legacy behavior described " +"above. The Hibernate session obtains a connection when it first needs to " +"perform some JDBC access and holds unto that connection until the session is " +"closed." +msgstr "" +"ON_CLOSE - 基本上就是上面提到的老式行为。Hibernate session" +"在第一次需要进行JDBC操作的时候获取连接,然后持有它,直到session关闭。" + +#. Tag: para +#: transactions.xml:966 +#, no-c-format +msgid "" +"AFTER_TRANSACTION - says to release connections after a " +"org.hibernate.Transaction has completed." +msgstr "" +"AFTER_TRANSACTION - 在org.hibernate.Transaction结束后释放连接。" + +#. Tag: para +#: transactions.xml:972 +#, no-c-format +msgid "" +"AFTER_STATEMENT (also referred to as aggressive release) " +"- says to release connections after each and every statement execution. This " +"aggressive releasing is skipped if that statement leaves open resources " +"associated with the given session; currently the only situation where this " +"occurs is through the use of org.hibernate.ScrollableResults." +msgstr "" +"AFTER_STATEMENT (也被称做积极释放) - 在每一条语句被执行后" +"就释放连接。但假若语句留下了与session相关的资源,那就不会被释放。目前唯一的这" +"种情形就是使用org.hibernate.ScrollableResults。" + +#. Tag: para +#: transactions.xml:982 +#, no-c-format +msgid "" +"The configuration parameter hibernate.connection.release_mode is used to specify which release mode to use. The possible values:" +msgstr "" +"hibernate.connection.release_mode配置参数用来指定使用哪一" +"种释放模式。可能的值有:" + +#. Tag: para +#: transactions.xml:989 +#, no-c-format +msgid "" +"auto (the default) - this choice delegates to the release " +"mode returned by the org.hibernate.transaction.TransactionFactory." +"getDefaultReleaseMode() method. For JTATransactionFactory, this " +"returns ConnectionReleaseMode.AFTER_STATEMENT; for JDBCTransactionFactory, " +"this returns ConnectionReleaseMode.AFTER_TRANSACTION. It is rarely a good " +"idea to change this default behavior as failures due to the value of this " +"setting tend to indicate bugs and/or invalid assumptions in user code." +msgstr "" +"auto(默认) - 这一选择把释放模式委派给org." +"hibernate.transaction.TransactionFactory.getDefaultReleaseMode()方" +"法。对JTATransactionFactory来说,它会返回ConnectionReleaseMode." +"AFTER_STATEMENT;对JDBCTransactionFactory来说,则是ConnectionReleaseMode." +"AFTER_TRANSACTION。很少需要修改这一默认行为,因为假若设置不当,就会带来bug," +"或者给用户代码带来误导。" + +#. Tag: para +#: transactions.xml:999 +#, no-c-format +msgid "" +"on_close - says to use ConnectionReleaseMode.ON_CLOSE. " +"This setting is left for backwards compatibility, but its use is highly " +"discouraged." +msgstr "" +"on_close - 使用 ConnectionReleaseMode.ON_CLOSE. 这种方式是" +"为了向下兼容的,但是已经完全不被鼓励使用了。" + +#. Tag: para +#: transactions.xml:1005 +#, no-c-format +msgid "" +"after_transaction - says to use ConnectionReleaseMode." +"AFTER_TRANSACTION. This setting should not be used in JTA environments. Also " +"note that with ConnectionReleaseMode.AFTER_TRANSACTION, if a session is " +"considered to be in auto-commit mode connections will be released as if the " +"release mode were AFTER_STATEMENT." +msgstr "" +"after_transaction - 使用ConnectionReleaseMode." +"AFTER_TRANSACTION。这一设置不应该在JTA环境下使用。也要注意,使用" +"ConnectionReleaseMode.AFTER_TRANSACTION的时候,假若session 处于auto-commit状" +"态,连接会像AFTER_STATEMENT那样被释放。" + +#. Tag: para +#: transactions.xml:1013 +#, no-c-format +msgid "" +"after_statement - says to use ConnectionReleaseMode." +"AFTER_STATEMENT. Additionally, the configured ConnectionProvider is consulted to see if it supports this setting " +"(supportsAggressiveRelease()). If not, the release mode " +"is reset to ConnectionReleaseMode.AFTER_TRANSACTION. This setting is only " +"safe in environments where we can either re-acquire the same underlying JDBC " +"connection each time we make a call into ConnectionProvider." +"getConnection() or in auto-commit environments where it does not " +"matter whether we get back the same connection." +msgstr "" +"after_statement - 使用ConnectionReleaseMode." +"AFTER_STATEMENT。除此之外,会查询配置的ConnectionProvider,是否它支持这一设置((supportsAggressiveRelease()))。假若不支持,释放模式会被设置为ConnectionReleaseMode." +"AFTER_TRANSACTION。只有在你每次调用ConnectionProvider.getConnection" +"()获取底层JDBC连接的时候,都可以确信获得同一个连接的时候,这一设置" +"才是安全的;或者在auto-commit环境中,你可以不管是否每次都获得同一个连接的时" +"候,这才是安全的。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/tutorial.po b/documentation/envers/src/main/docbook/zh-CN/content/tutorial.po new file mode 100644 index 0000000000..1d39c38b09 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/tutorial.po @@ -0,0 +1,2662 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2007-10-25 01:01+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: tutorial.xml:7 +#, no-c-format +msgid "Introduction to Hibernate" +msgstr "Hibernate入门" + +#. Tag: title +#: tutorial.xml:10 +#, no-c-format +msgid "Preface" +msgstr "前言" + +#. Tag: para +#: tutorial.xml:12 +#, no-c-format +msgid "" +"This chapter is an introductory tutorial for new users of Hibernate. We " +"start with a simple command line application using an in-memory database and " +"develop it in easy to understand steps." +msgstr "" +"本章是面向Hibernate初学者的一个入门教程。我们从一个使用驻留内存式(in-memory)" +"数据库的简单命令行应用程序开始, 用易于理解的方式逐步开发。" + +#. Tag: para +#: tutorial.xml:18 +#, no-c-format +msgid "" +"This tutorial is intended for new users of Hibernate but requires Java and " +"SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party " +"libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3." +msgstr "" +"本章面向Hibernate初学者,但需要Java和SQL知识。它是在Michael Goegl所写的指南的" +"基础上完成的。在这里,我们称第三方库文件是指JDK 1.4和5.0。若使用JDK1.3,你可" +"能需要其它的库文件。" + +#. Tag: para +#: tutorial.xml:24 +#, no-c-format +msgid "" +"The source code for the tutorial is included in the distribution in the " +"doc/reference/tutorial/ directory." +msgstr "" +"本章的源代码已包含在发布包中,位于doc/reference/tutorial/" +"目录下。" + +#. Tag: title +#: tutorial.xml:32 +#, no-c-format +msgid "Part 1 - The first Hibernate Application" +msgstr "第一部分 - 第一个Hibernate应用程序" + +#. Tag: para +#: tutorial.xml:34 +#, no-c-format +msgid "" +"First, we'll create a simple console-based Hibernate application. We use an " +"Java database (HSQL DB), so we do not have to install any database server." +msgstr "" +"首先我们将创建一个简单的基于控制台的(console-based)Hibernate应用程序。由于我" +"们使用Java数据库(HSQL DB),所以不必安装任何数据库服务器。" + +#. Tag: para +#: tutorial.xml:39 +#, no-c-format +msgid "" +"Let's assume we need a small database application that can store events we " +"want to attend, and information about the hosts of these events." +msgstr "" +"假设我们希望有一个小应用程序可以保存我们希望参加的活动(events)和这些活动主" +"办方的相关信息。 (译者注:在本教程的后面部分,我们将直接使用event而不是它的" +"中文翻译“活动”,以免混淆。)" + +#. Tag: para +#: tutorial.xml:44 +#, no-c-format +msgid "" +"The first thing we do, is set up our development directory and put all the " +"Java libraries we need into it. Download the Hibernate distribution from the " +"Hibernate website. Extract the package and place all required libraries " +"found in /lib into into the /lib " +"directory of your new development working directory. It should look like " +"this:" +msgstr "" +"我们所做的第一件事就是创建我们的开发目录,并且把所有需要用到的Java库文件放进" +"去。解压缩从Hibernate网站下载的Hibernate发布包,并把/lib目" +"录下所有需要的库文件拷到我们新建开发目录下的/lib目录下。看" +"起来就像这样:" + +#. Tag: programlisting +#: tutorial.xml:52 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:54 +#, no-c-format +msgid "" +"This is the minimum set of required libraries (note that we also copied " +"hibernate3.jar, the main archive) for Hibernate at the time of " +"writing. The Hibernate release you are using might require more " +"or less libraries. See the README.txt file in the " +"lib/ directory of the Hibernate distribution for more " +"information about required and optional third-party libraries. (Actually, " +"Log4j is not required but preferred by many developers.)" +msgstr "" +"到编写本文时为止,这些是Hibernate运行所需要的最小库文件" +"集合(注意我们也拷贝了 Hibernate3.jar,这个是最主要的文件)。你正使用的" +"Hibernate版本可能需要比这更多或少一些的库文件。请参见发布包中的lib/" +"目录下的README.txt,以获取更多关于所需和可选的第" +"三方库文件信息(事实上,Log4j并不是必须的库文件,但被许多开发者所喜欢)。" + +#. Tag: para +#: tutorial.xml:63 +#, no-c-format +msgid "" +"Next we create a class that represents the event we want to store in " +"database." +msgstr "接下来我们创建一个类,用来代表那些我们希望储存在数据库里的event。" + +#. Tag: title +#: tutorial.xml:68 +#, no-c-format +msgid "The first class" +msgstr "第一个class" + +#. Tag: para +#: tutorial.xml:70 +#, no-c-format +msgid "" +"Our first persistent class is a simple JavaBean class with some properties:" +msgstr "我们的第一个持久化类是一个带有一些属性(property)的简单JavaBean类:" + +#. Tag: programlisting +#: tutorial.xml:74 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:76 +#, no-c-format +msgid "" +"You can see that this class uses standard JavaBean naming conventions for " +"property getter and setter methods, as well as private visibility for the " +"fields. This is a recommended design - but not required. Hibernate can also " +"access fields directly, the benefit of accessor methods is robustness for " +"refactoring. The no-argument constructor is required to instantiate an " +"object of this class through reflection." +msgstr "" +"你可以看到这个类对属性的存取方法(getter and setter method)使用了标准" +"JavaBean命名约定,同时把类属性(field)的访问级别设成私有的(private)。这是" +"推荐的设计,但并不是必须的。Hibernate也可以直接访问这些field,而使用访问方法" +"(accessor method)的好处是提供了重构时的健壮性(robustness)。为了通过反射机" +"制(Reflection)来实例化这个类的对象,我们需要提供一个无参的构造器(no-" +"argument constructor)。" + +#. Tag: para +#: tutorial.xml:84 +#, no-c-format +msgid "" +"The id property holds a unique identifier value for a " +"particular event. All persistent entity classes (there are less important " +"dependent classes as well) will need such an identifier property if we want " +"to use the full feature set of Hibernate. In fact, most applications (esp. " +"web applications) need to distinguish objects by identifier, so you should " +"consider this a feature rather than a limitation. However, we usually don't " +"manipulate the identity of an object, hence the setter method should be " +"private. Only Hibernate will assign identifiers when an object is saved. You " +"can see that Hibernate can access public, private, and protected accessor " +"methods, as well as (public, private, protected) fields directly. The choice " +"is up to you and you can match it to fit your application design." +msgstr "" +"对一特定的event, id 属性持有唯一的标识符(identifier)的" +"值。如果我们希望使用Hibernate提供的所有特性,那么所有的持久化实体" +"(persistent entity)类(这里也包括一些次要依赖类)都需要一个这样的标识符属" +"性。而事实上,大多数应用程序(特别是web应用程序)都需要通过标识符来区别对象," +"所以你应该考虑使用标识符属性而不是把它当作一种限制。然而,我们通常不会操作对" +"象的标识(identity),因此它的setter方法的访问级别应该声明private。这样当对象" +"被保存的时候,只有Hibernate可以为它分配标识符值。你可看到Hibernate可以直接访" +"问public,private和protected的访问方法和field。所以选择哪种方式完全取决于你," +"你可以使你的选择与你的应用程序设计相吻合。" + +#. Tag: para +#: tutorial.xml:96 +#, no-c-format +msgid "" +"The no-argument constructor is a requirement for all persistent classes; " +"Hibernate has to create objects for you, using Java Reflection. The " +"constructor can be private, however, package visibility is required for " +"runtime proxy generation and efficient data retrieval without bytecode " +"instrumentation." +msgstr "" +"所有的持久化类(persistent classes)都要求有无参的构造器,因为Hibernate必须使" +"用Java反射机制来为你创建对象。构造器(constructor)的访问级别可以是private," +"然而当生成运行时代理(runtime proxy)的时候则要求使用至少是package 级别的访问" +"控制,这样在没有字节码指令(bytecode instrumentation)的情况下,从持久化类里" +"获取数据会更有效率。" + +#. Tag: para +#: tutorial.xml:103 +#, no-c-format +msgid "" +"Place this Java source file in a directory called src in " +"the development folder, and in its correct package. The directory should now " +"look like this:" +msgstr "" +"把这个Java源代码文件放到开发目录下的src目录里,注意包位置" +"要正确。 现在这个目录看起来应该像这样:" + +#. Tag: programlisting +#: tutorial.xml:108 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:110 +#, no-c-format +msgid "In the next step, we tell Hibernate about this persistent class." +msgstr "下一步,我们把这个持久化类的信息告诉Hibernate。" + +#. Tag: title +#: tutorial.xml:117 +#, no-c-format +msgid "The mapping file" +msgstr "映射文件" + +#. Tag: para +#: tutorial.xml:119 +#, no-c-format +msgid "" +"Hibernate needs to know how to load and store objects of the persistent " +"class. This is where the Hibernate mapping file comes into play. The mapping " +"file tells Hibernate what table in the database it has to access, and what " +"columns in that table it should use." +msgstr "" +"Hibernate需要知道怎样去加载(load)和存储(store)持久化类的对象。这正是" +"Hibernate映射文件发挥作用的地方。映射文件告诉Hibernate它,应该访问数据库" +"(database)里面的哪个表(table)及应该使用表里面的哪些字段(column)。" + +#. Tag: para +#: tutorial.xml:126 +#, no-c-format +msgid "The basic structure of a mapping file looks like this:" +msgstr "一个映射文件的基本结构看起来像这样:" + +#. Tag: programlisting +#: tutorial.xml:130 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"[...]\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:132 +#, no-c-format +msgid "" +"Note that the Hibernate DTD is very sophisticated. You can use it for auto-" +"completion of XML mapping elements and attributes in your editor or IDE. You " +"also should open up the DTD file in your text editor - it's the easiest way " +"to get an overview of all elements and attributes and to see the defaults, " +"as well as some comments. Note that Hibernate will not load the DTD file " +"from the web, but first look it up from the classpath of the application. " +"The DTD file is included in hibernate3.jar as well as in " +"the src/ directory of the Hibernate distribution." +msgstr "" +"注意Hibernate的DTD是非常复杂的。你的编辑器或者IDE里使用它来自动完成那些用来映" +"射的XML元素(element)和属性(attribute)。你也可以在文本编辑器里打开DTD-这" +"是最简单的方式来概览所有的元素和attribute,并查看它们的缺省值以及注释。注意" +"Hibernate不会从web加载DTD文件,但它会首先在应用程序的classpath中查找。DTD文件" +"已包括在hibernate3.jar里,同时也在Hibernate发布包的" +"src/目录下。" + +#. Tag: para +#: tutorial.xml:143 +#, no-c-format +msgid "" +"We will omit the DTD declaration in future examples to shorten the code. It " +"is of course not optional." +msgstr "" +"为缩短代码长度,在以后的例子里我们会省略DTD的声明。当然,在实际的应用程序中," +"DTD声明是必须的。" + +#. Tag: para +#: tutorial.xml:148 +#, no-c-format +msgid "" +"Between the two hibernate-mapping tags, include a " +"class element. All persistent entity classes (again, " +"there might be dependent classes later on, which are not first-class " +"entities) need such a mapping, to a table in the SQL database:" +msgstr "" +"在hibernate-mapping标签(tag)之间, 含有一个" +"class元素。所有的持久化实体类(再次声明,或许接下来会有依" +"赖类,就是那些次要的实体)都需要一个这样的映射,来把类对象映射到SQL数据库里的" +"表。" + +#. Tag: programlisting +#: tutorial.xml:155 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:157 +#, no-c-format +msgid "" +"So far we told Hibernate how to persist and load object of class " +"Event to the table EVENTS, each " +"instance represented by a row in that table. Now we continue with a mapping " +"of the unique identifier property to the tables primary key. In addition, as " +"we don't want to care about handling this identifier, we configure " +"Hibernate's identifier generation strategy for a surrogate primary key " +"column:" +msgstr "" +"到目前为止,我们告诉了Hibernate怎样把Events类的对象持久化" +"到数据库的EVENTS表里,以及怎样从EVENTS" +"表加载到Events类的对象。每个实例对应着数据库表中的一行。现" +"在我们将继续讨论有关唯一标识符属性到数据库表的映射。另外,由于我们不关心怎样" +"处理这个标识符,我们就配置由Hibernate的标识符生成策略来产生代理主键字段。" + +#. Tag: programlisting +#: tutorial.xml:165 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:167 +#, no-c-format +msgid "" +"The id element is the declaration of the identifer " +"property, name=\"id\" declares the name of the Java " +"property - Hibernate will use the getter and setter methods to access the " +"property. The column attribute tells Hibernate which column of the " +"EVENTS table we use for this primary key. The nested " +"generator element specifies the identifier generation " +"strategy, in this case we used native, which picks the " +"best strategy depending on the configured database (dialect). Hibernate " +"supports database generated, globally unique, as well as application " +"assigned identifiers (or any strategy you have written an extension for)." +msgstr "" +"id元素是标识符属性的声明,name=\"id\" " +"声明了Java属性的名字 - Hibernate会使用getId()和" +"setId()来访问它。 column属性则告诉" +"Hibernate, 我们使用EVENTS表的哪个字段作为主键。嵌套的" +"generator元素指定了标识符生成策略,在这里我们指定" +"native,它根据已配置的数据库(方言)自动选择最佳的标识符生" +"成策略。Hibernate支持由数据库生成,全局唯一性(globally unique)和应用程序指" +"定(或者你自己为任何已有策略所写的扩展)这些策略来生成标识符。" + +#. Tag: para +#: tutorial.xml:180 +#, no-c-format +msgid "" +"Finally we include declarations for the persistent properties of the class " +"in the mapping file. By default, no properties of the class are considered " +"persistent:" +msgstr "" +"最后我们在映射文件里面包含需要持久化属性的声明。默认情况下,类里面的属性都被" +"视为非持久化的:" + +#. Tag: programlisting +#: tutorial.xml:186 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:188 +#, no-c-format +msgid "" +"Just as with the id element, the name " +"attribute of the property element tells Hibernate which " +"getter and setter methods to use. So, in this case, Hibernate will look for " +"getDate()/setDate(), as well as getTitle()/" +"setTitle()." +msgstr "" +"和id元素一样,property元素的" +"name属性告诉Hibernate使用哪个getter和setter方法。在此例" +"中,Hibernate会寻找getDate()/setDate(), 以及" +"getTitle()/setTitle()。" + +#. Tag: para +#: tutorial.xml:195 +#, no-c-format +msgid "" +"Why does the date property mapping include the " +"column attribute, but the title " +"doesn't? Without the column attribute Hibernate by " +"default uses the property name as the column name. This works fine for " +"title. However, date is a reserved " +"keyword in most database, so we better map it to a different name." +msgstr "" +"为什么date属性的映射含有column " +"attribute,而title却没有?当没有设定column attribute 的时候,Hibernate缺省地使用JavaBean的属性名作为字段名。对" +"于title,这样工作得很好。然而,date在多" +"数的数据库里,是一个保留关键字,所以我们最好把它映射成一个不同的名字。" + +#. Tag: para +#: tutorial.xml:204 +#, no-c-format +msgid "" +"The next interesting thing is that the title mapping also " +"lacks a type attribute. The types we declare and use in " +"the mapping files are not, as you might expect, Java data types. They are " +"also not SQL database types. These types are so called Hibernate " +"mapping types, converters which can translate from Java to SQL " +"data types and vice versa. Again, Hibernate will try to determine the " +"correct conversion and mapping type itself if the type " +"attribute is not present in the mapping. In some cases this automatic " +"detection (using Reflection on the Java class) might not have the default " +"you expect or need. This is the case with the date " +"property. Hibernate can't know if the property (which is of java." +"util.Date) should map to a SQL date, " +"timestamp, or time column. We preserve " +"full date and time information by mapping the property with a " +"timestamp converter." +msgstr "" +"另一有趣的事情是title属性缺少一个type " +"attribute。我们在映射文件里声明并使用的类型,却不是我们期望的那样,是Java数据" +"类型,同时也不是SQL数据库的数据类型。这些类型就是所谓的Hibernate 映射类型" +"(mapping types),它们能把Java数据类型转换到SQL数据类" +"型,反之亦然。再次重申,如果在映射文件中没有设置type属性的" +"话,Hibernate会自己试着去确定正确的转换类型和它的映射类型。在某些情况下这个自" +"动检测机制(在Java 类上使用反射机制)不会产生你所期待或需要的缺省值。" +"date属性就是个很好的例子,Hibernate无法知道这个属性" +"(java.util.Date类型的)应该被映射成:SQL date,或timestamp,还是time 字段。" +"在此例中,把这个属性映射成timestamp 转换器,这样我们预留了" +"日期和时间的全部信息。" + +#. Tag: para +#: tutorial.xml:220 +#, no-c-format +msgid "" +"This mapping file should be saved as Event.hbm.xml, right " +"in the directory next to the Event Java class source " +"file. The naming of mapping files can be arbitrary, however the hbm." +"xml suffix is a convention in the Hibernate developer community. " +"The directory structure should now look like this:" +msgstr "" +"应该把这个映射文件保存为Event.hbm.xml,且就在" +"EventJava类的源文件目录下。映射文件可随意地命名,但" +"hbm.xml的后缀已成为Hibernate开发者社区的约定。现在目录结构" +"看起来应该像这样:" + +#. Tag: programlisting +#: tutorial.xml:228 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:230 +#, no-c-format +msgid "We continue with the main configuration of Hibernate." +msgstr "我们继续进行Hibernate的主要配置。" + +#. Tag: title +#: tutorial.xml:237 +#, no-c-format +msgid "Hibernate configuration" +msgstr "Hibernate配置" + +#. Tag: para +#: tutorial.xml:239 +#, no-c-format +msgid "" +"We now have a persistent class and its mapping file in place. It is time to " +"configure Hibernate. Before we do this, we will need a database. HSQL DB, a " +"java-based SQL DBMS, can be downloaded from the HSQL DB website(http://" +"hsqldb.org/). Actually, you only need the hsqldb.jar from " +"this download. Place this file in the lib/ directory of " +"the development folder." +msgstr "" +"现在我们已经有了一个持久化类和它的映射文件,该是配置Hibernate的时候了。在此之" +"前,我们需要一个数据库。 HSQL DB是种基于Java 的SQL数据库管理系统(DBMS),可" +"以从HSQL DB的网站上下载。实际上,你只需下载的包中的hsqldb.jar文件,并把这个文件放在开发文件夹的lib/目录下即可。" + +#. Tag: para +#: tutorial.xml:247 +#, no-c-format +msgid "" +"Create a directory called data in the root of the " +"development directory - this is where HSQL DB will store its data files. Now " +"start the database by running java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server in this data directory. You can see it start up and " +"bind to a TCP/IP socket, this is where our application will connect later. " +"If you want to start with a fresh database during this tutorial, shutdown " +"HSQL DB (press CTRL + C in the window), delete all files " +"in the data/ directory, and start HSQL DB again." +msgstr "" +"在开发的根目录下创建一个data目录 - 这是HSQL DB存储数据文" +"件的地方。此时在data目录中运行java -classpath ../lib/hsqldb.jar org." +"hsqldb.Server就可启动数据库。你可以在log中看到它的启动,及绑定到" +"TCP/IP套结字,这正是我们的应用程序稍后会连接的地方。如果你希望在本例中运行一" +"个全新的数据库,就在窗口中按下CTRL + C来关闭HSQL数据库,并" +"删除data/目录下的所有文件,再重新启动HSQL数据库。" + +#. Tag: para +#: tutorial.xml:257 +#, no-c-format +msgid "" +"Hibernate is the layer in your application which connects to this database, " +"so it needs connection information. The connections are made through a JDBC " +"connection pool, which we also have to configure. The Hibernate distribution " +"contains several open source JDBC connection pooling tools, but will use the " +"Hibernate built-in connection pool for this tutorial. Note that you have to " +"copy the required library into your classpath and use different connection " +"pooling settings if you want to use a production-quality third party JDBC " +"pooling software." +msgstr "" +"Hibernate是你的应用程序里连接数据库的那层,所以它需要连接用的信息。连接" +"(connection)是通过一个也由我们配置的JDBC连接池(connection pool)来完成的。" +"Hibernate的发布包里包含了许多开源的(open source)连接池,但在我们例子中使用" +"Hibernate内置的连接池。注意,如果你希望使用一个产品级(production-quality)的第" +"三方连接池软件,你必须拷贝所需的库文件到你的classpath下,并使用不同的连接池设" +"置。" + +#. Tag: para +#: tutorial.xml:267 +#, no-c-format +msgid "" +"For Hibernate's configuration, we can use a simple hibernate." +"properties file, a slightly more sophisticated hibernate." +"cfg.xml file, or even complete programmatic setup. Most users " +"prefer the XML configuration file:" +msgstr "" +"为了保存Hibernate的配置,我们可以使用一个简单的hibernate." +"properties文件,或者一个稍微复杂的hibernate.cfg.xml,甚至可以完全使用程序来配置Hibernate。多数用户更喜欢使用XML配置文" +"件:" + +#. Tag: programlisting +#: tutorial.xml:273 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +"\n" +"\n" +" \n" +"\n" +" \n" +" org.hsqldb.jdbcDriver\n" +" jdbc:hsqldb:hsql://localhost\n" +" sa\n" +" \n" +"\n" +" \n" +" 1\n" +"\n" +" \n" +" org.hibernate.dialect.HSQLDialect\n" +"\n" +" \n" +" thread\n" +"\n" +" \n" +" org.hibernate.cache." +"NoCacheProvider\n" +"\n" +" \n" +" true\n" +"\n" +" \n" +" create\n" +"\n" +" \n" +"\n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:275 +#, no-c-format +msgid "" +"Note that this XML configuration uses a different DTD. We configure " +"Hibernate's SessionFactory - a global factory responsible " +"for a particular database. If you have several databases, use several " +"<session-factory> configurations, usually in " +"several configuration files (for easier startup)." +msgstr "" +"注意这个XML配置使用了一个不同的DTD。在这里,我们配置了Hibernate的" +"SessionFactory-一个关联于特定数据库全局的工厂" +"(factory)。如果你要使用多个数据库,就要用多个的<session-" +"factory>,通常把它们放在多个配置文件中(为了更容易启动)。" + +#. Tag: para +#: tutorial.xml:283 +#, no-c-format +msgid "" +"The first four property elements contain the necessary " +"configuration for the JDBC connection. The dialect property element specifies the particular SQL variant Hibernate generates. " +"Hibernate's automatic session management for persistence contexts will come " +"in handy as you will soon see. The hbm2ddl.auto option " +"turns on automatic generation of database schemas - directly into the " +"database. This can of course also be turned off (by removing the config " +"option) or redirected to a file with the help of the SchemaExport Ant task. Finally, we add the mapping file(s) for persistent " +"classes to the configuration." +msgstr "" +"最开始的4个property元素包含必要的JDBC连接信息。方言" +"(dialect)的property元素指明Hibernate 生成的特定SQL变量。" +"你很快会看到,Hibernate对持久化上下文的自动session管理就会派上用场。 打开" +"hbm2ddl.auto选项将自动生成数据库模式(schema)- 直接加入" +"数据库中。当然这个选项也可以被关闭(通过去除这个配置选项)或者通过Ant任务" +"SchemaExport的帮助来把数据库schema重定向到文件中。最后,在" +"配置中为持久化类加入映射文件。" + +#. Tag: para +#: tutorial.xml:296 +#, no-c-format +msgid "" +"Copy this file into the source directory, so it will end up in the root of " +"the classpath. Hibernate automatically looks for a file called " +"hibernate.cfg.xml in the root of the classpath, on " +"startup." +msgstr "" +"把这个文件拷贝到源代码目录下面,这样它就位于classpath的根目录的最后。" +"Hibernate在启动时会自动在classpath的根目录查找名为hibernate.cfg." +"xml的配置文件。" + +#. Tag: title +#: tutorial.xml:305 +#, no-c-format +msgid "Building with Ant" +msgstr "用Ant构建" + +#. Tag: para +#: tutorial.xml:307 +#, no-c-format +msgid "" +"We'll now build the tutorial with Ant. You will need to have Ant installed - " +"get it from the Ant " +"download page. How to install Ant will not be covered here. Please " +"refer to the Ant " +"manual. After you have installed Ant, we can start to create the " +"buildfile. It will be called build.xml and placed " +"directly in the development directory." +msgstr "" +"现在我们用Ant来构建应用程序。你必须先安装Ant-可以从Ant 下载页面得到它。怎样安装Ant就不在这" +"里介绍了,请参考Ant 用" +"户手册。当你安装完了Ant,就可以开始创建build.xml文" +"件,把它直接放在开发目录下面。" + +#. Tag: para +#: tutorial.xml:316 +#, no-c-format +msgid "A basic build file looks like this:" +msgstr "一个简单的build文件看起来像这样:" + +#. Tag: programlisting +#: tutorial.xml:320 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:322 +#, no-c-format +msgid "" +"This will tell Ant to add all files in the lib directory ending with " +".jar to the classpath used for compilation. It will also " +"copy all non-Java source files to the target directory, e.g. configuration " +"and Hibernate mapping files. If you now run Ant, you should get this output:" +msgstr "" +"这将告诉Ant把所有在lib目录下以.jar结尾的文件拷贝到" +"classpath中以供编译之用。它也把所有的非Java源代码文件,例如配置和Hibernate映" +"射文件,拷贝到目标目录。如果你现在运行Ant,会得到以下输出:" + +#. Tag: programlisting +#: tutorial.xml:329 +#, no-c-format +msgid "" +"ant\n" +"Buildfile: build.xml\n" +"\n" +"copy-resources:\n" +" [copy] Copying 2 files to C:\\hibernateTutorial\\bin\n" +"\n" +"compile:\n" +" [javac] Compiling 1 source file to C:\\hibernateTutorial\\bin\n" +"\n" +"BUILD SUCCESSFUL\n" +"Total time: 1 second ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:334 +#, no-c-format +msgid "Startup and helpers" +msgstr "启动和辅助类" + +#. Tag: para +#: tutorial.xml:336 +#, no-c-format +msgid "" +"It's time to load and store some Event objects, but first " +"we have to complete the setup with some infrastructure code. We have to " +"startup Hibernate. This startup includes building a global " +"SessionFactory object and to store it somewhere for easy " +"access in application code. A SessionFactory can open up " +"new Session's. A Session represents a " +"single-threaded unit of work, the SessionFactory is a " +"thread-safe global object, instantiated once." +msgstr "" +"是时候来加载和储存一些Event对象了,但首先我们得编写一些基" +"础的代码以完成设置。我们必须启动Hibernate,此过程包括创建一个全局的" +"SessoinFactory,并把它储存在应用程序代码容易访问的地方。" +"SessionFactory可以创建并打开新的Session。一个Session代表一个单线程的单元操作," +"SessionFactory则是个线程安全的全局对象,只需要被实例化一" +"次。" + +#. Tag: para +#: tutorial.xml:346 +#, no-c-format +msgid "" +"We'll create a HibernateUtil helper class which takes " +"care of startup and makes accessing a SessionFactory " +"convenient. Let's have a look at the implementation:" +msgstr "" +"我们将创建一个HibernateUtil辅助类(helper class)来负责启" +"动Hibernate和更方便地操作SessionFactory。让我们来看一下它" +"的实现:" + +#. Tag: programlisting +#: tutorial.xml:352 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:354 +#, no-c-format +msgid "" +"This class does not only produce the global SessionFactory in its static initializer (called once by the JVM when the class is " +"loaded), but also hides the fact that it uses a static singleton. It might " +"as well lookup the SessionFactory from JNDI in an " +"application server." +msgstr "" +"这个类不但在它的静态初始化过程(仅当加载这个类的时候被JVM执行一次)中产生全局" +"的SessionFactory,而且隐藏了它使用了静态singleton的事实。" +"它也可能在应用程序服务器中的JNDI查找SessionFactory。" + +#. Tag: para +#: tutorial.xml:361 +#, no-c-format +msgid "" +"If you give the SessionFactory a name in your " +"configuration file, Hibernate will in fact try to bind it to JNDI after it " +"has been built. To avoid this code completely you could also use JMX " +"deployment and let the JMX-capable container instantiate and bind a " +"HibernateService to JNDI. These advanced options are " +"discussed in the Hibernate reference documentation." +msgstr "" +"如果你在配置文件中给SessionFactory一个名字,在" +"SessionFactory创建后,Hibernate会试着把它绑定到JNDI。要完" +"全避免这样的代码,你也可以使用JMX部署,让具有JMX能力的容器来实例化" +"HibernateService并把它绑定到JNDI。这些高级可选项在后面的章" +"节中会讨论到。" + +#. Tag: para +#: tutorial.xml:370 +#, no-c-format +msgid "" +"Place HibernateUtil.java in the development source " +"directory, in a package next to events:" +msgstr "" +"把HibernateUtil.java放在开发目录的源代码路径下,与放" +"events的包并列:" + +#. Tag: programlisting +#: tutorial.xml:375 +#, no-c-format +msgid "" +"\n" +"+src\n" +" +events\n" +" Event.java\n" +" Event.hbm.xml\n" +" +util\n" +" HibernateUtil.java\n" +" hibernate.cfg.xml\n" +"+data\n" +"build.xml]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:377 +#, no-c-format +msgid "" +"This should again compile without problems. We finally need to configure a " +"logging system - Hibernate uses commons logging and leaves you the choice " +"between Log4j and JDK 1.4 logging. Most developers prefer Log4j: copy " +"log4j.properties from the Hibernate distribution (it's in " +"the etc/ directory) to your src " +"directory, next to hibernate.cfg.xml. Have a look at the " +"example configuration and change the settings if you like to have more " +"verbose output. By default, only Hibernate startup message are shown on " +"stdout." +msgstr "" +"再次编译这个应用程序应该不会有问题。最后我们需要配置一个日志(logging)系统 " +"- Hibernate使用通用日志接口,允许你在Log4j和JDK 1.4 日志之间进行选择。多数开" +"发者更喜欢Log4j:从Hibernate的发布包中(它在etc/目录下)拷" +"贝log4j.properties到你的src目录,与" +"hibernate.cfg.xml.放在一起。看一下配置示例,如果你希望看到" +"更加详细的输出信息,你可以修改配置。默认情况下,只有Hibernate的启动信息才会显" +"示在标准输出上。" + +#. Tag: para +#: tutorial.xml:387 +#, no-c-format +msgid "" +"The tutorial infrastructure is complete - and we are ready to do some real " +"work with Hibernate." +msgstr "示例的基本框架完成了 - 现在我们可以用Hibernate来做些真正的工作。" + +#. Tag: title +#: tutorial.xml:395 +#, no-c-format +msgid "Loading and storing objects" +msgstr "加载并存储对象" + +#. Tag: para +#: tutorial.xml:397 +#, no-c-format +msgid "" +"Finally, we can use Hibernate to load and store objects. We write an " +"EventManager class with a main() " +"method:" +msgstr "" +"我们终于可以使用Hibernate来加载和存储对象了,编写一个带有main()方法的EventManager类:" + +#. Tag: programlisting +#: tutorial.xml:402 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:404 +#, no-c-format +msgid "" +"We create a new Event object, and hand it over to " +"Hibernate. Hibernate now takes care of the SQL and executes INSERTs on the database. Let's have a look at the Session and Transaction-handling code before we run this." +msgstr "" +"我们创建了个新的Event对象并把它传递给Hibernate。现在" +"Hibernate负责与SQL打交道,并把INSERT命令传给数据库。在运行" +"之前,让我们看一下处理SessionTransaction的代码。" + +#. Tag: para +#: tutorial.xml:411 +#, no-c-format +msgid "" +"A Session is a single unit of work. For now we'll keep " +"things simple and assume a one-to-one granularity between a Hibernate " +"Session and a database transaction. To shield our code " +"from the actual underlying transaction system (in this case plain JDBC, but " +"it could also run with JTA) we use the Transaction API " +"that is available on the Hibernate Session." +msgstr "" +"一个Session就是个单一的工作单元。我们暂时让事情简单一些," +"并假设HibernateSession和数据库事务是一一对应的。为了让我们" +"的代码从底层的事务系统中脱离出来(此例中是JDBC,但也可能是JTA),我们使用" +"Hibernate Session中的Transaction API。" + +#. Tag: para +#: tutorial.xml:419 +#, no-c-format +msgid "" +"What does sessionFactory.getCurrentSession() do? First, " +"you can call it as many times and anywhere you like, once you get hold of " +"your SessionFactory (easy thanks to " +"HibernateUtil). The getCurrentSession() method always returns the \"current\" unit of work. Remember that " +"we switched the configuration option for this mechanism to \"thread\" in " +"hibernate.cfg.xml? Hence, the current unit of work is " +"bound to the current Java thread that executes our application. However, " +"this is not the full picture, you also have to consider scope, when a unit " +"of work begins and when it ends." +msgstr "" +"sessionFactory.getCurrentSession()是干什么的呢?首先,只要" +"你持有SessionFactory(幸亏我们有HibernateUtil,可以随时获得),大可在任何时候、任何地点调用这个方法。" +"getCurrentSession()方法总会返回“当前的”工作单元。记得我们" +"在hibernate.cfg.xml中把这一配置选项调整为\"thread\"了吗?" +"因此,因此,当前工作单元被绑定到当前执行我们应用程序的Java线程。但是,这并非" +"是完全准确的,你还得考虑工作单元的生命周期范围 (scope),它何时开始,又何时结束." + +#. Tag: para +#: tutorial.xml:430 +#, no-c-format +msgid "" +"A Session begins when it is first needed, when the first " +"call to getCurrentSession() is made. It is then bound by " +"Hibernate to the current thread. When the transaction ends, either through " +"commit or rollback, Hibernate automatically unbinds the Session from the thread and closes it for you. If you call " +"getCurrentSession() again, you get a new " +"Session and can start a new unit of work. This " +"thread-bound programming model is the most popular way " +"of using Hibernate, as it allows flexible layering of your code (transaction " +"demarcation code can be separated from data access code, we'll do this later " +"in this tutorial)." +msgstr "" +"Session在第一次被使用的时候,即第一次调用" +"getCurrentSession()的时候,其生命周期就开始。然后它被" +"Hibernate绑定到当前线程。当事务结束的时候,不管是提交还是回滚,Hibernate会自" +"动把Session从当前线程剥离,并且关闭它。假若你再次调用" +"getCurrentSession(),你会得到一个新的Session,并且开始一个新的工作单元。这种线程绑定(thread-bound)的编程模型(model)是使用Hibernate的最广泛的方式,因为它支持对你的代" +"码灵活分层(事务划分可以和你的数据访问代码分离开来,在本教程的后面部分就会这么" +"做)。" + +#. Tag: para +#: tutorial.xml:441 +#, no-c-format +msgid "" +"Related to the unit of work scope, should the Hibernate Session be used to execute one or several database operations? The above " +"example uses one Session for one operation. This is pure " +"coincidence, the example is just not complex enough to show any other " +"approach. The scope of a Hibernate Session is flexible " +"but you should never design your application to use a new Hibernate " +"Session for every database " +"operation. So even if you see it a few more times in the following (very " +"trivial) examples, consider session-per-operation an " +"anti-pattern. A real (web) application is shown later in this tutorial." +msgstr "" +"和工作单元的生命周期这个话题相关,Hibernate Session是否被" +"应该用来执行多次数据库操作?上面的例子对每一次操作使用了一个" +"Session,这完全是巧合,这个例子不是很复杂,无法展示其他方" +"式。Hibernate Session的生命周期可以很灵活,但是你绝不要把" +"你的应用程序设计成为每一次数据库操作都用一个新的" +"Hibernate Session。因此就算下面的例子(它们都很简单)中你" +"可以看到这种用法,记住每次操作一个session是一个反模式。" +"在本教程的后面会展示一个真正的(web)程序。" + +#. Tag: para +#: tutorial.xml:452 +#, no-c-format +msgid "" +"Have a look at for more information about " +"transaction handling and demarcation. We also skipped any error handling and " +"rollback in the previous example." +msgstr "" +"关于事务处理及事务边界界定的详细信息,请参看。在上面的例子中,我们也忽略了所有的错误与回滚的处理。" + +#. Tag: para +#: tutorial.xml:458 +#, no-c-format +msgid "" +"To run this first routine we have to add a callable target to the Ant build " +"file:" +msgstr "" +"为第一次运行我们的程序,我们得在Ant的build文件中增加一个可以调用得到的" +"target。" + +#. Tag: programlisting +#: tutorial.xml:462 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:464 +#, no-c-format +msgid "" +"The value of the action argument is set on the command " +"line when calling the target:" +msgstr "" +"action参数(argument)的值是通过命令行调用这个target的时候" +"设置的:" + +#. Tag: programlisting +#: tutorial.xml:469 +#, no-c-format +msgid "ant run -Daction=store]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:471 +#, no-c-format +msgid "" +"You should see, after compilation, Hibernate starting up and, depending on " +"your configuration, lots of log output. At the end you will find the " +"following line:" +msgstr "" +"你应该会看到,编译以后,Hibernate根据你的配置启动,并产生一大堆的输出日志。在" +"日志最后你会看到下面这行:" + +#. Tag: programlisting +#: tutorial.xml:476 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:478 +#, no-c-format +msgid "" +"This is the INSERT executed by Hibernate, the question " +"marks represent JDBC bind parameters. To see the values bound as arguments, " +"or to reduce the verbosity of the log, check your log4j.properties." +msgstr "" +"这是Hibernate执行的INSERT命令,问号代表JDBC的绑定参数。如" +"果想要看到绑定参数的值或者减少日志的长度,就要调整你在log4j." +"properties文件里的设置。" + +#. Tag: para +#: tutorial.xml:484 +#, no-c-format +msgid "" +"Now we'd like to list stored events as well, so we add an option to the main " +"method:" +msgstr "" +"我们想要列出所有已经被存储的events,就要增加一个条件分支选项到main方法中去。" + +#. Tag: programlisting +#: tutorial.xml:488 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:490 +#, no-c-format +msgid "We also add a new listEvents() method:" +msgstr "我们也增加一个新的listEvents()方法:" + +#. Tag: programlisting +#: tutorial.xml:494 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:496 +#, no-c-format +msgid "" +"What we do here is use an HQL (Hibernate Query Language) query to load all " +"existing Event objects from the database. Hibernate will " +"generate the appropriate SQL, send it to the database and populate " +"Event objects with the data. You can create more complex " +"queries with HQL, of course." +msgstr "" +"我们在这里是用一个HQL(Hibernate Query Language-Hibernate查询语言)查询语句" +"来从数据库中加载所有存在的Event对象。Hibernate会生成适当的" +"SQL,把它发送到数据库,并操作从查询得到数据的Event对象。当" +"然,你可以使用HQL来创建更加复杂的查询。" + +#. Tag: para +#: tutorial.xml:503 +#, no-c-format +msgid "Now, to execute and test all of this, follow these steps:" +msgstr "现在,根据以下步骤来执行并测试以上各项:" + +#. Tag: para +#: tutorial.xml:509 +#, no-c-format +msgid "" +"Run ant run -Daction=store to store something into the " +"database and, of course, to generate the database schema before through " +"hbm2ddl." +msgstr "" +"运行ant run -Daction=store来保存一些内容到数据库。当然,先" +"得用hbm2ddl来生成数据库schema。" + +#. Tag: para +#: tutorial.xml:515 +#, no-c-format +msgid "" +"Now disable hbm2ddl by commenting out the property in your " +"hibernate.cfg.xml file. Usually you only leave it turned " +"on in continous unit testing, but another run of hbm2ddl would " +"drop everything you have stored - the create configuration setting actually translates into \"drop all tables " +"from the schema, then re-create all tables, when the SessionFactory is build" +"\"." +msgstr "" +"现在把hibernate.cfg.xml文件中hbm2ddl属性注释掉,这样我们就" +"取消了在启动时用hbm2ddl来生成数据库schema。通常只有在不断重复进行单元测试的时" +"候才需要打开它,但再次运行hbm2ddl会把你保存的一切都删掉(drop)——create配置的真实含义是:“在创建SessionFactory" +"的时候,从schema 中drop 掉所有的表,再重新创建它们”。" + +#. Tag: para +#: tutorial.xml:525 +#, no-c-format +msgid "" +"If you now call Ant with -Daction=list, you should see " +"the events you have stored so far. You can of course also call the " +"store action a few times more." +msgstr "" +"如果你现在使用命令行参数-Daction=list运行Ant,你会看到那些" +"至今为止我们所储存的events。当然,你也可以多调用几次store" +"以保存更多的envents。" + +#. Tag: para +#: tutorial.xml:531 +#, no-c-format +msgid "" +"Note: Most new Hibernate users fail at this point and we see questions about " +"Table not found error messages regularly. However, if " +"you follow the steps outlined above you will not have this problem, as " +"hbm2ddl creates the database schema on the first run, and subsequent " +"application restarts will use this schema. If you change the mapping and/or " +"database schema, you have to re-enable hbm2ddl once again." +msgstr "" +"注意,很多Hibernate新手在这一步会失败,我们不时看到关于Table not " +"found错误信息的提问。但是,只要你根据上面描述的步骤来执行,就不会" +"有这个问题,因为hbm2ddl会在第一次运行的时候创建数据库schema,后继的应用程序重" +"起后还能继续使用这个schema。假若你修改了映射,或者修改了数据库schema,你必须" +"把hbm2ddl重新打开一次。" + +#. Tag: title +#: tutorial.xml:544 +#, no-c-format +msgid "Part 2 - Mapping associations" +msgstr "第二部分 - 关联映射" + +#. Tag: para +#: tutorial.xml:546 +#, no-c-format +msgid "" +"We mapped a persistent entity class to a table. Let's build on this and add " +"some class associations. First we'll add people to our application, and " +"store a list of events they participate in." +msgstr "" +"我们已经映射了一个持久化实体类到表上。让我们在这个基础上增加一些类之间的关" +"联。首先我们往应用程序里增加人(people)的概念,并存储他们所参与的一个Event列" +"表。(译者注:与Event一样,我们在后面将直接使用person来表示“人”而不是它的中文" +"翻译)" + +#. Tag: title +#: tutorial.xml:552 +#, no-c-format +msgid "Mapping the Person class" +msgstr "映射Person类" + +#. Tag: para +#: tutorial.xml:554 +#, no-c-format +msgid "The first cut of the Person class is simple:" +msgstr "最初简单的Person类:" + +#. Tag: programlisting +#: tutorial.xml:558 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:560 +#, no-c-format +msgid "" +"Create a new mapping file called Person.hbm.xml (don't " +"forget the DTD reference at the top):" +msgstr "" +"创建一个名为Person.hbm.xml的新映射文件(别忘了最上面的DTD" +"引用):" + +#. Tag: programlisting +#: tutorial.xml:565 +#, no-c-format +msgid "" +"\n" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:567 +#, no-c-format +msgid "Finally, add the new mapping to Hibernate's configuration:" +msgstr "最后,把新的映射加入到Hibernate的配置中:" + +#. Tag: programlisting +#: tutorial.xml:571 +#, no-c-format +msgid "" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:573 +#, no-c-format +msgid "" +"We'll now create an association between these two entities. Obviously, " +"persons can participate in events, and events have participants. The design " +"questions we have to deal with are: directionality, multiplicity, and " +"collection behavior." +msgstr "" +"现在我们在这两个实体之间创建一个关联。显然,persons可以参与一系列events,而" +"events也有不同的参加者(persons)。我们需要处理的设计问题是关联方向" +"(directionality),阶数(multiplicity)和集合(collection)的行为。" + +#. Tag: title +#: tutorial.xml:583 +#, no-c-format +msgid "A unidirectional Set-based association" +msgstr "单向Set-based的关联" + +#. Tag: para +#: tutorial.xml:585 +#, no-c-format +msgid "" +"We'll add a collection of events to the Person class. " +"That way we can easily navigate to the events for a particular person, " +"without executing an explicit query - by calling aPerson.getEvents()" +". We use a Java collection, a Set, because the " +"collection will not contain duplicate elements and the ordering is not " +"relevant for us." +msgstr "" +"我们将向Person类增加一连串的events。那样,通过调用" +"aPerson.getEvents(),就可以轻松地导航到特定person所参与的" +"events,而不用去执行一个显式的查询。我们使用Java的集合类(collection):" +"Set,因为set 不包含重复的元素及与我们无关的排序。" + +#. Tag: para +#: tutorial.xml:592 +#, no-c-format +msgid "" +"We need a unidirectional, many-valued associations, implemented with a " +"Set. Let's write the code for this in the Java classes " +"and then map it:" +msgstr "" +"我们需要用set 实现一个单向多值关联。让我们在Java类里为这个关联编码,接着映射" +"它:" + +#. Tag: programlisting +#: tutorial.xml:597 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:599 +#, no-c-format +msgid "" +"Before we map this association, think about the other side. Clearly, we " +"could just keep this unidirectional. Or, we could create another collection " +"on the Event, if we want to be able to navigate it bi-" +"directional, i.e. anEvent.getParticipants(). This is not " +"necessary, from a functional perspective. You could always execute an " +"explicit query to retrieve the participants for a particular event. This is " +"a design choice left to you, but what is clear from this discussion is the " +"multiplicity of the association: \"many\" valued on both sides, we call this " +"a many-to-many association. Hence, we use Hibernate's " +"many-to-many mapping:" +msgstr "" +"在映射这个关联之前,先考虑一下此关联的另外一端。很显然,我们可以保持这个关联" +"是单向的。或者,我们可以在Event里创建另外一个集合,如果希" +"望能够双向地导航,如:anEvent.getParticipants()。从功能的" +"角度来说,这并不是必须的。因为你总可以显式地执行一个查询,以获得某个特定event" +"的所有参与者。这是个在设计时需要做出的选择,完全由你来决定,但此讨论中关于关" +"联的阶数是清楚的:即两端都是“多”值的,我们把它叫做多对多(many-to-" +"many)关联。因而,我们使用Hibernate的多对多映射:" + +#. Tag: programlisting +#: tutorial.xml:610 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:612 +#, no-c-format +msgid "" +"Hibernate supports all kinds of collection mappings, a <set> being most common. For a many-to-many association (or n:" +"m entity relationship), an association table is needed. Each row " +"in this table represents a link between a person and an event. The table " +"name is configured with the table attribute of the " +"set element. The identifier column name in the " +"association, for the person's side, is defined with the <key>" +" element, the column name for the event's side with the " +"column attribute of the <many-to-many>. You also have to tell Hibernate the class of the objects in your " +"collection (correct: the class on the other side of the collection of " +"references)." +msgstr "" +"Hibernate支持各种各样的集合映射,<set>使用的最为普" +"遍。对于多对多关联(或叫n:m实体关系), 需要一个关联表" +"(association table)。里面的每一行代表从person到event的" +"一个关联。表名是由set元素的table属性配" +"置的。关联里面的标识符字段名,对于person的一端,是由<key>元素定义,而event一端的字段名是由<many-to-many>元素的column属性定义。你也必须告诉Hibernate集合中" +"对象的类(也就是位于这个集合所代表的关联另外一端的类)。" + +#. Tag: para +#: tutorial.xml:624 +#, no-c-format +msgid "The database schema for this mapping is therefore:" +msgstr "因而这个映射的数据库schema是:" + +#. Tag: programlisting +#: tutorial.xml:628 +#, no-c-format +msgid "" +" | *EVENT_ID | | |\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID |\n" +" | TITLE | |__________________| | AGE |\n" +" |_____________| | FIRSTNAME |\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: title +#: tutorial.xml:633 +#, no-c-format +msgid "Working the association" +msgstr "使关联工作" + +#. Tag: para +#: tutorial.xml:635 +#, no-c-format +msgid "" +"Let's bring some people and events together in a new method in " +"EventManager:" +msgstr "" +"我们把一些people和events 一起放到EventManager的新方法中:" + +#. Tag: programlisting +#: tutorial.xml:639 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:641 +#, no-c-format +msgid "" +"After loading a Person and an Event, " +"simply modify the collection using the normal collection methods. As you can " +"see, there is no explicit call to update() or " +"save(), Hibernate automatically detects that the " +"collection has been modified and needs to be updated. This is called " +"automatic dirty checking, and you can also try it by " +"modifying the name or the date property of any of your objects. As long as " +"they are in persistent state, that is, bound to a " +"particular Hibernate Session (i.e. they have been just " +"loaded or saved in a unit of work), Hibernate monitors any changes and " +"executes SQL in a write-behind fashion. The process of synchronizing the " +"memory state with the database, usually only at the end of a unit of work, " +"is called flushing. In our code, the unit of work ends " +"with a commit (or rollback) of the database transaction - as defined by the " +"thread configuration option for the " +"CurrentSessionContext class." +msgstr "" +"在加载一PersonEvent后,使用普通的集合" +"方法就可容易地修改我们定义的集合。如你所见,没有显式的update()save(),Hibernate会自动检测到集合已经被修改并需" +"要更新回数据库。这叫做自动脏检查(automatic dirty checking),你也可以尝试修改任何对象的name或者date属性,只要他们处于" +"持久化状态,也就是被绑定到某个Hibernate 的" +"Session上(如:他们刚刚在一个单元操作被加载或者保存)," +"Hibernate监视任何改变并在后台隐式写的方式执行SQL。同步内存状态和数据库的过" +"程,通常只在单元操作结束的时候发生,称此过程为清理缓存(flushing)" +"。在我们的代码中,工作单元由数据库事务的提交(或者回滚)来结束——这" +"是由CurrentSessionContext类的thread配置" +"选项定义的。" + +#. Tag: para +#: tutorial.xml:656 +#, no-c-format +msgid "" +"You might of course load person and event in different units of work. Or you " +"modify an object outside of a Session, when it is not in " +"persistent state (if it was persistent before, we call this state " +"detached). You can even modify a collection when it is " +"detached:" +msgstr "" +"当然,你也可以在不同的单元操作里面加载person和event。或在Session以外修改不是处在持久化(persistent)状态下的对象(如果该对象以前曾经" +"被持久化,那么我们称这个状态为脱管(detached))。你甚至" +"可以在一个集合被脱管时修改它:" + +#. Tag: programlisting +#: tutorial.xml:663 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:665 +#, no-c-format +msgid "" +"The call to update makes a detached object persistent " +"again, you could say it binds it to a new unit of work, so any modifications " +"you made to it while detached can be saved to the database. This includes " +"any modifications (additions/deletions) you made to a collection of that " +"entity object." +msgstr "" +"对update的调用使一个脱管对象重新持久化,你可以说它被绑定到" +"一个新的单元操作上,所以在脱管状态下对它所做的任何修改都会被保存到数据库里。" +"这也包括你对这个实体对象的集合所作的任何改动(增加/删除)。" + +#. Tag: para +#: tutorial.xml:672 +#, no-c-format +msgid "" +"Well, this is not much use in our current situation, but it's an important " +"concept you can design into your own application. For now, complete this " +"exercise by adding a new action to the EventManager's " +"main method and call it from the command line. If you need the identifiers " +"of a person and an event - the save() method returns it " +"(you might have to modify some of the previous methods to return that " +"identifier):" +msgstr "" +"这对我们当前的情形不是很有用,但它是非常重要的概念,你可以把它融入到你自己的" +"应用程序设计中。在EventManager的main方法中添加一个新的动" +"作,并从命令行运行它来完成我们所做的练习。如果你需要person及event的标识符 — " +"那就用save()方法返回它(你可能需要修改前面的一些方法来返回" +"那个标识符):" + +#. Tag: programlisting +#: tutorial.xml:680 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:682 +#, no-c-format +msgid "" +"This was an example of an association between two equally important classes, " +"two entities. As mentioned earlier, there are other classes and types in a " +"typical model, usually \"less important\". Some you have already seen, like " +"an int or a String. We call these " +"classes value types, and their instances " +"depend on a particular entity. Instances of these types " +"don't have their own identity, nor are they shared between entities (two " +"persons don't reference the same firstname object, even " +"if they have the same first name). Of course, value types can not only be " +"found in the JDK (in fact, in a Hibernate application all JDK classes are " +"considered value types), but you can also write dependent classes yourself, " +"Address or MonetaryAmount, for example." +msgstr "" +"上面是个关于两个同等重要的实体类间关联的例子。像前面所提到的那样,在特定的模" +"型中也存在其它的类和类型,这些类和类型通常是“次要的”。你已看到过其中的一些," +"像intString。我们称这些类为" +"值类型(value type),它们的实例依赖(depend)在某个特定的实体上。这些类型的实例没有它们自己的标识(identity),也" +"不能在实体间被共享(比如,两个person不能引用同一个firstname对象,即使他们有相同的first name)。当然,值类型并不仅仅在JDK中存在" +"(事实上,在一个Hibernate应用程序中,所有的JDK类都被视为值类型),而且你也可" +"以编写你自己的依赖类,例如Address," +"MonetaryAmount。" + +#. Tag: para +#: tutorial.xml:695 +#, no-c-format +msgid "" +"You can also design a collection of value types. This is conceptually very " +"different from a collection of references to other entities, but looks " +"almost the same in Java." +msgstr "" +"你也可以设计一个值类型的集合,这在概念上与引用其它实体的集合有很大的不同,但" +"是在Java里面看起来几乎是一样的。" + +#. Tag: title +#: tutorial.xml:703 +#, no-c-format +msgid "Collection of values" +msgstr "值类型的集合" + +#. Tag: para +#: tutorial.xml:705 +#, no-c-format +msgid "" +"We add a collection of value typed objects to the Person " +"entity. We want to store email addresses, so the type we use is " +"String, and the collection is again a Set:" +msgstr "" +"我们把一个值类型对象的集合加入Person实体中。我们希望保存" +"email地址,所以使用String类型,而且这次的集合类型又是" +"Set:" + +#. Tag: programlisting +#: tutorial.xml:710 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:712 +#, no-c-format +msgid "The mapping of this Set:" +msgstr "这个Set的映射" + +#. Tag: programlisting +#: tutorial.xml:716 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:718 +#, no-c-format +msgid "" +"The difference compared with the earlier mapping is the element part, which tells Hibernate that the collection does not contain " +"references to another entity, but a collection of elements of type " +"String (the lowercase name tells you it's a Hibernate " +"mapping type/converter). Once again, the table attribute " +"of the set element determines the table name for the " +"collection. The key element defines the foreign-key " +"column name in the collection table. The column attribute " +"in the element element defines the column name where the " +"String values will actually be stored." +msgstr "" +"比较这次和此前映射的差别,主要在于element部分,这次并没有" +"包含对其它实体引用的集合,而是元素类型为String的集合(在映" +"射中使用小写的名字”string“是向你表明它是一个Hibernate的映射类型或者类型转换" +"器)。和之前一样,set元素的table属性决" +"定了用于集合的表名。key元素定义了在集合表中外键的字段名。" +"element元素的column属性定义用于实际保存" +"String值的字段名。" + +#. Tag: para +#: tutorial.xml:728 +#, no-c-format +msgid "Have a look at the updated schema:" +msgstr "看一下修改后的数据库schema。" + +#. Tag: programlisting +#: tutorial.xml:732 +#, no-c-format +msgid "" +" | *EVENT_ID | | | |" +"___________________|\n" +" | EVENT_DATE | | *PERSON_ID | <--> | *PERSON_ID | <--> | " +"*PERSON_ID |\n" +" | TITLE | |__________________| | AGE | | " +"*EMAIL_ADDR |\n" +" |_____________| | FIRSTNAME | |" +"___________________|\n" +" | LASTNAME |\n" +" |_____________|\n" +" ]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:734 +#, no-c-format +msgid "" +"You can see that the primary key of the collection table is in fact a " +"composite key, using both columns. This also implies that there can't be " +"duplicate email addresses per person, which is exactly the semantics we need " +"for a set in Java." +msgstr "" +"你可以看到集合表的主键实际上是个复合主键,同时使用了2个字段。这也暗示了对于同" +"一个person不能有重复的email地址,这正是Java里面使用Set时候所需要的语义(Set里" +"元素不能重复)。" + +#. Tag: para +#: tutorial.xml:740 +#, no-c-format +msgid "" +"You can now try and add elements to this collection, just like we did before " +"by linking persons and events. It's the same code in Java:" +msgstr "" +"你现在可以试着把元素加入到这个集合,就像我们在之前关联person和event的那样。其" +"实现的Java代码是相同的:" + +#. Tag: programlisting +#: tutorial.xml:745 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:747 +#, no-c-format +msgid "" +"This time we didnt' use a fetch query to initialize the " +"collection. Hence, the call to its getter method will trigger an additional " +"select to initialize it, so we can add an element to it. Monitor the SQL log " +"and try to optimize this with an eager fetch." +msgstr "" +"这次我们没有使用fetch查询来初始化集合。因此,调用其" +"getter方法会触发另一附加的select来初始化集合,这样我们才能把元素添加进去。检" +"查SQL log,试着通过预先抓取来优化它。" + +#. Tag: title +#: tutorial.xml:757 +#, no-c-format +msgid "Bi-directional associations" +msgstr "双向关联" + +#. Tag: para +#: tutorial.xml:759 +#, no-c-format +msgid "" +"Next we are going to map a bi-directional association - making the " +"association between person and event work from both sides in Java. Of " +"course, the database schema doesn't change, we still have many-to-many " +"multiplicity. A relational database is more flexible than a network " +"programming language, so it doesn't need anything like a navigation " +"direction - data can be viewed and retrieved in any possible way." +msgstr "" +"接下来我们将映射双向关联(bi-directional association)- 在Java里让person和" +"event可以从关联的任何一端访问另一端。当然,数据库schema没有改变,我们仍然需要" +"多对多的阶数。一个关系型数据库要比网络编程语言 更加灵活,所以它并不需要任何像" +"导航方向(navigation direction)的东西 - 数据可以用任何可能的方式进行查看和" +"获取。" + +#. Tag: para +#: tutorial.xml:767 +#, no-c-format +msgid "" +"First, add a collection of participants to the Event " +"Event class:" +msgstr "首先,把一个参与者(person)的集合加入Event类中:" + +#. Tag: programlisting +#: tutorial.xml:771 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:773 +#, no-c-format +msgid "" +"Now map this side of the association too, in Event.hbm.xml." +msgstr "在Event.hbm.xml里面也映射这个关联。" + +#. Tag: programlisting +#: tutorial.xml:777 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:779 +#, no-c-format +msgid "" +"As you see, these are normal set mappings in both mapping " +"documents. Notice that the column names in key and " +"many-to-many are swapped in both mapping documents. The " +"most important addition here is the inverse=\"true\" " +"attribute in the set element of the Event's collection mapping." +msgstr "" +"如你所见,两个映射文件里都有普通的set映射。注意在两个映射" +"文件中,互换了keymany-to-many的字段" +"名。这里最重要的是Event映射文件里增加了set元素的inverse=\"true\"属性。" + +#. Tag: para +#: tutorial.xml:787 +#, no-c-format +msgid "" +"What this means is that Hibernate should take the other side - the " +"Person class - when it needs to find out information " +"about the link between the two. This will be a lot easier to understand once " +"you see how the bi-directional link between our two entities is created ." +msgstr "" +"这意味着在需要的时候,Hibernate能在关联的另一端 - Person" +"类得到两个实体间关联的信息。这将会极大地帮助你理解双向关联是如何在两个实体间" +"被创建的。" + +#. Tag: title +#: tutorial.xml:796 +#, no-c-format +msgid "Working bi-directional links" +msgstr "使双向连起来" + +#. Tag: para +#: tutorial.xml:798 +#, no-c-format +msgid "" +"First, keep in mind that Hibernate does not affect normal Java semantics. " +"How did we create a link between a Person and an " +"Event in the unidirectional example? We added an instance " +"of Event to the collection of event references, of an " +"instance of Person. So, obviously, if we want to make " +"this link working bi-directional, we have to do the same on the other side - " +"adding a Person reference to the collection in an " +"Event. This \"setting the link on both sides\" is " +"absolutely necessary and you should never forget doing it." +msgstr "" +"首先请记住,Hibernate并不影响通常的Java语义。 在单向关联的例子中,我们是怎样" +"在PersonEvent之间创建联系的?我们把" +"Event实例添加到Person实例内的event引用" +"集合里。因此很显然,如果我们要让这个关联可以双向地工作,我们需要在另外一端做" +"同样的事情 - 把Person实例加入Event类内" +"的Person引用集合。这“在关联的两端设置联系”是完全必要的而且你都得这么做。" + +#. Tag: para +#: tutorial.xml:808 +#, no-c-format +msgid "" +"Many developers program defensive and create link management methods to " +"correctly set both sides, e.g. in Person:" +msgstr "" +"许多开发人员防御式地编程,创建管理关联的方法来保证正确的设置了关联的两端,比" +"如在Person里:" + +#. Tag: programlisting +#: tutorial.xml:813 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:815 +#, no-c-format +msgid "" +"Notice that the get and set methods for the collection are now protected - " +"this allows classes in the same package and subclasses to still access the " +"methods, but prevents everybody else from messing with the collections " +"directly (well, almost). You should probably do the same with the collection " +"on the other side." +msgstr "" +"注意现在对于集合的get和set方法的访问级别是protected - 这允许在位于同一个包" +"(package)中的类以及继承自这个类的子类可以访问这些方法,但禁止其他任何人的直" +"接访问,避免了集合内容的混乱。你应尽可能地在另一端也把集合的访问级别设成" +"protected。" + +#. Tag: para +#: tutorial.xml:822 +#, no-c-format +msgid "" +"What about the inverse mapping attribute? For you, and " +"for Java, a bi-directional link is simply a matter of setting the references " +"on both sides correctly. Hibernate however doesn't have enough information " +"to correctly arrange SQL INSERT and UPDATE statements (to avoid constraint violations), and needs some help to " +"handle bi-directional associations properly. Making one side of the " +"association inverse tells Hibernate to basically ignore " +"it, to consider it a mirror of the other side. That's " +"all that is necessary for Hibernate to work out all of the issues when " +"transformation a directional navigation model to a SQL database schema. The " +"rules you have to remember are straightforward: All bi-directional " +"associations need one side as inverse. In a one-to-many " +"association it has to be the many-side, in many-to-many association you can " +"pick either side, there is no difference." +msgstr "" +"inverse映射属性究竟表示什么呢?对于你和Java来说,一个双向" +"关联仅仅是在两端简单地正确设置引用。然而,Hibernate并没有足够的信息去正确地执" +"行INSERTUPDATE语句(以避免违反数据库" +"约束),所以它需要一些帮助来正确的处理双向关联。把关联的一端设置为" +"inverse将告诉Hibernate忽略关联的这一端,把这端看成是另外一" +"端的一个镜象(mirror)。这就是所需的全部信息,Hibernate" +"利用这些信息来处理把一个有向导航模型转移到数据库schema时的所有问题。你只需要" +"记住这个直观的规则:所有的双向关联需要有一端被设置为inverse。在一对多关联中它必须是代表多(many)的那端。而在多对多(many-to-" +"many)关联中,你可以任意选取一端,因为两端之间并没有差别。" + +#. Tag: para +#: tutorial.xml:837 +#, no-c-format +msgid "Let's turn this into a small web application." +msgstr "让我们把进入一个小型的web应用程序。" + +#. Tag: title +#: tutorial.xml:844 +#, no-c-format +msgid "Part 3 - The EventManager web application" +msgstr "第三部分 - EventManager web应用程序" + +#. Tag: para +#: tutorial.xml:846 +#, no-c-format +msgid "" +"A Hibernate web application uses Session and " +"Transaction almost like a standalone application. " +"However, some common patterns are useful. We now write an " +"EventManagerServlet. This servlet can list all events " +"stored in the database, and it provides an HTML form to enter new events." +msgstr "" +"Hibernate web应用程序使用SessionTransaction的方式几乎和独立应用程序是一样的。但是,有一些常见的模式(pattern)非" +"常有用。现在我们编写一个EventManagerServlet。这个servlet可" +"以列出数据库中保存的所有的events,还提供一个HTML表单来增加新的events。" + +#. Tag: title +#: tutorial.xml:854 +#, no-c-format +msgid "Writing the basic servlet" +msgstr "编写基本的servlet" + +#. Tag: para +#: tutorial.xml:856 +#, no-c-format +msgid "" +"Create a new class in your source directory, in the events package:" +msgstr "在你的源代码目录的events包中创建一个新的类:" + +#. Tag: programlisting +#: tutorial.xml:861 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:863 +#, no-c-format +msgid "" +"The servlet handles HTTP GET requests only, hence, the " +"method we implement is doGet():" +msgstr "" +"我们后面会用到dateFormatter 的工具, 它把Date对象转换为字符串。只要一个formatter作为servlet的成员就可以了。" + +#. Tag: programlisting +#: tutorial.xml:868 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:870 +#, fuzzy, no-c-format +msgid "" +"The pattern we are applying here is called session-per-request. When a request hits the servlet, a new Hibernate " +"Session is opened through the first call to " +"getCurrentSession() on the SessionFactory. Then a database transaction is started—all data access as to " +"occur inside a transaction, no matter if data is read or written (we don't " +"use the auto-commit mode in applications)." +msgstr "" +"这个servlet只处理 HTTP GET 请求,因此,我们要实现的是" +"doGet()方法:" + +#. Tag: para +#: tutorial.xml:879 +#, no-c-format +msgid "" +"Do not use a new Hibernate Session " +"for every database operation. Use one Hibernate Session " +"that is scoped to the whole request. Use getCurrentSession(), so that it is automatically bound to the current Java thread." +msgstr "" +"我们称这里应用的模式为每次请求一个session(session-per-request)。当有请求到达这个servlet的时候,通过对SessionFactory的第一次调用,打开一个新的Hibernate Session。然后" +"启动一个数据库事务—所有的数据访问都是在事务中进行,不管是读还是写(我们" +"在应用程序中不使用auto-commit模式)。" + +#. Tag: para +#: tutorial.xml:886 +#, no-c-format +msgid "" +"Next, the possible actions of the request are processed and the response " +"HTML is rendered. We'll get to that part soon." +msgstr "" +"不要为每次数据库操作都使用一个新的Hibernate " +"Session。将Hibernate Session的范围设置" +"为整个请求。要用getCurrentSession(),这样它自动会绑定到当" +"前Java线程。" + +#. Tag: para +#: tutorial.xml:891 +#, fuzzy, no-c-format +msgid "" +"Finally, the unit of work ends when processing and rendering is complete. If " +"any problem occured during processing or rendering, an exception will be " +"thrown and the database transaction rolled back. This completes the " +"session-per-request pattern. Instead of the transaction " +"demarcation code in every servlet you could also write a servlet filter. See " +"the Hibernate website and Wiki for more information about this pattern, " +"called Open Session in View—you'll need it as " +"soon as you consider rendering your view in JSP, not in a servlet." +msgstr "" +"下一步,对请求的可能动作进行处理,渲染出反馈的HTML。我们很快就会涉及到那部" +"分。" + +#. Tag: title +#: tutorial.xml:905 +#, no-c-format +msgid "Processing and rendering" +msgstr "" +"最后,当处理与渲染都结束的时候,这个工作单元就结束了。假若在处理或渲染的时候" +"有任何错误发生,会抛出一个异常,回滚数据库事务。这样,session-per-" +"request模式就完成了。为了避免在每个servlet中都编写事务边界界定的代" +"码,可以考虑写一个servlet 过滤器(filter)来更好地解决。关于这一模式的更多信" +"息,请参阅Hibernate网站和Wiki,这一模式叫做Open Session in View—只要你考虑用JSP来渲染你的视图(view),而不是在servlet中,你" +"就会很快用到它。" + +#. Tag: para +#: tutorial.xml:907 +#, no-c-format +msgid "" +"Let's implement the processing of the request and rendering of the page." +msgstr "处理与渲染" + +#. Tag: programlisting +#: tutorial.xml:911 +#, no-c-format +msgid "" +"Event Manager\");\n" +"\n" +"// Handle actions\n" +"if ( \"store\".equals(request.getParameter(\"action\")) ) {\n" +"\n" +" String eventTitle = request.getParameter(\"eventTitle\");\n" +" String eventDate = request.getParameter(\"eventDate\");\n" +"\n" +" if ( \"\".equals(eventTitle) || \"\".equals(eventDate) ) {\n" +" out.println(\"Please enter event title and date.\");\n" +" } else {\n" +" createAndStoreEvent(eventTitle, dateFormatter.parse(eventDate));\n" +" out.println(\"Added event.\");\n" +" }\n" +"}\n" +"\n" +"// Print page\n" +"printEventForm(out);\n" +"listEvents(out, dateFormatter);\n" +"\n" +"// Write HTML footer\n" +"out.println(\"\");\n" +"out.flush();\n" +"out.close();]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:913 +#, fuzzy, no-c-format +msgid "" +"Granted, this coding style with a mix of Java and HTML would not scale in a " +"more complex application—keep in mind that we are only illustrating " +"basic Hibernate concepts in this tutorial. The code prints an HTML header " +"and a footer. Inside this page, an HTML form for event entry and a list of " +"all events in the database are printed. The first method is trivial and only " +"outputs HTML:" +msgstr "我们来实现处理请求以及渲染页面的工作。" + +#. Tag: programlisting +#: tutorial.xml:922 +#, no-c-format +msgid "" +"Add new event:\");\n" +" out.println(\"
\");\n" +" out.println(\"Title:
\");\n" +" out.println(\"Date (e.g. 24.12.2009):
\");\n" +" out.println(\"\");\n" +" out.println(\"
\");\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:924 +#, no-c-format +msgid "" +"The listEvents() method uses the Hibernate " +"Session bound to the current thread to execute a query:" +msgstr "" +"listEvents()方法使用绑定到当前线程的Hibernate " +"Session来执行查询:" + +#. Tag: programlisting +#: tutorial.xml:930 +#, no-c-format +msgid "" +" 0) {\n" +" out.println(\"

Events in database:

\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" for (Iterator it = result.iterator(); it.hasNext();) {\n" +" Event event = (Event) it.next();\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" out.println(\"\");\n" +" }\n" +" out.println(\"
Event titleEvent date
\" + event.getTitle() + \"\" + dateFormatter.format(event.getDate()) + " +"\"
\");\n" +" }\n" +"}]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:932 +#, no-c-format +msgid "" +"Finally, the store action is dispatched to the " +"createAndStoreEvent() method, which also uses the " +"Session of the current thread:" +msgstr "" +"最后,store动作会被导向到createAndStoreEvent()方法,它也使用当前线程的Session:" + +#. Tag: programlisting +#: tutorial.xml:938 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: tutorial.xml:940 +#, no-c-format +msgid "" +"That's it, the servlet is complete. A request to the servlet will be " +"processed in a single Session and Transaction. As earlier in the standalone application, Hibernate can " +"automatically bind these ojects to the current thread of execution. This " +"gives you the freedom to layer your code and access the " +"SessionFactory in any way you like. Usually you'd use a " +"more sophisticated design and move the data access code into data access " +"objects (the DAO pattern). See the Hibernate Wiki for more examples." +msgstr "" +"大功告成,这个servlet写完了。Hibernate会在单一的Session 和" +"Transaction中处理到达的servlet请求。如同在前面的独立应用程" +"序中那样,Hibernate可以自动的把这些对象绑定到当前运行的线程中。这给了你用任何" +"你喜欢的方式来对代码分层及访问SessionFactory的自由。通常," +"你会用更加完备的设计,把数据访问代码转移到数据访问对象中(DAO模式)。请参见" +"Hibernate Wiki,那里有更多的例子。" + +#. Tag: title +#: tutorial.xml:954 +#, no-c-format +msgid "Deploying and testing" +msgstr "部署与测试" + +#. Tag: para +#: tutorial.xml:956 +#, no-c-format +msgid "" +"To deploy this application you have to create a web archive, a WAR. Add the " +"following Ant target to your build.xml:" +msgstr "" +"要发布这个程序,你得把它打成web发布包:WAR文件。把下面的脚本加入到你的" +"build.xml中:" + +#. Tag: programlisting +#: tutorial.xml:961 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +"\n" +" \n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:963 +#, no-c-format +msgid "" +"This target creates a file called hibernate-tutorial.war " +"in your project directory. It packages all libraries and the web." +"xml descriptor, which is expected in the base directory of your " +"project:" +msgstr "" +"这段代码在你的开发目录中创建一个hibernate-tutorial.war的文" +"件。它把所有的类库和web.xml描述文件都打包进去,web.xml 文" +"件应该位于你的开发根目录中:" + +#. Tag: programlisting +#: tutorial.xml:969 +#, no-c-format +msgid "" +"\n" +"\n" +"\n" +" \n" +" Event Manager\n" +" events.EventManagerServlet\n" +" \n" +"\n" +" \n" +" Event Manager\n" +" /eventmanager\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: tutorial.xml:971 +#, no-c-format +msgid "" +"Before you compile and deploy the web application, note that an additional " +"library is required: jsdk.jar. This is the Java servlet " +"development kit, if you don't have this library already, get it from the Sun " +"website and copy it to your library directory. However, it will be only used " +"for compliation and excluded from the WAR package." +msgstr "" +"请注意在你编译和部署web应用程之前,需要一个附加的类库:jsdk.jar。这是Java Servlet开发包,假若你还没有,可以从Sun网站上下载,把它copy" +"到你的lib目录。但是,它仅仅是在编译时需要,不会被打入WAR包。" + +#. Tag: para +#: tutorial.xml:979 +#, no-c-format +msgid "" +"To build and deploy call ant war in your project " +"directory and copy the hibernate-tutorial.war file into " +"your Tomcat webapp directory. If you don't have Tomcat " +"installed, download it and follow the installation instructions. You don't " +"have to change any Tomcat configuration to deploy this application though." +msgstr "" +"在你的开发目录中,调用ant war来构建、打包,然后把" +"hibernate-tutorial.war文件拷贝到你的tomcat的" +"webapps目录下。假若你还没安装Tomcat,就去下载一个,按照指" +"南来安装。对此应用的发布,你不需要修改任何Tomcat的配置。" + +#. Tag: para +#: tutorial.xml:987 +#, no-c-format +msgid "" +"Once deployed and Tomcat is running, access the application at " +"http://localhost:8080/hibernate-tutorial/eventmanager. " +"Make sure you watch the Tomcat log to see Hibernate initialize when the " +"first request hits your servlet (the static initializer in " +"HibernateUtil is called) and to get the detailed output " +"if any exceptions occurs." +msgstr "" +"在部署完,启动Tomcat之后,通过http://localhost:8080/hibernate-" +"tutorial/eventmanager进行访问你的应用,在第一次servlet 请求发生时," +"请在Tomcat log中确认你看到Hibernate被初始化了(HibernateUtil的静态初始化器被调用),假若有任何异常抛出,也可以看到详细的输出。" + +#. Tag: title +#: tutorial.xml:1000 +#, no-c-format +msgid "Summary" +msgstr "总结" + +#. Tag: para +#: tutorial.xml:1002 +#, no-c-format +msgid "" +"This tutorial covered the basics of writing a simple standalone Hibernate " +"application and a small web application." +msgstr "" +"本章覆盖了如何编写一个简单独立的Hibernate命令行应用程序及小型的Hibernate web" +"应用程序的基本要素。" + +#. Tag: para +#: tutorial.xml:1007 +#, no-c-format +msgid "" +"If you already feel confident with Hibernate, continue browsing through the " +"reference documentation table of contents for topics you find interesting - " +"most asked are transactional processing (), " +"fetch performance (), or the usage of the API " +"() and the query features ()." +msgstr "" +"如果你已经对Hibernate感到自信,通过开发指南目录,继续浏览你感兴趣的内容-那些" +"会被问到的问题大多是事务处理 (),抓取" +"(fetch)的效率 (),或者API的使用 ()和查询的特性()。" + +#. Tag: para +#: tutorial.xml:1015 +#, no-c-format +msgid "" +"Don't forget to check the Hibernate website for more (specialized) tutorials." +msgstr "别忘了去Hibernate的网站查看更多(有针对性的)示例。" diff --git a/documentation/envers/src/main/docbook/zh-CN/content/xml.po b/documentation/envers/src/main/docbook/zh-CN/content/xml.po new file mode 100644 index 0000000000..520b7607b6 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/content/xml.po @@ -0,0 +1,433 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://bugs.kde.org\n" +"POT-Creation-Date: 2008-08-14 15:28+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#: xml.xml:29 +#, no-c-format +msgid "XML Mapping" +msgstr "XML映射" + +#. Tag: emphasis +#: xml.xml:31 +#, no-c-format +msgid "" +"Note that this is an experimental feature in Hibernate 3.0 and is under " +"extremely active development." +msgstr "注意这是Hibernate 3.0的一个实验性的特性。这一特性仍在积极开发中。" + +#. Tag: title +#: xml.xml:37 +#, no-c-format +msgid "Working with XML data" +msgstr "用XML数据进行工作" + +#. Tag: para +#: xml.xml:39 +#, no-c-format +msgid "" +"Hibernate lets you work with persistent XML data in much the same way you " +"work with persistent POJOs. A parsed XML tree can be thought of as just " +"another way to represent the relational data at the object level, instead of " +"POJOs." +msgstr "" +"Hibernate使得你可以用XML数据来进行工作,恰如你用持久化的POJO进行工作那样。解" +"析过的XML树 可以被认为是代替POJO的另外一种在对象层面上表示关系型数据的途径." + +#. Tag: para +#: xml.xml:46 +#, no-c-format +msgid "" +"Hibernate supports dom4j as API for manipulating XML trees. You can write " +"queries that retrieve dom4j trees from the database and have any " +"modification you make to the tree automatically synchronized to the " +"database. You can even take an XML document, parse it using dom4j, and write " +"it to the database with any of Hibernate's basic operations: persist" +"(), saveOrUpdate(), merge(), delete(), replicate() (merging is not " +"yet supported)." +msgstr "" +"Hibernate支持采用dom4j作为操作XML树的API。你可以写一些查询从数据库中检索出 " +"dom4j树,随后你对这颗树做的任何修改都将自动同步回数据库。你甚至可以用dom4j解" +"析 一篇XML文档,然后使用Hibernate的任一基本操作将它写入数据库: " +"persist(), saveOrUpdate(), merge(), delete(), replicate() " +"(合并操作merge()目前还不支持)。" + +#. Tag: para +#: xml.xml:56 +#, no-c-format +msgid "" +"This feature has many applications including data import/export, " +"externalization of entity data via JMS or SOAP and XSLT-based reporting." +msgstr "" +"这一特性可以应用在很多场合,包括数据导入导出,通过JMS或SOAP具体化实体数据以" +"及 基于XSLT的报表。" + +#. Tag: para +#: xml.xml:61 +#, no-c-format +msgid "" +"A single mapping may be used to simultaneously map properties of a class and " +"nodes of an XML document to the database, or, if there is no class to map, " +"it may be used to map just the XML." +msgstr "" +"一个单一的映射就可以将类的属性和XML文档的节点同时映射到数据库。如果不需要映射" +"类, 它也可以用来只映射XML文档。" + +#. Tag: title +#: xml.xml:68 +#, no-c-format +msgid "Specifying XML and class mapping together" +msgstr "指定同时映射XML和类" + +#. Tag: para +#: xml.xml:70 +#, no-c-format +msgid "Here is an example of mapping a POJO and XML simultaneously:" +msgstr "这是一个同时映射POJO和XML的例子:" + +#. Tag: programlisting +#: xml.xml:74 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:78 +#, no-c-format +msgid "Specifying only an XML mapping" +msgstr "只定义XML映射" + +#. Tag: para +#: xml.xml:80 +#, no-c-format +msgid "Here is an example where there is no POJO class:" +msgstr "这是一个不映射POJO的例子:" + +#. Tag: programlisting +#: xml.xml:84 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:86 +#, no-c-format +msgid "" +"This mapping allows you to access the data as a dom4j tree, or as a graph of " +"property name/value pairs (java Maps). The property names " +"are purely logical constructs that may be referred to in HQL queries." +msgstr "" +"这个映射使得你既可以把数据作为一棵dom4j树那样访问,又可以作为由属性键值对" +"(java Maps) 组成的图那样访问。属性名字纯粹是逻辑上的结构," +"你可以在HQL查询中引用它。" + +#. Tag: title +#: xml.xml:97 +#, no-c-format +msgid "XML mapping metadata" +msgstr "XML映射元数据" + +#. Tag: para +#: xml.xml:99 +#, no-c-format +msgid "" +"Many Hibernate mapping elements accept the node " +"attribute. This let's you specify the name of an XML attribute or element " +"that holds the property or entity data. The format of the node attribute must be one of the following:" +msgstr "" +"许多Hibernate映射元素具有node属性。这使你可以指定用来保存 " +"属性或实体数据的XML属性或元素。node属性必须是下列格式之" +"一:" + +#. Tag: para +#: xml.xml:108 +#, no-c-format +msgid "\"element-name\" - map to the named XML element" +msgstr "\"element-name\" - 映射为指定的XML元素" + +#. Tag: para +#: xml.xml:111 +#, no-c-format +msgid "\"@attribute-name\" - map to the named XML attribute" +msgstr "\"@attribute-name\" - 映射为指定的XML属性" + +#. Tag: para +#: xml.xml:114 +#, no-c-format +msgid "\".\" - map to the parent element" +msgstr "\".\" - 映射为父元素" + +#. Tag: para +#: xml.xml:117 +#, no-c-format +msgid "" +"\"element-name/@attribute-name\" - map to the named " +"attribute of the named element" +msgstr "" +"\"element-name/@attribute-name\" - 映射为指定元素的指定属" +"性" + +#. Tag: para +#: xml.xml:124 +#, no-c-format +msgid "" +"For collections and single valued associations, there is an additional " +"embed-xml attribute. If embed-xml=\"true\", the default, the XML tree for the associated entity (or collection " +"of value type) will be embedded directly in the XML tree for the entity that " +"owns the association. Otherwise, if embed-xml=\"false\", " +"then only the referenced identifier value will appear in the XML for single " +"point associations and collections will simply not appear at all." +msgstr "" +"对于集合和单值的关联,有一个额外的embed-xml属性可用。 这个" +"属性的缺省值是真(embed-xml=\"true\")。如果embed-" +"xml=\"true\", 则对应于被关联实体或值类型的集合的XML树将直接嵌入拥" +"有这些关联的实体的XML树中。 否则,如果embed-xml=\"false\",那么对于单值的关联,仅被引用的实体的标识符出现在 XML树中(被引用实体" +"本身不出现),而集合则根本不出现。" + +#. Tag: para +#: xml.xml:134 +#, no-c-format +msgid "" +"You should be careful not to leave embed-xml=\"true\" for " +"too many associations, since XML does not deal well with circularity!" +msgstr "" +"你应该小心,不要让太多关联的embed-xml属性为真(embed-xml=\"true\"),因为XML不能很好地处理 循环引用!" + +#. Tag: programlisting +#: xml.xml:139 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" \n" +" ...\n" +" \n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:141 +#, no-c-format +msgid "" +"in this case, we have decided to embed the collection of account ids, but " +"not the actual account data. The following HQL query:" +msgstr "" +"在这个例子中,我们决定嵌入帐目号码(account id)的集合,但不嵌入实际的帐目数" +"据。下面的HQL查询:" + +#. Tag: programlisting +#: xml.xml:146 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:148 +#, no-c-format +msgid "Would return datasets such as this:" +msgstr "返回的数据集将是这样:" + +#. Tag: programlisting +#: xml.xml:152 +#, no-c-format +msgid "" +"\n" +" 987632567\n" +" 985612323\n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: para +#: xml.xml:154 +#, no-c-format +msgid "" +"If you set embed-xml=\"true\" on the <one-to-" +"many> mapping, the data might look more like this:" +msgstr "" +"如果你把一对多映射<one-to-many>的embed-xml属性置为真" +"(embed-xml=\"true\"), 则数据看上去就像这样:" + +#. Tag: programlisting +#: xml.xml:159 +#, no-c-format +msgid "" +"\n" +" \n" +" \n" +" 100.29\n" +" \n" +" \n" +" \n" +" -2370.34\n" +" \n" +" \n" +" Gavin\n" +" A\n" +" King\n" +" \n" +" ...\n" +"]]>" +msgstr "" + +#. Tag: title +#: xml.xml:165 +#, no-c-format +msgid "Manipulating XML data" +msgstr "操作XML数据" + +#. Tag: para +#: xml.xml:167 +#, no-c-format +msgid "" +"Let's rearead and update XML documents in the application. We do this by " +"obtaining a dom4j session:" +msgstr "" +"让我们来读入和更新应用程序中的XML文档。通过获取一个dom4j会话可以做到这一点:" + +#. Tag: programlisting +#: xml.xml:172 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: programlisting +#: xml.xml:174 +#, no-c-format +msgid "" +"" +msgstr "" + +#. Tag: para +#: xml.xml:176 +#, no-c-format +msgid "" +"It is extremely useful to combine this feature with Hibernate's " +"replicate() operation to implement XML-based data import/" +"export." +msgstr "" +"将这一特色与Hibernate的replicate()操作结合起来对于实现的基" +"于XML的数据导入/导出将非常有用." diff --git a/documentation/envers/src/main/docbook/zh-CN/legal_notice.po b/documentation/envers/src/main/docbook/zh-CN/legal_notice.po new file mode 100644 index 0000000000..251f66d2f1 --- /dev/null +++ b/documentation/envers/src/main/docbook/zh-CN/legal_notice.po @@ -0,0 +1,40 @@ +#, fuzzy +msgid "" +msgstr "" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Content-Type: text/plain; charset=utf-8\n" +#: index.docbook:20 +msgid "Legal Notice" +msgstr "Legal Notice" + +#: index.docbook:22 +msgid "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" +msgstr "1801 Varsity Drive Raleigh, NC27606-2072USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588Research Triangle Park, NC27709USA" + +#: index.docbook:31 +msgid "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." +msgstr "Copyright 2007 by Red Hat, Inc. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser General Public License, as published by the Free Software Foundation." + +#: index.docbook:40 +msgid "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." +msgstr "Red Hat and the Red Hat \"Shadow Man\" logo are registered trademarks of Red Hat, Inc. in the United States and other countries." + +#: index.docbook:43 +msgid "All other trademarks referenced herein are the property of their respective owners." +msgstr "All other trademarks referenced herein are the property of their respective owners." + +#: index.docbook:46 +msgid "The GPG fingerprint of the security@redhat.com key is:" +msgstr "The GPG fingerprint of the security@redhat.com key is:" + +#: index.docbook:49 +msgid "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" +msgstr "CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E" + +msgid "ROLES_OF_TRANSLATORS" +msgstr "" + +msgid "CREDIT_FOR_TRANSLATORS" +msgstr "" +