[jboss-cvs] jboss-seam/doc/reference/en/modules ...
Gavin King
gavin.king at jboss.com
Sun Jan 28 00:56:57 EST 2007
User: gavin
Date: 07/01/28 00:56:57
Modified: doc/reference/en/modules framework.xml persistence.xml
Log:
split out persistence chapter
updated configuration chapter
Revision Changes Path
1.16 +0 -44 jboss-seam/doc/reference/en/modules/framework.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: framework.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/framework.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- framework.xml 27 Jan 2007 02:25:55 -0000 1.15
+++ framework.xml 28 Jan 2007 05:56:54 -0000 1.16
@@ -479,50 +479,6 @@
</section>
<section>
- <title>Using Hibernate filters</title>
-
- <para>
- The coolest, and most unique, feature of Hibernate is <emphasis>filters</emphasis>.
- Filters let you provide a restricted view of the data in the database. You can find
- out more about filters in the Hibernate documentation. But we thought we'd mention
- an easy way to incorporate filters into a Seam application, one that works especially
- well with the Seam Application Framework.
- </para>
-
- <para>
- Seam-managed persistence contexts may have a list of filters defined, which will be
- enabled whenever an <literal>EntityManager</literal> or Hibernate <literal>Session</literal>
- is first created. (Of course, they may only be used when Hibernate is the underlying
- persistence provider.)
- </para>
-
- <programlisting><![CDATA[<core:filter name="regionFilter">
- <core:name>region</core:name>
- <core:parameters>
- <key>regionCode</key>
- <value>#{region.code}</value>
- </core:parameters>
-</core:filter>
-
-<core:filter name="currentFilter">
- <core:name>current</core:name>
- <core:parameters>
- <key>date</key>
- <value>#{currentDate}</value>
- </core:parameters>
-</core:filter>
-
-<core:managed-persistence-context name="personDatabase"
- persistence-unit-jndi-name="java:/EntityManagerFactories/personDatabase">
- <core:filters>
- <value>#{regionFilter}</value>
- <value>#{currentFilter}</value>
- </core:filters>
-</core:managed-persistence-context>]]></programlisting>
-
- </section>
-
- <section>
<title>Controller objects</title>
<para>
A totally optional part of the Seam Application Framework is the class
1.2 +48 -4 jboss-seam/doc/reference/en/modules/persistence.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: persistence.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/persistence.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- persistence.xml 28 Jan 2007 05:49:56 -0000 1.1
+++ persistence.xml 28 Jan 2007 05:56:57 -0000 1.2
@@ -339,7 +339,7 @@
<title>Using the JPA "delegate"</title>
<para>
- The <literal>EntityManager</literal> interface let's you access a vendor-specific
+ The <literal>EntityManager</literal> interface lets you access a vendor-specific
API via the <literal>getDelegate()</literal> method. Naturally, the most interesting
vendor is Hibernate, and the most powerful delegate interface is
<literal>org.hibernate.Session</literal>. You'd be nuts to use anything else. Trust
@@ -384,4 +384,48 @@
</section>
+ <section>
+ <title>Using Hibernate filters</title>
+
+ <para>
+ The coolest, and most unique, feature of Hibernate is <emphasis>filters</emphasis>.
+ Filters let you provide a restricted view of the data in the database. You can find
+ out more about filters in the Hibernate documentation. But we thought we'd mention
+ an easy way to incorporate filters into a Seam application, one that works especially
+ well with the Seam Application Framework.
+ </para>
+
+ <para>
+ Seam-managed persistence contexts may have a list of filters defined, which will be
+ enabled whenever an <literal>EntityManager</literal> or Hibernate <literal>Session</literal>
+ is first created. (Of course, they may only be used when Hibernate is the underlying
+ persistence provider.)
+ </para>
+
+ <programlisting><![CDATA[<core:filter name="regionFilter">
+ <core:name>region</core:name>
+ <core:parameters>
+ <key>regionCode</key>
+ <value>#{region.code}</value>
+ </core:parameters>
+</core:filter>
+
+<core:filter name="currentFilter">
+ <core:name>current</core:name>
+ <core:parameters>
+ <key>date</key>
+ <value>#{currentDate}</value>
+ </core:parameters>
+</core:filter>
+
+<core:managed-persistence-context name="personDatabase"
+ persistence-unit-jndi-name="java:/EntityManagerFactories/personDatabase">
+ <core:filters>
+ <value>#{regionFilter}</value>
+ <value>#{currentFilter}</value>
+ </core:filters>
+</core:managed-persistence-context>]]></programlisting>
+
+ </section>
+
</chapter>
More information about the jboss-cvs-commits
mailing list