📄 filters.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#: filters.xml:5#, no-c-formatmsgid "Filtering data"msgstr "データのフィルタリング"#. Tag: para#: filters.xml:7#, no-c-formatmsgid """Hibernate3 provides an innovative new approach to handling data with ""\"visibility\" rules. A <emphasis>Hibernate filter</emphasis> is a global, ""named, parameterized filter that may be enabled or disabled for a particular ""Hibernate session."msgstr """Hibernate3では「可視性」ルールに基づいてデータを扱うための画期的な方法を用意""しています。 <emphasis>Hibernate filter</emphasis> はグローバルで、名前付き""で、パラメータ化されたフィルタです。 これはHibernateセッションごとに有効無効""を切り替えられます。"#. Tag: title#: filters.xml:14#, no-c-formatmsgid "Hibernate filters"msgstr "Hibernateのフィルタ"#. Tag: para#: filters.xml:16#, no-c-formatmsgid """Hibernate3 adds the ability to pre-define filter criteria and attach those ""filters at both a class and a collection level. A filter criteria is the ""ability to define a restriction clause very similiar to the existing \"where""\" attribute available on the class and various collection elements. Except ""these filter conditions can be parameterized. The application can then make ""the decision at runtime whether given filters should be enabled and what ""their parameter values should be. Filters can be used like database views, ""but parameterized inside the application."msgstr """Hibernate3はフィルタクライテリアをあらかじめ定義し、 これらのフィルタをクラス""やコレクションレベルに加える機能を加えました。 フィルタクライテリアは制約節を""定義する機能です。 これらのフィルタ条件はパラメータ化できるということを除""き、 クラスやさまざまなコレクション要素で利用可能な「where」句に非常によく似て""います。 アプリケーションは、与えられたフィルタを可能にすべきか、 そしてその""パラメータ値を何にすべきかを実行時に決定することができます。 フィルタはデータ""ベースビューのように使用されますが、アプリケーション内ではパラメータ化されま""す。"#. Tag: para#: filters.xml:26#, no-c-formatmsgid """In order to use filters, they must first be defined and then attached to the ""appropriate mapping elements. To define a filter, use the <literal><""filter-def/></literal> element within a <literal><hibernate-mapping/""></literal> element:"msgstr """フィルタを使うためにはまず、適切なマッピング要素に定義、追加しなくてはなりま""せん。 フィルタを定義するためには、 <literal><hibernate-mapping/></""literal> 要素内で <literal><filter-def/></literal> 要素を使用します。:"#. Tag: programlisting#: filters.xml:32#, no-c-formatmsgid """<![CDATA[<filter-def name=\"myFilter\">\n"" <filter-param name=\"myFilterParam\" type=\"string\"/>\n""</filter-def>]]>"msgstr ""#. Tag: para#: filters.xml:34#, no-c-formatmsgid "Then, this filter can be attached to a class:"msgstr "そうしてフィルタはクラスへと結び付けられます。:"#. Tag: programlisting#: filters.xml:38#, no-c-formatmsgid """<![CDATA[<class name=\"myClass\" ...>\n"" ...\n"" <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</class>]]>"msgstr ""#. Tag: para#: filters.xml:40#, no-c-formatmsgid "or, to a collection:"msgstr "また、コレクションに対しては次のようになります。:"#. Tag: programlisting#: filters.xml:44#, no-c-formatmsgid """<![CDATA[<set ...>\n"" <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</set>]]>"msgstr ""#. Tag: para#: filters.xml:46#, no-c-formatmsgid "or, even to both (or multiples of each) at the same time."msgstr "どちらに対しても(また、それぞれを複数)同時に設定することもできます。"#. Tag: para#: filters.xml:50#, no-c-formatmsgid """The methods on <literal>Session</literal> are: <literal>enableFilter(String ""filterName)</literal>, <literal>getEnabledFilter(String filterName)</""literal>, and <literal>disableFilter(String filterName)</literal>. By ""default, filters are <emphasis>not</emphasis> enabled for a given session; ""they must be explcitly enabled through use of the <literal>Session.""enabledFilter()</literal> method, which returns an instance of the ""<literal>Filter</literal> interface. Using the simple filter defined above, ""this would look like:"msgstr """<literal>Session</literal> 上のメソッドは <literal>enableFilter(String ""filterName)</literal>, <literal>getEnabledFilter(String filterName)</""literal>, <literal>disableFilter(String filterName)</literal> です。 デフォル""トでは、フィルタは与えられたセッションに対して使用 <emphasis>できません</""emphasis> 。 <literal>Filter</literal> インスタンスを返り値とする ""<literal>Session.enabledFilter()</literal> メソッドを使うことで、 フィルタは""明示的に使用可能となります。 上で定義した単純なフィルタの使用は、このようにな""ります。:"#. Tag: programlisting#: filters.xml:59#, no-c-formatmsgid """<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", ""\"some-value\");]]>"msgstr ""#. Tag: para#: filters.xml:61#, no-c-formatmsgid """Note that methods on the org.hibernate.Filter interface do allow the method-""chaining common to much of Hibernate."msgstr """org.hibernate.Filterインターフェイスのメソッドは、 Hibernateの多くに共通して""いるメソッド連鎖を許していることに注意してください。"#. Tag: para#: filters.xml:65#, no-c-formatmsgid """A full example, using temporal data with an effective record date pattern:"msgstr "有効なレコードデータパターンを持つ一時データを使った完全な例です:"#. Tag: programlisting#: filters.xml:69#, no-c-formatmsgid """<![CDATA[<filter-def name=\"effectiveDate\">\n"" <filter-param name=\"asOfDate\" type=\"date\"/>\n""</filter-def>\n""\n""<class name=\"Employee\" ...>\n""...\n"" <many-to-one name=\"department\" column=\"dept_id\" class=\"Department\"/"">\n"" <property name=\"effectiveStartDate\" type=\"date\" column=\"eff_start_dt""\"/>\n"" <property name=\"effectiveEndDate\" type=\"date\" column=\"eff_end_dt\"/"">\n""...\n"" <!--\n"" Note that this assumes non-terminal records have an eff_end_dt set ""to\n"" a max db date for simplicity-sake\n"" -->\n"" <filter name=\"effectiveDate\"\n"" condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/>\n""</class>\n""\n""<class name=\"Department\" ...>\n""...\n"" <set name=\"employees\" lazy=\"true\">\n"" <key column=\"dept_id\"/>\n"" <one-to-many class=\"Employee\"/>\n"" <filter name=\"effectiveDate\"\n"" condition=\":asOfDate BETWEEN eff_start_dt and eff_end_dt\"/"">\n"" </set>\n""</class>]]>"msgstr ""#. Tag: para#: filters.xml:71#, no-c-formatmsgid """Then, in order to ensure that you always get back currently effective ""records, simply enable the filter on the session prior to retrieving ""employee data:"msgstr """常に現在の有効レコードを返却することを保証するために、 単純に、社員データの検""索より前にセッション上のフィルタを有効にします。"#. Tag: programlisting#: filters.xml:76#, no-c-formatmsgid """<![CDATA[Session session = ...;\n""session.enabledFilter(\"effectiveDate\").setParameter(\"asOfDate\", new Date""());\n""List results = session.createQuery(\"from Employee as e where e.salary > :""targetSalary\")\n"" .setLong(\"targetSalary\", new Long(1000000))\n"" .list();\n""]]>"msgstr ""#. Tag: para#: filters.xml:78#, no-c-formatmsgid """In the HQL above, even though we only explicitly mentioned a salary ""constraint on the results, because of the enabled filter the query will ""return only currently active employees who have a salary greater than a ""million dollars."msgstr """上記のHQLでは、結果の給料の制約について明示的に触れただけですが、 有効になっ""ているフィルタのおかげで、このクエリは給料が100万ドル以上の現役の社員だけを返""します。"#. Tag: para#: filters.xml:84#, no-c-formatmsgid """Note: if you plan on using filters with outer joining (either through HQL or ""load fetching) be careful of the direction of the condition expression. Its ""safest to set this up for left outer joining; in general, place the ""parameter first followed by the column name(s) after the operator."msgstr """(HQLかロードフェッチで)外部結合を持つフィルタを使うつもりなら、 条件式の方向""に注意してください。 これは左外部結合のために設定するのが最も安全です。 一般""的に、演算子の後カラム名に続けて最初のパラメータを配置してください。"#. Tag: para#: filters.xml:91#, no-c-formatmsgid """After being defined a filter might be attached to multiple entities and/or ""collections each with its own condition. That can be tedious when the ""conditions are the same each time. Thus <literal><filter-def/></""literal> allows defining a default condition, either as an attribute or ""CDATA:"msgstr "translator-credits"#. Tag: programlisting#: filters.xml:98#, no-c-formatmsgid """<![CDATA[<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</filter-""def>\n""<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>]]>"msgstr ""#. Tag: para#: filters.xml:100#, no-c-formatmsgid """This default condition will then be used whenever the filter is attached to ""something without specifying a condition. Note that this means you can give ""a specific condition as part of the attachment of the filter which overrides ""the default condition in that particular case."msgstr ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -