📄 basic_mapping.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:47+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:5#, no-c-formatmsgid "Basic O/R Mapping"msgstr "Mapeamento O/R Bassico"#. Tag: title#: basic_mapping.xml:8#, no-c-formatmsgid "Mapping declaration"msgstr "Declaração de mapeamento"#. Tag: para#: basic_mapping.xml:10#, 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 """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."#. Tag: para#: basic_mapping.xml:17#, 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 """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."#. Tag: para#: basic_mapping.xml:23#, no-c-formatmsgid "Lets kick off with an example mapping:"msgstr "Lets kick off with an example mapping:"#. Tag: programlisting#: basic_mapping.xml:27#, 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:29#, 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 """Discutir agora o conteúdo deste documento de mapeamento. Iremos apenas ""descrever os elementos do documento e atributos que são utilizados pelo ""Hibernate em tempo de execução. O documento de mapeamento também contém ""alguns atributos adicionais e opcionais além de elementos que afetam os ""esquemas de banco de dados exportados pela ferramenta de exportação de ""esquemas. (Por exemplo, o atributo <literal>not-null</literal>)."#. Tag: title#: basic_mapping.xml:40#, no-c-formatmsgid "Doctype"msgstr "Doctype"#. Tag: para#: basic_mapping.xml:42#, 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 """Todos os mapeamentos de XML devem declarar o doctype exibido. O DTD atual ""pode ser encontrado na URL abaixo, no diretório <literal>hibernate-x.x.x/src/""org/ hibernate </literal> ou no <literal>hibernate3.jar</literal>. O ""Hibernate sempre irá procurar pelo DTD inicialmente no seu classpath. Se ""você tentar localizar o DTD usando uma conexão de internet, compare a ""declaração do seu DTD com o conteúdo do seu classpath"#. Tag: title#: basic_mapping.xml:52#, no-c-formatmsgid "EntityResolver"msgstr "EntityResolver"#. Tag: para#: basic_mapping.xml:53#, 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:61#, 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:70#, 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:79#, no-c-formatmsgid "An example of utilizing user namespacing:"msgstr "An example of utilizing user namespacing:"#. Tag: programlisting#: basic_mapping.xml:82#, 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:83#, 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 <xref linkend=\"mapping-types-""custom\">typedef</xref>."#. Tag: title#: basic_mapping.xml:91#, no-c-formatmsgid "hibernate-mapping"msgstr "hibernate-mapping"#. Tag: para#: basic_mapping.xml:93#, 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 """Este elemento tem diversos atributos opcionais. Os atributos ""<literal>schema</literal> e <literal>catalog</literal> especificam que ""tabelas referenciadas neste mapeamento pertencem ao esquema e/ou ao catalogo ""nomeado. Se especificados, os nomes das tabelas irão ser qualificados no ""schema ou catalog dado. Se não, os nomes das tabelas não serão qualificados. ""O atributo <literal>default-cascade </literal> especifica qual estilo de ""cascata será assumido pelas propriedades e coleções que não especificarm um ""atributo <literal>cascade</literal>. O atributo <literal>auto-import</""literal> nos deixa utilizar nomes de classes não qualificados na linguagem ""de consulta, por default."#. Tag: programlisting#: basic_mapping.xml:114#, 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:117#, no-c-formatmsgid "<literal>schema</literal> (optional): The name of a database schema."msgstr """<literal>schema</literal> (opcional): O nome do esquema do banco de dados."#. Tag: para#: basic_mapping.xml:122#, no-c-formatmsgid "<literal>catalog</literal> (optional): The name of a database catalog."msgstr """<literal>catalog</literal> (opcional): O nome do catálogo do banco de dados."#. Tag: para#: basic_mapping.xml:127#, no-c-formatmsgid """<literal>default-cascade</literal> (optional - defaults to <literal>none</""literal>): A default cascade style."msgstr """<literal>default-cascade</literal> (opcional – default é <literal>nenhum </""literal>): Um estilo cascata default."#. Tag: para#: basic_mapping.xml:133#, no-c-format
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -