⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 collection_mapping.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:47+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: collection_mapping.xml:5#, no-c-formatmsgid "Collection Mapping"msgstr "Mapeamento de Coleções"#. Tag: title#: collection_mapping.xml:8#, no-c-formatmsgid "Persistent collections"msgstr "Persistent collections"#. Tag: para#: collection_mapping.xml:10#, no-c-formatmsgid """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-formatmsgid """<![CDATA[public class Product {\n""    private String serialNumber;\n""    private Set parts = new HashSet();\n""    \n""    public Set getParts() { return parts; }\n""    void setParts(Set parts) { this.parts = parts; }\n""    public String getSerialNumber() { return serialNumber; }\n""    void setSerialNumber(String sn) { serialNumber = sn; }\n""}]]>"msgstr ""#. Tag: para#: collection_mapping.xml:17#, no-c-formatmsgid """The actual interface might be <literal>java.util.Set</literal>, ""<literal>java.util.Collection</literal>, <literal>java.util.List</literal>, ""<literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, ""<literal>java.util.SortedMap</literal> or ... anything you like! (Where ""\"anything you like\" means you will have to write an implementation of ""<literal>org.hibernate.usertype.UserCollectionType</literal>.)"msgstr """The actual interface might be <literal>java.util.Set</literal>, ""<literal>java.util.Collection</literal>, <literal>java.util.List</literal>, ""<literal>java.util.Map</literal>, <literal>java.util.SortedSet</literal>, ""<literal>java.util.SortedMap</literal> or ... anything you like! (Where ""\"anything you like\" means you will have to write an implementation of ""<literal>org.hibernate.usertype.UserCollectionType</literal>.)"#. Tag: para#: collection_mapping.xml:26#, no-c-formatmsgid """Notice how we initialized the instance variable with an instance of ""<literal>HashSet</literal>. This is the best way to initialize collection ""valued properties of newly instantiated (non-persistent) instances. When you ""make the instance persistent - by calling <literal>persist()</literal>, for ""example - Hibernate will actually replace the <literal>HashSet</literal> ""with an instance of Hibernate's own implementation of <literal>Set</""literal>. Watch out for errors like this:"msgstr """Notice how we initialized the instance variable with an instance of ""<literal>HashSet</literal>. This is the best way to initialize collection ""valued properties of newly instantiated (non-persistent) instances. When you ""make the instance persistent - by calling <literal>persist()</literal>, for ""example - Hibernate will actually replace the <literal>HashSet</literal> ""with an instance of Hibernate's own implementation of <literal>Set</""literal>. Watch out for errors like this:"#. Tag: programlisting#: collection_mapping.xml:36#, no-c-formatmsgid """<![CDATA[Cat cat = new DomesticCat();\n""Cat kitten = new DomesticCat();\n""....\n""Set kittens = new HashSet();\n""kittens.add(kitten);\n""cat.setKittens(kittens);\n""session.persist(cat);\n""kittens = cat.getKittens(); // Okay, kittens collection is a Set\n""(HashSet) cat.getKittens(); // Error!]]>"msgstr ""#. Tag: para#: collection_mapping.xml:38#, no-c-formatmsgid """The persistent collections injected by Hibernate behave like ""<literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</""literal>, <literal>TreeSet</literal> or <literal>ArrayList</literal>, ""depending upon the interface type."msgstr """The persistent collections injected by Hibernate behave like ""<literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</""literal>, <literal>TreeSet</literal> or <literal>ArrayList</literal>, ""depending upon the interface type."#. Tag: para#: collection_mapping.xml:45#, no-c-formatmsgid """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-formatmsgid """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-formatmsgid "Collection mappings"msgstr "Collection mappings"#. Tag: para#: collection_mapping.xml:67#, no-c-formatmsgid """The Hibernate mapping element used for mapping a collection depends upon the ""type of the interface. For example, a <literal>&lt;set&gt;</literal> element ""is used for mapping properties of type <literal>Set</literal>."msgstr """The Hibernate mapping element used for mapping a collection depends upon the ""type of the interface. For example, a <literal>&lt;set&gt;</literal> element ""is used for mapping properties of type <literal>Set</literal>."#. Tag: programlisting#: collection_mapping.xml:73#, no-c-formatmsgid """<![CDATA[<class name=\"Product\">\n""    <id name=\"serialNumber\" column=\"productSerialNumber\"/>\n""    <set name=\"parts\">\n""        <key column=\"productSerialNumber\" not-null=\"true\"/>\n""        <one-to-many class=\"Part\"/>\n""    </set>\n""</class>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:75#, no-c-formatmsgid """Apart from <literal>&lt;set&gt;</literal>, there is also <literal>&lt;""list&gt;</literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</""literal>, <literal>&lt;array&gt;</literal> and <literal>&lt;primitive-""array&gt;</literal> mapping elements. The <literal>&lt;map&gt;</literal> ""element is representative:"msgstr """Apart from <literal>&lt;set&gt;</literal>, there is also <literal>&lt;""list&gt;</literal>, <literal>&lt;map&gt;</literal>, <literal>&lt;bag&gt;</""literal>, <literal>&lt;array&gt;</literal> and <literal>&lt;primitive-""array&gt;</literal> mapping elements. The <literal>&lt;map&gt;</literal> ""element is representative:"#. Tag: programlisting#: collection_mapping.xml:100#, no-c-formatmsgid """<![CDATA[<map\n""    name=\"propertyName\"\n""    table=\"table_name\"\n""    schema=\"schema_name\"\n""    lazy=\"true|extra|false\"\n""    inverse=\"true|false\"\n""    cascade=\"all|none|save-update|delete|all-delete-orphan|delete-orphan\"\n""    sort=\"unsorted|natural|comparatorClass\"\n""    order-by=\"column_name asc|desc\"\n""    where=\"arbitrary sql where condition\"\n""    fetch=\"join|select|subselect\"\n""    batch-size=\"N\"\n""    access=\"field|property|ClassName\"\n""    optimistic-lock=\"true|false\"\n""    mutable=\"true|false\"\n""    node=\"element-name|.\"\n""    embed-xml=\"true|false\"\n"">\n""\n""    <key .... />\n""    <map-key .... />\n""    <element .... />\n""</map>]]>"msgstr ""#. Tag: para#: collection_mapping.xml:103#, no-c-formatmsgid "<literal>name</literal> the collection property name"msgstr "<literal>name</literal> the collection property name"#. Tag: para#: collection_mapping.xml:108#, no-c-formatmsgid """<literal>table</literal> (optional - defaults to property name) the name of ""the collection table (not used for one-to-many associations)"msgstr """<literal>table</literal> (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-formatmsgid """<literal>schema</literal> (optional) the name of a table schema to override ""the schema declared on the root element"msgstr """<literal>schema</literal> (optional) the name of a table schema to override ""the schema declared on the root element"#. Tag: para#: collection_mapping.xml:120#, no-c-formatmsgid """<literal>lazy</literal> (optional - defaults to <literal>true</literal>) 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 """<literal>lazy</literal> (optional - defaults to <literal>true</literal>) 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-formatmsgid """<literal>inverse</literal> (optional - defaults to <literal>false</literal>) ""mark this collection as the \"inverse\" end of a bidirectional association"msgstr """<literal>inverse</literal> (optional - defaults to <literal>false</literal>) ""mark this collection as the \"inverse\" end of a bidirectional association"#. Tag: para#: collection_mapping.xml:135#, no-c-formatmsgid """<literal>cascade</literal> (optional - defaults to <literal>none</literal>) ""enable operations to cascade to child entities"msgstr """<literal>cascade</literal> (optional - defaults to <literal>none</literal>) ""enable operations to cascade to child entities"#. Tag: para#: collection_mapping.xml:141#, no-c-formatmsgid """<literal>sort</literal> (optional) specify a sorted collection with ""<literal>natural</literal> sort order, or a given comparator class"msgstr """<literal>sort</literal> (optional) specify a sorted collection with ""<literal>natural</literal> sort order, or a given comparator class"#. Tag: para#: collection_mapping.xml:147#, no-c-formatmsgid """<literal>order-by</literal> (optional, JDK1.4 only) specify a table column ""(or columns) that define the iteration order of the <literal>Map</literal>, ""<literal>Set</literal> or bag, together with an optional <literal>asc</""literal> or <literal>desc</literal>"msgstr """<literal>order-by</literal> (optional, JDK1.4 only) specify a table column ""(or columns) that define the iteration order of the <literal>Map</literal>, ""<literal>Set</literal> or bag, together with an optional <literal>asc</""literal> or <literal>desc</literal>"#. Tag: para#: collection_mapping.xml:154#, no-c-formatmsgid """<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</""literal> condition to be used when retrieving or removing the collection ""(useful if the collection should contain only a subset of the available data)"msgstr """<literal>where</literal> (optional) specify an arbitrary SQL <literal>WHERE</""literal> 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-formatmsgid """<literal>fetch</literal> (optional, defaults to <literal>select</literal>) ""Choose between outer-join fetching, fetching by sequential select, and ""fetching by sequential subselect."msgstr """<literal>fetch</literal> (optional, defaults to <literal>select</literal>) ""Choose between outer-join fetching, fetching by sequential select, and ""fetching by sequential subselect."#. Tag: para#: collection_mapping.xml:168#, no-c-formatmsgid """<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) ""specify a \"batch size\" for lazily fetching instances of this collection."msgstr """<literal>batch-size</literal> (optional, defaults to <literal>1</literal>) ""specify a \"batch size\" for lazily fetching instances of this collection."#. Tag: para#: collection_mapping.xml:174#, no-c-formatmsgid """<literal>access</literal> (optional - defaults to <literal>property</""literal>): The strategy Hibernate should use for accessing the collection ""property value."msgstr """<literal>access</literal> (optional - defaults to <literal>property</"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -