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

📄 configuration.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
📖 第 1 页 / 共 5 页
字号:
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#: configuration.xml:5#, no-c-formatmsgid "Configuration"msgstr "設定"#. Tag: para#: configuration.xml:7#, no-c-formatmsgid """Because Hibernate is designed to operate in many different environments, ""there are a large number of configuration parameters. Fortunately, most have ""sensible default values and Hibernate is distributed with an example ""<literal>hibernate.properties</literal> file in <literal>etc/</literal> that ""shows the various options. Just put the example file in your classpath and ""customize it."msgstr """Hibernateはさまざまな環境で動作するようにデザインされているため、非常に多くの""設定要素があります。 幸いなことに、Hibernateは、公開されているパッケージの ""<literal>etc/</literal> フォルダの <literal>hibernate.properties</literal> ""に、ほとんどの設定要素の適切なデフォルト値が記述されています。 この ""<literal>hibernate.properties</literal> をクラスパスに設定し、設定要素をカス""タマイズするだけです。"#. Tag: title#: configuration.xml:16#, no-c-formatmsgid "Programmatic configuration"msgstr "プログラム上の設定"#. Tag: para#: configuration.xml:18#, no-c-formatmsgid """An instance of <literal>org.hibernate.cfg.Configuration</literal> represents ""an entire set of mappings of an application's Java types to an SQL database. ""The <literal>Configuration</literal> is used to build an (immutable) ""<literal>SessionFactory</literal>. The mappings are compiled from various ""XML mapping files."msgstr """<literal>org.hibernate.cfg.Configuration</literal> のインスタンスは、 Javaの""型とSQLデータベースのマッピング情報をすべて持っています。 The ""<literal>Configuration</literal> は、(不変の) <literal>SessionFactory</""literal> を生成するときに使用します。 複数のXMLマッピングファイルを変換し、""マッピング情報にします。"#. Tag: para#: configuration.xml:26#, no-c-formatmsgid """You may obtain a <literal>Configuration</literal> instance by instantiating ""it directly and specifying XML mapping documents. If the mapping files are ""in the classpath, use <literal>addResource()</literal>:"msgstr """通常、<literal>Configuration</literal> インスタンスは、特定のXMLマッピング""ファイル によって直接初期化されます。もし、マッピングファイルがクラスパスに設""定されている場合、 次のメソッドを使ってください。 <literal>addResource()</""literal> :"#. Tag: programlisting#: configuration.xml:32#, no-c-formatmsgid """<![CDATA[Configuration cfg = new Configuration()\n""    .addResource(\"Item.hbm.xml\")\n""    .addResource(\"Bid.hbm.xml\");]]>"msgstr ""#. Tag: para#: configuration.xml:34#, no-c-formatmsgid """An alternative (sometimes better) way is to specify the mapped class, and ""let Hibernate find the mapping document for you:"msgstr """代替案(こちらのほうが良いときもあります)としてマッピングクラスを指定する方法""もあります。Hibernateに、マッピングファイルを 見つけさせてください:"#. Tag: programlisting#: configuration.xml:39#, no-c-formatmsgid """<![CDATA[Configuration cfg = new Configuration()\n""    .addClass(org.hibernate.auction.Item.class)\n""    .addClass(org.hibernate.auction.Bid.class);]]>"msgstr ""#. Tag: para#: configuration.xml:41#, no-c-formatmsgid """Then Hibernate will look for mapping files named <literal>/org/hibernate/""auction/Item.hbm.xml</literal> and <literal>/org/hibernate/auction/Bid.hbm.""xml</literal> in the classpath. This approach eliminates any hardcoded ""filenames."msgstr """Hibernateは、クラスパスにある以下のような名前のマッピングファイルを見つけま""す。 <literal>/org/hibernate/auction/Item.hbm.xml</literal> 、 <literal>/org/""hibernate/auction/Bid.hbm.xml</literal> 。 この方法だと、ハードコーディングさ""れたファイル名を排除できます。"#. Tag: para#: configuration.xml:48#, no-c-formatmsgid """A <literal>Configuration</literal> also allows you to specify configuration ""properties:"msgstr """<literal>Configuration</literal> は、設定プロパティを指定することもできます:"#. Tag: programlisting#: configuration.xml:53#, no-c-formatmsgid """<![CDATA[Configuration cfg = new Configuration()\n""    .addClass(org.hibernate.auction.Item.class)\n""    .addClass(org.hibernate.auction.Bid.class)\n""    .setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.""MySQLInnoDBDialect\")\n""    .setProperty(\"hibernate.connection.datasource\", \"java:comp/env/jdbc/""test\")\n""    .setProperty(\"hibernate.order_updates\", \"true\");]]>"msgstr ""#. Tag: para#: configuration.xml:55#, no-c-formatmsgid """This is not the only way to pass configuration properties to Hibernate. The ""various options include:"msgstr """Hibernateに設定プロパティを通す方法は1つではありません。 さまざまなオプション""を用意しています:"#. Tag: para#: configuration.xml:62#, no-c-formatmsgid """Pass an instance of <literal>java.util.Properties</literal> to ""<literal>Configuration.setProperties()</literal>."msgstr """<literal>java.util.Properties</literal> インスタンスを ""<literal>Configuration.setProperties()</literal> に渡します。"#. Tag: para#: configuration.xml:68#, no-c-formatmsgid """Place <literal>hibernate.properties</literal> in a root directory of the ""classpath."msgstr """<literal>hibernate.properties</literal> を クラスパスのルートディレクトリに置""きます。"#. Tag: para#: configuration.xml:74#, no-c-formatmsgid """Set <literal>System</literal> properties using <literal>java -""Dproperty=value</literal>."msgstr """<literal>System</literal> プロパティが <literal>java -Dproperty=value</""literal> を使うように設定します。"#. Tag: para#: configuration.xml:80#, no-c-formatmsgid """Include <literal>&lt;property&gt;</literal> elements in <literal>hibernate.""cfg.xml</literal> (discussed later)."msgstr """<literal>&lt;property&gt;</literal> 要素を <literal>hibernate.cfg.xml</""literal> (後述)に設定します。"#. Tag: para#: configuration.xml:87#, no-c-formatmsgid """<literal>hibernate.properties</literal> is the easiest approach if you want ""to get started quickly."msgstr """今すぐ始めたいのなら、<literal>hibernate.properties</literal> を使うのが一番""の近道です。"#. Tag: para#: configuration.xml:92#, no-c-formatmsgid """The <literal>Configuration</literal> is intended as a startup-time object, ""to be discarded once a <literal>SessionFactory</literal> is created."msgstr """<literal>Configuration</literal> は、起動時にだけあるオブジェクトであり、 一""度 <literal>SessionFactory</literal> を生成した後は、破棄されることを意図して""います。"#. Tag: title#: configuration.xml:100#, no-c-formatmsgid "Obtaining a SessionFactory"msgstr "SessionFactoryを取得する"#. Tag: para#: configuration.xml:102#, no-c-formatmsgid """When all mappings have been parsed by the <literal>Configuration</literal>, ""the application must obtain a factory for <literal>Session</literal> ""instances. This factory is intended to be shared by all application threads:"msgstr """<literal>Configuration</literal> がすべてのマッピング情報を解析したら、 アプ""リケーションは、 <literal>Session</literal> ファクトリインスタンスを取得しま""す。 このSessionFactoryは、Hibernateを使用するすべてのスレッドで共有されるべ""きです。"#. Tag: programlisting#: configuration.xml:108#, no-c-formatmsgid "<![CDATA[SessionFactory sessions = cfg.buildSessionFactory();]]>"msgstr ""#. Tag: para#: configuration.xml:110#, no-c-formatmsgid """Hibernate does allow your application to instantiate more than one ""<literal>SessionFactory</literal>. This is useful if you are using more than ""one database."msgstr """Hibernateは、 <literal>SessionFactory</literal> を複数生成することができま""す。 これは、複数のデータベースを使用する場合に便利です。"#. Tag: title#: configuration.xml:119#, no-c-formatmsgid "JDBC connections"msgstr "JDBCコネクション"#. Tag: para#: configuration.xml:121#, no-c-formatmsgid """Usually, you want to have the <literal>SessionFactory</literal> create and ""pool JDBC connections for you. If you take this approach, opening a ""<literal>Session</literal> is as simple as:"msgstr """通常、開発者は <literal>SessionFactory</literal> を生成し、SessionFactoryで""JDBCコネクションをプーリングしたいと考えます。 そのアプローチを採用する場合、""単純に <literal>Session</literal> をオープンしてください:"#. Tag: programlisting#: configuration.xml:127#, no-c-formatmsgid """<![CDATA[Session session = sessions.openSession(); // open a new Session]]>"msgstr ""#. Tag: para#: configuration.xml:129#, no-c-formatmsgid """As soon as you do something that requires access to the database, a JDBC ""connection will be obtained from the pool."msgstr """これだけで、プーリングしたJDBCコネクションを使って目的のデータベース にアクセ""スすることができます。"#. Tag: para#: configuration.xml:134#, no-c-formatmsgid """For this to work, we need to pass some JDBC connection properties to ""Hibernate. All Hibernate property names and semantics are defined on the ""class <literal>org.hibernate.cfg.Environment</literal>. We will now describe ""the most important settings for JDBC connection configuration."msgstr """そのためには、JDBCコネクションのプロパティをHibernateに設定する必要がありま""す。 すべてのHibernateプロパティ名とセマンティクスは <literal>org.hibernate.""cfg.Environment</literal> クラスに定義されています。 この設定はJDBCコネクショ""ン設定の中で一番重要なものです。"#. Tag: para#: configuration.xml:141#, no-c-formatmsgid """Hibernate will obtain (and pool) connections using <literal>java.sql.""DriverManager</literal> if you set the following properties:"msgstr """もし、以下のプロパティを設定すると、Hibernateはコネクションを取得する(プール""も)ために <literal>java.sql.DriverManager</literal> を使います。"#. Tag: title#: configuration.xml:147#, no-c-formatmsgid "Hibernate JDBC Properties"msgstr "Hibernate JDBCプロパティ"#. Tag: entry#: configuration.xml:153 configuration.xml:241 configuration.xml:338#: configuration.xml:529 configuration.xml:725 configuration.xml:832#: configuration.xml:920#, no-c-formatmsgid "Property name"msgstr "プロパティ名"#. Tag: entry#: configuration.xml:154 configuration.xml:242 configuration.xml:339#: configuration.xml:530 configuration.xml:726 configuration.xml:833#: configuration.xml:921#, no-c-formatmsgid "Purpose"msgstr "意味"#. Tag: literal#: configuration.xml:160#, no-c-formatmsgid "hibernate.connection.driver_class"msgstr "hibernate.connection.driver_class"#. Tag: emphasis#: configuration.xml:163#, no-c-formatmsgid "JDBC driver class"msgstr "JDBCドライバクラス"#. Tag: literal#: configuration.xml:168#, no-c-formatmsgid "hibernate.connection.url"msgstr "hibernate.connection.url"#. Tag: emphasis#: configuration.xml:171#, no-c-formatmsgid "JDBC URL"msgstr "jdbc URL"#. Tag: literal#: configuration.xml:176 configuration.xml:272#, no-c-formatmsgid "hibernate.connection.username"msgstr "hibernate.connection.username"#. Tag: emphasis#: configuration.xml:179#, no-c-formatmsgid "database user"msgstr "database user"#. Tag: literal#: configuration.xml:184 configuration.xml:280#, no-c-formatmsgid "hibernate.connection.password"msgstr "hibernate.connection.password"#. Tag: emphasis#: configuration.xml:187#, no-c-formatmsgid "database user password"msgstr "database user password"#. Tag: literal#: configuration.xml:192#, no-c-formatmsgid "hibernate.connection.pool_size"msgstr "hibernate.connection.pool_size"#. Tag: emphasis#: configuration.xml:195#, no-c-formatmsgid "maximum number of pooled connections"msgstr "プールするコネクションの最大数"#. Tag: para#: configuration.xml:202#, no-c-formatmsgid """Hibernate's own connection pooling algorithm is however quite rudimentary. ""It is intended to help you get started and is <emphasis>not intended for use ""in a production system</emphasis> or even for performance testing. You ""should use a third party pool for best performance and stability. Just ""replace the <literal>hibernate.connection.pool_size</literal> property with ""connection pool specific settings. This will turn off Hibernate's internal ""pool. For example, you might like to use C3P0."

⌨️ 快捷键说明

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