📄 session_api.po
字号:
msgid """If the <literal>Cat</literal> with identifier <literal>catId</literal> had ""already been loaded by <literal>secondSession</literal> when the application ""tried to reattach it, an exception would have been thrown."msgstr """Si el <literal>Cat</literal> con identificador <literal>catId</literal> ya ""hubiera sido cargado por <literal>secondSession</literal> cuando la ""aplicación intentó volver a unirlo, se habría lanzado ""una excepción."#: index.docbook:544msgid """Use <literal>update()</literal> if you are sure that the session does not ""contain an already persistent instance with the same identifier, and ""<literal>merge()</literal> if you want to merge your modifications at any ""time without consideration of the state of the session. In other words, ""<literal>update()</literal> is usually the first method you would call in a ""fresh session, ensuring that reattachment of your detached instances is the ""first operation that is executed."msgstr """Usa <literal>update()</literal> si no estás seguro que la sesió""n tenga una instancia ya persistente con el mismo identificador, y ""<literal>merge()</literal> si quieres fusionar tus modificaciones en ""cualquier momento sin consideración del estado de la sesión. ""En otras palabras, <literal>update()</literal> es usualmente el primer ""método que llamarías en una sesión fresca, asegurando ""que la re-unión de tus instancias separadas es la primera ""operación que se ejecuta."#: index.docbook:553msgid """The application should individually <literal>update()</literal> detached ""instances reachable from the given detached instance if and <emphasis>only</""emphasis> if it wants their state also updated. This can be automated of ""course, using <emphasis>transitive persistence</emphasis>, see <xref linkend=""\"objectstate-transitive\"/>."msgstr """La aplicación debe actualizar individualmente las instancias ""separadas alcanzables por la instancia separada dada llamando a ""<literal>update()</literal>, si y <emphasis>sólo</emphasis> si quiere ""que sus estados sean también actualizados. Esto puede, por supuesto, ""ser automatizado usando <emphasis>persistencia transitiva</emphasis>, ver ""<xref linkend=\"objectstate-transitive\"/>."#: index.docbook:560msgid """The <literal>lock()</literal> method also allows an application to ""reassociate an object with a new session. However, the detached instance has ""to be unmodified!"msgstr """El método <literal>lock()</literal> también permite a una ""aplicación reasociar un objeto con una sesión nueva. Sin ""embargo, la instancia separada no puede haber sido modificada!"#: index.docbook:565msgid """<![CDATA[//just reassociate:\n""sess.lock(fritz, LockMode.NONE);\n""//do a version check, then reassociate:\n""sess.lock(izi, LockMode.READ);\n""//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n""sess.lock(pk, LockMode.UPGRADE);]]>"msgstr """<![CDATA[//just reassociate:\n""sess.lock(fritz, LockMode.NONE);\n""//do a version check, then reassociate:\n""sess.lock(izi, LockMode.READ);\n""//do a version check, using SELECT ... FOR UPDATE, then reassociate:\n""sess.lock(pk, LockMode.UPGRADE);]]>"#: index.docbook:567msgid """Note that <literal>lock()</literal> can be used with various ""<literal>LockMode</literal>s, see the API documentation and the chapter on ""transaction handling for more information. Reattachment is not the only ""usecase for <literal>lock()</literal>."msgstr """Nota que <literal>lock()</literal> puede ser usado con varios ""<literal>LockMode</literal>s, ver la documentación de la API y el ""capítulo sobre manejo de transacciones para más ""información. La re-unión no es el único caso de uso ""para <literal>lock()</literal>."#: index.docbook:574msgid """Other models for long units of work are discussed in <xref linkend=""\"transactions-optimistic\"/>."msgstr """Se discuten otros modelos para unidades de trabajo largas en <xref linkend=""\"transactions-optimistic\"/>."#: index.docbook:581msgid "Automatic state detection"msgstr "Detección automática de estado"#: index.docbook:583msgid """Hibernate users have requested a general purpose method that either saves a ""transient instance by generating a new identifier or updates/reattaches the ""detached instances associated with its current identifier. The ""<literal>saveOrUpdate()</literal> method implements this functionality."msgstr """Los usuarios de Hibernate han pedido un método de propósito ""general que bien salve una instancia transitoria generando un identificador ""nuevo, o bien actualice/reúna las instancias separadas asociadas con ""su identificador actual. El método <literal>saveOrUpdate()</literal> ""implementa esta funcionalidad."#: index.docbook:590msgid """<![CDATA[// in the first session\n""Cat cat = (Cat) firstSession.load(Cat.class, catID);\n""\n""// in a higher tier of the application\n""Cat mate = new Cat();\n""cat.setMate(mate);\n""\n""// later, in a new session\n""secondSession.saveOrUpdate(cat); // update existing state (cat has a non-""null id)\n""secondSession.saveOrUpdate(mate); // save the new instance (mate has a null ""id)]]>"msgstr """<![CDATA[// in the first session\n""Cat cat = (Cat) firstSession.load(Cat.class, catID);\n""\n""// in a higher tier of the application\n""Cat mate = new Cat();\n""cat.setMate(mate);\n""\n""// later, in a new session\n""secondSession.saveOrUpdate(cat); // update existing state (cat has a non-""null id)\n""secondSession.saveOrUpdate(mate); // save the new instance (mate has a null ""id)]]>"#: index.docbook:592msgid """The usage and semantics of <literal>saveOrUpdate()</literal> seems to be ""confusing for new users. Firstly, so long as you are not trying to use ""instances from one session in another new session, you should not need to ""use <literal>update()</literal>, <literal>saveOrUpdate()</literal>, or ""<literal>merge()</literal>. Some whole applications will never use either of ""these methods."msgstr """El uso y semántica de <literal>saveOrUpdate()</literal> parece ser ""confuso para usuarios nuevos. Primeramente, en tanto no estés ""intentando usar instancias de una sesión en otra sesión nueva, ""no debes necesitar usar <literal>update()</literal>, <literal>saveOrUpdate()""</literal>, o <literal>merge()</literal>. Algunas aplicaciones enteras nunca ""usarán ninguno de estos métodos."#: index.docbook:600msgid """Usually <literal>update()</literal> or <literal>saveOrUpdate()</literal> are ""used in the following scenario:"msgstr """Usualmente <literal>update()</literal> o <literal>saveOrUpdate()</literal> ""se usan en el siguiente escenario:"#: index.docbook:607msgid "the application loads an object in the first session"msgstr "la aplicación carga un objeto en la primera sesión"#: index.docbook:612msgid "the object is passed up to the UI tier"msgstr "el objeto es pasado a la capa de UI"#: index.docbook:617msgid "some modifications are made to the object"msgstr "se hacen algunas modificaciones al objeto"#: index.docbook:622msgid "the object is passed back down to the business logic tier"msgstr "el objeto se pasa abajo de regreso a la capa de negocio"#: index.docbook:627msgid """the application persists these modifications by calling <literal>update()</""literal> in a second session"msgstr """la aplicación hace estas modificaciones persistentes llamando a ""<literal>update()</literal> en una segunda sesión"#: index.docbook:634msgid "<literal>saveOrUpdate()</literal> does the following:"msgstr "<literal>saveOrUpdate()</literal> hace lo siguiente:"#: index.docbook:640msgid "if the object is already persistent in this session, do nothing"msgstr "si el objeto ya es persistente en esta sesión, no hace nada"#: index.docbook:645msgid """if another object associated with the session has the same identifier, throw ""an exception"msgstr """si otro objeto asociado con la sesión tiene el mismo identificador, ""lanza una excepción"#: index.docbook:651msgid "if the object has no identifier property, <literal>save()</literal> it"msgstr """si el objeto no tiene ninguna propiedad identificadora, lo salva llamando a ""<literal>save()</literal>"#: index.docbook:656msgid """if the object's identifier has the value assigned to a newly instantiated ""object, <literal>save()</literal> it"msgstr """si el identificador del objeto tiene el valor asignado a un objeto ""recién instanciado, lo salva llamando a <literal>save()</literal>"#: index.docbook:662msgid """if the object is versioned (by a <literal><version></literal> or ""<literal><timestamp></literal>), and the version property value is the ""same value assigned to a newly instantiated object, <literal>save()</""literal> it"msgstr """si el objeto está versionado (por un <literal><version></""literal> o <literal><timestamp></literal>), y el valor de la propiedad ""de versión es el mismo valor asignado a una objeto recién ""instanciado, lo salva llamando a <literal>save()</literal>"#: index.docbook:670msgid "otherwise <literal>update()</literal> the object"msgstr """en cualquier otro caso se actualiza el objeto llamando a <literal>update()</""literal>"#: index.docbook:676msgid "and <literal>merge()</literal> is very different:"msgstr "y <literal>merge()</literal> es muy diferente:"#: index.docbook:682msgid """if there is a persistent instance with the same identifier currently ""associated with the session, copy the state of the given object onto the ""persistent instance"msgstr """si existe una instancia persistente con el mismo identificador asignado ""actualmente con la sesión, copia el estado del objeto dado en la ""instancia persistente"#: index.docbook:689msgid """if there is no persistent instance currently associated with the session, ""try to load it from the database, or create a new persistent instance"msgstr """si no existe ninguna instancia persistente actualmente asociada a la ""sesión, intente cargarla de la base de datos, o crear una nueva ""instancia persistente"#: index.docbook:695msgid "the persistent instance is returned"msgstr "la instancia persistente es devuelta"#: index.docbook:700msgid """the given instance does not become associated with the session, it remains ""detached"msgstr """la instancia dada no resulta ser asociada a la sesión, permanece ""separada"#: index.docbook:710msgid "Deleting persistent objects"msgstr "Borrando objetos persistentes"#: index.docbook:712msgid """<literal>Session.delete()</literal> will remove an object's state from the ""database. Of course, your application might still hold a reference to a ""deleted object. It's best to think of <literal>delete()</literal> as making ""a persistent instance transient."msgstr """<literal>Session.delete()</literal> quitará el estado de un objeto de ""la base de datos. Por supuesto, tu aplicación podría tener ""aún una referencia a un objeto borrado. Lo mejor es pensar en ""<literal>delete()</literal> como hacer transitoria una instancia persistente."#: index.docbook:719msgid "<![CDATA[sess.delete(cat);]]>"msgstr "<![CDATA[sess.delete(cat);]]>"#: index.docbook:721msgid """You may delete objects in any order you like, without risk of foreign key ""constraint violations. It is still possible to violate a <literal>NOT NULL</""literal> constraint on a foreign key column by deleting objects in the wrong ""order, e.g. if you delete the parent, but forget to delete the children."msgstr """Puedes borrar los objetos en el orden que gustes, sin riesgo de violaciones ""de restricción de clave foránea. Aún es posible violar ""una restricción <literal>NOT NULL</literal> sobre una columna clave ""foránea borrando objetos en un orden erróneo, por ejemplo, si ""borras el padre, pero olvidas borrar los hijos."#: index.docbook:732msgid "Replicating object between two different datastores"msgstr "Replicando objetos entre dos almacénes de datos diferentes"#: index.docbook:734msgid """It is occasionally useful to be able to take a graph of persistent instances ""and make them persistent in a different datastore, without regenerating ""identifier values."msgstr """Es
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -