alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (performance.po)

This example Hibernate source code file (performance.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

cat, esto, hibernate, hibernate, if, la, si, tag, tag, the, the, this, this, you

The Hibernate performance.po source code

# translation of performance.po to
# Michael H. Smith <mhideo@redhat.com>, 2007.
# Angela Garcia <agarcia@redhat.com>, 2009, 2010.
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
msgid ""
msgstr ""
"Project-Id-Version: performance\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-20 21:02+0000\n"
"PO-Revision-Date: 2010-03-17 10:28+1000\n"
"Last-Translator: Angela Garcia <agarcia@redhat.com>\n"
"Language-Team:  <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"

#. Tag: title
#: performance.xml:31
#, no-c-format
msgid "Improving performance"
msgstr "Mejoramiento del rendimiento"

#. Tag: title
#: performance.xml:34
#, no-c-format
msgid "Fetching strategies"
msgstr "Estrategias de recuperación"

#. Tag: para
#: performance.xml:36
#, no-c-format
msgid ""
"Hibernate uses a <emphasis>fetching strategy to retrieve "
"associated objects if the application needs to navigate the association. "
"Fetch strategies can be declared in the O/R mapping metadata, or over-ridden "
"by a particular HQL or <literal>Criteria query."
msgstr ""
"Hibernate utiliza una <emphasis>estrategia de recuperación para "
"recuperar los objetos asociados cuando la aplicación necesita navegar la "
"asociación. Las estrategias de recuperación se pueden declarar en los "
"metadatos de mapeo O/R, o se pueden sobrescribir por medio de una HQL "
"particular o una petición <literal>Criteria."

#. Tag: para
#: performance.xml:42
#, no-c-format
msgid "Hibernate3 defines the following fetching strategies:"
msgstr "Hibernate3 define las siguientes estrategias de recuperación:"

#. Tag: para
#: performance.xml:46
#, no-c-format
msgid ""
"<emphasis>Join fetching: Hibernate retrieves the associated "
"instance or collection in the same <literal>SELECT, using an "
"<literal>OUTER JOIN."
msgstr ""
"<emphasis>Recuperación por unión (join fetching): Hibernate "
"recupera la instancia asociada o la colección en el mismo <literal>SELECTOUTER JOIN."

#. Tag: para
#: performance.xml:53
#, no-c-format
msgid ""
"<emphasis>Select fetching: a second SELECT is "
"used to retrieve the associated entity or collection. Unless you explicitly "
"disable lazy fetching by specifying <literal>lazy=\"false\", this "
"second select will only be executed when you access the association."
msgstr ""
"<emphasis>Recuperación por selección (select fetching): se "
"utiliza un segundo <literal>SELECT para recuperar la entidad o "
"colección asocidas. A menos que deshabilite explícitamente la recuperación "
"perezosa especificando <literal>lazy=\"false\", la segunda "
"selección sólo será ejecutada cuando acceda a la asociación."

#. Tag: para
#: performance.xml:61
#, no-c-format
msgid ""
"<emphasis>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 <literal>lazy=\"false\", this second select will only "
"be executed when you access the association."
msgstr ""
"<emphasis>Recuperación por subselección (subselect fetching): se "
"utiliza un segundo <literal>SELECT para recuperar las colecciones "
"asociadas de todas las entidades recuperadas en una consulta o recuperación "
"previa. A menos de que deshabilite explícitamente la recuperación perezosa "
"especificando <literal>lazy=\"false\", esta segunda selección sólo "
"se ejecutará cuando acceda a la asociación."

#. Tag: para
#: performance.xml:70
#, no-c-format
msgid ""
"<emphasis>Batch fetching: an optimization strategy for select "
"fetching. Hibernate retrieves a batch of entity instances or collections in "
"a single <literal>SELECT by specifying a list of primary or "
"foreign keys."
msgstr ""
"<emphasis>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 un solo <literal>SELECT, especificando "
"una lista de claves principales o de claves foráneas."

#. Tag: para
#: performance.xml:77
#, no-c-format
msgid "Hibernate also distinguishes between:"
msgstr "Hibernate también distingue entre:"

#. Tag: para
#: performance.xml:81
#, no-c-format
msgid ""
"<emphasis>Immediate fetching: an association, collection or "
"attribute is fetched immediately when the owner is loaded."
msgstr ""
"<emphasis>Recuperación inmediata: una asociación, colección o "
"atributo se recupera inmediatamente cuando se carga el dueño."

#. Tag: para
#: performance.xml:87
#, no-c-format
msgid ""
"<emphasis>Lazy collection fetching: a collection is fetched when "
"the application invokes an operation upon that collection. This is the "
"default for collections."
msgstr ""
"<emphasis>Recuperación perezosa de colecciones: una colección se "
"recupera cuando la aplicación invoca una operación sobre esa colección. Este "
"es el valor predeterminado para las colecciones."

#. Tag: para
#: performance.xml:93
#, no-c-format
msgid ""
"<emphasis>\"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. It "
"is suitable for large collections."
msgstr ""
"<emphasis>Recuperación de colección \"extra-perezoza\" : se "
"accede a elementos individuales desde la base de datos cuando se necesita. "
"Hibernate intenta no recuperar toda la colección en la memoria a menos de "
"que sea absolutamente necesario. Esto es apropiado para colecciones muy "
"grandes."

#. Tag: para
#: performance.xml:101
#, no-c-format
msgid ""
"<emphasis>Proxy fetching: a single-valued association is fetched "
"when a method other than the identifier getter is invoked upon the "
"associated object."
msgstr ""
"<emphasis>Recuperación por proxy: una asociación monovaluada se "
"recupera cuando se invoca un método que no sea el getter del identificador "
"sobre el objeto asociado."

#. Tag: para
#: performance.xml:107
#, no-c-format
msgid ""
"<emphasis>\"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. It is also more transparent, since no proxy is "
"visible to the application. This approach requires buildtime bytecode "
"instrumentation and is rarely necessary."
msgstr ""
"<emphasis> Recuperación \"no-proxy\" : una asociación monovaluada "
"se recupera cuando se accede a la variable de la instancia. Comparado con la "
"recuperación por proxy, este enfoque es menos perezozo; la asociación se "
"recupera cuando se accede sólamente al identificador. También es más "
"transparente ya que para la aplicación no hay proxies visibles. Este enfoque "
"requiere instrumentación del código byte del tiempo estimado de construcción "
"y se necesita muy raramente."

#. Tag: para
#: performance.xml:117
#, no-c-format
msgid ""
"<emphasis>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 ""
"<emphasis>Recuperación perezosa de atributos: un atributo o una "
"asociación monovaluada se recuperan cuando se accede a la variable de la "
"instancia. Este enfoque requiere instrumentación del código byte en tiempo "
"estimado de construcción y se necesita muy raramente."

#. Tag: para
#: performance.xml:124
#, no-c-format
msgid ""
"We have two orthogonal notions here: <emphasis>when is the "
"association fetched and <emphasis>how is it fetched. It is "
"important that you do not confuse them. We use <literal>fetch to "
"tune performance. We can use <literal>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: <emphasis>cuándo se "
"recupera la aplicación, y <emphasis>cómo se recupera. Es "
"importante que no las confunda. Utilizamos <literal>fetch para "
"afinar el rendimiento. Podemos usar <literal>lazy para definir un "
"contrato sobre qué datos están siempre disponibles en cualquier instancia "
"separada de una clase en particular."

#. Tag: title
#: performance.xml:132
#, no-c-format
msgid "Working with lazy associations"
msgstr "Trabajo con asociaciones perezosas"

#. Tag: para
#: performance.xml:134
#, 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 "
"most associations in the majority of 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 predeterminadas tienen sentido para casi todas "
"las asociaciones en la mayoría de las aplicaciones."

#. Tag: para
#: performance.xml:138
#, no-c-format
msgid ""
"If you set <literal>hibernate.default_batch_fetch_size, Hibernate "
"will use the batch fetch optimization for lazy fetching. This optimization "
"can also be enabled at a more granular level."
msgstr ""
"Si configura <literal>hibernate.default_batch_fetch_size, "
"Hibernate utilizará la optimización de recuperación en lotes para "
"recuperación perezosa. Esta optimización también se puede habilitar en un "
"nivel más detallado."

#. Tag: para
#: performance.xml:142
#, no-c-format
msgid ""
"Please be aware that access to a lazy association outside of the context of "
"an open Hibernate session will result in an exception. For example:"
msgstr ""
"Note que el acceder a una asociación perezosa fuera del contexto de una "
"sesión de Hibernate abierta resultará en una excepción. Por ejemplo:"

#. Tag: programlisting
#: performance.xml:146
#, no-c-format
msgid ""
"s = sessions.openSession();\n"
"Transaction tx = s.beginTransaction();\n"
"            \n"
"User u = (User) s.createQuery(\"from User u where u.name=:userName\")\n"
"    .setString(\"userName\", userName).uniqueResult();\n"
"Map permissions = u.getPermissions();\n"
"\n"
"tx.commit();\n"
"s.close();\n"
"\n"
"Integer accessLevel = (Integer) permissions.get(\"accounts\");  // Error!"
msgstr ""

#. Tag: para
#: performance.xml:148
#, no-c-format
msgid ""
"Since the permissions collection was not initialized when the "
"<literal>Session was closed, the collection will not be able to "
"load its state. <emphasis>Hibernate does not support lazy initialization for "
"detached objects</emphasis>. This can be fixed by moving 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 "
"<literal>Session, la colección no será capaz de cargar su estado. "
"<emphasis>Hibernate no soporta la inicialización perezosa de objetos "
"separados</emphasis>. La solución es mover el código que lee de la colección "
"a justo antes de que se guarde la transacción."

#. Tag: para
#: performance.xml:155
#, no-c-format
msgid ""
"Alternatively, you can use a non-lazy collection or association, by "
"specifying <literal>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 fetch the entire database into memory "
"in every transaction."
msgstr ""
"Opcionalmente puede utilizar una colección no perezosa o asociación, "
"especificando <literal>lazy=\"false\" para el mapeo de asociación. "
"Sin embargo, el propósito de la inicialización perezosa es que se utilice "
"para casi todas las colecciones y asociaciones. ¡Si define demasiadas "
"asociaciones no perezosas en su modelo de objetos, Hibernate recuperará la "
"base de datos entera en toda transacción."

#. Tag: para
#: performance.xml:162
#, no-c-format
msgid ""
"On the other hand, you can use join fetching, which is non-lazy by nature, "
"instead of select fetching in a particular transaction. We will now explain "
"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, puede utilizar la recuperación por unión, la cual no es "
"perezosa por naturaleza, en lugar 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 para las de las asociaciones monovaluadas y las "
"colecciones."

#. Tag: title
#: performance.xml:170
#, no-c-format
msgid "Tuning fetch strategies"
msgstr "Afinación de las estrategias de recuperación"

#. 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 ""
"La recuperación por selección (la preestablecida) es extremadamente "
"vulnerable a problemas de selección N+1, de modo que puede que queramos "
"habilitar la recuperación por unión (join fetching) en el documento de mapeo:"

#. Tag: programlisting
#: performance.xml:176
#, no-c-format
msgid ""
"<set name=\"permissions\"\n"
"            fetch=\"join\">\n"
"    <key column=\"userId\"/>\n"
"    <one-to-many class=\"Permission\"/>\n"
"</set"
msgstr ""

#. Tag: programlisting
#: performance.xml:178
#, no-c-format
msgid "<many-to-one name=\"mother\" class=\"Cat\" fetch=\"join\"/>"
msgstr ""

#. Tag: para
#: performance.xml:180
#, no-c-format
msgid ""
"The <literal>fetch strategy defined in the mapping document "
"affects:"
msgstr ""
"La estrategia de <literal>recuperación definida en el documento de "
"mapeo afecta a:"

#. Tag: para
#: performance.xml:185
#, no-c-format
msgid "retrieval via <literal>get() or load()"
msgstr ""
"las recuperaciones por medio de <literal>get() o load() queries"
msgstr "las consultas de <literal>Criteria"

#. Tag: para
#: performance.xml:199
#, no-c-format
msgid "HQL queries if <literal>subselect fetching is used"
msgstr ""
"las consultas HQL si se utiliza la recuperación <literal>subselect"

#. Tag: para
#: performance.xml:204
#, no-c-format
msgid ""
"Irrespective of the fetching strategy you use, the defined non-lazy graph is "
"guaranteed to be loaded into memory. This might, however, result in several "
"immediate selects being used to execute a particular HQL query."
msgstr ""
"Sin importar que estrategia de recuperación utilice, se garantiza que la "
"gráfica no-perezoza definida será cargada en la memoria. Sin embargo, esto "
"puede causar la utilización de varias selecciones inmediatas para ejecutar "
"una consulta HQL en particular."

#. Tag: para
#: performance.xml:209
#, no-c-format
msgid ""
"Usually, the mapping document is not used to customize fetching. Instead, we "
"keep the default behavior, and override it for a particular transaction, "
"using <literal>left join fetch in HQL. This tells Hibernate to "
"fetch the association eagerly in the first select, using an outer join. In "
"the <literal>Criteria query API, you would use "
"<literal>setFetchMode(FetchMode.JOIN)."
msgstr ""
"Usualmente, no utilizamos 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, utilizando <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, usted utilizaría "
"<literal>setFetchMode(FetchMode.JOIN)."

#. Tag: para
#: performance.xml:216
#, no-c-format
msgid ""
"If you want to change the fetching strategy used by <literal>get() "
"or <literal>load(), you can use a Criteria "
"query. For example:"
msgstr ""
"Si quiere cambiar la estrategia de recuperación utilizada por <literal>get()"
"</literal> o load(); utilice una consulta "
"<literal>Criteria. Por ejemplo:"

#. Tag: programlisting
#: performance.xml:220
#, no-c-format
msgid ""
"User user = (User) session.createCriteria(User.class)\n"
"                .setFetchMode(\"permissions\", FetchMode.JOIN)\n"
"                .add( Restrictions.idEq(userId) )\n"
"                .uniqueResult();"
msgstr ""

#. Tag: para
#: performance.xml:222
#, no-c-format
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 denominan "
"un \"plan de recuperación\"."

#. Tag: para
#: performance.xml:225
#, no-c-format
msgid ""
"A completely different approach to problems with N+1 selects is to use the "
"second-level cache."
msgstr ""
"Un enfoque completamente diferente de evitar problemas con selecciones N+1 "
"es usar el caché de segundo nivel."

#. Tag: title
#: performance.xml:230
#, no-c-format
msgid "Single-ended association proxies"
msgstr "Proxies de asociaciones de un sólo extremo"

#. Tag: para
#: performance.xml:232
#, 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 which is "
"accessed via the CGLIB library."
msgstr ""
"La recuperación perezosa de colecciones está implementada utilizando 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 sólo extremo. La entidad destino de la asociación se debe "
"tratar con proxies. Hibernate implementa proxies de inicialización perezosa "
"para objetos persistentes utilizando la mejora del código byte en tiempo de "
"ejecución por medio de la biblioteca CGLIB)."

#. Tag: para
#: performance.xml:239
#, no-c-format
msgid ""
"At startup, Hibernate3 generates proxies by default for all persistent "
"classes and uses them to enable lazy fetching of <literal>many-to-oneone-to-one associations."
msgstr ""
"En el arranque, Hibernate3 genera proxies por defecto para todas las clases "
"persistentes y los usa para habilitar la recuperación perezosa de "
"asociaciones <literal>muchos-a-uno y uno-a-uno."

#. Tag: para
#: performance.xml:244
#, no-c-format
msgid ""
"The mapping file may declare an interface to use as the proxy interface for "
"that class, with the <literal>proxy attribute. By default, "
"Hibernate uses a subclass of the class. <emphasis>The proxied class must "
"implement a default constructor with at least package visibility. This "
"constructor is recommended for all persistent classes</emphasis>."
msgstr ""
"El archivo de mapeo puede declarar una interfaz a utilizar como interfaz de "
"proxy para esa clase, con el atributo <literal>proxy. Por defecto, "
"Hibernate usa una subclase de la clase. <emphasis>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>."

#. Tag: para
#: performance.xml:251
#, no-c-format
msgid ""
"There are potential problems to note when extending this approach to "
"polymorphic classes.For example:"
msgstr ""
"Hay problemas potenciales que se deben tener en cuenta al extender este "
"enfoque a las clases polimórficas. Por ejemplo:"

#. Tag: programlisting
#: performance.xml:254
#, no-c-format
msgid ""
"<class name=\"Cat\" proxy=\"Cat\">\n"
"    ......\n"
"    <subclass name=\"DomesticCat\">\n"
"        .....\n"
"    </subclass>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:256
#, no-c-format
msgid ""
"Firstly, instances of <literal>Cat will never be castable to "
"<literal>DomesticCat, even if the underlying instance is an "
"instance of <literal>DomesticCat:"
msgstr ""
"Primero, las instancias de <literal>Cat nunca serán objeto de un "
"cast a <literal>DomesticCat, incluso aunque la instancia "
"subyacente sea una instancia de <literal>DomesticCat:"

#. Tag: programlisting
#: performance.xml:260
#, no-c-format
msgid ""
"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 ""

#. Tag: para
#: performance.xml:262
#, no-c-format
msgid "Secondly, it is possible to break proxy <literal>==:"
msgstr "Segundo, es posible romper el proxy <literal>==:"

#. Tag: programlisting
#: performance.xml:265
#, no-c-format
msgid ""
"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 ""

#. Tag: para
#: performance.xml:267
#, 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 ""
"Sin embargo, la situación no es en absoluto tan mala como parece. Aunque "
"tenemos ahora dos referencias a objetos proxy diferentes, la instancia "
"subyacente será aún el mismo objeto:"

#. Tag: programlisting
#: performance.xml:271
#, no-c-format
msgid ""
"cat.setWeight(11.0);  // hit the db to initialize the proxy\n"
"System.out.println( dc.getWeight() );  // 11.0"
msgstr ""

#. Tag: para
#: performance.xml:273
#, no-c-format
msgid ""
"Third, you cannot use a CGLIB proxy for a <literal>final class or "
"a class with any <literal>final methods."
msgstr ""
"Tercero, no puede usar un proxy CGLIB para una clase <literal>finalfinal."

#. Tag: para
#: performance.xml:276
#, no-c-format
msgid ""
"Finally, if your persistent object acquires any resources upon instantiation "
"(e.g. 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 su 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. "

#. Tag: para
#: performance.xml:281
#, no-c-format
msgid ""
"These problems are all due to fundamental limitations in Java's single "
"inheritance model. 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 where <literal>CatImplCat and "
"<literal>DomesticCatImpl implements the interface "
"<literal>DomesticCat. For example:"
msgstr ""
"Estos problemas se deben a limitaciones fundamentales en el modelo de "
"herencia única de Java. Si desea evitar estos problemas cada una de sus "
"clases persistentes deben implementar una interfaz que declare sus métodos "
"de negocio. Debe especificar estas interfaces en el archivo de mapeo en "
"donde <literal>CatImpl implementa la interfaz CatDomesticCatImpl implementa la interfaz "
"<literal>DomesticCat. Por ejemplo:"

#. Tag: programlisting
#: performance.xml:289
#, no-c-format
msgid ""
"<class name=\"CatImpl\" proxy=\"Cat\">\n"
"    ......\n"
"    <subclass name=\"DomesticCatImpl\" proxy=\"DomesticCat\">\n"
"        .....\n"
"    </subclass>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:291
#, no-c-format
msgid ""
"Then proxies for instances of <literal>Cat and "
"<literal>DomesticCat can be returned by load() "
"or <literal>iterate()."
msgstr ""
"Entonces los proxies para las instancias de <literal>Cat y "
"<literal>DomesticCat pueden ser retornadas por load()iterate()."

#. Tag: programlisting
#: performance.xml:295
#, no-c-format
msgid ""
"Cat cat = (Cat) session.load(CatImpl.class, catid);\n"
"Iterator iter = session.createQuery(\"from CatImpl as cat where cat."
"name='fritz'\").iterate();\n"
"Cat fritz = (Cat) iter.next();"
msgstr ""

#. Tag: title
#: performance.xml:298
#, no-c-format
msgid "Note"
msgstr "Nota"

#. Tag: para
#: performance.xml:300
#, no-c-format
msgid "<literal>list() does not usually return proxies."
msgstr "<literal>list() usualmente no retorna proxies."

#. Tag: para
#: performance.xml:304
#, no-c-format
msgid ""
"Relationships are also lazily initialized. This means you must declare any "
"properties to be of type <literal>Cat, not CatImpl, no "
"<literal>CatImpl."

#. Tag: para
#: performance.xml:308
#, no-c-format
msgid ""
"Certain operations do <emphasis>not require proxy initialization:"
msgstr ""
"Ciertas operaciones <emphasis>no requieren inicialización de "
"proxies:"

#. Tag: para
#: performance.xml:313
#, no-c-format
msgid ""
"<literal>equals(): if the persistent class does not override "
"<literal>equals()"
msgstr ""
"<literal>equals(), si la clase persistente no sobrescribe "
"<literal>equals() "

#. Tag: para
#: performance.xml:318
#, no-c-format
msgid ""
"<literal>hashCode(): if the persistent class does not override "
"<literal>hashCode()"
msgstr ""
"<literal>hashCode(), si la clase persistente no sobrescribe "
"<literal>hashCode() "

#. Tag: para
#: performance.xml:323
#, no-c-format
msgid "The identifier getter method"
msgstr "El método getter del identificador"

#. Tag: para
#: performance.xml:327
#, no-c-format
msgid ""
"Hibernate will detect persistent classes that override <literal>equals()hashCode()."
msgstr ""
"Hibernate detectará las clases persistentes que sobrescriban <literal>equals"
"()</literal> o hashCode()."

#. Tag: para
#: performance.xml:330
#, no-c-format
msgid ""
"By choosing <literal>lazy=\"no-proxy\" instead of the default "
"<literal>lazy=\"proxy\", you can avoid problems associated with "
"typecasting. However, buildtime bytecode instrumentation is required, and "
"all operations will result in immediate proxy initialization."
msgstr ""
"Al escoger <literal>lazy=\"no-proxy\" en vez del lazy="
"\"proxy\"</literal> predeterminado, podemos evitar los problemas asociados "
"con conversión de tipos (typecasting). Sin embargo, requiere la "
"instrumentación de código byte en tiempo estimado de construcción y todas "
"las operaciones resultarán en una inicialización de proxies inmediata."

#. Tag: title
#: performance.xml:338
#, no-c-format
msgid "Initializing collections and proxies"
msgstr "Inicialización de colecciones y proxies"

#. Tag: para
#: performance.xml:340
#, no-c-format
msgid ""
"A <literal>LazyInitializationException will be thrown by Hibernate "
"if an uninitialized collection or proxy is accessed outside of the scope of "
"the <literal>Session, i.e., when the entity owning the collection "
"or having the reference to the proxy is in the detached state."
msgstr ""
"Hibernate lanzará una <literal>LazyInitializationException si se "
"accede a una colección o proxy sin acceder fuera del ámbito de la "
"<literal>Session, por ejemplo, cuando la entidad que posee la "
"colección o que tiene la referencia al proxy esté en el estado separado."

#. Tag: para
#: performance.xml:346
#, no-c-format
msgid ""
"Sometimes a proxy or collection needs to be initialized before closing the "
"<literal>Session. You can force initialization by calling "
"<literal>cat.getSex() or cat.getKittens().size(). Puede forzar la inicialización llamando a "
"<literal>cat.getSex() o cat.getKittens().size() and "
"<literal>Hibernate.isInitialized(), provide the application with a "
"convenient way of working with lazily initialized collections or proxies. "
"<literal>Hibernate.initialize(cat) will force the initialization "
"of a proxy, <literal>cat, as long as its SessionHibernate.initialize( cat.getKittens() ) y "
"<literal>Hibernate.isInitialized() proporcionan a la aplicación "
"una forma conveniente de trabajar con colecciones o proxies inicializados "
"perezosamente. <literal>Hibernate.initialize(cat) forzará la "
"inicialización de un proxy, <literal>cat, en tanto su "
"<literal>Session esté todavía abierta. Hibernate."
"initialize( cat.getKittens() )</literal> tiene un efecto similar para la "
"colección de gatitos. "

#. Tag: para
#: performance.xml:362
#, no-c-format
msgid ""
"Another option is to keep the <literal>Session open until all "
"required 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 "
"<literal>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 <literal>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 utiliza están en "
"capas de aplicación diferentes o procesos físicos diferentes, puede ser un "
"problema asegurar que la <literal>Session esté abierta cuando se "
"inicializa una colección. Existen dos formas básicas para abordar este tema: "

#. Tag: para
#: performance.xml:372
#, no-c-format
msgid ""
"In a web-based application, a servlet filter can be used to close the "
"<literal>Session only at the end of a user request, once the "
"rendering of the view is complete (the <emphasis>Open Session in View 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 en la web se puede utilizar un filtro de servlets "
"para cerrar la <literal>Session sólamente al final de una petición "
"del usuario, una vez que la entrega de la vista esté completa (el patrón "
"<emphasis>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 la infraestructura de su aplicación. Es de una vital "
"importancia que la <literal>Session esté cerrada y la transacción "
"terminada antes de volver al usuario, incluso cuando ocurra una excepción "
"durante le entrega de la vista. Refiérase a la Wiki de Hibernate para ver "
"ejemplos de este patrón \"Open Session in View\" (sesión abierta en vista). "

#. Tag: para
#: performance.xml:385
#, no-c-format
msgid ""
"In an application with a separate business tier, the business logic must "
"\"prepare\" all collections that the web tier needs 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 <literal>Hibernate."
"initialize()</literal> 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 <literal>FETCH "
"clause or a <literal>FetchMode.JOIN in CriteriaCommandSession Facade."
msgstr ""
"En una aplicación con una capa de negocios separada, la lógica empresarial "
"tiene que \"preparar\" todas las colecciones que la capa web va a necesitar "
"antes de retornar. Esto significa que la capa empresarial debe cargar todos "
"los datos y devolver a la capa web/presentación todos los datos ya "
"inicializados que se requieran para un caso de uso en particular. "
"Usualmente, la aplicación llama a <literal>Hibernate.initialize() "
"para cada colección que se necesitará en la capa web (esta llamada debe "
"tener lugar antes de que se cierre la sesión) o recupera la colección "
"tempranamente utilizando una consulta de Hibernate con una cláusula "
"<literal>FETCH o una FetchMode.JOIN en "
"<literal>Criteria. Usualmente, esto es más fácil si adopta el "
"patrón <emphasis>Comando en vez de una Fachada de "
"Sesión</emphasis>."

#. Tag: para
#: performance.xml:401
#, no-c-format
msgid ""
"You can also attach a previously loaded object to a new <literal>Sessionmerge() or lock() before "
"accessing uninitialized collections or other proxies. Hibernate does not, "
"and certainly <emphasis>should not, do this automatically since "
"it would introduce impromptu transaction semantics."
msgstr ""
"También puede adjuntar un objeto cargado previamente a una nueva "
"<literal>Session con merge() o lock() hacer esto "
"automáticamente ya que introduciría semánticas de transacción improvisadas."

#. Tag: para
#: performance.xml:410
#, no-c-format
msgid ""
"Sometimes you do not want to initialize a large collection, but still need "
"some information about it, like its size, for example, or a subset of the "
"data."
msgstr ""
"A veces no quiere inicializar una colección grande, pero todavía necesita "
"alguna información sobre ella como por ejemplo, su tamaño o un subconjunto "
"de los datos."

#. Tag: para
#: performance.xml:414
#, no-c-format
msgid ""
"You can use a collection filter to get the size of a collection without "
"initializing it:"
msgstr ""
"Puede utilizar un filtro de colecciones para obtener el tamaño de una "
"colección sin inicializarla:"

#. Tag: programlisting
#: performance.xml:417
#, no-c-format
msgid ""
"( (Integer) s.createFilter( collection, \"select count(*)\" ).list().get"
"(0) ).intValue()"
msgstr ""

#. Tag: para
#: performance.xml:419
#, no-c-format
msgid ""
"The <literal>createFilter() method is also used to efficiently "
"retrieve subsets of a collection without needing to initialize the whole "
"collection:"
msgstr ""
"El método <literal>createFilter() también se utiliza para "
"recuperar eficientemente subconjuntos de una colección sin necesidad de "
"inicializar toda la colección:"

#. Tag: programlisting
#: performance.xml:423
#, no-c-format
msgid ""
"s.createFilter( lazyCollection, \"\").setFirstResult(0).setMaxResults(10)."
"list();"
msgstr ""

#. Tag: title
#: performance.xml:427
#, no-c-format
msgid "Using batch fetching"
msgstr "Utilización de recuperación de lotes"

#. Tag: para
#: performance.xml:429
#, no-c-format
msgid ""
"Using batch fetching, Hibernate can load several uninitialized proxies if "
"one proxy is accessed. Batch fetching is an optimization of the lazy select "
"fetching strategy. There are two ways you can configure batch fetching: on "
"the class level and the collection level."
msgstr ""
"Usando la recuperación por lotes, Hibernate puede cargar varios proxies sin "
"inicializar si se accede a un proxy. La recuperación en lotes es una "
"optimización de la estrategia de recuperación por selección perezosa. Hay "
"dos formas en que puede configurar la recuperación en lotes: a nivel de la "
"clase y a nivel de colección."

#. Tag: para
#: performance.xml:434
#, no-c-format
msgid ""
"Batch fetching for classes/entities is easier to understand. Consider the "
"following example: at runtime you have 25 <literal>Cat instances "
"loaded in a <literal>Session, and each Cat has "
"a reference to its <literal>owner, a Person. "
"The <literal>Person class is mapped with a proxy, lazy="
"\"true\"</literal>. If you now iterate through all cats and call "
"<literal>getOwner() on each, Hibernate will, by default, execute "
"25 <literal>SELECT statements to retrieve the proxied owners. You "
"can tune this behavior by specifying a <literal>batch-size in the "
"mapping of <literal>Person:"
msgstr ""
"La recuperación en lotes para clases/entidades es más fácil de entender. "
"Considere el siguiente ejemplo: en tiempo de ejecución tiene 25 instancias "
"de <literal>Cat cargadas en una Session y cada "
"<literal>Cat tiene una referencia a su owner, "
"una <literal>Person. La clase Person está "
"mapeada con un proxy, <literal>lazy=\"true\". Si ahora itera a "
"través de todos los cats y llama a <literal>getOwner() para cada "
"uno, Hibernate por defecto, ejecutará 25 declaraciones <literal>SELECT en el mapeo de "
"<literal>Person:"

#. Tag: programlisting
#: performance.xml:447
#, no-c-format
msgid "<class name=\"Person\" batch-size=\"10\">...</class>"
msgstr ""

#. Tag: para
#: performance.xml:449
#, no-c-format
msgid ""
"Hibernate will now execute only three queries: the pattern is 10, 10, 5."
msgstr ""
"Hibernate ahora ejecutará sólamente tres consultas: el patrón es 10, 10, 5."

#. Tag: para
#: performance.xml:452
#, no-c-format
msgid ""
"You can also enable batch fetching of collections. For example, if each "
"<literal>Person has a lazy collection of Cats, "
"and 10 persons are currently loaded in the <literal>Session, "
"iterating through all persons will generate 10 <literal>SELECTs, "
"one for every call to <literal>getCats(). If you enable batch "
"fetching for the <literal>cats collection in the mapping of "
"<literal>Person, Hibernate can pre-fetch collections:"
msgstr ""
"También puede habilitar la recuperación en lotes para colecciones. Por "
"ejemplo, si cada <literal>Person tiene una colección perezosa de "
"<literal>Cats y hay 10 personas actualmente cargadas en la "
"<literal>Session, iterar a través de las 10 personas generará 10 "
"<literal>SELECTs, uno para cada llamada a getCats() en el mapeo de Person, Hibernate "
"puede recuperar por adelantado las colecciones: "

#. Tag: programlisting
#: performance.xml:461
#, no-c-format
msgid ""
"<class name=\"Person\">\n"
"    <set name=\"cats\" batch-size=\"3\">\n"
"        ...\n"
"    </set>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:463
#, no-c-format
msgid ""
"With a <literal>batch-size of 3, Hibernate will load 3, 3, 3, 1 "
"collections in four <literal>SELECTs. Again, the value of the "
"attribute depends on the expected number of uninitialized collections in a "
"particular <literal>Session."
msgstr ""
"Con un <literal>batch-size de 3, Hibernate cargará las colecciones "
"3, 3, 3, 1 en cuatro <literal>SELECTs. Una vez más, el valor del "
"atributo depende del número esperado de colecciones sin inicializar en una "
"<literal>Session en particular."

#. Tag: para
#: performance.xml:468
#, no-c-format
msgid ""
"Batch fetching of collections is particularly useful if you have a nested "
"tree of items, i.e. the typical bill-of-materials pattern. However, a "
"<emphasis>nested set or a materialized path "
"might be a better option for read-mostly trees."
msgstr ""
"La recuperación de colecciones en lotes es particularmente útil si tiene un "
"árbol anidado de ítems, por ejemplo, el típico patrón de cuenta de "
"materiales. Sin embargo, un <emphasis>conjunto anidado o una "
"<emphasis>ruta materializada podría ser una mejor opción para "
"árboles que sean de lectura en la mayoría de los casos."

#. Tag: title
#: performance.xml:475
#, no-c-format
msgid "Using subselect fetching"
msgstr "Utilización de la recuperación por subselección"

#. Tag: para
#: performance.xml:477
#, no-c-format
msgid ""
"If one lazy collection or single-valued proxy has to be fetched, Hibernate "
"will load all of them, re-running the original query in a subselect. This "
"works in the same way as batch-fetching but 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. "

#. Tag: title
#: performance.xml:486
#, no-c-format
msgid "Fetch profiles"
msgstr "Perfiles de recuperación"

#. Tag: para
#: performance.xml:488
#, fuzzy, no-c-format
msgid ""
"Another way to affect the fetching strategy for loading associated objects "
"is through something called a fetch profile, which is a named configuration "
"associated with the <interfacename>org.hibernate.SessionFactoryorg.hibernate."
"Session</interfacename>. Once enabled on a org.hibernate."
"Session</interfacename>, the fetch profile will be in affect for that "
"<interfacename>org.hibernate.Session until it is explicitly "
"disabled."
msgstr ""
"Otra manera de modificar la estrategia de recuperación para cargar objetos "
"asociados es por medio de algo llamado un perfil de recuperación, el cual es "
"una configuración nombrada asociada con la <interfacename>org.hibernate."
"SessionFactory</interfacename> pero habilitada por nombre en la "
"<interfacename>org.hibernate.Session. Una vez habilitada en "
"una <interfacename>org.hibernate.Session, el perfil de "
"recuperación estará en efecto para esa <interfacename>org.hibernate.Session"
msgstr ""

#. Tag: programlisting
#: performance.xml:506
#, no-c-format
msgid ""
"@Entity\n"
"@FetchProfile(name = \"customer-with-orders\", fetchOverrides = {\n"
"   @FetchProfile.FetchOverride(entity = Customer.class, association = "
"\"orders\", mode = FetchMode.JOIN)\n"
"})\n"
"public class Customer {\n"
"   @Id\n"
"   @GeneratedValue\n"
"   private long id;\n"
"\n"
"   private String name;\n"
"\n"
"   private long customerNumber;\n"
"\n"
"   @OneToMany\n"
"   private Set<Order> orders;\n"
"\n"
"   // standard getter/setter\n"
"   ...\n"
"}"
msgstr ""

#. Tag: title
#: performance.xml:510
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"outside <literal><class> node"
msgstr ""

#. Tag: programlisting
#: performance.xml:514
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
"    <class name=\"Customer\">\n"
"        ...\n"
"        <set name=\"orders\" inverse=\"true\">\n"
"            <key column=\"cust_id\"/>\n"
"            <one-to-many class=\"Order\"/>\n"
"        </set>\n"
"    </class>\n"
"    <class name=\"Order\">\n"
"        ...\n"
"    </class>\n"
"    <fetch-profile name=\"customer-with-orders\">\n"
"        <fetch entity=\"Customer\" association=\"orders\" style=\"join\"/"
">\n"
"    </fetch-profile>\n"
"</hibernate-mapping>"
msgstr ""

#. Tag: title
#: performance.xml:518
#, no-c-format
msgid ""
"Specifying a fetch profile using <literal><fetch-profile> "
"inside <literal><class> node"
msgstr ""

#. Tag: programlisting
#: performance.xml:522
#, no-c-format
msgid ""
"<hibernate-mapping>\n"
"    <class name=\"Customer\">\n"
"        ...\n"
"        <set name=\"orders\" inverse=\"true\">\n"
"            <key column=\"cust_id\"/>\n"
"            <one-to-many class=\"Order\"/>\n"
"        </set>\n"
"        <fetch-profile name=\"customer-with-orders\">\n"
"            <fetch association=\"orders\" style=\"join\"/>\n"
"        </fetch-profile>\n"
"    </class>\n"
"    <class name=\"Order\">\n"
"        ...\n"
"    </class>\n"
"</hibernate-mapping>"
msgstr ""

#. Tag: para
#: performance.xml:525
#, fuzzy, no-c-format
msgid ""
"Now normally when you get a reference to a particular customer, that "
"customer's set of orders will be lazy meaning we will not yet have loaded "
"those orders from the database. Normally this is a good thing. Now lets say "
"that you have a certain use case where it is more efficient to load the "
"customer and their orders together. One way certainly is to use \"dynamic "
"fetching\" strategies via an HQL or criteria queries. But another option is "
"to use a fetch profile to achieve that. The following code will load both "
"the customer <emphasis>andtheir orders:"
msgstr ""
"Ahora normalmente cuando reciba una referencia a un cliente en particular, "
"el grupo de pedidos será perezoso lo que significa que aún no habremos "
"cargado esos pedidos de la base de datos. Usualmente esto está bien. Ahora "
"digamos que tiene un ejemplo en donde es más eficiente el cargar el cliente "
"y sus pedidos juntos. Una manera es utilizar las estrategias de "
"\"recuperación dinámica\" por medio de peticiones de criterio o un HQL. Pero "
"otra opción es utilizar un perfi de recuperación para lograr esto. "
"Simplemente agregue lo siguiente a su mapeo:"

#. Tag: title
#: performance.xml:536
#, no-c-format
msgid "Activating a fetch profile for a given <classname>Session"
msgstr ""

#. Tag: programlisting
#: performance.xml:539
#, no-c-format
msgid ""
"Session session = ...;\n"
"session.enableFetchProfile( \"customer-with-orders\" );  // name matches "
"from mapping\n"
"Customer customer = (Customer) session.get( Customer.class, customerId );"
msgstr ""

#. Tag: para
#: performance.xml:543
#, no-c-format
msgid ""
"<classname>@FetchProfile definitions are global and it does not "
"matter on which class you place them. You can place the "
"<classname>@FetchProfile annotation either onto a class or "
"package (package-info.java). In order to define multiple fetch profiles for "
"the same class or package <classname>@FetchProfiles can be used."
msgstr ""

#. Tag: para
#: performance.xml:551
#, no-c-format
msgid ""
"Currently only join style fetch profiles are supported, but they plan is to "
"support additional styles. See <ulink url=\"http://opensource.atlassian.com/"
"projects/hibernate/browse/HHH-3414\">HHH-3414</ulink> for details."
msgstr ""
"Actualmente solo se soportan los perfiles de recuperación de estilo unido "
"pero se planear soportar estilos adicionales. Consulte <ulink url=\"http://"
"opensource.atlassian.com/projects/hibernate/browse/HHH-3414\">HHH-3414</"
"ulink> para obtener mayores detalles."

#. Tag: title
#: performance.xml:558
#, no-c-format
msgid "Using lazy property fetching"
msgstr "Utilización de la recuperación perezosa de propiedades"

#. Tag: para
#: performance.xml:560
#, no-c-format
msgid ""
"Hibernate3 supports the lazy fetching of individual properties. This "
"optimization technique is also known as <emphasis>fetch groups. "
"Please note that this is mostly a marketing feature; optimizing row reads is "
"much more important than optimization of column reads. However, only loading "
"some properties of a class could be useful in extreme cases. For example, "
"when legacy tables have hundreds of columns and the data model cannot be "
"improved."
msgstr ""
"Hibernate3 soporta la recuperación perezosa de propiedades individuales. "
"Esta técnica de optimización también es conocida como <emphasis>grupos de "
"recuperación (fetch groups)</emphasis>. Por favor, note que éste es "
"principalmente un aspecto de marketing, ya que en la práctica, optimizar las "
"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. Por ejemplo, cuando las tablas heredadas tienen "
"cientos de columnas y el modelo de datos no puede ser mejorado."

#. Tag: para
#: performance.xml:568
#, no-c-format
msgid ""
"To enable lazy property loading, set the <literal>lazy attribute "
"on your particular property mappings:"
msgstr ""
"Para habilitar la carga perezosa de propiedades, establezca el atributo "
"<literal>lazy en sus mapeos de propiedades:"

#. Tag: programlisting
#: performance.xml:571
#, no-c-format
msgid ""
"<class name=\"Document\">\n"
"       <id name=\"id\">\n"
"        <generator class=\"native\"/>\n"
"    </id>\n"
"    <property name=\"name\" not-null=\"true\" length=\"50\"/>\n"
"    <property name=\"summary\" not-null=\"true\" length=\"200\" lazy="
"\"true\"/>\n"
"    <property name=\"text\" not-null=\"true\" length=\"2000\" lazy=\"true"
"\"/>\n"
"</class>"
msgstr ""

#. Tag: para
#: performance.xml:573
#, no-c-format
msgid ""
"Lazy property loading requires buildtime bytecode instrumentation. If your "
"persistent classes are not enhanced, Hibernate will ignore lazy property "
"settings and return to immediate fetching."
msgstr ""
"La carga perezosa de propiedades requiere la instrumentación del código byte "
"en tiempo de construcción. Si sus clases persistentes no se mejoran, "
"Hibernate ignorará la configuración perezosa de propiedades y retornará a la "
"recuperación inmediata."

#. Tag: para
#: performance.xml:577
#, no-c-format
msgid "For bytecode instrumentation, use the following Ant task:"
msgstr ""
"Para la instrumentación del código byte, utilice la siguiente tarea Ant:"

#. Tag: programlisting
#: performance.xml:579
#, no-c-format
msgid ""
"<target name=\"instrument\" depends=\"compile\">\n"
"    <taskdef name=\"instrument\" classname=\"org.hibernate.tool."
"instrument.InstrumentTask\">\n"
"        <classpath path=\"${jar.path}\"/>\n"
"        <classpath path=\"${classes.dir}\"/>\n"
"        <classpath refid=\"lib.class.path\"/>\n"
"    </taskdef>\n"
"\n"
"    <instrument verbose=\"true\">\n"
"        <fileset dir=\"${testclasses.dir}/org/hibernate/auction/model"
"\">\n"
"            <include name=\"*.class\"/>\n"
"        </fileset>\n"
"    </instrument>\n"
"</target>"
msgstr ""

#. Tag: para
#: performance.xml:581
#, no-c-format
msgid ""
"A different way of avoiding 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 ""
"Una forma diferente de evitar lecturas innecesarias de columnas, al menos "
"para transacciones de sólo lectura es utilizar las funcionalidades de "
"proyección de consultas HQL o Criteria. Esto evita la necesidad de procesar "
"el código byte en tiempo de construcción y ciertamente es la solución "
"preferida."

#. Tag: para
#: performance.xml:586
#, no-c-format
msgid ""
"You can force the usual eager fetching of properties using <literal>fetch "
"all properties</literal> in HQL."
msgstr ""
"Puede forzar la usual recuperación temprana de propiedades utilizando "
"<literal>fetch all properties en HQL."

#. Tag: title
#: performance.xml:592
#, no-c-format
msgid "The Second Level Cache"
msgstr "El Caché de Segundo Nivel"

#. Tag: para
#: performance.xml:594
#, no-c-format
msgid ""
"A Hibernate <literal>Session is a transaction-level cache of "
"persistent data. It is possible to configure a cluster or JVM-level "
"(<literal>SessionFactory-level) cache on a class-by-class and "
"collection-by-collection basis. You can even plug in a clustered cache. Be "
"aware that caches are not aware of changes made to the persistent store by "
"another application. They can, however, be configured to regularly expire "
"cached data."
msgstr ""
"Una <literal>Session de Hibernate es un caché de datos "
"persistentes a nivel de transacción. Es posible configurar un clúster o "
"caché a nivel de MVJ (a nivel de <literal>SessionFactory) sobre "
"una base de clase-por-clase o colección-por-colección. Incluso puede "
"enchufar un caché en clúster. Tenga en cuenta de que los cachés nunca están "
"al tanto de los cambios que otra aplicación haya realizado al almacén "
"persistente. Sin embargo, se pueden configurar para que los datos en caché "
"expiren regularmente."

#. Tag: para
#: performance.xml:602
#, fuzzy, 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 <literal>org.hibernate.cache."
"CacheProvider</literal> using the property hibernate.cache."
"provider_class</literal>. Hibernate is bundled with a number of built-in "
"integrations with the open-source cache providers that are listed in <xref "
"linkend=\"cacheproviders\"/>. You can also implement your own and plug it in "
"as outlined above. Note that versions prior to Hibernate 3.2 use EhCache as "
"the default cache provider."
msgstr ""
"Tiene la opción de decirle a Hibernate cual implementación de caché utilizar "
"al especificar el nombre de una clase que implemente <literal>org.hibernate."
"cache.CacheProvider</literal> utilizando la propiedad hibernate."
"cache.provider_class</literal>. Hibernate viene vinculada con un número de "
"integraciones incorporadas con los proveedores caché de código abierto "
"enumerados a continuación. Además puede implementar el suyo y enchufarlo "
"como se explicó anteriormente. Observe que las versiones anteriores a 3.2 "
"por defecto utilizan EhCache como proveedor de caché."

#. Tag: title
#: performance.xml:613
#, no-c-format
msgid "Cache Providers"
msgstr "Proveedores de Caché"

#. Tag: entry
#: performance.xml:628 performance.xml:976
#, no-c-format
msgid "Cache"
msgstr "Caché"

#. Tag: entry
#: performance.xml:630
#, no-c-format
msgid "Provider class"
msgstr "Clase del Provedor"

#. Tag: entry
#: performance.xml:632
#, no-c-format
msgid "Type"
msgstr "Tipo"

#. Tag: entry
#: performance.xml:634
#, no-c-format
msgid "Cluster Safe"
msgstr "Clúster Seguro"

#. Tag: entry
#: performance.xml:636
#, no-c-format
msgid "Query Cache Supported"
msgstr "Caché de Consultas Soportado"

#. Tag: entry
#: performance.xml:642 performance.xml:990
#, no-c-format
msgid "Hashtable (not intended for production use)"
msgstr "Hashtable (no fue pensado para la utilización en producción)"

#. Tag: literal
#: performance.xml:644
#, fuzzy, no-c-format
msgid "org.hibernate.cache.HashtableCacheProvider"
msgstr "<literal>org.hibernate.cache.HashtableCacheProvider"

#. Tag: entry
#: performance.xml:646
#, no-c-format
msgid "memory"
msgstr "memoria"

#. Tag: entry
#: performance.xml:650 performance.xml:662 performance.xml:674
#: performance.xml:992 performance.xml:994 performance.xml:996
#: performance.xml:1004 performance.xml:1006 performance.xml:1008
#: performance.xml:1016 performance.xml:1018 performance.xml:1020
#: performance.xml:1028 performance.xml:1030 performance.xml:1040
#: performance.xml:1046 performance.xml:1052 performance.xml:1058
#, no-c-format
msgid "<entry>yes"
msgstr ""

#. Tag: entry
#: performance.xml:654 performance.xml:1002
#, no-c-format
msgid "EHCache"
msgstr "EHCache"

#. Tag: literal
#: performance.xml:656
#, fuzzy, no-c-format
msgid "org.hibernate.cache.EhCacheProvider"
msgstr "<literal>org.hibernate.cache.EhCacheProvider"

#. Tag: entry
#: performance.xml:658 performance.xml:670
#, no-c-format
msgid "memory, disk"
msgstr "memoria, disco"

#. Tag: entry
#: performance.xml:666 performance.xml:1014
#, no-c-format
msgid "OSCache"
msgstr "OSCache"

#. Tag: literal
#: performance.xml:668
#, fuzzy, no-c-format
msgid "org.hibernate.cache.OSCacheProvider"
msgstr "<literal>org.hibernate.cache.OSCacheProvider"

#. Tag: entry
#: performance.xml:678 performance.xml:1026
#, no-c-format
msgid "SwarmCache"
msgstr "SwarmCache"

#. Tag: literal
#: performance.xml:680
#, fuzzy, no-c-format
msgid "org.hibernate.cache.SwarmCacheProvider"
msgstr "<literal>org.hibernate.cache.SwarmCacheProvider"

#. Tag: entry
#: performance.xml:682
#, no-c-format
msgid "clustered (ip multicast)"
msgstr "en clúster (ip multicast)"

#. Tag: entry
#: performance.xml:684
#, no-c-format
msgid "yes (clustered invalidation)"
msgstr "sí (invalidación en clúster)"

#. Tag: entry
#: performance.xml:690 performance.xml:1038
#, no-c-format
msgid "JBoss Cache 1.x"
msgstr "JBoss Cache 1.x"

#. Tag: literal
#: performance.xml:692
#, fuzzy, no-c-format
msgid "org.hibernate.cache.TreeCacheProvider"
msgstr "<literal>org.hibernate.cache.TreeCacheProvider"

#. Tag: entry
#: performance.xml:694 performance.xml:706
#, no-c-format
msgid "clustered (ip multicast), transactional"
msgstr "en clúster (ip multicast), transaccional"

#. Tag: entry
#: performance.xml:696
#, no-c-format
msgid "yes (replication)"
msgstr "sí (replicación)"

#. Tag: entry
#: performance.xml:698 performance.xml:710
#, no-c-format
msgid "yes (clock sync req.)"
msgstr "sí (requiere sincronización de reloj)"

#. Tag: entry
#: performance.xml:702 performance.xml:1050
#, no-c-format
msgid "JBoss Cache 2"
msgstr "JBoss Cache 2"

#. Tag: literal
#: performance.xml:704
#, fuzzy, no-c-format
msgid "org.hibernate.cache.jbc.JBossCacheRegionFactory"
msgstr "<literal>org.hibernate.cache.jbc.JBossCacheRegionFactory"

#. Tag: entry
#: performance.xml:708
#, no-c-format
msgid "yes (replication or invalidation)"
msgstr "sí (replicación o invalidación)"

#. Tag: title
#: performance.xml:717
#, no-c-format
msgid "Cache mappings"
msgstr "Mapeos de caché"

#. Tag: para
#: performance.xml:719
#, no-c-format
msgid ""
"As we have done in previous chapters we are looking at the two different "
"possibiltites to configure caching. First configuration via annotations and "
"then via Hibernate mapping files."
msgstr ""

#. Tag: para
#: performance.xml:723
#, no-c-format
msgid ""
"By default, entities are not part of the second level cache and we recommend "
"you to stick to this setting. However, you can override this by setting the "
"<literal>shared-cache-mode element in your persistence."
"xml</filename> file or by using the javax.persistence.sharedCache."
"mode </literal>property in your configuration. The following values are "
"possible:"
msgstr ""

#. Tag: para
#: performance.xml:732
#, no-c-format
msgid ""
"<literal>ENABLE_SELECTIVE (Default and recommended value): "
"entities are not cached unless explicitly marked as cacheable."
msgstr ""

#. Tag: para
#: performance.xml:738
#, no-c-format
msgid ""
"<literal>DISABLE_SELECTIVE: entities are cached unless explicitly "
"marked as not cacheable."
msgstr ""

#. Tag: para
#: performance.xml:743
#, no-c-format
msgid ""
"<literal>ALL: all entities are always cached even if marked as non "
"cacheable."
msgstr ""

#. Tag: para
#: performance.xml:748
#, no-c-format
msgid ""
"<literal>NONE: no entity are cached even if marked as cacheable. "
"This option can make sense to disable second-level cache altogether."
msgstr ""

#. Tag: para
#: performance.xml:754
#, no-c-format
msgid ""
"The cache concurrency strategy used by default can be set globaly via the "
"<literal>hibernate.cache.default_cache_concurrency_strategy "
"configuration property. The values for this property are:"
msgstr ""

#. Tag: literal
#: performance.xml:761
#, fuzzy, no-c-format
msgid "<literal>read-only"
msgstr "las consultas de <literal>Criteria"

#. Tag: literal
#: performance.xml:765
#, fuzzy, no-c-format
msgid "<literal>read-write"
msgstr "las consultas de <literal>Criteria"

#. Tag: literal
#: performance.xml:769
#, fuzzy, no-c-format
msgid "<literal>nonstrict-read-write"
msgstr "nonstrict-read-write"

#. Tag: literal
#: performance.xml:773
#, fuzzy, no-c-format
msgid "<literal>transactional"
msgstr "las consultas de <literal>Criteria"

#. Tag: para
#: performance.xml:778
#, no-c-format
msgid ""
"It is recommended to define the cache concurrency strategy per entity rather "
"than using a global one. Use the <classname>@org.hibernate.annotations."
"Cache</classname> annotation for that."
msgstr ""

#. Tag: title
#: performance.xml:785
#, no-c-format
msgid ""
"Definition of cache concurrency strategy via <classname>@Cache"
msgstr ""

#. Tag: programlisting
#: performance.xml:788
#, no-c-format
msgid ""
"@Entity \n"
"@Cacheable\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public class Forest { ... }"
msgstr ""

#. Tag: para
#: performance.xml:791
#, no-c-format
msgid ""
"Hibernate also let's you cache the content of a collection or the "
"identifiers if the collection contains other entities. Use the "
"<classname>@Cache annotation on the collection property."
msgstr ""

#. Tag: title
#: performance.xml:797
#, fuzzy, no-c-format
msgid "Caching collections using annotations"
msgstr "Inicialización de colecciones y proxies"

#. Tag: programlisting
#: performance.xml:799
#, no-c-format
msgid ""
"@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)\n"
"@JoinColumn(name=\"CUST_ID\")\n"
"@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)\n"
"public SortedSet<Ticket> getTickets() {\n"
"    return tickets;\n"
"}"
msgstr ""

#. Tag: para
#: performance.xml:802
#, no-c-format
msgid ""
"shows the<literal> @org.hibernate.annotations.Cache annotations "
"with its attributes. It allows you to define the caching strategy and region "
"of a given second level cache."
msgstr ""

#. Tag: title
#: performance.xml:808
#, no-c-format
msgid "<classname>@Cache annotation with attributes"
msgstr ""

#. Tag: programlisting
#: performance.xml:820
#, no-c-format
msgid ""
"@Cache(\n"
"    CacheConcurrencyStrategy usage();\n"
"    String region() default \"\";\n"
"    String include() default \"all\";\n"
")"
msgstr ""

#. Tag: para
#: performance.xml:824
#, no-c-format
msgid ""
"usage: the given cache concurrency strategy (NONE, READ_ONLY, "
"NONSTRICT_READ_WRITE, READ_WRITE, TRANSACTIONAL)"
msgstr ""

#. Tag: para
#: performance.xml:830
#, no-c-format
msgid ""
"region (optional): the cache region (default to the fqcn of the class or the "
"fq role name of the collection)"
msgstr ""

#. Tag: para
#: performance.xml:835
#, no-c-format
msgid ""
"<literal>include (optional): all to include all properties, non-"
"lazy to only include non lazy properties (default all)."
msgstr ""

#. Tag: para
#: performance.xml:843
#, no-c-format
msgid ""
"Let's now take a look at Hibernate mapping files. There the <literal><"
"cache></literal> element of a class or collection mapping is used to "
"configure the second level cache. Looking at <xref linkend=\"example-"
"hibernate-cache-mapping-element\"/> the parallels to anotations is obvious."
msgstr ""

#. Tag: title
#: performance.xml:850
#, no-c-format
msgid "The Hibernate <literal><cache> mapping element"
msgstr ""

#. Tag: programlisting
#: performance.xml:862
#, no-c-format
msgid ""
"<cache\n"
"    usage=\"transactional|read-write|nonstrict-read-write|read-only\"\n"
"    region=\"RegionName\"\n"
"    include=\"all|non-lazy\"\n"
"/>"
msgstr ""

#. Tag: para
#: performance.xml:866
#, no-c-format
msgid ""
"<literal>usage (required) specifies the caching strategy: "
"<literal>transactional, read-write, "
"<literal>nonstrict-read-write or read-only"
msgstr ""
"<literal>usage especifica la estrategia de caché: "
"<literal>transactional, read-write, "
"<literal>nonstrict-read-write o read-only"

#. Tag: para
#: performance.xml:874
#, no-c-format
msgid ""
"<literal>region (optional: defaults to the class or collection "
"role name): specifies the name of the second level cache region"
msgstr ""
"<literal>region (opcional: por defecto es el nombre del rol de la "
"clase o colección): especifica el nombre de la región de caché de segundo "
"nivel."

#. Tag: para
#: performance.xml:880
#, no-c-format
msgid ""
"<literal>include (optional: defaults to all) "
"<literal>non-lazy: specifies that properties of the entity mapped "
"with <literal>lazy=\"true\" cannot be cached when attribute-level "
"lazy fetching is enabled"
msgstr ""
"<literal>include (opcional: por defecto es all) "
"<literal>non-lazy: especifica que las propiedades de la entidad "
"mapeadas con <literal>lazy=\"true\" no se pueden poner en caché "
"cuando se habilita la recuperación perezoza a nivel de atributos."

#. Tag: para
#: performance.xml:890
#, fuzzy, no-c-format
msgid ""
"Alternatively to <literal><cache>, you can use <"
"class-cache></literal> and <collection-cache> "
"elements in <literal>hibernate.cfg.xml."
msgstr ""
"Opcionalmente, puede especificar los elementos <literal><class-cache><collection-cache> en hibernate."
"cfg.xml</literal>."

#. Tag: para
#: performance.xml:895
#, no-c-format
msgid "Let's now have a closer look at the different usage strategies"
msgstr ""

#. Tag: title
#: performance.xml:900
#, no-c-format
msgid "Strategy: read only"
msgstr "Estrategia: sólo lectura"

#. Tag: para
#: performance.xml:902
#, no-c-format
msgid ""
"If your application needs to read, but not modify, instances of a persistent "
"class, a <literal>read-only cache can be used. This is the "
"simplest and optimal performing strategy. It is even safe for use in a "
"cluster."
msgstr ""
"Si su aplicación necesita leer pero no modificar las instancias de una clase "
"persistente, puede utilizar un caché <literal>read-only (de sólo "
"lectura). Esta es la mejor estrategia y la más simple. Incluso es totalmente "
"segura para utilizar en un clúster."

#. Tag: title
#: performance.xml:909
#, no-c-format
msgid "Strategy: read/write"
msgstr "Estrategia: lectura/escritura (read/write)"

#. Tag: para
#: performance.xml:911
#, no-c-format
msgid ""
"If the application needs to update data, a <literal>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 <literal>hibernate."
"transaction.manager_lookup_class</literal> and naming a strategy for "
"obtaining the JTA <literal>TransactionManager. In other "
"environments, you should ensure that the transaction is completed when "
"<literal>Session.close() or Session.disconnect() support locking."
msgstr ""
"Si la aplicación necesita actualizar datos, un caché <literal>read-write, "
"mencionando una estrategia para obtener el <literal>TransactionManager o "
"<literal>Session.disconnect(). Si desea utilizar esta estrategia "
"en un clúster, debe asegurarse de que la implementación de caché subyacente "
"soporta bloqueos. Los provedores de caché internos <emphasis>no "
"soportan bloqueos."

#. Tag: title
#: performance.xml:927
#, no-c-format
msgid "Strategy: nonstrict read/write"
msgstr "Estrategia: lectura/escritura no estricta"

#. Tag: para
#: performance.xml:929
#, no-c-format
msgid ""
"If the application only occasionally needs to update data (i.e. if it is "
"extremely unlikely that two transactions would try to update the same item "
"simultaneously), and strict transaction isolation is not required, a "
"<literal>nonstrict-read-write cache might be appropriate. If the "
"cache is used in a JTA environment, you must specify <literal>hibernate."
"transaction.manager_lookup_class</literal>. In other environments, you "
"should ensure that the transaction is completed when <literal>Session.close()"
"</literal> or Session.disconnect() is called."
msgstr ""
"Si la aplicación necesita sólo ocasionalmente actualizar datos (es decir, es "
"extremadamente improbable que dos transacciones intenten actualizar el mismo "
"ítem simultáneamente) y no se requiere de un aislamiento de transacciones "
"estricto, un caché <literal>nonstrict-read-write podría ser "
"apropiado. Si se utiliza el caché en un entorno JTA, tiene que especificar "
"<literal>hibernate.transaction.manager_lookup_class. En otros "
"entornos, debe asegurarse que se haya completado la transacción cuando se "
"llame a <literal>Session.close() o Session.disconnect() cache strategy provides support for "
"fully transactional cache providers such as JBoss TreeCache. Such a cache "
"can only be used in a JTA environment and you must specify "
"<literal>hibernate.transaction.manager_lookup_class."
msgstr ""
"La estrategia de caché <literal>transactional brinda soporte a "
"provedores de cachés completamente transaccionales como JBoss TreeCache. Un "
"caché así, sólo se puede utilizar en un entorno JTA y tiene que especificar "
"<literal>hibernate.transaction.manager_lookup_class."

#. Tag: title
#: performance.xml:950
#, no-c-format
msgid "Cache-provider/concurrency-strategy compatibility"
msgstr "Compatibilidad de proveedor de caché/estrategia de concurrencia"

#. Tag: para
#: performance.xml:953
#, no-c-format
msgid ""
"None of the cache providers support all of the cache concurrency strategies."
msgstr ""
"Ninguno de los provedores de caché soporta todas las estrategias de "
"concurrencia al caché. "

#. Tag: para
#: performance.xml:957
#, no-c-format
msgid ""
"The following table shows which providers are compatible with which "
"concurrency strategies."
msgstr ""
"La siguiente tabla muestra qué provedores son compatibles con qué "
"estrategias de concurrencia."

#. Tag: title
#: performance.xml:961
#, no-c-format
msgid "Cache Concurrency Strategy Support"
msgstr "Soporte a Estrategia de Concurrencia a Caché"

#. Tag: entry
#: performance.xml:978
#, no-c-format
msgid "<entry>read-only"
msgstr ""

#. Tag: entry
#: performance.xml:980
#, fuzzy, no-c-format
msgid "<entry>nonstrict-read-write"
msgstr "nonstrict-read-write"

#. Tag: entry
#: performance.xml:982
#, no-c-format
msgid "<entry>read-write"
msgstr ""

#. Tag: entry
#: performance.xml:984
#, fuzzy, no-c-format
msgid "<entry>transactional"
msgstr "transactional"

#. Tag: title
#: performance.xml:1067
#, no-c-format
msgid "Managing the caches"
msgstr "Gestión de cachés"

#. Tag: para
#: performance.xml:1069
#, no-c-format
msgid ""
"Whenever you pass an object to <literal>save(), update()saveOrUpdate(), and whenever you retrieve an "
"object using <literal>load(), get(), "
"<literal>list(), iterate() or scroll()"
"</literal>, that object is added to the internal cache of the "
"<literal>Session."
msgstr ""
"Siempre que pase un objeto a <literal>save(), update()saveOrUpdate() y siempre que recupere un "
"objeto utilizando <literal>load(), get(), "
"<literal>list(), iterate() o scroll()Session 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 <literal>evict() method "
"can be used to remove the object and its collections from the first-level "
"cache."
msgstr ""
"Cuando luego se llame a <literal>flush(), el estado de ese objeto "
"será sincronizado con la base de datos. Si no quiere que ocurra esta "
"sincronización o si está procesando un número enorme de objetos y necesita "
"gestionar la memoria eficientemente, puede utilizar el método <literal>evict"
"()</literal> para quitar el objeto y sus colecciones del caché de primer "
"nivel. "

#. Tag: title
#: performance.xml:1084
#, no-c-format
msgid ""
"Explcitly evicting a cached instance from the first level cache using "
"<methodname>Session.evict()"
msgstr ""

#. Tag: programlisting
#: performance.xml:1087
#, no-c-format
msgid ""
"ScrollableResult cats = sess.createQuery(\"from Cat as cat\").scroll(); //a "
"huge result set\n"
"while ( cats.next() ) {\n"
"    Cat cat = (Cat) cats.get(0);\n"
"    doSomethingWithACat(cat);\n"
"    sess.evict(cat);\n"
"}"
msgstr ""

#. Tag: para
#: performance.xml:1090
#, no-c-format
msgid ""
"The <literal>Session also provides a contains() "
"method to determine if an instance belongs to the session cache."
msgstr ""
"La <literal>Session también proporciona un método contains"
"()</literal> para determinar si una instancia pertenece al caché de la "
"sesión."

#. Tag: para
#: performance.xml:1094
#, no-c-format
msgid ""
"To evict all objects from the session cache, call <literal>Session.clear(). "

#. Tag: para
#: performance.xml:1097
#, no-c-format
msgid ""
"For the second-level cache, there are methods defined on "
"<literal>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 "
"<literal>SessionFactory para explusar el estado en caché de una "
"instancia, clase entera, instancia de colección o rol entero de colección."

#. Tag: title
#: performance.xml:1103
#, no-c-format
msgid ""
"Second-level cache eviction via <methodname>SessionFactoty.evict() SessionFacyory.evictCollection()"
msgstr ""

#. Tag: programlisting
#: performance.xml:1107
#, no-c-format
msgid ""
"sessionFactory.evict(Cat.class, catId); //evict a particular Cat\n"
"sessionFactory.evict(Cat.class);  //evict all Cats\n"
"sessionFactory.evictCollection(\"Cat.kittens\", catId); //evict a particular "
"collection of kittens\n"
"sessionFactory.evictCollection(\"Cat.kittens\"); //evict all kitten "
"collections"
msgstr ""

#. Tag: para
#: performance.xml:1110
#, no-c-format
msgid ""
"The <literal>CacheMode controls how a particular session interacts "
"with the second-level cache:"
msgstr ""
"El <literal>CacheMode controla la manera en que interactúa una "
"sesión en particular con el caché de segundo nivel:"

#. Tag: para
#: performance.xml:1115
#, no-c-format
msgid ""
"<literal>CacheMode.NORMAL: will read items from and write items to "
"the second-level cache"
msgstr ""
"<literal>CacheMode.NORMAL: lee ítems desde y escribe ítems hacia "
"el caché del segundo nivel"

#. Tag: para
#: performance.xml:1120
#, no-c-format
msgid ""
"<literal>CacheMode.GET: will read items from the second-level "
"cache. Do not write to the second-level cache except when updating data"
msgstr ""
"<literal>CacheMode.GET: lee ítems del caché del segundo nivel. No "
"escribe al caché de segundo nivel excepto cuando actualiza datos"

#. Tag: para
#: performance.xml:1126
#, no-c-format
msgid ""
"<literal>CacheMode.PUT: will write items to the second-level "
"cache. Do not read from the second-level cache"
msgstr ""
"<literal>CacheMode.PUT: escribe ítems al caché de segundo nivel. "
"No lee del caché de segundo nivel"

#. Tag: para
#: performance.xml:1131
#, no-c-format
msgid ""
"<literal>CacheMode.REFRESH: will write items to the second-level "
"cache. Do not read from the second-level cache. Bypass the effect of "
"<literal>hibernate.cache.use_minimal_puts forcing a refresh of the "
"second-level cache for all items read from the database"
msgstr ""
"<literal>CacheMode.REFRESH: escribe ítems al caché de segundo "
"nivel. No lee del caché de segundo nivel, saltándose el efecto de "
"<literal>hibernate.cache.use_minimal_puts, forzando la "
"actualización del caché de segundo nivel para todos los ítems leídos de la "
"base de datos"

#. Tag: para
#: performance.xml:1139
#, no-c-format
msgid ""
"To browse the contents of a second-level or query cache region, use the "
"<literal>Statistics API:"
msgstr ""
"Para navegar por los contenidos de una región de caché de segundo nivel o de "
"consultas, use la API de <literal>Statistics:"

#. Tag: title
#: performance.xml:1143
#, fuzzy, no-c-format
msgid ""
"Browsing the second-level cache entries via the <classname>Statistics:"

#. Tag: programlisting
#: performance.xml:1146
#, no-c-format
msgid ""
"Map cacheEntries = sessionFactory.getStatistics()\n"
"        .getSecondLevelCacheStatistics(regionName)\n"
"        .getEntries();"
msgstr ""

#. Tag: para
#: performance.xml:1149
#, no-c-format
msgid ""
"You will need to enable statistics and, optionally, force Hibernate to keep "
"the cache entries in a more readable format:"
msgstr ""
"Necesitará habilitar las estadísticas y, opcionalmente, forzar a Hibernate "
"para que guarde las entradas del caché en un formato más fácil de entender "
"para humanos: "

#. Tag: title
#: performance.xml:1153
#, no-c-format
msgid "Enabling Hibernate statistics"
msgstr ""

#. Tag: programlisting
#: performance.xml:1155
#, no-c-format
msgid ""
"hibernate.generate_statistics true\n"
"hibernate.cache.use_structured_entries true"
msgstr ""

#. Tag: title
#: performance.xml:1160
#, no-c-format
msgid "The Query Cache"
msgstr "El Caché de Consultas"

#. Tag: para
#: performance.xml:1162
#, no-c-format
msgid ""
"Query result sets can also be cached. This is only useful for queries that "
"are run frequently with the same parameters."
msgstr ""
"Los conjuntos de resultados de peticiones también pueden ponerse en caché. "
"Esto sólamente es útil para consultas que se ejecutan frecuentemente con los "
"mismos parámetros."

#. Tag: title
#: performance.xml:1166
#, no-c-format
msgid "Enabling query caching"
msgstr "Habilitación del caché de peticiones"

#. Tag: para
#: performance.xml:1168
#, no-c-format
msgid ""
"Caching of query results introduces some overhead in terms of your "
"applications normal transactional processing. For example, if you cache "
"results of a query against Person Hibernate will need to keep track of when "
"those results should be invalidated because changes have been committed "
"against Person. That, coupled with the fact that most applications simply "
"gain no benefit from caching query results, leads Hibernate to disable "
"caching of query results by default. To use query caching, you will first "
"need to enable the query cache:"
msgstr ""
"El poner en caché los resultados de una petición introduce algunos "
"sobrecostos en términos del procesamiento transaccional normal de sus "
"aplicaciones. Por ejemplo, si pone en caché los resultados de una petición "
"frente a Person, Hibernate necesitará rastrear cuando se deben invalidar "
"esos resultados debido a los cambios que se han guardado en Person. Eso más "
"el hecho de que la mayoría de las aplicaciones simplemente no ganan "
"beneficio de poner los resultados en caché, lleva a Hibernate a deshabilitar "
"el caché de los resultados de una petición por defecto. Para utilizar el "
"caché de peticiones primero necesita habilitar el caché de peticiones:"

#. Tag: programlisting
#: performance.xml:1177
#, no-c-format
msgid "hibernate.cache.use_query_cache true"
msgstr ""

#. Tag: para
#: performance.xml:1179
#, no-c-format
msgid "This setting creates two new cache regions:"
msgstr "Esta configuración crea dos nuevas regiones de caché:"

#. Tag: para
#: performance.xml:1181
#, no-c-format
msgid ""
"<classname>org.hibernate.cache.StandardQueryCache, holding the "
"cached query results"
msgstr ""
"<classname>org.hibernate.cache.StandardQueryCache, mantiene los "
"resultados de la petición en caché"

#. Tag: para
#: performance.xml:1186
#, no-c-format
msgid ""
"<classname>org.hibernate.cache.UpdateTimestampsCache, holding "
"timestamps of the most recent updates to queryable tables. These are used to "
"validate the results as they are served from the query cache."
msgstr ""
"<classname>org.hibernate.cache.UpdateTimestampsCache, mantiene "
"los sellos de fecha de las actualizaciones más recientes a las tablas de "
"peticiones. Estas se utilizan para validar los resultados ya que se sirven "
"desde el caché de peticiones."

#. Tag: para
#: performance.xml:1194
#, fuzzy, no-c-format
msgid ""
"If you configure your underlying cache implementation to use expiry or "
"timeouts is very important that the cache timeout of the underlying cache "
"region for the UpdateTimestampsCache be set to a higher value than the "
"timeouts of any of the query caches. In fact, we recommend that the the "
"UpdateTimestampsCache region not be configured for expiry at all. Note, in "
"particular, that an LRU cache expiry policy is never appropriate."
msgstr ""
"Si configura su implementación de caché subyacente para utilizar los tiempos "
"de expiración es muy importante que el tiempo de expiración del caché de la "
"región de cachésubyacente para el UpdateTimestampsCache se establezca con un "
"valor mayor que los tiempos de expiración de cualquiera de los cachés de "
"resultados. De hecho, recomendamos que la región UpdateTimestampsCache no se "
"configure con ninguna expiración. Observe en particular que nunca es "
"apropiado una política de expiración de caché LRU. "

#. Tag: para
#: performance.xml:1203
#, no-c-format
msgid ""
"As mentioned above, most queries do not benefit from caching or their "
"results. So by default, individual queries are not cached even after "
"enabling query caching. To enable results caching for a particular query, "
"call <literal>org.hibernate.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 ""
"Como lo mencionamos anteriormente, la mayoría de las consultas no se "
"benefician del caché o de sus resultados; de modo que por defecto las "
"consultas individuales no se ponen en caché incluso después de habilitar el "
"caché para peticiones. Para habilitar el caché de resultados para una "
"petición en particular, llame a <literal>org.hibernate.Query.setCacheable"
"(true)</literal>. Esta llamada permite que la consulta busque resultados "
"existentes en caché o que agregue sus resultados al caché cuando se ejecuta."

#. Tag: para
#: performance.xml:1211
#, no-c-format
msgid ""
"The query cache does not cache the state of the actual entities in the "
"cache; it caches only identifier values and results of value type. For this "
"reaso, the query cache should always be used in conjunction with the second-"
"level cache for those entities expected to be cached as part of a query "
"result cache (just as with collection caching)."
msgstr ""
"El caché de peticiones no pone en caché el estado real de las entidades en "
"el caché; pone en caché solo los valores del identificador y los resultados "
"de tipo valor. Por esta razón, el caché de peticiones siempre se debe "
"utilizar en conjunto con el caché de segundo nivel para aquellas entidades "
"que se esperan poner en caché como parte de un caché de resultados de una "
"petición (así como con el caché de colección). "

#. Tag: title
#: performance.xml:1221
#, no-c-format
msgid "Query cache regions"
msgstr "Regiones de caché de consultas"

#. Tag: para
#: performance.xml:1223
#, no-c-format
msgid ""
"If you require fine-grained control over query cache expiration policies, "
"you can specify a named cache region for a particular query by calling "
"<literal>Query.setCacheRegion()."
msgstr ""
"Si necesita un control muy detallado sobre las políticas de expiración del "
"caché de consultas, puede especificar una región de caché con nombre para "
"una consulta en particular llamando a <literal>Query.setCacheRegion() and <index> e "
"<literal><index>. En este caso las actualizaciones de "
"colecciones son extremadamente eficientes. La clave principal puede ser "
"indexada eficientemente y una fila en particular puede ser localizada cuando "
"Hibernate intenta actualizarla o borrarla."

#. Tag: para
#: performance.xml:1295
#, no-c-format
msgid ""
"Sets have a primary key consisting of <literal><key> and "
"element columns. This can be less efficient for some types of collection "
"element, particularly composite elements or large text or binary fields, as "
"the database may not be able to index a complex primary key as efficiently. "
"However, for one-to-many or many-to-many associations, particularly in the "
"case of synthetic identifiers, it is likely to be just as efficient. If you "
"want <literal>SchemaExport to actually create the primary key of a "
"<literal><set>, you must declare all columns as not-"
"null=\"true\"</literal>."
msgstr ""
"Los conjuntos tienen una clave principal que consiste de <literal><key>"
"</literal> y columnas de elementos. Esto puede ser menos eficiente para "
"algunos tipos de elementos de colección, particularmente elementos "
"compuestos o texto largo o campos binarios ya que la base de datos puede no "
"ser capaz de indexar una clave principal compleja eficientemente. Sin "
"embargo, para asociaciones uno a muchos o muchos a muchos, particularmente "
"en el caso de los identificadores sintéticos, es probable que sólo sea igual "
"de eficiente. Si quiere que <literal>SchemaExport realmente cree "
"la clave principal de un <literal><set>, tiene que declarar "
"todas las columnas como <literal>not-null=\"true\"."

#. Tag: para
#: performance.xml:1306
#, no-c-format
msgid ""
"<literal><idbag> mappings define a surrogate key, so they "
"are efficient to update. In fact, they are the best case."
msgstr ""
"Los mapeos de <literal><idbag> definen una clave delegada, "
"de modo que siempre resulten eficientes de actualizar. De hecho, son el "
"mejor caso."

#. Tag: para
#: performance.xml:1309
#, no-c-format
msgid ""
"Bags are the worst case since they permit duplicate element values and, as "
"they have no index column, no primary key can be defined. Hibernate has no "
"way of distinguishing between duplicate rows. Hibernate resolves this "
"problem by completely removing in a single <literal>DELETE and "
"recreating the collection whenever it changes. This can be 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 principal. Hibernate no tiene forma de distinguir entre filas "
"duplicadas. Hibernate resuelve este problema quitando por completo con un "
"sólo <literal>DELETE y recreando la colección siempre que cambia. "
"Esto puede ser muy ineficiente."

#. Tag: para
#: performance.xml:1316
#, no-c-format
msgid ""
"For a one-to-many association, the \"primary key\" may not be the physical "
"primary key of the database table. Even in this case, the above "
"classification is still useful. It reflects how Hibernate \"locates\" "
"individual rows of the collection."
msgstr ""
"Para una asociación uno-a-muchos, la \"clave principal\" puede no ser la "
"clave principal física de la tabla de la base de datos. Incluso en este "
"caso, la clasificación anterior es útil todavía. Refleja cómo Hibernate "
"\"localiza\" filas individuales de la colección."

#. Tag: title
#: performance.xml:1323
#, no-c-format
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"

#. Tag: para
#: performance.xml:1326
#, no-c-format
msgid ""
"From the discussion above, it should be clear that indexed collections and "
"sets allow the most efficient operation in terms of adding, removing and "
"updating elements."
msgstr ""
"De la discusión anterior, debe quedar claro que las colecciones indexadas y "
"los conjuntos permiten una operación más eficiente en términos de agregar, "
"quitar y actualizar elementos."

#. Tag: para
#: performance.xml:1330
#, 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 <literal>Set, Hibernate does not UPDATESetINSERT and DELETE, Hibernate ni "
"siquiera actualiza una fila con <literal>UPDATE cuando se \"cambia"
"\" un elemento. Los cambios a un <literal>Set siempre funcionan "
"por medio de <literal>INSERT y DELETE de filas "
"individuales. Una vez más, esta consideración no se aplica a las "
"asociaciones uno a muchos."

#. Tag: para
#: performance.xml:1338
#, no-c-format
msgid ""
"After observing that arrays cannot be lazy, you can conclude that lists, "
"maps and idbags are the most performant (non-inverse) collection types, with "
"sets not far behind. You can expect sets 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 atrás. Se espera "
"que los sets sean el tipo más común de colección en las aplicaciones de "
"Hibernate. Esto se debe a que la semántica de los sets es la más natural en "
"el modelo relacional."

#. Tag: para
#: performance.xml:1344
#, no-c-format
msgid ""
"However, in well-designed Hibernate domain models, most collections are in "
"fact one-to-many associations with <literal>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 <literal>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 la actualización de "
"las colecciones simplemente no se aplican."

#. Tag: title
#: performance.xml:1352
#, no-c-format
msgid "Bags and lists are the most efficient inverse collections"
msgstr "Los Bags y las listas son las colecciones inversas más eficientes"

#. Tag: para
#: performance.xml:1354
#, no-c-format
msgid ""
"There is a particular case, however, in which bags, and also lists, are much "
"more performant than sets. For a collection with <literal>inverse=\"true\", "
"<literal>Collection.add() or Collection.addAll()List. This "
"can make the following common code much faster:"
msgstr ""
"Hay un caso en particular en el que los bags y también las listas son mucho "
"más eficientes que los conjuntos. Para una colección con <literal>inverse="
"\"true\"</literal>, por ejemplo, el idioma estándar de relaciones uno-a-"
"muchos bidireccionales, podemos agregar elementos a un bag o lista sin "
"necesidad de inicializar (recuperar) los elementos del bag. Esto se debe a "
"que, a manera opuesta de <literal>Collection.add() o "
"<literal>Collection.addAll() siempre deben retornar verdadero para "
"un bag o <literal>List (no como un Set). Esto "
"puede hacer el siguiente código común mucho más rápido:"

#. Tag: programlisting
#: performance.xml:1365
#, no-c-format
msgid ""
"Parent p = (Parent) sess.load(Parent.class, id);\n"
"Child c = new Child();\n"
"c.setParent(p);\n"
"p.getChildren().add(c);  //no need to fetch the collection!\n"
"sess.flush();"
msgstr ""

#. Tag: title
#: performance.xml:1369
#, no-c-format
msgid "One shot delete"
msgstr "Borrado de un sólo tiro"

#. Tag: para
#: performance.xml:1371
#, no-c-format
msgid ""
"Deleting collection elements one by one can sometimes be extremely "
"inefficient. Hibernate knows not to do that in the case of an newly-empty "
"collection (if you called <literal>list.clear(), for example). In "
"this case, Hibernate will issue a single <literal>DELETE."
msgstr ""
"Borrar los elementos de una colección uno por uno a veces puede ser "
"extremadamente ineficiente. Hibernate sabe que no debe hacer eso, en el caso "
"de una colección nueva-vacía (si ha llamado a <literal>list.clear()."

#. Tag: para
#: performance.xml:1377
#, no-c-format
msgid ""
"Suppose you added a single element to a collection of size twenty and then "
"remove two elements. Hibernate will issue one <literal>INSERT "
"statement and two <literal>DELETE statements, unless the "
"collection is a bag. This is certainly desirable."
msgstr ""
"Suponga que agrega un solo elemento a una colección de tamaño veinte y luego "
"quitamos dos elementos. Hibernate publicará una declaración <literal>INSERTDELETE a menos que la "
"colección sea un bag. Esto ciertamente es deseable."

#. Tag: para
#: performance.xml:1383
#, 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 ""
"Sin embargo, supónga que quitamos dieciocho elementos, dejando dos y luego "
"añadimos tres elementos nuevos. Hay dos formas posibles de proceder"

#. Tag: para
#: performance.xml:1389
#, no-c-format
msgid "delete eighteen rows one by one and then insert three rows"
msgstr "borrar dieciocho filas una a una y luego insertar tres filas"

#. Tag: para
#: performance.xml:1394
#, no-c-format
msgid ""
"remove the whole collection in one SQL <literal>DELETE and insert "
"all five current elements one by one"
msgstr ""
"quitar toda la colección en un sólo <literal>DELETE de SQL e "
"insertar todos los cinco elementos actuales uno por uno"

#. Tag: para
#: performance.xml:1400
#, no-c-format
msgid ""
"Hibernate cannot know that the second option is probably quicker. It would "
"probably be undesirable for Hibernate to be that intuitive as such behavior "
"might confuse database triggers, etc."
msgstr ""
"Hibernate no sabe que la segunda opción es probablemente la más rápida. "
"Probablemente no sería deseable que Hibernate fuese tan intuitivo ya que tal "
"comportamiento podría confundir a disparadores de la base de datos, etc."

#. Tag: para
#: performance.xml:1404
#, no-c-format
msgid ""
"Fortunately, you can force this behavior (i.e. the second strategy) at any "
"time by discarding (i.e. dereferencing) the original collection and "
"returning a newly instantiated collection with all the current elements."
msgstr ""
"Afortunadamente, puede forzar este comportamiento (por ejemplo, la segunda "
"estrategia) en cualquier momento descartando (por ejemplo, desreferenciando) "
"la colección original y retornando una colección nuevamente instanciada con "
"todos los elementos actuales."

#. Tag: para
#: performance.xml:1409
#, no-c-format
msgid ""
"One-shot-delete does not apply to collections mapped <literal>inverse=\"true"
"\"</literal>."
msgstr ""
"El borrado-de-un-sólo-tiro no se aplica a las colecciones mapeadas "
"<literal>inverse=\"true\"."

#. Tag: title
#: performance.xml:1415
#, no-c-format
msgid "Monitoring performance"
msgstr "Control del rendimiento"

#. Tag: para
#: performance.xml:1417
#, 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 "
"<literal>SessionFactory."
msgstr ""
"La optimización no es de mucho uso sin el monitoreo y el acceso a números de "
"rendimiento. Hibernate brinda un rango completo de números sobre sus "
"operaciones internas. Las estadísticas en Hibernate están disponibles por "
"<literal>SessionFactory."

#. Tag: title
#: performance.xml:1423
#, no-c-format
msgid "Monitoring a SessionFactory"
msgstr "Control de una SessionFactory"

#. Tag: para
#: performance.xml:1425
#, no-c-format
msgid ""
"You can access <literal>SessionFactory metrics in two ways. Your "
"first option is to call <literal>sessionFactory.getStatistics() "
"and read or display the <literal>Statistics yourself."
msgstr ""
"Puede acceder a las métricas de <literal>SessionFactory de dos "
"formas. Su primera opción es llamar a <literal>sessionFactory.getStatistics()"
"</literal> y leer o mostrar por pantalla la Statistics "
"por sí mismo."

#. Tag: para
#: performance.xml:1430
#, no-c-format
msgid ""
"Hibernate can also use JMX to publish metrics if you enable the "
"<literal>StatisticsService MBean. You can enable a single MBean "
"for all your <literal>SessionFactory or one per factory. See the "
"following code for minimalistic configuration examples:"
msgstr ""
"Hibernate también puede utilizar JMX para publicar las métricas si habilita "
"el MBean <literal>StatisticsService. Puede habilitar un sólo MBean "
"para todas sus <literal>SessionFactory o una por fábrica. Véa el "
"siguiente código para ver ejemplos de configuración minimalistas:"

#. Tag: programlisting
#: performance.xml:1435
#, no-c-format
msgid ""
"// MBean service registration for a specific SessionFactory\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"myFinancialApp\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"stats.setSessionFactory(sessionFactory); // Bind the stats to a "
"SessionFactory\n"
"server.registerMBean(stats, on); // Register the Mbean on the server"
msgstr ""

#. Tag: programlisting
#: performance.xml:1437
#, no-c-format
msgid ""
"// MBean service registration for all SessionFactory's\n"
"Hashtable tb = new Hashtable();\n"
"tb.put(\"type\", \"statistics\");\n"
"tb.put(\"sessionFactory\", \"all\");\n"
"ObjectName on = new ObjectName(\"hibernate\", tb); // MBean object name\n"
"\n"
"StatisticsService stats = new StatisticsService(); // MBean implementation\n"
"server.registerMBean(stats, on); // Register the MBean on the server"
msgstr ""

#. Tag: para
#: performance.xml:1439
#, no-c-format
msgid ""
"You can activate and deactivate the monitoring for a "
"<literal>SessionFactory:"
msgstr ""
"Puede activar y desactivar el monitoreo de una <literal>SessionFactory "
"to <literal>false"
msgstr ""
"en tiempo de configuración, establezca <literal>hibernate."
"generate_statistics</literal> como false"

#. Tag: para
#: performance.xml:1452
#, no-c-format
msgid ""
"at runtime: <literal>sf.getStatistics().setStatisticsEnabled(true) "
"or <literal>hibernateStatsBean.setStatisticsEnabled(true)"
msgstr ""
"en tiempo de ejecución: <literal>sf.getStatistics().setStatisticsEnabled"
"(true)</literal> o hibernateStatsBean.setStatisticsEnabled(true) method."
msgstr ""
"Las estadísticas pueden ser reajustadas programáticamente utilizando el "
"método <literal>clear(). Puede enviarse un resumen a un registro "
"(a nivel de información) utilizando el método <literal>logSummary() "
"interface API, in three categories:"
msgstr ""
"Hibernate proporciona un número de métricas, desde información muy básica "
"hasta la más especializada sólamente relevante en ciertos escenarios. Todos "
"los contadores disponibles se describen en la API de la interfaz "
"<literal>Statistics, en tres categorías:"

#. Tag: para
#: performance.xml:1473
#, no-c-format
msgid ""
"Metrics related to the general <literal>Session usage, such as "
"number of open sessions, retrieved JDBC connections, etc."
msgstr ""
"Métricas relacionadas al uso general de <literal>Session usage, "
"tales como número de sesiones abiertas, conexiones JDBC recuperadas, etc,"

#. Tag: para
#: performance.xml:1479
#, no-c-format
msgid ""
"Metrics related to the entities, collections, queries, and caches as a whole "
"(aka global metrics)."
msgstr ""
"Métricas relacionadas con las entidades, colecciones, consultas y cachés "
"como un todo (también conocidas como métricas globales)."

#. Tag: para
#: performance.xml:1484
#, no-c-format
msgid ""
"Detailed metrics related to a particular entity, collection, query or cache "
"region."
msgstr ""
"Métricas detalladas relacionadas con una entidad, colección, consulta o "
"región de caché en particular."

#. Tag: para
#: performance.xml:1489
#, 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. Be aware that "
"the number of milliseconds is subject to approximation in Java. Hibernate is "
"tied to the JVM precision and on some platforms this might only be accurate "
"to 10 seconds."
msgstr ""
"Por ejemplo, puede comprobar el acceso, pérdida y radio de colecciones de "
"entidades y consultas en el caché, y el tiempo promedio que necesita una "
"consulta. Tenga en cuenta que el número de milisegundos está sujeto a una "
"aproximación en Java. Hibernate está vinculado a la precisión de la MVJ, en "
"algunas plataformas esto podría tener incluso una exactitud de 10 segundos."

#. Tag: para
#: performance.xml:1495
#, 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 "
"<literal>Statistics, EntityStatistics, "
"<literal>CollectionStatistics, "
"<literal>SecondLevelCacheStatistics, and QueryStatistics, EntityStatistics, "
"<literal>CollectionStatistics, "
"<literal>SecondLevelCacheStatistics, y QueryStatistics, "
"<literal>getEntityNames(), getCollectionRoleNames()getSecondLevelCacheRegionNames()."
msgstr ""
"Para trabajar sobre todas las entidades, colecciones, consultas y regiones "
"de cachés, recuperando la lista de nombres de entidades, colecciones, "
"consultas y regiones de cachés con los siguientes métodos: "
"<literal>getQueries(), getEntityNames(), "
"<literal>getCollectionRoleNames() y "
"<literal>getSecondLevelCacheRegionNames()."

#~ msgid "or even:"
#~ msgstr "o incluso:"

#~ msgid ""
#~ "Now the following code will actually load both the customer <emphasis>and "
#~ "their orders</emphasis>:"
#~ msgstr ""
#~ "Ahora el siguiente código de hecho cargará el cliente <emphasis>y sus "
#~ "órdenes</emphasis>:"

#~ msgid "yes"
#~ msgstr "si"

#~ msgid ""
#~ "The <literal><cache> element of a class or collection "
#~ "mapping has the following form:"
#~ msgstr ""
#~ "El elemento <literal><cache> de un mapeo de clase o "
#~ "colección tiene la siguiente forma:"

#~ msgid ""
#~ "The <literal>usage attribute specifies a cache "
#~ "concurrency strategy</emphasis>."
#~ msgstr ""
#~ "El atributo <literal>usage especifica una estrategia "
#~ "de concurrencia al caché</emphasis>."

#~ msgid "read-only"
#~ msgstr "read-only"

#~ msgid "read-write"
#~ msgstr "read-write"

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate performance.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.