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

📄 basic_mapping.po

📁 hibernate-distribution-3.3.1.GA-dist.zip源码
💻 PO
📖 第 1 页 / 共 5 页
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: http://bugs.kde.org\n""POT-Creation-Date: 2008-08-14 15:28+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#: basic_mapping.xml:29#, no-c-formatmsgid "Basic O/R Mapping"msgstr "Mapping O/R basique"#. Tag: title#: basic_mapping.xml:32#, no-c-formatmsgid "Mapping declaration"msgstr "Déclaration de Mapping"#. Tag: para#: basic_mapping.xml:34#, no-c-formatmsgid """Object/relational mappings are usually defined in an XML document. The ""mapping document is designed to be readable and hand-editable. The mapping ""language is Java-centric, meaning that mappings are constructed around ""persistent class declarations, not table declarations."msgstr """Les mappings Objet/relationnel sont généralement définis dans un document ""XML. Le document de mapping est conçu pour être lisible et éditable à la ""main. Le langage de mapping est Java-centrique, c'est à dire que les ""mappings sont construits à partir des déclarations des classes persistantes ""et non des déclarations des tables."#. Tag: para#: basic_mapping.xml:41#, no-c-formatmsgid """Note that, even though many Hibernate users choose to write the XML by hand, ""a number of tools exist to generate the mapping document, including XDoclet, ""Middlegen and AndroMDA."msgstr """Remarquez que même si beaucoup d'utilisateurs de Hibernate préfèrent écrire ""les fichiers de mappings à la main, plusieurs outils existent pour générer ""ce document, notamment XDoclet, Middlegen et AndroMDA."#. Tag: para#: basic_mapping.xml:47#, no-c-formatmsgid "Lets kick off with an example mapping:"msgstr "Démarrons avec un exemple de mapping :"#. Tag: programlisting#: basic_mapping.xml:51#, no-c-formatmsgid """<![CDATA[<?xml version=\"1.0\"?>\n""<!DOCTYPE hibernate-mapping PUBLIC\n""      \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n""          \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\">\n""\n""<hibernate-mapping package=\"eg\">\n""\n""        <class name=\"Cat\"\n""            table=\"cats\"\n""            discriminator-value=\"C\">\n""\n""                <id name=\"id\">\n""                        <generator class=\"native\"/>\n""                </id>\n""\n""                <discriminator column=\"subclass\"\n""                     type=\"character\"/>\n""\n""                <property name=\"weight\"/>\n""\n""                <property name=\"birthdate\"\n""                    type=\"date\"\n""                    not-null=\"true\"\n""                    update=\"false\"/>\n""\n""                <property name=\"color\"\n""                    type=\"eg.types.ColorUserType\"\n""                    not-null=\"true\"\n""                    update=\"false\"/>\n""\n""                <property name=\"sex\"\n""                    not-null=\"true\"\n""                    update=\"false\"/>\n""\n""                <property name=\"litterId\"\n""                    column=\"litterId\"\n""                    update=\"false\"/>\n""\n""                <many-to-one name=\"mother\"\n""                    column=\"mother_id\"\n""                    update=\"false\"/>\n""\n""                <set name=\"kittens\"\n""                    inverse=\"true\"\n""                    order-by=\"litter_id\">\n""                        <key column=\"mother_id\"/>\n""                        <one-to-many class=\"Cat\"/>\n""                </set>\n""\n""                <subclass name=\"DomesticCat\"\n""                    discriminator-value=\"D\">\n""\n""                        <property name=\"name\"\n""                            type=\"string\"/>\n""\n""                </subclass>\n""\n""        </class>\n""\n""        <class name=\"Dog\">\n""                <!-- mapping for Dog could go here -->\n""        </class>\n""\n""</hibernate-mapping>]]>"msgstr ""#. Tag: para#: basic_mapping.xml:53#, no-c-formatmsgid """We will now discuss the content of the mapping document. We will only ""describe the document elements and attributes that are used by Hibernate at ""runtime. The mapping document also contains some extra optional attributes ""and elements that affect the database schemas exported by the schema export ""tool. (For example the <literal> not-null</literal> attribute.)"msgstr """Etudions le contenu du document de mapping. Nous décrirons uniquement les ""éléments et attributs du document utilisés par Hibernate à l'exécution. Le ""document de mapping contient aussi des attributs et éléments optionnels qui ""agissent sur le schéma de base de données exporté par l'outil de génération ""de schéma. (Par exemple l'attribut <literal>not-null</literal>.)"#. Tag: title#: basic_mapping.xml:64#, no-c-formatmsgid "Doctype"msgstr "Doctype"#. Tag: para#: basic_mapping.xml:66#, no-c-formatmsgid """All XML mappings should declare the doctype shown. The actual DTD may be ""found at the URL above, in the directory <literal>hibernate-x.x.x/src/org/""hibernate </literal> or in <literal>hibernate3.jar</literal>. Hibernate will ""always look for the DTD in its classpath first. If you experience lookups of ""the DTD using an Internet connection, check your DTD declaration against the ""contents of your claspath."msgstr """Tous les mappings XML devraient utiliser le doctype indiqué. Ce fichier est ""présent à l'URL ci-dessus, dans le répertoire <literal>hibernate-x.x.x/src/""org/hibernate</literal> ou dans <literal>hibernate3.jar</literal>. Hibernate ""va toujours chercher la DTD dans son classpath en premier lieu. Si vous ""constatez des recherches de la DTD sur Internet, vérifiez votre déclaration ""de DTD par rapport au contenu de votre classpath."#. Tag: title#: basic_mapping.xml:76#, no-c-formatmsgid "EntityResolver"msgstr "EntityResolver"#. Tag: para#: basic_mapping.xml:77#, no-c-formatmsgid """As mentioned previously, Hibernate will first attempt to resolve DTDs in its ""classpath. The manner in which it does this is by registering a custom ""<literal>org.xml.sax.EntityResolver</literal> implementation with the ""SAXReader it uses to read in the xml files. This custom ""<literal>EntityResolver</literal> recognizes two different systemId ""namespaces."msgstr """As mentioned previously, Hibernate will first attempt to resolve DTDs in its ""classpath. The manner in which it does this is by registering a custom ""<literal>org.xml.sax.EntityResolver</literal> implementation with the ""SAXReader it uses to read in the xml files. This custom ""<literal>EntityResolver</literal> recognizes two different systemId ""namespaces."#. Tag: para#: basic_mapping.xml:85#, no-c-formatmsgid """a <literal>hibernate namespace</literal> is recognized whenever the resolver ""encounteres a systemId starting with <literal>http://hibernate.sourceforge.""net/</literal>; the resolver attempts to resolve these entities via the ""classlaoder which loaded the Hibernate classes."msgstr """a <literal>hibernate namespace</literal> is recognized whenever the resolver ""encounteres a systemId starting with <literal>http://hibernate.sourceforge.""net/</literal>; the resolver attempts to resolve these entities via the ""classlaoder which loaded the Hibernate classes."#. Tag: para#: basic_mapping.xml:94#, no-c-formatmsgid """a <literal>user namespace</literal> is recognized whenever the resolver ""encounteres a systemId using a <literal>classpath://</literal> URL protocol; ""the resolver will attempt to resolve these entities via (1) the current ""thread context classloader and (2) the classloader which loaded the ""Hibernate classes."msgstr """a <literal>user namespace</literal> is recognized whenever the resolver ""encounteres a systemId using a <literal>classpath://</literal> URL protocol; ""the resolver will attempt to resolve these entities via (1) the current ""thread context classloader and (2) the classloader which loaded the ""Hibernate classes."#. Tag: para#: basic_mapping.xml:103#, no-c-formatmsgid "An example of utilizing user namespacing:"msgstr "An example of utilizing user namespacing:"#. Tag: programlisting#: basic_mapping.xml:106#, no-c-formatmsgid """<![CDATA[<?xml version=\"1.0\"?>\n""<!DOCTYPE hibernate-mapping PUBLIC\n""        \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n""        \"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd\" [\n""    <!ENTITY types SYSTEM \"classpath://your/domain/types.xml\">\n""]>\n""\n""<hibernate-mapping package=\"your.domain\">\n""    <class name=\"MyEntity\">\n""        <id name=\"id\" type=\"my-custom-id-type\">\n""            ...\n""        </id>\n""    <class>\n""    &types;\n""</hibernate-mapping>]]>"msgstr ""#. Tag: para#: basic_mapping.xml:107#, no-c-formatmsgid """Where <literal>types.xml</literal> is a resource in the <literal>your.""domain</literal> package and contains a custom <link linkend=\"mapping-types-""custom\">typedef</link>."msgstr """Where <literal>types.xml</literal> is a resource in the <literal>your.""domain</literal> package and contains a custom <link linkend=\"mapping-types-""custom\">typedef</link>."#. Tag: title#: basic_mapping.xml:115#, no-c-formatmsgid "hibernate-mapping"msgstr "hibernate-mapping"#. Tag: para#: basic_mapping.xml:117#, no-c-formatmsgid """This element has several optional attributes. The <literal>schema</literal> ""and <literal>catalog</literal> attributes specify that tables referred to in ""this mapping belong to the named schema and/or catalog. If specified, ""tablenames will be qualified by the given schema and catalog names. If ""missing, tablenames will be unqualified. The <literal>default-cascade</""literal> attribute specifies what cascade style should be assumed for ""properties and collections which do not specify a <literal>cascade</literal> ""attribute. The <literal>auto-import</literal> attribute lets us use ""unqualified class names in the query language, by default."msgstr """Cet élément a plusieurs attributs optionnels. Les attributs <literal>schema</""literal> et <literal>catalog</literal> indiquent que les tables référencées ""par ce mapping appartiennent au schéma nommé et/ou au catalogue. S'ils sont ""spécifiés, les noms de tables seront qualifiés par les noms de schéma et ""catalogue. L'attribut <literal>default-cascade</literal> indique quel type ""de cascade sera utlisé par défaut pour les propriétés et collections qui ne ""précisent pas l'attribut <literal>cascade</literal>. L'attribut ""<literal>auto-import</literal> nous permet d'utiliser par défaut des noms de ""classes non qualifiés dans le langage de requête."#. Tag: programlisting#: basic_mapping.xml:138#, no-c-formatmsgid """<![CDATA[<hibernate-mapping\n""         schema=\"schemaName\"\n""         catalog=\"catalogName\"\n""         default-cascade=\"cascade_style\"\n""         default-access=\"field|property|ClassName\"\n""         default-lazy=\"true|false\"\n""         auto-import=\"true|false\"\n""         package=\"package.name\"\n"" />]]>"msgstr ""#. Tag: para#: basic_mapping.xml:141#, no-c-formatmsgid "<literal>schema</literal> (optional): The name of a database schema."msgstr """<literal>schema</literal> (optionnel) : Le nom d'un schéma de base de ""données."#. Tag: para#: basic_mapping.xml:146#, no-c-formatmsgid "<literal>catalog</literal> (optional): The name of a database catalog."msgstr """<literal>catalog</literal> (optionnel) : Le nom d'un catalogue de base de ""données."#. Tag: para#: basic_mapping.xml:151#, no-c-formatmsgid """<literal>default-cascade</literal> (optional - defaults to <literal>none</""literal>): A default cascade style."msgstr """<literal>default-cascade</literal> (optionnel - par défaut vaut : ""<literal>none</literal>) : Un type de cascade par défaut."

⌨️ 快捷键说明

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