alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Hibernate example source code file (filters.po)

This example Hibernate source code file (filters.po) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Hibernate tags/keywords

employee, filter, filter, filters, hibernate, hibernate, my_filtered_column, session, sie, sie, tag, tag, the, this

The Hibernate filters.po source code

# translation of Collection_Mapping.po to 
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# translation of Collection_Mapping.po to
# Language /mnt/hgfs/base/Hibernate/Reference translations for PACKAGE package.
# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
# Automatically generated, 2006.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
# , 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: Collection_Mapping\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2010-07-20 21:02+0000\n"
"PO-Revision-Date: 2007-02-26 10:27+1000\n"
"Last-Translator: \n"
"Language-Team:  <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.9.1\n"

#. Tag: title
#: filters.xml:31
#, no-c-format
msgid "Filtering data"
msgstr "Das Filtern von Daten"

#. Tag: para
#: filters.xml:33
#, fuzzy, no-c-format
msgid ""
"Hibernate3 provides an innovative new approach to handling data with "
"\"visibility\" rules. A <emphasis>Hibernate filter is a global, "
"named, parameterized filter that can be enabled or disabled for a particular "
"Hibernate session."
msgstr ""
"Hibernate3 bietet eine innovative, neue Möglichkeit des Umgangs mit Daten "
"mittels \"Sichtbarkeits\"regeln. Bei einem <emphasis>Hibernate Filter@org.hibernate.annotations.FilterDefsname() and an "
"array of parameters(). A parameter will allow you to adjust the behavior of "
"the filter at runtime. Each parameter is defined by a <literal>@ParamDef parameter for a given "
"<literal>@FilterDef to set the default condition to use when none "
"are defined in each individual <literal>@Filter. "
"<literal>@FilterDef(s) can be defined at the class or package "
"level."
msgstr ""

#. Tag: para
#: filters.xml:63
#, no-c-format
msgid ""
"We now need to define the SQL filter clause applied to either the entity "
"load or the collection load. <literal>@Filter is used and placed "
"either on the entity or the collection element. The connection between "
"<classname>@FilterName and @Filter is a "
"matching name."
msgstr ""

#. Tag: title
#: filters.xml:70
#, no-c-format
msgid "@FilterDef and @Filter annotations"
msgstr ""

#. Tag: programlisting
#: filters.xml:72
#, no-c-format
msgid ""
"@Entity\n"
"@FilterDef(name=\"minLength\", parameters=@ParamDef( name=\"minLength\", "
"type=\"integer\" ) )\n"
"@Filters( {\n"
"    @Filter(name=\"betweenLength\", condition=\":minLength <= length and :"
"maxLength >= length\"),\n"
"    @Filter(name=\"minLength\", condition=\":minLength <= length\")\n"
"} )\n"
"public class Forest { ... }"
msgstr ""

#. Tag: para
#: filters.xml:75
#, no-c-format
msgid ""
"When the collection use an association table as a relational representation, "
"you might want to apply the filter condition to the association table itself "
"or to the target entity table. To apply the constraint on the target entity, "
"use the regular <literal>@Filter annotation. However, if you want "
"to target the association table, use the <literal>@FilterJoinTable "
"annotation."
msgstr ""

#. Tag: title
#: filters.xml:84
#, no-c-format
msgid ""
"Using <classname>@FilterJoinTable for filterting on the "
"association table"
msgstr ""

#. Tag: programlisting
#: filters.xml:87
#, no-c-format
msgid ""
"@OneToMany\n"
"    @JoinTable\n"
"    //filter on the target entity table\n"
"    @Filter(name=\"betweenLength\", condition=\":minLength <= length and :"
"maxLength >= length\")\n"
"    //filter on the association table\n"
"    @FilterJoinTable(name=\"security\", condition=\":userlevel >= "
"requredLevel\")\n"
"    public Set<Forest> getForests() { ... }"
msgstr ""

#. Tag: para
#: filters.xml:90
#, fuzzy, no-c-format
msgid ""
"Using Hibernate mapping files for defining filters the situtation is very "
"similar. The filters 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 <hibernate-mapping/"
"></literal> element:"
msgstr ""
"Um Filter zu benutzen müssen diese zunächst definiert und anschließend den "
"betreffenden Mapping-Elementen zugefügt werden. Um einen Filter zu "
"definieren, verwenden Sie das <literal><filter-def/>-Element "
"innerhalb eines <literal><hibernate-mapping/>-Elements:"

#. Tag: title
#: filters.xml:97
#, no-c-format
msgid "Defining a filter definition via <literal><filter-def>"
msgstr ""

#. Tag: programlisting
#: filters.xml:100
#, fuzzy, no-c-format
msgid ""
"<filter-def name=\"myFilter\">\n"
"    <filter-param name=\"myFilterParam\" type=\"string\"/>\n"
"</filter-def>"
msgstr ""
"<filter-def name=\"myFilter\">\n"
"    <filter-param name=\"myFilterParam\" type=\"string\"/>\n"
"</filter-def>"

#. Tag: para
#: filters.xml:103
#, fuzzy, no-c-format
msgid ""
"This filter can then be attached to a class or collection (or, to both or "
"multiples of each at the same time):"
msgstr "oder gar beiden (oder mehreren von beiden) gleichzeitig."

#. Tag: title
#: filters.xml:107
#, no-c-format
msgid ""
"Attaching a filter to a class or collection using <literal><filter> are: enableFilter(String "
"filterName)</literal>, getEnabledFilter(String filterName)disableFilter(String filterName). By "
"default, filters are <emphasis>not enabled for a given session. "
"Filters must be enabled through use of the <literal>Session.enableFilter()Filter "
"interface. If you used the simple filter defined above, it would look like "
"this:"
msgstr ""
"Die Methoden an <literal>Session sind: enableFilter"
"(String filterName)</literal>, getEnabledFilter(String filterName)disableFilter(String filterName). "
"Standardmäßig werden Filter <emphasis>nicht für eine vorgegebene "
"Session verwendet, sondern müssen mittels der <literal>Session.enabledFilter"
"()</literal>-Methode, die eine Instanz des Filter-"
"Interface wiedergibt, explizit aktiviert werden. Die Verwendung des oben "
"definierten, einfachen Filters würde wie folgt aussehen:"

#. Tag: programlisting
#: filters.xml:123
#, fuzzy, no-c-format
msgid ""
"session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", \"some-"
"value\");"
msgstr ""
"session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", \"some-"
"value\");"

#. Tag: para
#: filters.xml:125
#, fuzzy, no-c-format
msgid ""
"Methods on the org.hibernate.Filter interface do allow the method-chaining "
"common to much of Hibernate."
msgstr ""
"Bitte beachten Sie, dass Methoden am org.hibernate.Filter-Interface "
"Methodenverkettung - wie in den meisten Teilen von Hibernate üblich - "
"erlauben."

#. Tag: para
#: filters.xml:128
#, fuzzy, no-c-format
msgid ""
"The following is a full example, using temporal data with an effective "
"record date pattern:"
msgstr ""
"Nachfolgend sehen Sie ein vollständiges Beispiel unter Verwendung temporaler "
"Daten mit effektivem Datumsformat für den Datensatz:"

#. Tag: programlisting
#: filters.xml:131
#, fuzzy, no-c-format
msgid ""
"<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 ""
"<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>"

#. Tag: para
#: filters.xml:133
#, fuzzy, no-c-format
msgid ""
"In order to ensure that you are provided with currently effective records, "
"enable the filter on the session prior to retrieving employee data:"
msgstr ""
"Anschließend aktivieren Sie einfach den Filter an der Session vor dem Abruf "
"der Angestelltendaten um sicherzustellen, dass Sie stets die aktuell "
"wirksamen Datensätze erhalten:"

#. Tag: programlisting
#: filters.xml:137
#, fuzzy, no-c-format
msgid ""
"Session session = ...;\n"
"session.enableFilter(\"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();"
msgstr ""
"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();"

#. Tag: para
#: filters.xml:139
#, fuzzy, no-c-format
msgid ""
"Even though a salary constraint was mentioned explicitly on the results in "
"the above HQL, because of the enabled filter, the query will return only "
"currently active employees who have a salary greater than one million "
"dollars."
msgstr ""
"In der vorherigen HQL antwortet die Anfrage wegen des aktivierten Filters "
"nur mit aktuell aktiven Angestellten, deren Gehalt höher als eine Million "
"Dollar ist, obwohl lediglich eine Gehaltsbedingung formuliert wurde."

#. Tag: para
#: filters.xml:144
#, fuzzy, no-c-format
msgid ""
"If you want to use filters with outer joining, either through HQL or load "
"fetching, be careful of the direction of the condition expression. It is "
"safest to set this up for left outer joining. Place the parameter first "
"followed by the column name(s) after the operator."
msgstr ""
"Hinweis: Falls Sie vorhaben, Filter mit \"outer-Joining\" zu verwenden "
"(entweder durch HQL oder Load-Abruf) achten Sie auf die Richtung des "
"Bedingungsausdrucks. Am sichersten ist es, das Ganze für \"left-outer-Joining"
"\" einzurichten. Generell sollte der Parameter zuerst gesetzt werden und "
"anschließend der (die) Spaltenname(n) nach dem Operator."

#. Tag: para
#: filters.xml:149
#, fuzzy, no-c-format
msgid ""
"After being defined, a filter might be attached to multiple entities and/or "
"collections each with its own condition. This can be problematic when the "
"conditions are the same each time. Using <literal><filter-def/> die Definition einer "
"Standardbedingung als Attribut oder als CDATA:"

#. Tag: programlisting
#: filters.xml:155
#, fuzzy, no-c-format
msgid ""
"<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</"
"filter-def>\n"
"<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>"
msgstr ""
"<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</"
"filter-def>\n"
"<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>"

#. Tag: para
#: filters.xml:157
#, fuzzy, no-c-format
msgid ""
"This default condition will be used whenever the filter is attached to "
"something without specifying a condition. This means you can give a specific "
"condition as part of the attachment of the filter that overrides the default "
"condition in that particular case."
msgstr ""
"Diese Standardbedingung wird dann verwendet, wenn der Filter zu etwas "
"hinzugefügt wird, ohne dass eine Bedingung spezifiziert wird. Bitte beachten "
"Sie, dass dies bedeutet, dass Sie eine spezielle Bedingung als Teil des "
"Filteranhangs festlegen können, die die Standardbedingung in diesem "
"bestimmten Fall außer Kraft setzt."

#, fuzzy
#~ msgid "This filter can then be attached to a class:"
#~ msgstr "Anschließend kann dieser Filter einer Klasse zugefügt werden:"

#, fuzzy
#~ msgid "Or, to a collection:"
#~ msgstr "oder einer Collection:"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<class name=\"myClass\" ...>\n"
#~ "    ...\n"
#~ "    <filter name=\"myFilter\" condition=\":myFilterParam = "
#~ "MY_FILTERED_COLUMN\"/>\n"
#~ "</class>"

#, fuzzy
#~ msgid ""
#~ "<![CDATA["
#~ msgstr ""
#~ "<set ...>\n"
#~ "    <filter name=\"myFilter\" condition=\":myFilterParam = "
#~ "MY_FILTERED_COLUMN\"/>\n"
#~ "</set>"

Other Hibernate examples (source code examples)

Here is a short list of links related to this Hibernate filters.po source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.