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

📄 session_api.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 5 页
字号:
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&#x00f3;n intent&#x00f3; volver a unirlo, se habr&#x00ed;a lanzado ""una excepci&#x00f3;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&#x00e1;s seguro que la sesi&#x00f3;""n tenga una instancia ya persistente con el mismo identificador, y ""<literal>merge()</literal> si quieres fusionar tus modificaciones en ""cualquier momento sin consideraci&#x00f3;n del estado de la sesi&#x00f3;n. ""En otras palabras, <literal>update()</literal> es usualmente el primer ""m&#x00e9;todo que llamar&#x00ed;as en una sesi&#x00f3;n fresca, asegurando ""que la re-uni&#x00f3;n de tus instancias separadas es la primera ""operaci&#x00f3;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&#x00f3;n debe actualizar individualmente las instancias ""separadas alcanzables por la instancia separada dada llamando a ""<literal>update()</literal>, si y <emphasis>s&#x00f3;lo</emphasis> si quiere ""que sus estados sean tambi&#x00e9;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&#x00e9;todo <literal>lock()</literal> tambi&#x00e9;n permite a una ""aplicaci&#x00f3;n reasociar un objeto con una sesi&#x00f3;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&#x00f3;n de la API y el ""cap&#x00ed;tulo sobre manejo de transacciones para m&#x00e1;s ""informaci&#x00f3;n. La re-uni&#x00f3;n no es el &#x00fa;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&#x00f3;n autom&#x00e1;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&#x00e9;todo de prop&#x00f3;sito ""general que bien salve una instancia transitoria generando un identificador ""nuevo, o bien actualice/re&#x00fa;na las instancias separadas asociadas con ""su identificador actual. El m&#x00e9;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&#x00e1;ntica de <literal>saveOrUpdate()</literal> parece ser ""confuso para usuarios nuevos. Primeramente, en tanto no est&#x00e9;s ""intentando usar instancias de una sesi&#x00f3;n en otra sesi&#x00f3;n nueva, ""no debes necesitar usar <literal>update()</literal>, <literal>saveOrUpdate()""</literal>, o <literal>merge()</literal>. Algunas aplicaciones enteras nunca ""usar&#x00e1;n ninguno de estos m&#x00e9;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&#x00f3;n carga un objeto en la primera sesi&#x00f3;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&#x00f3;n hace estas modificaciones persistentes llamando a ""<literal>update()</literal> en una segunda sesi&#x00f3;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&#x00f3;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&#x00f3;n tiene el mismo identificador, ""lanza una excepci&#x00f3;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&#x00e9;n instanciado, lo salva llamando a <literal>save()</literal>"#: index.docbook:662msgid """if the object is versioned (by a <literal>&lt;version&gt;</literal> or ""<literal>&lt;timestamp&gt;</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&#x00e1; versionado (por un <literal>&lt;version&gt;</""literal> o <literal>&lt;timestamp&gt;</literal>), y el valor de la propiedad ""de versi&#x00f3;n es el mismo valor asignado a una objeto reci&#x00e9;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&#x00f3;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&#x00f3;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&#x00f3;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&#x00e1; el estado de un objeto de ""la base de datos. Por supuesto, tu aplicaci&#x00f3;n podr&#x00ed;a tener ""a&#x00fa;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&#x00f3;n de clave for&#x00e1;nea. A&#x00fa;n es posible violar ""una restricci&#x00f3;n <literal>NOT NULL</literal> sobre una columna clave ""for&#x00e1;nea borrando objetos en un orden err&#x00f3;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&#x00e9;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 + -