📄 performance.po
字号:
"<![CDATA[<set name=\"permissions\" \n"" fetch=\"join\">\n"" <key column=\"userId\"/>\n"" <one-to-many class=\"Permission\"/>\n""</set]]>"msgstr """<![CDATA[<set name=\"permissions\" \n"" fetch=\"join\">\n"" <key column=\"userId\"/>\n"" <one-to-many class=\"Permission\"/>\n""</set]]>"#: index.docbook:179msgid "<![CDATA[<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>]]>"msgstr """<![CDATA[<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>]]>"#: index.docbook:181msgid """The <literal>fetch</literal> strategy defined in the mapping document ""affects:"msgstr """La estrategia de recuperación definida en el documento de mapeo ""afecta a:"#: index.docbook:187msgid "retrieval via <literal>get()</literal> or <literal>load()</literal>"msgstr """las recuperaciones vía <literal>get()</literal> o <literal>load()</""literal>"#: index.docbook:192msgid "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:197msgid "<literal>Criteria</literal> queries"msgstr "las consultas de <literal>Criteria</literal>"#: index.docbook:202msgid "HQL queries if <literal>subselect</literal> fetching is used"msgstr "HQL queries if <literal>subselect</literal> fetching is used"#: index.docbook:208msgid """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:214msgid """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 <literal>left join fetch</literal> in HQL. This tells Hibernate to ""fetch the association eagerly in the first select, using an outer join. In ""the <literal>Criteria</literal> query API, you would use ""<literal>setFetchMode(FetchMode.JOIN)</literal>."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 ""<literal>left join fetch</literal> 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 <literal>Criteria</""literal>, usarías <literal>setFetchMode(FetchMode.JOIN)</literal>."#: index.docbook:223msgid """If you ever feel like you wish you could change the fetching strategy used ""by <literal>get()</literal> or <literal>load()</literal>, simply use a ""<literal>Criteria</literal> query, for example:"msgstr """Si acaso lo deseases, podrías cambiar la estrategia de ""recuperación usada por <literal>get()</literal> or <literal>load()</""literal>; simplemente usa una consulta <literal>Criteria</literal>, por ""ejemplo:"#: index.docbook:229msgid """<![CDATA[User user = (User) session.createCriteria(User.class)\n"" .setFetchMode(\"permissions\", FetchMode.JOIN)\n"" .add( Restrictions.idEq(userId) )\n"" .uniqueResult();]]>"msgstr """<![CDATA[User user = (User) session.createCriteria(User.class)\n"" .setFetchMode(\"permissions\", FetchMode.JOIN)\n"" .add( Restrictions.idEq(userId) )\n"" .uniqueResult();]]>"#: index.docbook:231msgid """(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:235msgid """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:243msgid "Single-ended association proxies"msgstr "Proxies de asociaciones de un solo extremo"#: index.docbook:245msgid """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:253msgid """By default, Hibernate3 generates proxies (at startup) for all persistent ""classes and uses them to enable lazy fetching of <literal>many-to-one</""literal> and <literal>one-to-one</literal> 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 <literal>muchos-a-uno</literal> y <literal>uno-a-uno</""literal>."#: index.docbook:259msgid """The mapping file may declare an interface to use as the proxy interface for ""that class, with the <literal>proxy</literal> attribute. By default, ""Hibernate uses a subclass of the class. <emphasis>Note that the proxied ""class must implement a default constructor with at least package visibility. ""We recommend this constructor for all persistent classes!</emphasis>"msgstr """El fichero de mapeo puede declarar una interface a usar como interface de ""proxy para esa clase, con el atributo <literal>proxy</literal>. Por defecto, ""Hibernate usa una subclase de la clase. <emphasis>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!</emphasis>"#: index.docbook:266msgid """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:271msgid """<![CDATA[<class name=\"Cat\" proxy=\"Cat\">\n"" ......\n"" <subclass name=\"DomesticCat\">\n"" .....\n"" </subclass>\n""</class>]]>"msgstr """<![CDATA[<class name=\"Cat\" proxy=\"Cat\">\n"" ......\n"" <subclass name=\"DomesticCat\">\n"" .....\n"" </subclass>\n""</class>]]>"#: index.docbook:273msgid """Firstly, instances of <literal>Cat</literal> will never be castable to ""<literal>DomesticCat</literal>, even if the underlying instance is an ""instance of <literal>DomesticCat</literal>:"msgstr """Primero, las instancias de <literal>Cat</literal> nunca serán objeto ""de un cast a <literal>DomesticCat</literal>, incluso aunque la instancia ""subyacente sea instancia de <literal>DomesticCat</literal>:"#: index.docbook:279msgid """<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // instantiate a ""proxy (does not hit the db)\n""if ( cat.isDomesticCat() ) { // hit the db to initialize ""the proxy\n"" DomesticCat dc = (DomesticCat) cat; // Error!\n"" ....\n""}]]>"msgstr """<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // instantiate a ""proxy (does not hit the db)\n""if ( cat.isDomesticCat() ) { // hit the db to initialize ""the proxy\n"" DomesticCat dc = (DomesticCat) cat; // Error!\n"" ....\n""}]]>"#: index.docbook:281msgid "Secondly, it is possible to break proxy <literal>==</literal>."msgstr """Segundo, es posible romper con el operador <literal>==</literal> de un proxy."#: index.docbook:285msgid """<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // ""instantiate a Cat proxy\n""DomesticCat dc = \n"" (DomesticCat) session.load(DomesticCat.class, id); // acquire new ""DomesticCat proxy!\n""System.out.println(cat==dc); // false]]>"msgstr """<![CDATA[Cat cat = (Cat) session.load(Cat.class, id); // ""instantiate a Cat proxy\n""DomesticCat dc = \n"" (DomesticCat) session.load(DomesticCat.class, id); // acquire new ""DomesticCat proxy!\n""System.out.println(cat==dc); // false]]>"#: index.docbook:287msgid """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:292msgid """<![CDATA[cat.setWeight(11.0); // hit the db to initialize the proxy\n""System.out.println( dc.getWeight() ); // 11.0]]>"msgstr """<![CDATA[cat.setWeight(11.0); // hit the db to initialize the proxy\n""System.out.println( dc.getWeight() ); // 11.0]]>"#: index.docbook:294msgid """Third, you may not use a CGLIB proxy for a <literal>final</literal> class or ""a class with any <literal>final</literal> methods."msgstr """Tercero, no debes usar un proxy CGLIB para una clase <literal>final</""literal> o una clase con algún método <literal>final</literal>."#: index.docbook:299msgid """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:305msgid """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:311msgid """<![CDATA[<class name=\"CatImpl\" proxy=\"Cat\">\n"" ......\n"" <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"" .....\n"" </subclass>\n""</class>]]>"msgstr """<![CDATA[<class name=\"CatImpl\" proxy=\"Cat\">\n"" ......\n"" <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"" .....\n"" </subclass>\n""</class>]]>"#: index.docbook:313msgid """where <literal>CatImpl</literal> implements the interface <literal>Cat</"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -