📄 collection_mapping.po
字号:
#, fuzzymsgid ""msgstr """PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Content-Type: text/plain; charset=utf-8\n"#: index.docbook:5msgid "Collection Mapping"msgstr "Mapeo de Colecciones"#: index.docbook:8msgid "Persistent collections"msgstr "Colecciones persistentes"#: index.docbook:10msgid """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:15msgid """<![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 """<![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""}]]>"#: index.docbook:17msgid """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 """La interface real podría ser <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> o ... lo que te guste! (Donde \"lo ""que te guste\" significa que tendrás que escribir una ""implementación de <literal>org.hibernate.usertype.UserCollectionType</""literal>.)"#: index.docbook:26msgid """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 """Nota cómo hemos inicializado la variable de instancia de ""<literal>HashSet</literal>. 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 <literal>persist()</literal>, por ejemplo - Hibernate realmente ""remplazará el <literal>HashSet</literal> con una instancia de una ""implementación de <literal>Set</literal> propia de Hibernate. Observa ""errores como este:"#: index.docbook:36msgid """<![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 """<![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!]]>"#: index.docbook:38msgid """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 """Las colecciones persistentes inyectadas por Hibernate se comportan como ""<literal>HashMap</literal>, <literal>HashSet</literal>, <literal>TreeMap</""literal>, <literal>TreeSet</literal> o <literal>ArrayList</literal>, ""dependiendo del tipo de interface."#: index.docbook:45msgid """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:56msgid """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:65msgid "Collection mappings"msgstr "Mapeos de colección"#: index.docbook:67msgid """The Hibernate mapping element used for mapping a collection depends upon the ""type of the interface. For example, a <literal><set></literal> element ""is used for mapping properties of type <literal>Set</literal>."msgstr """El elemento de mapeo de Hibernate usado para mapear una colección ""depende del tipo de la interface. Por ejemplom un elemento <literal><""set></literal> se usa para mapear propiedades de tipo <literal>Set</""literal>."#: index.docbook:73msgid """<![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 """<![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>]]>"#: index.docbook:75msgid """Apart from <literal><set></literal>, there is also <literal><""list></literal>, <literal><map></literal>, <literal><bag></""literal>, <literal><array></literal> and <literal><primitive-""array></literal> mapping elements. The <literal><map></literal> ""element is representative:"msgstr """Aparte de <literal><set></literal>, existen además los ""elementos de mapeo <literal><list></literal>, <literal><map></""literal>, <literal><bag></literal>, <literal><array></literal> y ""<literal><primitive-array></literal>. El elemento <literal><map>""</literal> es representativo:"#: index.docbook:100msgid """<![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 """<![CDATA[<map\n"" name=\"propertyName\"\n"" table=\"table_name\"\n"" schema=\"schema_name\"\n"" lazy=\"true|false\"\n"" inverse=\"true|false\"\n"" cascade=\"all|none|save-update|delete|all-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"" node=\"element-name|.\"\n"" embed-xml=\"true|false\"\n"">\n""\n"" <key .... />\n"" <map-key .... />\n"" <element .... />\n""</map>]]>"#: index.docbook:103msgid "<literal>name</literal> the collection property name"msgstr "<literal>name</literal> el nombre de la propiedad de colección"#: index.docbook:108msgid """<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> (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:114msgid """<literal>schema</literal> (optional) the name of a table schema to override ""the schema declared on the root element"msgstr """<literal>schema</literal> (opcional) el nombre de un esquema de tablas para ""sobrescribir el esquema declarado en el elemento raíz"#: index.docbook:120msgid """<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> (opcional - por defecto a <literal>true</literal>) ""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:129msgid """<literal>inverse</literal> (optional - defaults to <literal>false</literal>) ""mark this collection as the \"inverse\" end of a bidirectional association"msgstr """<literal>inverse</literal> (opcional - por defecto a <literal>false</""literal>) marca esta colección como el extremo \"inverso\" de una ""asociación bidireccional."#: index.docbook:135msgid """<literal>cascade</literal> (optional - defaults to <literal>none</literal>) ""enable operations to cascade to child entities"msgstr """<literal>cascade</literal> (opcional - por defecto a <literal>none</""literal>) habilita operaciones en cascada a entidades hijas"#: index.docbook:141msgid """<literal>sort</literal> (optional) specify a sorted collection with ""<literal>natural</literal> sort order, or a given comparator class"msgstr """<literal>sort</literal> (opcional) especifica una colección con ""ordenamiento <literal>natural</literal>, o una clase comparadora dada"#: index.docbook:147msgid """<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</"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -