📄 filters.pot
字号:
msgid ""msgstr """Project-Id-Version: PACKAGE VERSION\n""POT-Creation-Date: 2007-10-19 10:32-0500\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"#: filters.xml:5(title) msgid "Filtering data"msgstr ""#: filters.xml:7(para) msgid "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 ""#: filters.xml:14(title) msgid "Hibernate filters"msgstr ""#: filters.xml:16(para) msgid "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 ""#: filters.xml:26(para) msgid "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 ""#: filters.xml:36(para) msgid "Then, this filter can be attached to a class:"msgstr ""#: filters.xml:45(para) msgid "or, to a collection:"msgstr ""#: filters.xml:53(para) msgid "or, even to both (or multiples of each) at the same time."msgstr ""#: filters.xml:57(para) msgid "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 ""#: filters.xml:68(para) msgid "Note that methods on the org.hibernate.Filter interface do allow the method-chaining common to much of Hibernate."msgstr ""#: filters.xml:72(para) msgid "A full example, using temporal data with an effective record date pattern:"msgstr ""#: filters.xml:104(para) msgid "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 ""#: filters.xml:116(para) msgid "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 ""#: filters.xml:122(para) msgid "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 ""#: filters.xml:129(para) msgid "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 ""#: filters.xml:139(para) msgid "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 ""#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2.#: filters.xml:0(None) msgid "translator-credits"msgstr ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -