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

📄 session_api.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 5 页
字号:
#: session_api.xml:607#, no-c-formatmsgid """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 """Les utilisateurs d'Hibernate ont demandé une méthode dont l'intention ""générale serait soit de sauvegarder une instance éphémère en générant un ""nouvel identifiant, soit mettre à jour/réattacher les instances détachées ""associées à l'identifiant courant. La méthode <literal>saveOrUpdate()</""literal> implémente cette fonctionnalité."#. Tag: programlisting#: session_api.xml:614#, no-c-formatmsgid """<![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 ""#. Tag: para#: session_api.xml:616#, no-c-formatmsgid """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 """L'usage et la sémantique de <literal>saveOrUpdate()</literal> semble être ""confuse pour les nouveaux utilisateurs. Premièrement, aussi longtemps que ""vous n'essayez pas d'utiliser des instances d'une session dans une autre, ""vous ne devriez pas avoir besoin d'utiliser <literal>update()</literal>, ""<literal>saveOrUpdate()</literal>, ou <literal>merge()</literal>. Certaines ""applications n'utiliseront jamais ces méthodes."#. Tag: para#: session_api.xml:624#, no-c-formatmsgid """Usually <literal>update()</literal> or <literal>saveOrUpdate()</literal> are ""used in the following scenario:"msgstr """Généralement <literal>update()</literal> ou <literal>saveOrUpdate()</""literal> sont utilisées dans le scénario suivant :"#. Tag: para#: session_api.xml:631#, no-c-formatmsgid "the application loads an object in the first session"msgstr "l'application charge un objet dans la première session"#. Tag: para#: session_api.xml:636#, no-c-formatmsgid "the object is passed up to the UI tier"msgstr "l'objet est passé à la couche utilisateur"#. Tag: para#: session_api.xml:641#, no-c-formatmsgid "some modifications are made to the object"msgstr "certaines modifications sont effectuées sur l'objet"#. Tag: para#: session_api.xml:646#, no-c-formatmsgid "the object is passed back down to the business logic tier"msgstr "l'objet est retourné à la couche logique métier"#. Tag: para#: session_api.xml:651#, no-c-formatmsgid """the application persists these modifications by calling <literal>update()</""literal> in a second session"msgstr """l'application persiste ces modifications en appelant <literal>update()</""literal> dans une seconde sessin"#. Tag: para#: session_api.xml:658#, no-c-formatmsgid "<literal>saveOrUpdate()</literal> does the following:"msgstr "<literal>saveOrUpdate()</literal> s'utilise dans le cas suivant :"#. Tag: para#: session_api.xml:664#, no-c-formatmsgid "if the object is already persistent in this session, do nothing"msgstr "si l'objet est déjà persistant dans cette session, ne rien faire"#. Tag: para#: session_api.xml:669#, no-c-formatmsgid """if another object associated with the session has the same identifier, throw ""an exception"msgstr """si un autre objet associé à la session a le même identifiant, lever une ""exception"#. Tag: para#: session_api.xml:675#, no-c-formatmsgid "if the object has no identifier property, <literal>save()</literal> it"msgstr """si l'objet n'a pas de propriété d'identifiant, appeler <literal>save()</""literal>"#. Tag: para#: session_api.xml:680#, no-c-formatmsgid """if the object's identifier has the value assigned to a newly instantiated ""object, <literal>save()</literal> it"msgstr """si l'identifiant de l'objet a une valeur assignée à un objet nouvellement ""instancié, appeler <literal>save()</literal>"#. Tag: para#: session_api.xml:686#, no-c-formatmsgid """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 l'objet est versionné (par <literal>&lt;version&gt;</literal> ou ""<literal>&lt;timestamp&gt;</literal>), et la valeur de la propriété de ""version est la même valeur que celle assignée à un objet nouvellement ""instancié, appeler <literal>save()</literal>"#. Tag: para#: session_api.xml:694#, no-c-formatmsgid "otherwise <literal>update()</literal> the object"msgstr "sinon mettre à jour l'objet avec <literal>update()</literal>"#. Tag: para#: session_api.xml:700#, no-c-formatmsgid "and <literal>merge()</literal> is very different:"msgstr "et <literal>merge()</literal> est très différent :"#. Tag: para#: session_api.xml:706#, no-c-formatmsgid """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 """s'il y a une instance persistante avec le même identifiant couramment ""associée à la session, copier l'état de l'objet donné dans l'instance ""persistante"#. Tag: para#: session_api.xml:713#, no-c-formatmsgid """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 """s'il n'y a pas d'instance persistante associée à cette session, essayer de ""le charger à partir de la base de données, ou créer une nouvelle instance ""persistante"#. Tag: para#: session_api.xml:719#, no-c-formatmsgid "the persistent instance is returned"msgstr "l'instance persistante est retournée"#. Tag: para#: session_api.xml:724#, no-c-formatmsgid """the given instance does not become associated with the session, it remains ""detached"msgstr """l'instance donnée ne devient pas associée à la session, elle reste détachée"#. Tag: title#: session_api.xml:734#, no-c-formatmsgid "Deleting persistent objects"msgstr "Suppression d'objets persistants"#. Tag: para#: session_api.xml:736#, no-c-formatmsgid """<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> supprimera l'état d'un objet de la base ""de données. Bien sûr, votre application pourrait encore conserver une ""référence vers un objet effacé. Il est mieux de penser à <literal>delete()</""literal> comme rendant une instance persistante éphémère."#. Tag: programlisting#: session_api.xml:743#, no-c-formatmsgid "<![CDATA[sess.delete(cat);]]>"msgstr ""#. Tag: para#: session_api.xml:745#, no-c-formatmsgid """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 """Vous pouvez effacer des objets dans l'ordre que vous voulez, sans risque de ""violations de contrainte de clef étrangère. Il est encore possible de violer ""une contrainte <literal>NOT NULL</literal> sur une colonne de clef étrangère ""en effaçant des objets dans le mauvais ordre, par exemple si vous effacer le ""parent, mais oubliez d'effacer les enfants."#. Tag: title#: session_api.xml:756#, no-c-formatmsgid "Replicating object between two different datastores"msgstr "Réplication d'objets entre deux entrepôts de données"#. Tag: para#: session_api.xml:758#, no-c-formatmsgid """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 """Il est occasionnellement utile de pouvoir prendre un graphe d'instances ""persistantes et de les rendre persistantes dans un entrepôt différent, sans ""regénérer les valeurs des identifiants."#. Tag: programlisting#: session_api.xml:764#, no-c-formatmsgid """<![CDATA[//retrieve a cat from one database\n""Session session1 = factory1.openSession();\n""Transaction tx1 = session1.beginTransaction();\n""Cat cat = session1.get(Cat.class, catId);\n""tx1.commit();\n""session1.close();\n""\n""//reconcile with a second database\n""Session session2 = factory2.openSession();\n""Transaction tx2 = session2.beginTransaction();\n""session2.replicate(cat, ReplicationMode.LATEST_VERSION);\n""tx2.commit();\n""session2.close();]]>"msgstr ""#. Tag: para#: session_api.xml:766#, no-c-formatmsgid """The <literal>ReplicationMode</literal> determines how <literal>replicate()</""literal> will deal with conflicts with existing rows in the database."msgstr """Le <literal>ReplicationMode</literal> détermine comment <literal>replicate()""</literal> traitera les conflits avec les lignes existantes dans la base de ""données."#. Tag: para#: session_api.xml:773#, no-c-formatmsgid """<literal>ReplicationMode.IGNORE</literal> - ignore the object when there is ""an existing database row with the same identifier"msgstr """<literal>ReplicationMode.IGNORE</literal> - ignore l'objet s'il y a une ""ligne existante dans la base de données avec le même identifiant"#. Tag: para#: session_api.xml:779#, no-c-formatmsgid """<literal>ReplicationMode.OVERWRITE</literal> - overwrite any existing ""database row with the same identifier"msgstr """<literal>ReplicationMode.OVERWRITE</literal> - écrase n'importe quelle ligne ""existante dans la base de données avec le même identifiant"#. Tag: para#: session_api.xml:785#, no-c-formatmsgid """<literal>ReplicationMode.EXCEPTION</literal> - throw an exception if there ""is an existing database row with the same identifier"msgstr """<literal>ReplicationMode.EXCEPTION</literal> - lève une exception s'il y une ""ligne dans la base de données avec le même identifiant"#. Tag: para#: session_api.xml:791#, no-c-formatmsgid """<literal>ReplicationMode.LATEST_VERSION</literal> - overwrite the row if its ""version number is earlier than the version number of the object, or ignore ""the object otherwise"msgstr """<literal>ReplicationMode.LATEST_VERSION</literal> - écrase la ligne si son ""numéro de version est plus petit que le numéro de version de l'objet, ou ""ignore l'objet sinon"#. Tag: para#: session_api.xml:799#, no-c-formatmsgid """Usecases for this feature include reconciling data entered into different ""database instances, upgrading system configuration information during ""product upgrades, rolling back changes made during non-ACID transactions and ""more."msgstr """Les cas d'utilisation de cette fonctionnalité incluent la réconciliation de ""données entrées dans différentes base de données, l'extension des ""informations de configuration du système durant une mise à jour 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -