📄 tutorial.po
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2007-10-25 07:48+0000\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#. Tag: title#: tutorial.xml:7#, no-c-formatmsgid "Introduction to Hibernate"msgstr "Introduction à Hibernate"#. Tag: title#: tutorial.xml:10#, no-c-formatmsgid "Preface"msgstr "Préface"#. Tag: para#: tutorial.xml:12#, no-c-formatmsgid """This chapter is an introductory tutorial for new users of Hibernate. We ""start with a simple command line application using an in-memory database and ""develop it in easy to understand steps."msgstr """Ce chapitre est un didacticiel introductif destiné aux nouveaux utilisateurs ""d'Hibernate. Nous commençons avec une simple application en ligne de ""commande utilisant une base de données en mémoire, et la développons en ""étapes faciles à comprendre."#. Tag: para#: tutorial.xml:18#, no-c-formatmsgid """This tutorial is intended for new users of Hibernate but requires Java and ""SQL knowledge. It is based on a tutorial by Michael Gloegl, the third-party ""libraries we name are for JDK 1.4 and 5.0. You might need others for JDK 1.3."msgstr """Ce didacticiel est destiné aux nouveaux utilisateurs d'Hibernate mais ""requiert des connaissances Java et SQL. Il est basé sur un didacticiel de ""Michael Gloegl, les bibliothèques tierces que nous nommons sont pour les JDK ""1.4 et 5.0. Vous pourriez avoir besoin d'autres bibliothèques pour le JDK ""1.3."#. Tag: para#: tutorial.xml:24#, no-c-formatmsgid """The source code for the tutorial is included in the distribution in the ""<literal>doc/reference/tutorial/</literal> directory."msgstr """Le code source de ce tutoriel est inclus dans la distribution dans le ""répertoire <literal>doc/reference/tutorial/</literal>."#. Tag: title#: tutorial.xml:32#, no-c-formatmsgid "Part 1 - The first Hibernate Application"msgstr "Partie 1 - Première application Hibernate"#. Tag: para#: tutorial.xml:34#, no-c-formatmsgid """First, we'll create a simple console-based Hibernate application. We use an ""Java database (HSQL DB), so we do not have to install any database server."msgstr """D'abord, nous créerons une simple application Hibernate en console. Nous ""utilisons une base de données en mémoire (HSQL DB), donc nous n'avons pas à ""installer de serveur de base de données."#. Tag: para#: tutorial.xml:39#, no-c-formatmsgid """Let's assume we need a small database application that can store events we ""want to attend, and information about the hosts of these events."msgstr """Supposons que nous ayons besoin d'une petite application de base de données ""qui puisse stocker des événements que nous voulons suivre, et des ""informations à propos des hôtes de ces événements."#. Tag: para#: tutorial.xml:44#, no-c-formatmsgid """The first thing we do, is set up our development directory and put all the ""Java libraries we need into it. Download the Hibernate distribution from the ""Hibernate website. Extract the package and place all required libraries ""found in <literal>/lib</literal> into into the <literal>/lib</literal> ""directory of your new development working directory. It should look like ""this:"msgstr """La première chose que nous faisons est de configurer notre répertoire de ""développement et de mettre toutes les bibliothèques dont nous avons besoin ""dedans. Téléchargez la distribution Hibernate à partir du site web ""d'Hibernate. Extrayez le paquet et placez toutes les bibliothèques requises ""trouvées dans <literal>/lib</literal> dans le répertoire <literal>/lib</""literal> de votre nouveau répertoire de travail. Il devrait ressembler à ça :"#. Tag: programlisting#: tutorial.xml:52#, no-c-formatmsgid """<![CDATA[.\n""+lib\n"" antlr.jar\n"" cglib.jar\n"" asm.jar\n"" asm-attrs.jars\n"" commons-collections.jar\n"" commons-logging.jar\n"" hibernate3.jar\n"" jta.jar\n"" dom4j.jar\n"" log4j.jar ]]>"msgstr ""#. Tag: para#: tutorial.xml:54#, no-c-formatmsgid """This is the minimum set of required libraries (note that we also copied ""hibernate3.jar, the main archive) for Hibernate <emphasis>at the time of ""writing</emphasis>. The Hibernate release you are using might require more ""or less libraries. See the <literal>README.txt</literal> file in the ""<literal>lib/</literal> directory of the Hibernate distribution for more ""information about required and optional third-party libraries. (Actually, ""Log4j is not required but preferred by many developers.)"msgstr """Ceci est l'ensemble minimum de bibliothèques requises (notez que nous avons ""aussi copié hibernate3.jar, l'archive principale) pour Hibernate. Lisez le ""fichier <literal>README.txt</literal> dans le répertoire <literal>lib/</""literal> de la distribution Hibernate pour plus d'informations à propos des ""biliothèques tierces requises et optionnelles. (En fait, log4j n'est pas ""requis mais préféré par beaucoup de développeurs.)"#. Tag: para#: tutorial.xml:63#, no-c-formatmsgid """Next we create a class that represents the event we want to store in ""database."msgstr """Ensuite, nous créons une classe qui réprésente l'événement que nous voulons ""stocker dans notre base de données."#. Tag: title#: tutorial.xml:68#, no-c-formatmsgid "The first class"msgstr "La première classe"#. Tag: para#: tutorial.xml:70#, no-c-formatmsgid """Our first persistent class is a simple JavaBean class with some properties:"msgstr """Notre première classe persistante est une simple classe JavaBean avec ""quelques propriétés :"#. Tag: programlisting#: tutorial.xml:74#, no-c-formatmsgid """<![CDATA[package events;\n""\n""import java.util.Date;\n""\n""public class Event {\n"" private Long id;\n""\n"" private String title;\n"" private Date date;\n""\n"" public Event() {}\n""\n"" public Long getId() {\n"" return id;\n"" }\n""\n"" private void setId(Long id) {\n"" this.id = id;\n"" }\n""\n"" public Date getDate() {\n"" return date;\n"" }\n""\n"" public void setDate(Date date) {\n"" this.date = date;\n"" }\n""\n"" public String getTitle() {\n"" return title;\n"" }\n""\n"" public void setTitle(String title) {\n"" this.title = title;\n"" }\n""}]]>"msgstr ""#. Tag: para#: tutorial.xml:76#, no-c-formatmsgid """You can see that this class uses standard JavaBean naming conventions for ""property getter and setter methods, as well as private visibility for the ""fields. This is a recommended design - but not required. Hibernate can also ""access fields directly, the benefit of accessor methods is robustness for ""refactoring. The no-argument constructor is required to instantiate an ""object of this class through reflection."msgstr """Vous pouvez voir que cette classe utilise les conventions de nommage ""standard JavaBean pour les méthodes getter/setter des propriétés, ainsi ""qu'une visibilité privée pour les champs. Ceci est la conception recommandée ""- mais pas obligatoire. Hibernate peut aussi accéder aux champs directement, ""le bénéfice des méthodes d'accès est la robustesse pour la refonte de code. ""Le constructeur sans argument est requis pour instancier un objet de cette ""classe via reflexion."#. Tag: para#: tutorial.xml:84#, no-c-formatmsgid """The <literal>id</literal> property holds a unique identifier value for a ""particular event. All persistent entity classes (there are less important ""dependent classes as well) will need such an identifier property if we want ""to use the full feature set of Hibernate. In fact, most applications (esp. ""web applications) need to distinguish objects by identifier, so you should ""consider this a feature rather than a limitation. However, we usually don't ""manipulate the identity of an object, hence the setter method should be ""private. Only Hibernate will assign identifiers when an object is saved. You ""can see that Hibernate can access public, private, and protected accessor ""methods, as well as (public, private, protected) fields directly. The choice ""is up to you and you can match it to fit your application design."msgstr """La propriété <literal>id</literal> contient la valeur d'un identifiant ""unique pour un événement particulier. Toutes les classes d'entités ""persistantes (ainsi que les classes dépendantes de moindre importance) ""auront besoin d'une telle propriété identifiante si nous voulons utiliser ""l'ensemble complet des fonctionnalités d'Hibernate. En fait, la plupart des ""applications (surtout les applications web) ont besoin de distinguer des ""objets par des identifiants, donc vous devriez considérer ça comme une ""fonctionnalité plutôt que comme une limitation. Cependant, nous ne ""manipulons généralement pas l'identité d'un objet, dorénavant la méthode ""setter devrait être privée. Seul Hibernate assignera les identifiants ""lorsqu'un objet est sauvegardé. Vous pouvez voir qu'Hibernate peut accéder ""aux méthodes publiques, privées et protégées, ainsi qu'aux champs (publics, ""privés, protégés) directement. Le choix vous est laissé, et vous pouvez ""l'ajuster à la conception de votre application."#. Tag: para#: tutorial.xml:96#, no-c-formatmsgid """The no-argument constructor is a requirement for all persistent classes; ""Hibernate has to create objects for you, using Java Reflection. The ""constructor can be private, however, package visibility is required for ""runtime proxy generation and efficient data retrieval without bytecode ""instrumentation."msgstr """Le constructeur sans argument est requis pour toutes les classes ""persistantes ; Hibernate doit créer des objets pour vous en utilisant la ""réflexion Java. Le constructeur peut être privé, cependant, la visibilité du ""paquet est requise pour la génération de proxy à l'exécution et une ""récupération des données efficaces sans instrumentation du bytecode."#. Tag: para#: tutorial.xml:103#, no-c-formatmsgid """Place this Java source file in a directory called <literal>src</literal> in ""the development folder, and in its correct package. The directory should now ""look like this:"msgstr """Placez ce fichier source Java dans un répertoire appelé <literal>src</""literal> dans le dossier de développement. Ce répertoire devrait maintenant ""ressembler à ça :"#. Tag: programlisting#: tutorial.xml:108#, no-c-formatmsgid """<![CDATA[.\n""+lib\n"" <Hibernate and third-party libraries>\n""+src\n"" +events\n"" Event.java]]>"msgstr ""#. Tag: para#: tutorial.xml:110#, no-c-formatmsgid "In the next step, we tell Hibernate about this persistent class."msgstr """Dans la prochaine étape, nous informons Hibernate de cette classe ""persistante."#. Tag: title#: tutorial.xml:117#, no-c-formatmsgid "The mapping file"msgstr "Le fichier de mapping"#. Tag: para#: tutorial.xml:119#, no-c-formatmsgid """Hibernate needs to know how to load and store objects of the persistent ""class. This is where the Hibernate mapping file comes into play. The mapping ""file tells Hibernate what table in the database it has to access, and what ""columns in that table it should use."msgstr """Hibernate a besoin de savoir comment charger et stocker des objets d'une ""classe persistante. C'est là qu'intervient le fichier de mapping Hibernate. ""Le fichier de mapping indique à Hibernate à quelle table dans la base de ""données il doit accéder, et quelles colonnes de cette table il devra ""utiliser."
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -