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

📄 filters.po

📁 hibernate 开源框架的代码 jar包希望大家能喜欢
💻 PO
字号:
#, fuzzymsgid ""msgstr """PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Content-Type: text/plain; charset=utf-8\n"#: index.docbook:5msgid "Filtering data"msgstr "Filtrando datos"#: index.docbook:7msgid """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 provee un nuevo enfoque innovador para manejar datos con reglas ""de \"visibilidad\". Un <emphasis>filtro de Hibernate</emphasis> es un filtro ""global, con nombre y parametrizado que puede ser habilitado o deshabilitado ""para una sesión de Hibernate en particular."#: index.docbook:14msgid "Hibernate filters"msgstr "Filtros de Hibernate"#: index.docbook:16msgid """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 añade la habilidad de predefinir criterios de filtros y unir esos ""filtros tanto a nivel de una clase como de una colección. Un criterio de ""filtro es la habilidad de definir una cláusula de restricción muy similar al ""atributo existente \"where\" disponible en el elemento class y varios ""elementos de colección. Excepto en que estos filtros pueden ser ""parametrizados. La aplicación puede tomar la decisión en tiempo de ejecución ""de qué filtros deben estar habilitados y cuáles deben ser sus parámetros. ""Los filtros pueden ser usados como vistas de base de datos, pero ""parametrizados dentro de la aplicación."#: index.docbook:26msgid """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>&lt;""filter-def/&gt;</literal> element within a <literal>&lt;hibernate-mapping/""&gt;</literal> element:"msgstr """Para usar los filtros, éstos deben primero ser definidos y luego unidos a ""los elementos de mapeo apropiados. Para definir un filtro, usa el elemento ""<literal>&lt;filter-def/&gt;</literal> dentro de un elemento <literal>&lt;""hibernate-mapping/&gt;</literal>:"#: index.docbook:32msgid """<![CDATA[<filter-def name=\"myFilter\">\n""    <filter-param name=\"myFilterParam\" type=\"string\"/>\n""</filter-def>]]>"msgstr """<![CDATA[<filter-def name=\"myFilter\">\n""    <filter-param name=\"myFilterParam\" type=\"string\"/>\n""</filter-def>]]>"#: index.docbook:34msgid "Then, this filter can be attached to a class:"msgstr "Entonces este filtro puede ser unido a una clase:"#: index.docbook:38msgid """<![CDATA[<class name=\"myClass\" ...>\n""    ...\n""    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</class>]]>"msgstr """<![CDATA[<class name=\"myClass\" ...>\n""    ...\n""    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</class>]]>"#: index.docbook:40msgid "or, to a collection:"msgstr "o a una colección:"#: index.docbook:44msgid """<![CDATA[<set ...>\n""    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</set>]]>"msgstr """<![CDATA[<set ...>\n""    <filter name=\"myFilter\" condition=\":myFilterParam = MY_FILTERED_COLUMN""\"/>\n""</set>]]>"#: index.docbook:46msgid "or, even to both (or multiples of each) at the same time."msgstr "o incluso a ambos (o muchos de cada uno) al mismo tiempo."#: index.docbook:50msgid """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 """Los métodos en <literal>Session</literal> son: <literal>enableFilter(String ""filterName)</literal>, <literal>getEnabledFilter(String filterName)</""literal>, y <literal>disableFilter(String filterName)</literal>. Por ""defecto, los filtros <emphasis>no</emphasis> están habilitados para una ""sesión dada; deben ser habilitados explícitamente por medio del uso del ""método <literal>Session.enableFilter()</literal>, que devuelve una instancia ""de la interface <literal>Filter</literal>. Usando el filtro simple definido ""arriba, esto se vería así:"#: index.docbook:59msgid """<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", ""\"some-value\");]]>"msgstr """<![CDATA[session.enableFilter(\"myFilter\").setParameter(\"myFilterParam\", ""\"some-value\");]]>"#: index.docbook:61msgid """Note that methods on the org.hibernate.Filter interface do allow the method-""chaining common to much of Hibernate."msgstr """Nota que los métodos en la interface org.hibernate.Filter permiten el ""encadenamiento de métodos común en gran parte de Hibernate."#: index.docbook:65msgid """A full example, using temporal data with an effective record date pattern:"msgstr """Un ejemplo completo, usando datos temporales con un patrón efectivo de ""fechas de registro:"#: index.docbook:69msgid """<![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 """<![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>]]>"#: index.docbook:71msgid """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 """Entonces, en orden de asegurar que siempre tendrás de vuelta registros ""actualmente efectivos, simplemente habilita el filtro en la sesión previo a ""recuperar los datos de empleados:"#: index.docbook:76msgid """<![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 """<![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""]]>"#: index.docbook:78msgid """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 """En el HQL de arriba, aunque sólo hemos mencionado explícitamente una ""restricción de salario en los resultados, debido al filtro habilitado la ""consulta sólo devolverá empleados actualmente activos que tengan un salario ""mayor que un millón de dólares."#: index.docbook:84msgid """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 """Nota: si planeas usar filtros con unión externa (outer joining) (bien a ""través de HQL, o bien de recuperación de carga) sé cuidadoso en la dirección ""de expresión de la condición. Lo más seguro es establecer esto para unión ""externa izquierda (left outer joining). En general, coloca el primer ""parámetro seguido del nombre(s) de columna(s) después del operador."#: index.docbook:91msgid """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>&lt;filter-def/&gt;</""literal> allows defining a default condition, either as an attribute or ""CDATA:"msgstr ""#: index.docbook:98msgid """<![CDATA[<filter-def name=\"myFilter\" condition=\"abc > xyz\">...</filter-""def>\n""<filter-def name=\"myOtherFilter\">abc=xyz</filter-def>]]>"msgstr ""#: index.docbook:100msgid """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 ""msgid "ROLES_OF_TRANSLATORS"msgstr "<!--TRANS:ROLES_OF_TRANSLATORS-->"msgid "CREDIT_FOR_TRANSLATORS"msgstr "<!--TRANS:CREDIT_FOR_TRANSLATORS-->"

⌨️ 快捷键说明

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