[jboss-svn-commits] JBL Code SVN: r18393 - in labs/jbossforums/branches/forums110P26: authz-jaae-plugin and 40 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Feb 7 13:59:32 EST 2008
Author: sviluppatorefico
Date: 2008-02-07 13:59:32 -0500 (Thu, 07 Feb 2008)
New Revision: 18393
Added:
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/
labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/component-info.xml
labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/lib/
labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/lib/jboss-cache-jdk50.jar
labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/lib/hibernate3.jar
labs/jbossforums/branches/forums110P26/thirdparty/jgroups/
labs/jbossforums/branches/forums110P26/thirdparty/jgroups/component-info.xml
labs/jbossforums/branches/forums110P26/thirdparty/jgroups/lib/
labs/jbossforums/branches/forums110P26/thirdparty/jgroups/lib/jgroups.jar
Removed:
labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/README.txt
labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/lib/hibernate.jar
Modified:
labs/jbossforums/branches/forums110P26/.project
labs/jbossforums/branches/forums110P26/authz-jaae-plugin/build.xml
labs/jbossforums/branches/forums110P26/build/build.xml
labs/jbossforums/branches/forums110P26/forums/build.xml
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/AttachmentImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/CategoryImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumWatchImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/MessageImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollOptionImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PosterImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicWatchImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/UploadedFileImpl.java
labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/WatchImpl.java
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml
labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt
Log:
clusterized forums
Modified: labs/jbossforums/branches/forums110P26/.project
===================================================================
--- labs/jbossforums/branches/forums110P26/.project 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/.project 2008-02-07 18:59:32 UTC (rev 18393)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>forums</name>
+ <name>forums110P26</name>
<comment></comment>
<projects>
</projects>
Modified: labs/jbossforums/branches/forums110P26/authz-jaae-plugin/build.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/authz-jaae-plugin/build.xml 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/authz-jaae-plugin/build.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -166,10 +166,28 @@
rows to achieve complete create for jboss-forums.ear -->
<copy todir="${forums.root}/resources/portal-forums-ear">
<fileset dir="${build.lib}" includes="portal-forums-authz-plugin.sar"/>
+ </copy>
+ <!-- Luca Stancapiano - 5 feb 2008 - this plugin is also inside new clustered
+ versions of JBossForums -->
+ <copy todir="${forums.root}/resources/portal-forums-ha-ear">
+ <fileset dir="${build.lib}" includes="portal-forums-authz-plugin.sar"/>
+ </copy>
+ <copy todir="${forums.root}/resources/portal-forums-ha-jbp-ear">
+ <fileset dir="${build.lib}" includes="portal-forums-authz-plugin.sar"/>
</copy>
+ <!-- end patch 5 feb 2008 -->
<jar jarfile="${forums.lib}/jboss-forums.ear">
<fileset dir="${forums.root}/resources/portal-forums-ear" includes="**/*"/>
+ </jar>
+ <!-- Luca Stancapiano - 5 feb 2008 - this plugin is also inside new clustered
+ versions of JBossForums as libraries -->
+ <jar jarfile="${forums.lib}/jboss-forums-ha.ear">
+ <fileset dir="${forums.root}/resources/portal-forums-ha-ear" includes="**/*"/>
</jar>
+ <jar jarfile="${forums.lib}/jboss-forums-ha-jbp.ear">
+ <fileset dir="${forums.root}/resources/portal-forums-ha-jbp-ear" includes="**/*"/>
+ </jar>
+ <!-- end patch 5 feb 2008 -->
<!-- end patch 7 apr 2007 -->
Modified: labs/jbossforums/branches/forums110P26/build/build.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/build/build.xml 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/build/build.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -112,11 +112,13 @@
<!-- Modules -->
<module name="forums"/>
<module name="authz-jaae-plugin"/>
+ <!-- Luca Stancapiano - 8 feb 2008 - new plugin for cluster standalone -->
+ <module name="cache-plugin"/>
<!-- setup the default group -->
<group name="default">
- <include modules="forums,authz-jaae-plugin"/>
+ <include modules="forums,authz-jaae-plugin,cache-plugin"/>
</group>
</moduleconfig>
Modified: labs/jbossforums/branches/forums110P26/forums/build.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/build.xml 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/build.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -66,6 +66,8 @@
<call target="configure-libraries"/>
<path id="library.classpath">
<path refid="oswego.concurrent.classpath"/>
+ <path refid="jboss.cache.classpath"/>
+ <path refid="jgroups.classpath"/>
<path refid="jboss.system.classpath"/>
<path refid="jboss.j2ee.classpath"/>
<path refid="jboss.server.classpath"/>
@@ -172,15 +174,6 @@
<fileset dir="${source.classes}" includes="**/*.java"/>
<jbossxmbean/>
</jmxdoclet>
- <hibernatedoclet
- destDir="${build.resources}/portal-forums-sar">
- <fileset dir="${source.java}">
- <include name="**/impl/*Impl.java"/>
- </fileset>
- <hibernate
- version="3.0"
- destDir="${build.resources}/portal-forums-sar"/>
- </hibernatedoclet>
</target>
<!-- Generate all class files -->
@@ -203,6 +196,9 @@
<hibernate-export properties="${hibernate.properties}" text="true" quiet="true" delimiter=";"
output="${build.resources}/setup/setup.ddl">
<fileset dir="${build.resources}/portal-forums-sar" includes="**/*.hbm.xml"/>
+ <!-- Luca Stancapiano - 8 feb 2008 - added new two modules for cluster -->
+ <fileset dir="${build.resources}/portal-forums-ha-sar" includes="**/*.hbm.xml"/>
+ <fileset dir="${build.resources}/portal-forums-ha-jbp-sar" includes="**/*.hbm.xml"/>
</hibernate-export>
</target>
@@ -254,10 +250,57 @@
<jar jarfile="${build.lib}/jboss-forums.ear">
<fileset dir="${build.resources}/portal-forums-ear" includes="**/*"/>
</jar>
+
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha.sar -->
+ <jar jarfile="${build.lib}/portal-forums-ha.sar">
+ <fileset dir="${build.resources}/portal-forums-ha-sar" includes="**/*"/>
+ <fileset dir="${jakarta.fileupload.root}/lib" includes="commons-fileupload.jar"/>
+ <fileset dir="${rome.lib}" includes="rome-0.9.jar" />
+ <fileset dir="${jdom.lib}" includes="jdom.jar" />
+ </jar>
+
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha-jbp.sar -->
+ <jar jarfile="${build.lib}/portal-forums-ha-jbp.sar">
+ <fileset dir="${build.resources}/portal-forums-ha-jbp-sar" includes="**/*"/>
+ <fileset dir="${jakarta.fileupload.root}/lib" includes="commons-fileupload.jar"/>
+ <fileset dir="${rome.lib}" includes="rome-0.9.jar" />
+ <fileset dir="${jdom.lib}" includes="jdom.jar" />
+ </jar>
+
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha.ear -->
+ <copy todir="${build.resources}/portal-forums-ha-ear">
+ <!--fileset dir="${jakarta.lucene.root}/lib" includes="lucene.jar"/-->
+ <fileset dir="${build.lib}" includes="portal-forums.war,portal-forums-ui.jar,portal-forums-ha.sar,portal-forums-authz-plugin.sar"/>
+ <fileset dir="${facelets.lib}" includes="jsf-facelets.jar,el-api.jar,el-ri.jar,jsf-example.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,tomahawk.jar"/>
+ <fileset dir="${jakarta.commons.lib}" includes="commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-digester-1.6.jar,commons-el.jar"/>
+ <fileset dir="${sun.portlet.lib}" includes="jsf-portlet.jar" />
+ <fileset dir="${jbportal.lib}" includes="portal-faces-lib.jar" />
+ </copy>
+ <jar jarfile="${build.lib}/jboss-forums-ha.ear">
+ <fileset dir="${build.resources}/portal-forums-ha-ear" includes="**/*"/>
+ </jar>
+
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha-jbp.ear -->
+ <copy todir="${build.resources}/portal-forums-ha-jbp-ear">
+ <!--fileset dir="${jakarta.lucene.root}/lib" includes="lucene.jar"/-->
+ <fileset dir="${build.lib}" includes="portal-forums.war,portal-forums-ui.jar,portal-forums-ha-jbp.sar,portal-forums-authz-plugin.sar"/>
+ <fileset dir="${facelets.lib}" includes="jsf-facelets.jar,el-api.jar,el-ri.jar,jsf-example.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,tomahawk.jar"/>
+ <fileset dir="${jakarta.commons.lib}" includes="commons-beanutils.jar,commons-codec.jar,commons-collections.jar,commons-digester-1.6.jar,commons-el.jar"/>
+ <fileset dir="${sun.portlet.lib}" includes="jsf-portlet.jar" />
+ <fileset dir="${jbportal.lib}" includes="portal-faces-lib.jar" />
+ </copy>
+ <jar jarfile="${build.lib}/jboss-forums-ha-jbp.ear">
+ <fileset dir="${build.resources}/portal-forums-ha-jbp-ear" includes="**/*"/>
+ </jar>
</target>
<target name="explode" depends="init">
- <explode file="${build.lib}/portal-forums.ear" todir="${build.lib}" name="portal-forums-exploded.ear"/>
+ <explode file="${build.lib}/jboss-forums.ear" todir="${build.resources}" />
+ <!-- Luca Stancapiano - 8 feb 2008 - exploded ha modules -->
+ <explode file="${build.lib}/jboss-forums-ha.ear" todir="${build.resources}" />
+ <explode file="${build.lib}/jboss-forums-ha-jbp.ear" todir="${build.resources}" />
</target>
<!-- ================================================================== -->
@@ -312,6 +355,46 @@
<copy file="${build.lib}/jboss-forums.ear" todir="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
</target>
+ <!--
+ | Deploy the ha application
+ -->
+ <target name="deploy-ha" description="Deploy ha." depends="output">
+
+ <!-- TEMPORARILY COPIED HERE, NEEDS TO BE REDONE -->
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha.ear -->
+ <copy todir="${build.resources}/portal-forums-ha-ear">
+ <fileset dir="${jakarta.lucene.root}/lib" includes="lucene.jar"/>
+ <fileset dir="${build.lib}" includes="portal-forums.war,portal-forums-ui.jar,portal-forums-ha.sar,portal-forums-authz-plugin.sar"/>
+ <fileset dir="${jbportal.root}/../facelets/lib" includes="jsf-facelets.jar,el-api.jar,el-ri.jar"/>
+ </copy>
+ <jar jarfile="${build.lib}/jboss-forums-ha.ear">
+ <fileset dir="${build.resources}/portal-forums-ha-ear" includes="**/*"/>
+ </jar>
+
+ <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ <copy file="${build.lib}/jboss-forums.ear" todir="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ </target>
+
+ <!--
+ | Deploy the ha-jbp application
+ -->
+ <target name="deploy-ha-jbp" description="Deploy ha jbp." depends="output">
+
+ <!-- TEMPORARILY COPIED HERE, NEEDS TO BE REDONE -->
+ <!-- Luca Stancapiano - 8 feb 2008 - portal-forums-ha.ear -->
+ <copy todir="${build.resources}/portal-forums-ha-jbp-ear">
+ <fileset dir="${jakarta.lucene.root}/lib" includes="lucene.jar"/>
+ <fileset dir="${build.lib}" includes="portal-forums.war,portal-forums-ui.jar,portal-forums-ha-jbp.sar,portal-forums-authz-plugin.sar"/>
+ <fileset dir="${jbportal.root}/../facelets/lib" includes="jsf-facelets.jar,el-api.jar,el-ri.jar"/>
+ </copy>
+ <jar jarfile="${build.lib}/jboss-forums-ha-jbp.ear">
+ <fileset dir="${build.resources}/portal-forums-ha-jbp-ear" includes="**/*"/>
+ </jar>
+
+ <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ <copy file="${build.lib}/jboss-forums.ear" todir="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ </target>
+
<!--
| Undeploy the application
-->
@@ -320,6 +403,22 @@
<delete file="${jboss.home}/server/${portal.deploy.dir}/deploy/portal-forums.ear"/>
</target>
+ <!--
+ | Luca Stancapiano - 8 feb 2008 - Undeploy the ha application
+ -->
+ <target name="undeploy-ha" description="Undeploy ha." depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/deploy/portal-forums-ha.ear"/>
+ </target>
+
+ <!--
+ | Luca Stancapiano - 8 feb 2008 - Undeploy the ha-jbp application
+ -->
+ <target name="undeploy-ha-jbp" description="Undeploy ha jbp." depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}/deploy"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/deploy/portal-forums-ha-jbp.ear"/>
+ </target>
+
<target name="test" depends="init">
<property name="build.testlog" value="${module.output}/log"/>
@@ -361,8 +460,12 @@
<classpath>
<pathelement location="${build.classes}"/>
<!--<pathelement location="${build.resources}/portal-core-sar" />-->
- <pathelement location="${build.resources}/portal-forums-sar"/>
- <pathelement location="${build.resources}/test"/>
+ <!-- Luca Stancapiano - 8 feb 2008 - new ha modules into classpath -->
+ <pathelement location="${build.resources}/portal-forums-sar"/>
+ <pathelement location="${build.resources}/portal-forums-ha-sar"/>
+ <pathelement location="${build.resources}/portal-forums-ha-jbp-sar"/>
+ <!-- Luca Stancapiano - 8 feb 2008 - end patch -->
+ <pathelement location="${build.resources}/test"/>
<pathelement location="${jboss.home}/lib/dom4j.jar"/>
<pathelement location="${jboss.config}/lib/hsqldb.jar"/>
<pathelement location="${jboss.config}/lib/jgroups.jar"/>
@@ -374,7 +477,8 @@
<pathelement location="${dbunit.dbunit.lib}/dbunit.jar"/>
<pathelement location="${jdbc.connectors.lib}/mysql-connector-java.jar"/>
<pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/asm.jar"/>
- <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/hibernate3.jar"/>
+ <!-- Luca Stancapiano - 8 feb 2008 - no more hibernate.jar -->
+ <pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/hibernate3.jar"/>
<pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/cglib-2.1.jar"/>
<pathelement location="${jboss.home}/server/default/deploy/jboss-hibernate.deployer/antlr-2.7.5H3.jar"/>
<!--<path refid="jboss.hibernate.classpath"/>-->
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/AttachmentImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/AttachmentImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/AttachmentImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -22,7 +22,6 @@
* @author theute
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* $Revision: 1018 $
- * @hibernate.class table="jbp_forums_attachments"
*/
public class AttachmentImpl implements Attachment, Serializable
{
@@ -38,8 +37,6 @@
}
/**
- * @hibernate.property column="jbp_comment"
- * type="text"
*/
public String getComment() {
return comment;
@@ -52,7 +49,6 @@
}
/**
- * @hibernate.component class="org.jboss.portlet.forums.impl.UploadedFileImpl"
*/
public UploadedFile getFile() {
return file;
@@ -65,8 +61,6 @@
}
/**
- * @hibernate.id column="jbp_attachment_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -79,8 +73,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_post_id"
- * class="org.jboss.portlet.forums.impl.PostImpl"
*/
public Post getPost()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/CategoryImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/CategoryImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/CategoryImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -24,8 +24,6 @@
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* @version $Revision: 916 $
- * @hibernate.class table="jbp_forums_categories"
- * @hibernate.cache usage="read-write"
*/
public class CategoryImpl
implements Serializable,
@@ -45,14 +43,6 @@
}
/**
- * @hibernate.bag lazy="true"
- * inverse="true"
- * cascade="all-delete-orphan"
- * order-by="jbp_order asc"
- * table="jbp_forums_forums"
- * @hibernate.collection-key column="jbp_category_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.ForumImpl"
- * @hibernate.collection-cache usage="read-write"
*/
public List getForums()
{
@@ -81,9 +71,6 @@
}
/**
- * @hibernate.property column="jbp_order"
- * unique="false"
- * update="true"
*/
public int getOrder()
{
@@ -101,9 +88,6 @@
}
/**
- * @hibernate.property column="jbp_title"
- * unique="false"
- * update="true"
*/
public String getTitle()
{
@@ -121,8 +105,6 @@
}
/**
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -37,8 +37,6 @@
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
* @version $Revision: 1124 $
- * @hibernate.class table="jbp_forums_forums"
- * @hibernate.cache usage="read-write"
*/
public class ForumImpl
implements Serializable,
@@ -80,8 +78,6 @@
/**
- * @hibernate.many-to-one column="jbp_category_id"
- * class="org.jboss.portlet.forums.impl.CategoryImpl"
*/
public Category getCategory()
{
@@ -99,9 +95,6 @@
}
/**
- * @hibernate.property column="jbp_description"
- * unique="false"
- * update="true"
*/
public String getDescription()
{
@@ -119,8 +112,6 @@
}
/**
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -179,9 +170,6 @@
}
/**
- * @hibernate.property column="jbp_name"
- * unique="false"
- * update="true"
*/
public String getName()
{
@@ -199,9 +187,6 @@
}
/**
- * @hibernate.property column="jbp_order"
- * unique="false"
- * update="true"
*/
public int getOrder()
{
@@ -219,9 +204,6 @@
}
/**
- * @hibernate.property column="jbp_topic_count"
- * unique="false"
- * update="true"
*/
public int getTopicCount()
{
@@ -248,9 +230,6 @@
}
/**
- * @hibernate.property column="jbp_post_count"
- * unique="false"
- * update="true"
*/
public int getPostCount()
{
@@ -325,9 +304,6 @@
}
/**
- * @hibernate.property column="jbp_status"
- * unique="false"
- * update="true"
*/
public int getStatus()
{
@@ -345,13 +321,6 @@
}
/**
- * @hibernate.bag lazy="true"
- * inverse="true"
- * cascade="all-delete-orphan"
- * order-by="jbp_last_post_date asc"
- * table="jbp_forums_topics"
- * @hibernate.collection-key column="jbp_forum_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.TopicImpl"
*/
public List getTopics()
{
@@ -381,11 +350,6 @@
}
/**
- * @hibernate.bag lazy="true"
- * inverse="true"
- * cascade="all"
- * @hibernate.collection-key column="jbp_forum_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.ForumWatchImpl"
*/
public Collection getForumWatch()
{
@@ -403,9 +367,6 @@
}
/**
- * @hibernate.property
- * column="jbp_type"
- * update="true"
*/
/*public int getType()
{
@@ -423,11 +384,6 @@
}*/
/**
- * @hibernate.bag lazy="true"
- * inverse="true"
- * cascade="all"
- * @hibernate.collection-key column="jbp_forum_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.ForumWatchImpl"
*/
public List getWatches()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumWatchImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumWatchImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumWatchImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -23,8 +23,6 @@
* @author <a href="mailto:julien at jboss.org">Julien Viet </a>
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
* @version $Revision: 2066 $
- * @hibernate.joined-subclass table="jbp_forums_forumswatch"
- * @hibernate.joined-subclass-key column="jbp_id"
*/
public class ForumWatchImpl
extends WatchImpl
@@ -42,8 +40,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_forum_id"
- * class="org.jboss.portlet.forums.impl.ForumImpl"
*/
public Forum getForum()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -210,10 +210,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select f " +
- "from ForumImpl f " +
- "left outer join fetch f.topics " +
- "where f.id = :forumId ");
+ Query query = session.getNamedQuery("findForumByIdFetchTopics");
query.setParameter("forumId",id);
List forumList = query.list();
if (forumList == null)
@@ -277,9 +274,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery(" from CategoryImpl as c " +
- " join fetch c.forums " +
- " where c.id=:categoryId ");
+ Query query = session.getNamedQuery("findCategoryByIdFetchForums");
query.setParameter("categoryId",id);
Category category = (Category)query.uniqueResult();
if (category == null)
@@ -311,7 +306,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from PosterImpl as u where u.userId=:userId");
+ Query query = session.getNamedQuery("findPosterByUserId");
query.setString("userId", userId);
PosterImpl user = (PosterImpl)query.uniqueResult();
return user;
@@ -340,6 +335,7 @@
PosterImpl user = new PosterImpl();
user.setUserId(userId);
session.save(user);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return user;
}
catch (HibernateException e)
@@ -361,8 +357,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from CategoryImpl as c order by c.order asc");
- query.setCacheable(true);
+ Query query = session.getNamedQuery("findCategories");
return query.list();
}
catch (HibernateException e)
@@ -379,11 +374,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery(" select c " +
- " from CategoryImpl as c " +
- " left outer join fetch c.forums " +
- " order by c.order asc");
- query.setCacheable(true);
+ Query query = session.getNamedQuery("findCategoriesFetchForums");
List categoriesWithDuplicates = query.list();
Iterator it = categoriesWithDuplicates.iterator();
List categories = new LinkedList();
@@ -409,7 +400,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from ForumImpl as f order by f.order asc");
+ Query query = session.getNamedQuery("findForums");
return query.list();
}
catch (HibernateException e)
@@ -427,7 +418,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from ForumImpl as f where f.category=:categoryId order by f.order asc");
+ session.getNamedQuery("findForumsByCategoryId");
query.setString("categoryId",
categoryId.toString());
return query.list();
@@ -447,7 +438,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate");
+ session.getNamedQuery("findAnnouncements");
query.setString("forumid", "" + forum.getId());
query.setString("type", "" + ForumsConstants.POST_ANNOUNCE);
return query.list();
@@ -466,7 +457,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl");
+ session.getNamedQuery("findTopics");
return query.list();
}
catch (HibernateException e)
@@ -500,11 +491,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t " +
- "join fetch t.poster " +
- "where t.forum = :forumid " +
- "and t.type = :type " +
- "order by t.lastPostDate " + order);
+ session.getNamedQuery("findTopicsType"+order);
query.setFirstResult(start);
query.setMaxResults(perPage);
query.setString("forumid", "" + forum.getId());
@@ -543,10 +530,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t " +
- "join fetch t.poster " +
- "where t.forum = :forumid " +
- "order by t.lastPostDate " + order);
+ session.getNamedQuery("findTopicsForum"+order);
query.setFirstResult(start);
query.setMaxResults(perPage);
query.setString("forumid", "" + forum.getId());
@@ -618,7 +602,7 @@
//"SELECT OBJECT(t) FROM topic AS t WHERE t.replies > ?1 ORDER BY t.creationDate DESC LIMIT ?2"
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t where t.replies > :replies order by t.lastPostDate desc");
+ session.getNamedQuery("findTopicsHot");
query.setMaxResults(limit);
query.setInteger("replies", replies);
return query.list();
@@ -640,7 +624,7 @@
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t order by t.lastPostDate desc");
+ session.getNamedQuery("findTopicsByLatestPosts");
query.setMaxResults(limit);
return query.list();
}
@@ -660,7 +644,7 @@
//"SELECT OBJECT(t) FROM topic AS t WHERE t.lastPostDate > ?1 ORDER BY t.replies DESC LIMIT ?2"
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t where t.lastPostDate > :after order by t.replies desc");
+ session.getNamedQuery("findTopicsHottest");
query.setMaxResults(limit);
query.setDate("after", after);
return query.list();
@@ -681,7 +665,7 @@
//"SELECT OBJECT(t) FROM topic AS t WHERE t.lastPostDate > ?1 ORDER BY t.views DESC LIMIT ?2"
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t where t.lastPostDate > :after order by t.viewCount desc");
+ session.getNamedQuery("findTopicsMostViewed");
query.setMaxResults(limit);
query.setDate("after", after);
return query.list();
@@ -709,7 +693,9 @@
Session session = getSession();
session.save(poster);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
session.save(poll);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
@@ -722,6 +708,7 @@
{
Attachment a = (Attachment)i.next();
session.save(a);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
post.addAttachment(a);
}
session.save(post);
@@ -742,12 +729,14 @@
session.save(topic);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
forum.addTopicSize();
forum.addPostSize();
post.setTopic(topic);
notificationEngine.scheduleForNotification(post.getId(), NotificationEngine.MODE_POST);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return post;
}
catch (HibernateException e)
@@ -792,6 +781,7 @@
session.save(topic);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
//forum.addTopicSize();
//forum.addPostSize();
@@ -835,6 +825,7 @@
session.save(post);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
topic.addPost(post);
//post.setTopic(topic);
@@ -846,6 +837,7 @@
//forum.setLastPost(post);
forum.addPostSize();
notificationEngine.scheduleForNotification(post.getId(), NotificationEngine.MODE_REPLY);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return post;
}
catch (HibernateException e)
@@ -870,6 +862,7 @@
}
session.save(poll);
topic.setPoll(poll);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return poll;
}
catch (HibernateException e)
@@ -885,7 +878,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select max(c.order) from CategoryImpl as c");
+ Query query = session.getNamedQuery("getLastCategoryOrder");
Integer lastCategoryOrder = (Integer)query.uniqueResult();
return (lastCategoryOrder != null) ? lastCategoryOrder.intValue() : 0;
}
@@ -906,6 +899,7 @@
category.setTitle(name);
category.setOrder(getLastCategoryOrder() + 10);
session.save(category);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return category;
}
catch (HibernateException e)
@@ -924,6 +918,7 @@
{
//session.flush();
session.delete(category);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
//session.flush();
}
catch (HibernateException e)
@@ -951,6 +946,7 @@
session.delete(forum);
}
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
//session.flush();
}
catch (HibernateException e)
@@ -978,6 +974,7 @@
{
session.delete(post);
}
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
}
catch (HibernateException e)
{
@@ -997,6 +994,7 @@
Poll poll = topic.getPoll();
topic.setPoll(null);
session.delete(poll);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
}
catch (HibernateException e)
@@ -1028,6 +1026,7 @@
{
session.delete(topic);
}
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
//session.flush();
}
catch (HibernateException e)
@@ -1044,7 +1043,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("select max(f.order) from ForumImpl as f where f.category = :categoryId");
+ session.getNamedQuery("getLastForumOrder");
query.setString("categoryId", "" + category.getId());
Integer lastForumOrder = (Integer)query.uniqueResult();
return (lastForumOrder != null) ? lastForumOrder.intValue() : 0;
@@ -1071,6 +1070,7 @@
forum.setDescription(description);
forum.setOrder(getLastForumOrder(category) + 10);
session.save(forum);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
return forum;
}
catch (HibernateException e)
@@ -1119,7 +1119,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from TopicImpl as t where t.forum = :forumid");
+ session.getNamedQuery("findTopicsForumNoOrder");
query.setString("forumid", "" + forum.getId());
return query.list();
}
@@ -1143,7 +1143,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from PostImpl");
+ session.getNamedQuery("findPosts");
return query.list();
}
catch (HibernateException e)
@@ -1222,7 +1222,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from PostImpl as p where p.topic=:topicId order by p.createDate " + order);
+ session.getNamedQuery("findPostsByTopicId"+order);
query.setString("topicId",
topicId.toString());
query.setFirstResult(start);
@@ -1253,11 +1253,7 @@
{
Session session = getSession();
Query query =
- session.createQuery(" from PostImpl as p " +
- " join fetch p.poster " +
- " left outer join fetch p.attachments " +
- " where p.id IN ( :postIds ) " +
- " order by p.createDate " + order);
+ session.getNamedQuery("findPostsByIdsFetchAttachmentsAndPosters"+order);
query.setParameterList("postIds",postIds);
Iterator it = query.list().iterator();
List list = new LinkedList();
@@ -1299,10 +1295,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("select p.id " +
- "from PostImpl as p " +
- "where p.topic=:topicId " +
- "order by p.createDate " + order);
+ session.getNamedQuery("findPostIds"+order);
query.setString("topicId", topicId.toString());
query.setFirstResult(start);
if (limit != 0)
@@ -1342,7 +1335,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from PostImpl as p where p.topic=:topicId");
+ session.getNamedQuery("findPostsByTopicIdNoOrder");
query.setString("topicId",
topicId.toString());
return query.list();
@@ -1395,7 +1388,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("select max(p.createDate) from PostImpl as p where p.poster.userId = :userId");
+ session.getNamedQuery("findLastPostDateForUser");
query.setString("userId", "" + user.getId().toString());
Date lastPostDate = (Date)query.uniqueResult();
return lastPostDate;
@@ -1416,16 +1409,9 @@
Query query =
// This is old query, considered as less efficient
- //session.createQuery("from PostImpl as p where p.topic.forum = :forumId order by p.createDate desc");
+ //session.getNamedQuery("from PostImpl as p where p.topic.forum = :forumId order by p.createDate desc");
- session.createQuery("select p " +
- "from PostImpl as p " +
- "join fetch p.poster " +
- "where p.createDate = ( " +
- " select DISTINCT MAX(topic.lastPostDate) " +
- " from TopicImpl as topic " +
- " where topic.forum = :forumId " +
- ") " );
+ session.getNamedQuery("findLastPost" );
query.setString("forumId", "" + forum.getId());
query.setFirstResult(0);
query.setMaxResults(1);
@@ -1447,13 +1433,9 @@
Session session = getSession();
Query query =
// Old query considered as inefficient
- //session.createQuery("from PostImpl as p where p.topic = :topicId order by p.createDate desc");
+ //session.getNamedQuery("from PostImpl as p where p.topic = :topicId order by p.createDate desc");
- session.createQuery("select p " +
- "from PostImpl as p " +
- "join fetch p.poster " +
- "where p.topic = :topicId " +
- "AND p.createDate = :lastPostDate ");
+ session.getNamedQuery("findFirstPost");
query.setDate("lastPostDate", topic.getLastPostDate());
query.setString("topicId", "" + topic.getId());
query.setFirstResult(0);
@@ -1475,7 +1457,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("from PostImpl as p where p.topic = :topicId order by p.createDate desc");
+ session.getNamedQuery("findLastPostOrder");
query.setString("topicId", "" + topic.getId());
query.setFirstResult(0);
query.setMaxResults(1);
@@ -1497,10 +1479,8 @@
Session session = getSession();
//Query query =
// Old query considered as inefficient
- //session.createQuery("from PostImpl as p where p.topic = :topicId order by p.createDate desc");
- session.createQuery("select topic.lastPostDate as maxDate , topic.id " +
- "from TopicImpl as topic " +
- "where topic.forum.id = :forumId ");
+ //session.getNamedQuery("from PostImpl as p where p.topic = :topicId order by p.createDate desc");
+ session.getNamedQuery("findLastPostsOfTopics");
Iterator it = topics.iterator();
List lastPostDates = new ArrayList(topics.size());
List dates = new LinkedList();
@@ -1515,11 +1495,7 @@
return new HashMap(0);
}
- Query query = session.createQuery("select post.createDate, post " +
- "from PostImpl as post " +
- "join fetch post.poster " +
- "where post.createDate IN (:dates) " +
- "order by post.createDate ");
+ Query query = session.getNamedQuery("findLastPostsOfTopicsCreateDate");
query.setParameterList("dates",dates);
List posts = query.list();
Map forumPostMap = new HashMap(dates.size());
@@ -1559,10 +1535,7 @@
{
Session session = getSession();
Query query =
- session.createQuery("select MAX(topic.lastPostDate) as maxDate , topic.forum.id " +
- "from TopicImpl as topic " +
- "group by topic.forum.id ");
- query.setCacheable(true);
+ session.getNamedQuery("findLastPostsOfForums");
List createDates = query.list();
Iterator it = createDates.iterator();
List dates = new LinkedList();
@@ -1575,12 +1548,7 @@
return new HashMap(0);
}
- query = session.createQuery("select post.createDate, post " +
- "from PostImpl as post " +
- "join fetch post.poster " +
- "where post.createDate IN (:dates) " +
- "order by post.createDate ");
- query.setCacheable(true);
+ query = session.getNamedQuery("findLastPostsOfForumsCreateDate");
query.setParameterList("dates",dates);
List posts = query.list();
Map forumPostMap = new HashMap(createDates.size());
@@ -1620,7 +1588,7 @@
{
Session session = getSession();
Query query = session
- .createQuery("select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate "
+ .getNamedQuery("findPostsFromForum"
+ order);
query.setString("forumId", forum.getId().toString());
@@ -1659,7 +1627,7 @@
{
Session session = getSession();
Query query = session
- .createQuery("select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate "
+ .getNamedQuery("findPostsFromCategory"
+ order);
query.setString("categoryId", category.getId().toString());
@@ -1697,7 +1665,7 @@
{
Session session = getSession();
Query query = session
- .createQuery("select p from PostImpl as p order by p.createDate "
+ .getNamedQuery("findPostsOrder"
+ order);
query.setFirstResult(0);
@@ -1730,7 +1698,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from ForumWatchImpl as f where f.poster.userId = :userId");
+ Query query = session.getNamedQuery("findForumWatchByUser");
query.setString("userId", user.getId().toString());
return query.list();
}
@@ -1747,12 +1715,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select f " +
- "from ForumImpl as f " +
- "where f.id IN ( "+
- " select fw.forum.id " +
- " from ForumWatchImpl fw " +
- " where fw.poster.userId = :userId )");
+ Query query = session.getNamedQuery("findForumWatchedByUser");
query.setString("userId", user.getId().toString());
return query.list();
}
@@ -1769,13 +1732,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select t " +
- "from TopicImpl as t " +
- "where t.id IN ( " +
- " select tw.topic.id " +
- " from TopicWatchImpl tw " +
- " where tw.poster.userId = :userId ) " +
- "order by t.lastPostDate desc ");
+ Query query = session.getNamedQuery("findTopicWatchedByUser");
query.setString("userId", user.getId().toString());
return query.list();
}
@@ -1792,14 +1749,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select t " +
- "from TopicImpl as t " +
- "where t.id IN ( " +
- " select tw.topic.id " +
- " from TopicWatchImpl tw " +
- " where tw.poster.userId = :userId ) " +
- "and (t.lastPostDate > :datePoint) " +
- "order by t.lastPostDate desc ");
+ Query query = session.getNamedQuery("findTopicWatchedByUser");
query.setString("userId", user.getId().toString());
query.setTimestamp("datePoint", datePoint);
return query.list();
@@ -1826,9 +1776,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select tw.topic.id , tw " +
- "from TopicWatchImpl tw " +
- "where tw.poster.userId = :userId ");
+ Query query = session.getNamedQuery("findTopicWatches");
query.setString("userId", user.getId().toString());
List results = query.list();
HashMap map = new HashMap(results.size());
@@ -1871,6 +1819,7 @@
forumWatch.setForum(forum);
forumWatch.setMode(mode);
session.save(forumWatch);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
}
catch (HibernateException e)
@@ -1887,6 +1836,7 @@
try
{
session.delete(watch);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
}
catch (HibernateException e)
{
@@ -1902,7 +1852,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from ForumWatchImpl as f where f.id = :forumWatchId");
+ Query query = session.getNamedQuery("findForumWatchById");
query.setString("forumWatchId",
forumWatchId.toString());
return (ForumWatch)query.uniqueResult();
@@ -1929,9 +1879,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("select fw.forum.id , fw " +
- "from ForumWatchImpl fw " +
- "where fw.poster.userId = :userId ");
+ Query query = session.getNamedQuery("findForumWatches");
query.setString("userId", user.getId().toString());
List results = query.list();
HashMap map = new HashMap(results.size());
@@ -1956,9 +1904,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery(" from ForumWatchImpl as fw " +
- " where fw.poster.userId = :userId " +
- " and fw.forum.id= :forumId ");
+ Query query = session.getNamedQuery("findForumWatchByUserAndForum");
query.setString("userId", user.getId().toString());
query.setInteger("forumId", forumId );
Object obj = query.uniqueResult();
@@ -1981,9 +1927,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery(" from TopicWatchImpl as tw " +
- " where tw.poster.userId = :userId " +
- " and tw.topic.id= :topicId ");
+ Query query = session.getNamedQuery("findTopicWatchByUserAndTopic");
query.setString("userId", user.getId().toString());
query.setInteger("topicId", topicId );
Object obj = query.uniqueResult();
@@ -2019,12 +1963,14 @@
}
session.save(poster);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
TopicWatch topicWatch = new TopicWatchImpl();
topicWatch.setPoster(poster);
topicWatch.setTopic(topic);
topicWatch.setMode(mode);
session.save(topicWatch);
+ session.flush(); // Luca Stancapiano - 8 feb 2008 - it is required for clustered versions
}
catch (HibernateException e)
{
@@ -2040,7 +1986,7 @@
try
{
Session session = getSession();
- Query query = session.createQuery("from TopicWatchImpl as f where f.id = :topicWatchId");
+ Query query = session.getNamedQuery("findTopicWatchById");
query.setString("topicWatchId",
topicWatchId.toString());
return (TopicWatch)query.uniqueResult();
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/MessageImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/MessageImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/MessageImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -35,7 +35,6 @@
private boolean signatureEnabled = true;
/**
- * @hibernate.property column="jbp_subject"
*/
public String getSubject()
{
@@ -53,8 +52,6 @@
}
/**
- * @hibernate.property column="jbp_text"
- * type="text"
*/
public String getText()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -21,7 +21,6 @@
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* @version $Revision: 916 $
- * @hibernate.class table="jbp_forums_polls"
*/
public class PollImpl
implements Serializable,
@@ -45,8 +44,6 @@
private Date creationDate;
/**
- * @hibernate.id column="jbp_poll_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -83,13 +80,6 @@
}
/**
- * @hibernate.list lazy="true"
- * cascade="all"
- * update="true"
- * table="jbp_forums_poll_option"
- * @hibernate.collection-key column="jbp_poll_id"
- * @hibernate.collection-index column="jbp_poll_option_position"
- * @hibernate.collection-composite-element class="org.jboss.portlet.forums.impl.PollOptionImpl"
*/
public List getOptions()
{
@@ -101,7 +91,6 @@
}
/**
- * @hibernate.property column="jbp_title"
*/
public String getTitle()
{
@@ -109,9 +98,6 @@
}
/**
- * @hibernate.property column="jbp_length"
- * unique="false"
- * update="true"
*/
public int getLength()
{
@@ -135,13 +121,6 @@
}*/
/**
- * @hibernate.set lazy="true"
- * cascade="all"
- * table="jbp_forums_poll_voted"
- * @hibernate.collection-key column="jbp_poll_id"
- * @hibernate.collection-element type="integer"
- * column="jbp_poll_voted"
- * not-null="true"
*/
public Set getVoted()
{
@@ -165,8 +144,6 @@
}
/**
- * @hibernate.property column="jbp_creation_date"
- * not-null="true"
*/
public Date getCreationDate()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollOptionImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollOptionImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PollOptionImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -39,8 +39,6 @@
}
/**
- * @hibernate.property column="jbp_votes"
- * not-null="true"
*/
public int getVotes()
{
@@ -53,8 +51,6 @@
}
/**
- * @hibernate.property column="jbp_question"
- * not-null="true"
*/
public String getQuestion()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -27,8 +27,6 @@
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* @version $Revision: 2066 $
- * @hibernate.class table="jbp_forums_posts"
- * @hibernate.cache usage="read-write"
*/
public class PostImpl
implements Serializable,
@@ -53,8 +51,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_topic_id"
- * class="org.jboss.portlet.forums.impl.TopicImpl"
*/
public Topic getTopic()
{
@@ -92,9 +88,6 @@
}
/**
- * @hibernate.property column="jbp_edit_count"
- * unique="false"
- * update="true"
*/
public int getEditCount()
{
@@ -112,9 +105,6 @@
}
/**
- * @hibernate.property column="jbp_edit_date"
- * unique="false"
- * update="true"
*/
public Date getEditDate()
{
@@ -132,8 +122,6 @@
}
/**
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -151,9 +139,6 @@
}
/**
- * @hibernate.property column="jbp_create_date"
- * unique="false"
- * update="false"
*/
public Date getCreateDate()
{
@@ -171,7 +156,6 @@
}
/**
- * @hibernate.component class="org.jboss.portlet.forums.impl.MessageImpl"
*/
public Message getMessage()
{
@@ -189,8 +173,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_poster_id"
- * class="org.jboss.portlet.forums.impl.PosterImpl"
*/
public Poster getPoster()
{
@@ -210,13 +192,6 @@
//TODO:BD - order it by something... is name ok?
/**
- * @hibernate.bag lazy="true"
- * cascade="all-delete-orphan"
- * order-by="jbp_name asc"
- * inverse="true"
- * table="jbp_forums_attachments"
- * @hibernate.collection-key column="jbp_post_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.AttachmentImpl"
*/
public List getAttachments()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PosterImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PosterImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/PosterImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -26,8 +26,6 @@
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
* @version $Revision: 2811 $
- * @hibernate.class table="jbp_forums_posters"
- * @hibernate.cache usage="read-write"
*/
public class PosterImpl
implements Poster
@@ -87,8 +85,6 @@
/**
* @return Returns the id.
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -107,8 +103,6 @@
* This column has the unique constraints as it reflects the user id.
*
* @return Returns the id.
- * @hibernate.property column="jbp_user_id"
- * unique="true"
*/
public String getUserId()
{
@@ -124,7 +118,6 @@
}
/**
- * @hibernate.property column="jbp_post_count"
*/
public int getPostCount()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -20,7 +20,6 @@
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
* @author <a href="mailto:boleslaw.dawidowicz at jboss.com">Boleslaw Dawidowicz</a>
* @version $Revision: 916 $
- * @hibernate.class table="jbp_forums_topics"
*/
public class TopicImpl
implements Serializable,
@@ -81,8 +80,6 @@
/**
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -105,13 +102,6 @@
*/
/**
- * @hibernate.bag lazy="true"
- * cascade="all-delete-orphan"
- * order-by="jbp_create_date asc"
- * inverse="true"
- * table="jbp_forums_posts"
- * @hibernate.collection-key column="jbp_topic_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.PostImpl"
*/
public List getPosts()
{
@@ -141,8 +131,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_forum_id"
- * class="org.jboss.portlet.forums.impl.ForumImpl"
*/
public Forum getForum()
{
@@ -160,9 +148,6 @@
}
/**
- * @hibernate.property column="jbp_view_count"
- * unique="false"
- * update="true"
*/
public int getViewCount()
{
@@ -180,9 +165,6 @@
}
/**
- * @hibernate.property column="jbp_replies"
- * unique="false"
- * update="true"
*/
public int getReplies()
{
@@ -264,9 +246,6 @@
}
/**
- * @hibernate.property column="jbp_last_post_date"
- * unique="false"
- * update="true"
*/
public Date getLastPostDate()
{
@@ -295,8 +274,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_poster"
- * class="org.jboss.portlet.forums.impl.PosterImpl"
*/
public Poster getPoster()
{
@@ -314,9 +291,6 @@
}
/**
- * @hibernate.property column="jbp_type"
- * unique="false"
- * update="true"
*/
public int getType()
{
@@ -334,9 +308,6 @@
}
/**
- * @hibernate.property column="jbp_status"
- * unique="false"
- * update="true"
*/
public int getStatus()
{
@@ -374,9 +345,6 @@
}*/
/**
- * @hibernate.property column="jbp_subject"
- * unique="false"
- * update="true"
*/
public String getSubject()
{
@@ -394,11 +362,6 @@
}
/**
- * @hibernate.bag lazy="true"
- * inverse="true"
- * cascade="all"
- * @hibernate.collection-key column="jbp_topic_id"
- * @hibernate.collection-one-to-many class="org.jboss.portlet.forums.impl.TopicWatchImpl"
*/
public List getWatches()
{
@@ -411,9 +374,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_poll"
- * class="org.jboss.portlet.forums.impl.PollImpl"
- * not-null="false"
*/
public Poll getPoll()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicWatchImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicWatchImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/TopicWatchImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -22,8 +22,6 @@
* @author <a href="mailto:julien at jboss.org">Julien Viet </a>
* @author <a href="mailto:theute at jboss.org">Thomas Heute </a>
* @version $Revision: 878 $
- * @hibernate.joined-subclass table="jbp_forums_topicswatch"
- * @hibernate.joined-subclass-key column="jbp_id"
*/
public class TopicWatchImpl
extends WatchImpl
@@ -41,8 +39,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_topic_id"
- * class="org.jboss.portlet.forums.impl.TopicImpl"
*/
public Topic getTopic()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/UploadedFileImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/UploadedFileImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/UploadedFileImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -85,7 +85,6 @@
}
/**
- * @hibernate.property column="jbp_content_type"
*/
public String getContentType()
{
@@ -98,7 +97,6 @@
}
/**
- * @hibernate.property column="jbp_size"
*/
public long getSize()
{
@@ -111,8 +109,6 @@
}
/**
- * @hibernate.property column="jbp_name"
- * type="text"
*/
public String getName()
{
@@ -135,9 +131,6 @@
}
/**
- * @hibernate.property column="jbp_content"
- * type="blob"
- * length="100000000"
*/
public Blob getContent()
{
Modified: labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/WatchImpl.java
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/WatchImpl.java 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/main/org/jboss/portlet/forums/impl/WatchImpl.java 2008-02-07 18:59:32 UTC (rev 18393)
@@ -18,7 +18,6 @@
*
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @version $Revision: 916 $
- * @hibernate.class table="jbp_forums_watch"
*/
public class WatchImpl implements Serializable, Watch
{
@@ -39,8 +38,6 @@
private Poster poster;
/**
- * @hibernate.id column="jbp_id"
- * generator-class="native"
*/
public Integer getId()
{
@@ -56,8 +53,6 @@
}
/**
- * @hibernate.many-to-one column="jbp_poster_id"
- * class="org.jboss.portlet.forums.impl.PosterImpl"
*/
public Poster getPoster()
{
@@ -70,9 +65,6 @@
}
/**
- * @hibernate.property column="jbp_mode"
- * unique="false"
- * update="true"
*/
public int getMode()
{
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+ <display-name>JBoss Forums</display-name>
+ <module>
+ <java>portal-forums-ui.jar</java>
+ </module>
+ <module>
+ <java>jsf-facelets.jar</java>
+ </module>
+ <module>
+ <java>el-api.jar</java>
+ </module>
+ <module>
+ <java>el-ri.jar</java>
+ </module>
+ <module>
+ <java>tomahawk.jar</java>
+ </module>
+ <module>
+ <java>myfaces-impl.jar</java>
+ </module>
+ <module>
+ <java>myfaces-api.jar</java>
+ </module>
+ <module>
+ <java>commons-collections.jar</java>
+ </module>
+ <module>
+ <java>commons-beanutils.jar</java>
+ </module>
+ <module>
+ <java>commons-el.jar</java>
+ </module>
+ <module>
+ <java>commons-digester-1.6.jar</java>
+ </module>
+ <module>
+ <java>commons-codec.jar</java>
+ </module>
+ <module>
+ <java>portal-faces-lib.jar</java>
+ </module>
+ <module>
+ <java>jsf-example.jar</java>
+ </module>
+ <module>
+ <web>
+ <web-uri>portal-forums.war</web-uri>
+ <!--context-root>/forums</context-root-->
+ </web>
+ </module>
+</application>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/application.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-app>
+ <loader-repository>
+ forums.jboss.com:loader=jboss-forums-ha-sar
+ <loader-repository-config>
+ java2ParentDelegation=false
+ </loader-repository-config>
+ </loader-repository>
+ <module>
+ <java>portal-forums-ui.jar</java>
+ </module>
+ <module>
+ <service>portal-forums-ha.sar</service>
+ </module>
+ <module>
+ <service>portal-forums-authz-plugin.sar</service>
+ </module>
+ <module>
+ <service>portal-forums-cache-plugin.sar</service>
+ </module>
+ <module>
+ <service>jboss-service.xml</service>
+ </module>
+</jboss-app>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/jboss-app.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+ "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+ "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The JAAS login configuration file for the java:/jaas/jbossweb-form-auth
+security domain used by the security-spec test case
+-->
+<!--<policy>
+ <application-policy name="forums">
+ <authentication>
+ <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
+ <module-option name="unauthenticatedIdentity">guest</module-option>
+ <module-option name="hashAlgorithm">MD5</module-option>
+ <module-option name="hashEncoding">HEX</module-option>
+ <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+ <module-option name="additionalRole">Authenticated</module-option>
+ <module-option name="password-stacking">useFirstPass</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+</policy>-->
+<policy>
+ <application-policy name="forums">
+ <authentication>
+<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required"> <module-option name="unauthenticatedIdentity">guest</module-option>
+ <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+ <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
+ <module-option name="additionalRole">Authenticated</module-option>
+ <module-option name="password-stacking">useFirstPass</module-option>
+</login-module>
+</authentication>
+</application-policy>
+</policy>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/META-INF/security-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <!-- hooking in a login module for the standalone version of JSF Forums -->
+ <!-- The custom JAAS login configuration that installs
+ a Configuration capable of dynamically updating the
+ config settings
+ -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+ name="jboss.security.tests:service=LoginConfig">
+ <attribute name="AuthConfig">META-INF/security-config.xml</attribute>
+ <depends optional-attribute-name="LoginConfigService">
+ jboss.security:service=XMLLoginConfig
+ </depends>
+ <depends optional-attribute-name="SecurityManagerService">
+ jboss.security:service=JaasSecurityManager
+ </depends>
+ </mbean>
+</server>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-ear/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application>
+ <display-name>JBoss Forums</display-name>
+ <module>
+ <java>portal-forums-ui.jar</java>
+ </module>
+ <module>
+ <java>jsf-facelets.jar</java>
+ </module>
+ <module>
+ <java>el-api.jar</java>
+ </module>
+ <module>
+ <java>el-ri.jar</java>
+ </module>
+ <module>
+ <java>tomahawk.jar</java>
+ </module>
+ <module>
+ <java>myfaces-impl.jar</java>
+ </module>
+ <module>
+ <java>myfaces-api.jar</java>
+ </module>
+ <module>
+ <java>commons-collections.jar</java>
+ </module>
+ <module>
+ <java>commons-beanutils.jar</java>
+ </module>
+ <module>
+ <java>commons-el.jar</java>
+ </module>
+ <module>
+ <java>commons-digester-1.6.jar</java>
+ </module>
+ <module>
+ <java>commons-codec.jar</java>
+ </module>
+ <module>
+ <java>portal-faces-lib.jar</java>
+ </module>
+ <module>
+ <java>jsf-example.jar</java>
+ </module>
+ <module>
+ <web>
+ <web-uri>portal-forums.war</web-uri>
+ <!--context-root>/forums</context-root-->
+ </web>
+ </module>
+</application>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/application.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jboss-app>
+ <loader-repository>
+ forums.jboss.com:loader=jboss-forums-ha-sar
+ <loader-repository-config>
+ java2ParentDelegation=false
+ </loader-repository-config>
+ </loader-repository>
+ <module>
+ <java>portal-forums-ui.jar</java>
+ </module>
+ <module>
+ <service>portal-forums-ha-jbp.sar</service>
+ </module>
+ <module>
+ <service>portal-forums-authz-plugin.sar</service>
+ </module>
+ <module>
+ <service>jboss-service.xml</service>
+ </module>
+</jboss-app>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/jboss-app.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,34 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+ "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+ "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<!-- The JAAS login configuration file for the java:/jaas/jbossweb-form-auth
+security domain used by the security-spec test case
+-->
+<!--<policy>
+ <application-policy name="forums">
+ <authentication>
+ <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
+ <module-option name="unauthenticatedIdentity">guest</module-option>
+ <module-option name="hashAlgorithm">MD5</module-option>
+ <module-option name="hashEncoding">HEX</module-option>
+ <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+ <module-option name="additionalRole">Authenticated</module-option>
+ <module-option name="password-stacking">useFirstPass</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+</policy>-->
+<policy>
+ <application-policy name="forums">
+ <authentication>
+<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required"> <module-option name="unauthenticatedIdentity">guest</module-option>
+ <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
+ <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
+ <module-option name="additionalRole">Authenticated</module-option>
+ <module-option name="password-stacking">useFirstPass</module-option>
+</login-module>
+</authentication>
+</application-policy>
+</policy>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/META-INF/security-config.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <!-- hooking in a login module for the standalone version of JSF Forums -->
+ <!-- The custom JAAS login configuration that installs
+ a Configuration capable of dynamically updating the
+ config settings
+ -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+ name="jboss.security.tests:service=LoginConfig">
+ <attribute name="AuthConfig">META-INF/security-config.xml</attribute>
+ <depends optional-attribute-name="LoginConfigService">
+ jboss.security:service=XMLLoginConfig
+ </depends>
+ <depends optional-attribute-name="SecurityManagerService">
+ jboss.security:service=JaasSecurityManager
+ </depends>
+ </mbean>
+</server>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-ear/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal.forums:service=Hibernate"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/hibernate/hibernate.cfg.xml</attribute>
+ <attribute name="SetupLocation">conf/hibernate/setup.txt</attribute>
+ </mbean>
+ <mbean
+ code="org.jboss.portlet.forums.impl.ForumsModuleImpl"
+ name="portal.forums:service=Module,type=Forums"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!-- Flood interval in seconds -->
+ <attribute name="FloodInterval">30</attribute>
+ <!-- Guest user -->
+ <attribute name="GuestUserName">guest</attribute>
+ <!-- Email address used for FROM field of email notification -->
+ <attribute name="FromAddress">portal at example.com</attribute>
+ <attribute name="JNDIName">java:portal/ForumsModule</attribute>
+ <depends optional-attribute-name="Hibernate" proxy-type="attribute">portal.forums:service=Hibernate</depends>
+ </mbean>
+<!-- configure the AuthorizationContext for this application -->
+<mbean name="portal.forums:service=AuthorizationContext"
+ code="org.jboss.portlet.forums.auth.AuthorizationContextImpl"
+ xmbean-dd=""
+ >
+ <!-- plug-in an AuthorizationProvider that implements the AuthorizationInterface here -->
+ <attribute name="providerImpl">org.jboss.forums.security.AuthorizationProvider</attribute>
+ <xmbean>
+ <class>org.jboss.portlet.forums.auth.AuthorizationContextImpl</class>
+ <constructor>
+ <name>org.jboss.portlet.forums.auth.AuthorizationContextImpl</name>
+ </constructor>
+ <attribute access="write" setMethod="setProviderImpl">
+ <name>providerImpl</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute access="read-only" >
+ <name>provider</name>
+ <type>org.jboss.portlet.forums.auth.AuthorizationInterface</type>
+ </attribute>
+ <operation impact="INFO">
+ <description>Method for getting Provider</description>
+ <name>provider</name>
+ <return-type>org.jboss.portlet.forums.auth.AuthorizationInterface</return-type>
+ </operation>
+ <operation>
+ <description>The start lifecycle operation</description>
+ <name>start</name>
+ </operation>
+ <operation>
+ <description>The stop lifecycle operation</description>
+ <name>stop</name>
+ </operation>
+ </xmbean>
+</mbean>
+</server>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,41 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <property name="connection.datasource">java:@portal.datasource.name@</property>
+ <property name="show_sql">false</property>
+ <property name="format_sql">false</property>
+
+ <!-- Use the C3P0 connection pool provider -->
+ <property name="hibernate.c3p0.min_size">5</property>
+ <property name="hibernate.c3p0.max_size">20</property>
+ <property name="hibernate.c3p0.timeout">300</property>
+ <property name="hibernate.c3p0.max_statements">50</property>
+ <property name="hibernate.c3p0.idle_test_period">3000</property>
+
+ <property name="cache.provider_class">org.jboss.portal.jems.hibernate.JMXTreeCacheProvider</property>
+ <property name="cache.object_name">portal:service=TreeCacheProvider,type=hibernate</property>
+
+ <property name="hibernate.cache.use_query_cache">true</property>
+ <property name="hibernate.cache.use_second_level_cache">true</property>
+ <property name="hibernate.generate_statistics">true</property>
+ <property name="hibernate.cache.use_structured_entries">true</property>
+ <!-- Force the dialect instead of using autodetection -->
+ <!--
+ <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ -->
+
+ <!-- Mapping files -->
+ <mapping resource="org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/ForumImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PollImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PosterImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PostImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/TopicImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/WatchImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/Queries.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/hibernate.cfg.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,60 @@
+// This bsh script setup the default content of the portal.
+// It is called when the SessionFactoryBinder service has created a schema and needs to populate it
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portlet.forums.impl.CategoryImpl;
+import org.jboss.portlet.forums.impl.ForumImpl;
+
+try
+{
+ session = SessionFactory.openSession();
+ tx = session.beginTransaction();
+
+ //
+ CategoryImpl cat = new CategoryImpl();
+ cat.setOrder(10);
+ cat.setTitle("Dummy demo category");
+ cat.setForums(new java.util.ArrayList());
+
+ //
+ ForumImpl forum1 = new ForumImpl();
+ forum1.setDescription("First description");
+ forum1.setCategory(cat);
+ forum1.setLastPost(null);
+ forum1.setName("First forum");
+ forum1.setOrder(10);
+ forum1.setTopicCount(0);
+ forum1.setPostCount(0);
+ forum1.setPruneEnable(true);
+ forum1.setPruneNext(0);
+ forum1.setStatus(0);
+ //forum1.setType(0);
+ ForumImpl forum2 = new ForumImpl();
+ forum2.setDescription("Second description");
+ forum2.setCategory(cat);
+ forum2.setLastPost(null);
+ forum2.setName("Second forum");
+ forum2.setOrder(20);
+ forum2.setTopicCount(0);
+ forum2.setPostCount(0);
+ forum2.setPruneEnable(true);
+ forum2.setPruneNext(0);
+ forum2.setStatus(0);
+ //forum2.setType(0);
+
+ //
+ //cat.getForums().add(forum1);
+ //cat.getForums().add(forum2);
+ cat.addForum(forum1);
+ cat.addForum(forum2);
+
+ //
+ session.save(cat);
+ session.flush();
+ //session.save(forum1);
+ //session.save(forum2);
+ tx.commit();
+}
+finally
+{
+ session.close();
+}
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/conf/hibernate/setup.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.AttachmentImpl"
+ table="jbp_forums_attachments"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_attachment_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-AttachmentImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="comment"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_comment"
+ />
+
+ <component
+ name="file"
+ class="org.jboss.portlet.forums.impl.UploadedFileImpl"
+ >
+ <property
+ name="contentType"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_content_type"
+ />
+
+ <property
+ name="size"
+ type="long"
+ update="true"
+ insert="true"
+ column="jbp_size"
+ />
+
+ <property
+ name="name"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ />
+
+ <property
+ name="content"
+ type="blob"
+ update="true"
+ insert="true"
+ column="jbp_content"
+ length="100000000"
+ />
+
+ </component>
+
+ <many-to-one
+ name="post"
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_post_id"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-AttachmentImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.CategoryImpl"
+ table="jbp_forums_categories"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-CategoryImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="forums"
+ table="jbp_forums_forums"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_order asc"
+ >
+ <cache
+ usage="transactional"
+ />
+
+ <key
+ column="jbp_category_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ />
+
+ </bag>
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-CategoryImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.ForumImpl"
+ table="jbp_forums_forums"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-ForumImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="category"
+ class="org.jboss.portlet.forums.impl.CategoryImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_category_id"
+ />
+
+ <property
+ name="description"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_description"
+ unique="false"
+ />
+
+ <property
+ name="name"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ unique="false"
+ />
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="topicCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_topic_count"
+ unique="false"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <bag
+ name="topics"
+ table="jbp_forums_topics"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_last_post_date asc"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="forumWatch"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-ForumImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PollImpl"
+ table="jbp_forums_polls"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_poll_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PollImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <list
+ name="options"
+ table="jbp_forums_poll_option"
+ lazy="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <index
+ column="jbp_poll_option_position"
+ />
+
+ <composite-element
+ class="org.jboss.portlet.forums.impl.PollOptionImpl"
+ >
+ <property
+ name="votes"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_votes"
+ not-null="true"
+ />
+
+ <property
+ name="question"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_question"
+ not-null="true"
+ />
+
+ </composite-element>
+
+ </list>
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ />
+
+ <property
+ name="length"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_length"
+ unique="false"
+ />
+
+ <set
+ name="voted"
+ table="jbp_forums_poll_voted"
+ lazy="true"
+ cascade="all"
+ sort="unsorted"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <element
+ column="jbp_poll_voted"
+ type="integer"
+ not-null="true"
+ unique="false"
+ />
+
+ </set>
+
+ <property
+ name="creationDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_creation_date"
+ not-null="true"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PollImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PostImpl"
+ table="jbp_forums_posts"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PostImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ <property
+ name="editCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_edit_count"
+ unique="false"
+ />
+
+ <property
+ name="editDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_edit_date"
+ unique="false"
+ />
+
+ <property
+ name="createDate"
+ type="java.util.Date"
+ update="false"
+ insert="true"
+ column="jbp_create_date"
+ unique="false"
+ />
+
+ <component
+ name="message"
+ class="org.jboss.portlet.forums.impl.MessageImpl"
+ >
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ />
+
+ <property
+ name="text"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_text"
+ />
+
+ </component>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <bag
+ name="attachments"
+ table="jbp_forums_attachments"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_name asc"
+ >
+
+ <key
+ column="jbp_post_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.AttachmentImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PostImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PosterImpl"
+ table="jbp_forums_posters"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PosterImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="userId"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_user_id"
+ unique="true"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PosterImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+
+ <query name="findForumByIdFetchTopics" cacheable="true"><![CDATA[select f
+ from ForumImpl f
+ left outer join fetch f.topics
+ where f.id = :forumId]]></query>
+
+ <query name="findCategoryByIdFetchForums" cacheable="true"><![CDATA[from CategoryImpl as c
+ join fetch c.forums
+ where c.id=:categoryId]]></query>
+
+ <query name="findPosterByUserId" cacheable="true"><![CDATA[from PosterImpl as u where u.userId=:userId]]></query>
+
+ <query name="findCategories" cacheable="true"><![CDATA[from CategoryImpl as c
+ order by c.order asc]]></query>
+
+ <query name="findCategoriesFetchForums" cacheable="true"><![CDATA[select c
+ from CategoryImpl as c
+ left outer join fetch c.forums
+ order by c.order asc]]></query>
+
+ <query name="findForums" cacheable="true"><![CDATA[from ForumImpl as f
+ order by f.order asc]]></query>
+
+ <query name="findForumsByCategoryId" cacheable="true"><![CDATA[from ForumImpl as f where f.category=:categoryId order by f.order asc]]></query>
+
+ <query name="findAnnouncements" cacheable="true"><![CDATA[from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate]]></query>
+
+ <query name="findTopics" cacheable="true"><![CDATA[from TopicImpl]]></query>
+
+ <query name="findTopicsTypeasc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsTypedesc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsForumasc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsForumdesc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHot" cacheable="true"><![CDATA[from TopicImpl as t where t.replies > :replies
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsByLatestPosts" cacheable="true"><![CDATA[from TopicImpl as t order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHottest" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.replies desc]]></query>
+
+ <query name="findTopicsMostViewed" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.viewCount desc]]></query>
+
+ <query name="getLastCategoryOrder" cacheable="true"><![CDATA[select max(c.order) from CategoryImpl as c]]></query>
+
+ <query name="getLastForumOrder" cacheable="true"><![CDATA[select max(f.order) from ForumImpl as f where f.category = :categoryId]]></query>
+
+ <query name="findTopicsForumNoOrder" cacheable="true"><![CDATA[from TopicImpl as t where t.forum = :forumid]]></query>
+
+ <query name="findPosts" cacheable="true"><![CDATA[from PostImpl]]></query>
+
+ <query name="findPostsByTopicIdasc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate asc]]></query>
+
+ <query name="findPostsByTopicIddesc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate desc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersasc" cacheable="true"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate asc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersdesc" cacheable="true"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate desc]]></query>
+
+ <query name="findPostIdsasc" cacheable="true"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate asc]]></query>
+
+ <query name="findPostIdsdesc" cacheable="true"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate desc]]></query>
+
+ <query name="findPostsByTopicIdNoOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId]]></query>
+
+ <query name="findLastPostDateForUser" cacheable="true"><![CDATA[select max(p.createDate) from PostImpl as p where p.poster.userId = :userId]]></query>
+
+ <query name="findLastPost" cacheable="true"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.createDate = (
+ select DISTINCT MAX(topic.lastPostDate)
+ from TopicImpl as topic
+ where topic.forum = :forumId
+ )]]></query>
+
+ <query name="findFirstPost" cacheable="true"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.topic = :topicId
+ AND p.createDate = :lastPostDate]]></query>
+
+ <query name="findLastPostOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic = :topicId order by p.createDate desc]]></query>
+
+ <query name="findLastPostsOfTopics" cacheable="true"><![CDATA[select topic.lastPostDate as maxDate , topic.id
+ from TopicImpl as topic
+ where topic.forum.id = :forumId]]></query>
+
+ <query name="findLastPostsOfTopicsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findLastPostsOfForums" cacheable="true"><![CDATA[select MAX(topic.lastPostDate) as maxDate , topic.forum.id
+ from TopicImpl as topic
+ group by topic.forum.id]]></query>
+
+ <query name="findLastPostsOfForumsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findForumWatchByUser" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchedByUser" cacheable="true"><![CDATA[select f
+ from ForumImpl as f where f.id IN (
+ select fw.forum.id from ForumWatchImpl fw
+ where fw.poster.userId = :userId )]]></query>
+
+ <query name="findTopicWatchedByUser" cacheable="true"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatchedByUserCreateDate" cacheable="true"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ and (t.lastPostDate > :datePoint)
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatches" cacheable="true"><![CDATA[select tw.topic.id , tw
+ from TopicWatchImpl tw
+ where tw.poster.userId = :userId]]></query>
+
+ <query name="findPostsFromForumasc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromForumdesc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsFromCategoryasc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromCategorydesc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsOrderasc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsOrderdesc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+ desc]]></query>
+
+ <query name="findForumWatchById" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.id = :forumWatchId]]></query>
+
+ <query name="findForumWatches" cacheable="true"><![CDATA[select fw.forum.id , fw
+ from ForumWatchImpl fw
+ where fw.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchByUserAndForum" cacheable="true"><![CDATA[from ForumWatchImpl as fw
+ where fw.poster.userId = :userId
+ and fw.forum.id= :forumId]]></query>
+
+ <query name="findTopicWatchByUserAndTopic" cacheable="true"><![CDATA[from TopicWatchImpl as tw
+ where tw.poster.userId = :userId
+ and tw.topic.id= :topicId]]></query>
+
+ <query name="findTopicWatchById" cacheable="true"><![CDATA[from TopicWatchImpl as f where f.id = :topicWatchId]]></query>
+
+
+</hibernate-mapping>
\ No newline at end of file
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.TopicImpl"
+ table="jbp_forums_topics"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-TopicImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="posts"
+ table="jbp_forums_posts"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_create_date asc"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ <property
+ name="viewCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_view_count"
+ unique="false"
+ />
+
+ <property
+ name="replies"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_replies"
+ unique="false"
+ />
+
+ <property
+ name="lastPostDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_last_post_date"
+ unique="false"
+ />
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster"
+ />
+
+ <property
+ name="type"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_type"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ unique="false"
+ />
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="poll"
+ class="org.jboss.portlet.forums.impl.PollImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poll"
+ not-null="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-TopicImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-jbp-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.WatchImpl"
+ table="jbp_forums_watch"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-WatchImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <property
+ name="mode"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_mode"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-WatchImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ table="jbp_forums_topicswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ </joined-subclass>
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ table="jbp_forums_forumswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ </joined-subclass>
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+ <mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal.forums:service=Hibernate"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+ <attribute name="DoChecking">true</attribute>
+ <attribute name="ConfigLocation">conf/hibernate/hibernate.cfg.xml</attribute>
+ <attribute name="SetupLocation">conf/hibernate/setup.txt</attribute>
+ </mbean>
+ <mbean
+ code="org.jboss.portlet.forums.impl.ForumsModuleImpl"
+ name="portal.forums:service=Module,type=Forums"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <!-- Flood interval in seconds -->
+ <attribute name="FloodInterval">30</attribute>
+ <!-- Guest user -->
+ <attribute name="GuestUserName">guest</attribute>
+ <!-- Email address used for FROM field of email notification -->
+ <attribute name="FromAddress">portal at example.com</attribute>
+ <attribute name="JNDIName">java:portal/ForumsModule</attribute>
+ <depends optional-attribute-name="Hibernate" proxy-type="attribute">portal.forums:service=Hibernate</depends>
+ </mbean>
+<!-- configure the AuthorizationContext for this application -->
+<mbean name="portal.forums:service=AuthorizationContext"
+ code="org.jboss.portlet.forums.auth.AuthorizationContextImpl"
+ xmbean-dd=""
+ >
+ <!-- plug-in an AuthorizationProvider that implements the AuthorizationInterface here -->
+ <attribute name="providerImpl">org.jboss.forums.security.AuthorizationProvider</attribute>
+ <xmbean>
+ <class>org.jboss.portlet.forums.auth.AuthorizationContextImpl</class>
+ <constructor>
+ <name>org.jboss.portlet.forums.auth.AuthorizationContextImpl</name>
+ </constructor>
+ <attribute access="write" setMethod="setProviderImpl">
+ <name>providerImpl</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute access="read-only" >
+ <name>provider</name>
+ <type>org.jboss.portlet.forums.auth.AuthorizationInterface</type>
+ </attribute>
+ <operation impact="INFO">
+ <description>Method for getting Provider</description>
+ <name>provider</name>
+ <return-type>org.jboss.portlet.forums.auth.AuthorizationInterface</return-type>
+ </operation>
+ <operation>
+ <description>The start lifecycle operation</description>
+ <name>start</name>
+ </operation>
+ <operation>
+ <description>The stop lifecycle operation</description>
+ <name>stop</name>
+ </operation>
+ </xmbean>
+</mbean>
+</server>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/META-INF/jboss-service.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,41 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <property name="connection.datasource">java:@portal.datasource.name@</property>
+ <property name="show_sql">false</property>
+ <property name="format_sql">false</property>
+
+ <!-- Use the C3P0 connection pool provider -->
+ <property name="hibernate.c3p0.min_size">5</property>
+ <property name="hibernate.c3p0.max_size">20</property>
+ <property name="hibernate.c3p0.timeout">300</property>
+ <property name="hibernate.c3p0.max_statements">50</property>
+ <property name="hibernate.c3p0.idle_test_period">3000</property>
+
+ <property name="cache.provider_class">org.jboss.portlet.forums.util.cache.JMXTreeCacheProvider</property>
+ <property name="cache.object_name">forums:service=TreeCacheProvider,type=hibernate</property>
+
+ <property name="hibernate.cache.use_query_cache">true</property>
+ <property name="hibernate.cache.use_second_level_cache">true</property>
+ <property name="hibernate.generate_statistics">true</property>
+ <property name="hibernate.cache.use_structured_entries">true</property>
+ <!-- Force the dialect instead of using autodetection -->
+ <!--
+ <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ -->
+
+ <!-- Mapping files -->
+ <mapping resource="org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/ForumImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PollImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PosterImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/PostImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/TopicImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/WatchImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml"/>
+ <mapping resource="org/jboss/portlet/forums/impl/Queries.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/hibernate.cfg.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,60 @@
+// This bsh script setup the default content of the portal.
+// It is called when the SessionFactoryBinder service has created a schema and needs to populate it
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portlet.forums.impl.CategoryImpl;
+import org.jboss.portlet.forums.impl.ForumImpl;
+
+try
+{
+ session = SessionFactory.openSession();
+ tx = session.beginTransaction();
+
+ //
+ CategoryImpl cat = new CategoryImpl();
+ cat.setOrder(10);
+ cat.setTitle("Dummy demo category");
+ cat.setForums(new java.util.ArrayList());
+
+ //
+ ForumImpl forum1 = new ForumImpl();
+ forum1.setDescription("First description");
+ forum1.setCategory(cat);
+ forum1.setLastPost(null);
+ forum1.setName("First forum");
+ forum1.setOrder(10);
+ forum1.setTopicCount(0);
+ forum1.setPostCount(0);
+ forum1.setPruneEnable(true);
+ forum1.setPruneNext(0);
+ forum1.setStatus(0);
+ //forum1.setType(0);
+ ForumImpl forum2 = new ForumImpl();
+ forum2.setDescription("Second description");
+ forum2.setCategory(cat);
+ forum2.setLastPost(null);
+ forum2.setName("Second forum");
+ forum2.setOrder(20);
+ forum2.setTopicCount(0);
+ forum2.setPostCount(0);
+ forum2.setPruneEnable(true);
+ forum2.setPruneNext(0);
+ forum2.setStatus(0);
+ //forum2.setType(0);
+
+ //
+ //cat.getForums().add(forum1);
+ //cat.getForums().add(forum2);
+ cat.addForum(forum1);
+ cat.addForum(forum2);
+
+ //
+ session.save(cat);
+ session.flush();
+ //session.save(forum1);
+ //session.save(forum2);
+ tx.commit();
+}
+finally
+{
+ session.close();
+}
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/conf/hibernate/setup.txt
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.AttachmentImpl"
+ table="jbp_forums_attachments"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_attachment_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-AttachmentImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="comment"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_comment"
+ />
+
+ <component
+ name="file"
+ class="org.jboss.portlet.forums.impl.UploadedFileImpl"
+ >
+ <property
+ name="contentType"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_content_type"
+ />
+
+ <property
+ name="size"
+ type="long"
+ update="true"
+ insert="true"
+ column="jbp_size"
+ />
+
+ <property
+ name="name"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ />
+
+ <property
+ name="content"
+ type="blob"
+ update="true"
+ insert="true"
+ column="jbp_content"
+ length="100000000"
+ />
+
+ </component>
+
+ <many-to-one
+ name="post"
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_post_id"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-AttachmentImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.CategoryImpl"
+ table="jbp_forums_categories"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-CategoryImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="forums"
+ table="jbp_forums_forums"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_order asc"
+ >
+ <cache
+ usage="transactional"
+ />
+
+ <key
+ column="jbp_category_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ />
+
+ </bag>
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-CategoryImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.ForumImpl"
+ table="jbp_forums_forums"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-ForumImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="category"
+ class="org.jboss.portlet.forums.impl.CategoryImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_category_id"
+ />
+
+ <property
+ name="description"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_description"
+ unique="false"
+ />
+
+ <property
+ name="name"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ unique="false"
+ />
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="topicCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_topic_count"
+ unique="false"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <bag
+ name="topics"
+ table="jbp_forums_topics"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_last_post_date asc"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="forumWatch"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-ForumImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PollImpl"
+ table="jbp_forums_polls"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_poll_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PollImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <list
+ name="options"
+ table="jbp_forums_poll_option"
+ lazy="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <index
+ column="jbp_poll_option_position"
+ />
+
+ <composite-element
+ class="org.jboss.portlet.forums.impl.PollOptionImpl"
+ >
+ <property
+ name="votes"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_votes"
+ not-null="true"
+ />
+
+ <property
+ name="question"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_question"
+ not-null="true"
+ />
+
+ </composite-element>
+
+ </list>
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ />
+
+ <property
+ name="length"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_length"
+ unique="false"
+ />
+
+ <set
+ name="voted"
+ table="jbp_forums_poll_voted"
+ lazy="true"
+ cascade="all"
+ sort="unsorted"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <element
+ column="jbp_poll_voted"
+ type="integer"
+ not-null="true"
+ unique="false"
+ />
+
+ </set>
+
+ <property
+ name="creationDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_creation_date"
+ not-null="true"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PollImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PostImpl"
+ table="jbp_forums_posts"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PostImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ <property
+ name="editCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_edit_count"
+ unique="false"
+ />
+
+ <property
+ name="editDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_edit_date"
+ unique="false"
+ />
+
+ <property
+ name="createDate"
+ type="java.util.Date"
+ update="false"
+ insert="true"
+ column="jbp_create_date"
+ unique="false"
+ />
+
+ <component
+ name="message"
+ class="org.jboss.portlet.forums.impl.MessageImpl"
+ >
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ />
+
+ <property
+ name="text"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_text"
+ />
+
+ </component>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <bag
+ name="attachments"
+ table="jbp_forums_attachments"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_name asc"
+ >
+
+ <key
+ column="jbp_post_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.AttachmentImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PostImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PosterImpl"
+ table="jbp_forums_posters"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PosterImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="userId"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_user_id"
+ unique="true"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PosterImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+
+ <query name="findForumByIdFetchTopics" cacheable="true"><![CDATA[select f
+ from ForumImpl f
+ left outer join fetch f.topics
+ where f.id = :forumId]]></query>
+
+ <query name="findCategoryByIdFetchForums" cacheable="true"><![CDATA[from CategoryImpl as c
+ join fetch c.forums
+ where c.id=:categoryId]]></query>
+
+ <query name="findPosterByUserId" cacheable="true"><![CDATA[from PosterImpl as u where u.userId=:userId]]></query>
+
+ <query name="findCategories" cacheable="true"><![CDATA[from CategoryImpl as c
+ order by c.order asc]]></query>
+
+ <query name="findCategoriesFetchForums" cacheable="true"><![CDATA[select c
+ from CategoryImpl as c
+ left outer join fetch c.forums
+ order by c.order asc]]></query>
+
+ <query name="findForums" cacheable="true"><![CDATA[from ForumImpl as f
+ order by f.order asc]]></query>
+
+ <query name="findForumsByCategoryId" cacheable="true"><![CDATA[from ForumImpl as f where f.category=:categoryId order by f.order asc]]></query>
+
+ <query name="findAnnouncements" cacheable="true"><![CDATA[from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate]]></query>
+
+ <query name="findTopics" cacheable="true"><![CDATA[from TopicImpl]]></query>
+
+ <query name="findTopicsTypeasc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsTypedesc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsForumasc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsForumdesc" cacheable="true"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHot" cacheable="true"><![CDATA[from TopicImpl as t where t.replies > :replies
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsByLatestPosts" cacheable="true"><![CDATA[from TopicImpl as t order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHottest" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.replies desc]]></query>
+
+ <query name="findTopicsMostViewed" cacheable="true"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.viewCount desc]]></query>
+
+ <query name="getLastCategoryOrder" cacheable="true"><![CDATA[select max(c.order) from CategoryImpl as c]]></query>
+
+ <query name="getLastForumOrder" cacheable="true"><![CDATA[select max(f.order) from ForumImpl as f where f.category = :categoryId]]></query>
+
+ <query name="findTopicsForumNoOrder" cacheable="true"><![CDATA[from TopicImpl as t where t.forum = :forumid]]></query>
+
+ <query name="findPosts" cacheable="true"><![CDATA[from PostImpl]]></query>
+
+ <query name="findPostsByTopicIdasc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate asc]]></query>
+
+ <query name="findPostsByTopicIddesc" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate desc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersasc" cacheable="true"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate asc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersdesc" cacheable="true"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate desc]]></query>
+
+ <query name="findPostIdsasc" cacheable="true"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate asc]]></query>
+
+ <query name="findPostIdsdesc" cacheable="true"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate desc]]></query>
+
+ <query name="findPostsByTopicIdNoOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic=:topicId]]></query>
+
+ <query name="findLastPostDateForUser" cacheable="true"><![CDATA[select max(p.createDate) from PostImpl as p where p.poster.userId = :userId]]></query>
+
+ <query name="findLastPost" cacheable="true"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.createDate = (
+ select DISTINCT MAX(topic.lastPostDate)
+ from TopicImpl as topic
+ where topic.forum = :forumId
+ )]]></query>
+
+ <query name="findFirstPost" cacheable="true"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.topic = :topicId
+ AND p.createDate = :lastPostDate]]></query>
+
+ <query name="findLastPostOrder" cacheable="true"><![CDATA[from PostImpl as p where p.topic = :topicId order by p.createDate desc]]></query>
+
+ <query name="findLastPostsOfTopics" cacheable="true"><![CDATA[select topic.lastPostDate as maxDate , topic.id
+ from TopicImpl as topic
+ where topic.forum.id = :forumId]]></query>
+
+ <query name="findLastPostsOfTopicsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findLastPostsOfForums" cacheable="true"><![CDATA[select MAX(topic.lastPostDate) as maxDate , topic.forum.id
+ from TopicImpl as topic
+ group by topic.forum.id]]></query>
+
+ <query name="findLastPostsOfForumsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findForumWatchByUser" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchedByUser" cacheable="true"><![CDATA[select f
+ from ForumImpl as f where f.id IN (
+ select fw.forum.id from ForumWatchImpl fw
+ where fw.poster.userId = :userId )]]></query>
+
+ <query name="findTopicWatchedByUser" cacheable="true"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatchedByUserCreateDate" cacheable="true"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ and (t.lastPostDate > :datePoint)
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatches" cacheable="true"><![CDATA[select tw.topic.id , tw
+ from TopicWatchImpl tw
+ where tw.poster.userId = :userId]]></query>
+
+ <query name="findPostsFromForumasc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromForumdesc" cacheable="true"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsFromCategoryasc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromCategorydesc" cacheable="true"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsOrderasc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsOrderdesc" cacheable="true"><![CDATA[select p from PostImpl as p order by p.createDate
+ desc]]></query>
+
+ <query name="findForumWatchById" cacheable="true"><![CDATA[from ForumWatchImpl as f where f.id = :forumWatchId]]></query>
+
+ <query name="findForumWatches" cacheable="true"><![CDATA[select fw.forum.id , fw
+ from ForumWatchImpl fw
+ where fw.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchByUserAndForum" cacheable="true"><![CDATA[from ForumWatchImpl as fw
+ where fw.poster.userId = :userId
+ and fw.forum.id= :forumId]]></query>
+
+ <query name="findTopicWatchByUserAndTopic" cacheable="true"><![CDATA[from TopicWatchImpl as tw
+ where tw.poster.userId = :userId
+ and tw.topic.id= :topicId]]></query>
+
+ <query name="findTopicWatchById" cacheable="true"><![CDATA[from TopicWatchImpl as f where f.id = :topicWatchId]]></query>
+
+
+</hibernate-mapping>
\ No newline at end of file
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.TopicImpl"
+ table="jbp_forums_topics"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-TopicImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="posts"
+ table="jbp_forums_posts"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_create_date asc"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ <property
+ name="viewCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_view_count"
+ unique="false"
+ />
+
+ <property
+ name="replies"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_replies"
+ unique="false"
+ />
+
+ <property
+ name="lastPostDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_last_post_date"
+ unique="false"
+ />
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster"
+ />
+
+ <property
+ name="type"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_type"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ unique="false"
+ />
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="poll"
+ class="org.jboss.portlet.forums.impl.PollImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poll"
+ not-null="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-TopicImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-ha-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.WatchImpl"
+ table="jbp_forums_watch"
+ >
+ <cache usage="transactional" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-WatchImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <property
+ name="mode"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_mode"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-WatchImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ table="jbp_forums_topicswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ </joined-subclass>
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ table="jbp_forums_forumswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ </joined-subclass>
+
+ </class>
+
+</hibernate-mapping>
Modified: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/hibernate.cfg.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -34,5 +34,7 @@
<mapping resource="org/jboss/portlet/forums/impl/TopicImpl.hbm.xml"/>
<mapping resource="org/jboss/portlet/forums/impl/WatchImpl.hbm.xml"/>
<mapping resource="org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml"/>
+ <!-- Luca Stancapiano - I add Queries to put off queries inside java code -->
+ <mapping resource="org/jboss/portlet/forums/impl/Queries.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Modified: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/conf/hibernate/setup.txt 2008-02-07 18:59:32 UTC (rev 18393)
@@ -49,6 +49,7 @@
//
session.save(cat);
+ session.flush(); // Luca Stancapiano - it is required for clustering versions
//session.save(forum1);
//session.save(forum2);
tx.commit();
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.AttachmentImpl"
+ table="jbp_forums_attachments"
+ >
+
+ <id
+ name="id"
+ column="jbp_attachment_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-AttachmentImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="comment"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_comment"
+ />
+
+ <component
+ name="file"
+ class="org.jboss.portlet.forums.impl.UploadedFileImpl"
+ >
+ <property
+ name="contentType"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_content_type"
+ />
+
+ <property
+ name="size"
+ type="long"
+ update="true"
+ insert="true"
+ column="jbp_size"
+ />
+
+ <property
+ name="name"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ />
+
+ <property
+ name="content"
+ type="blob"
+ update="true"
+ insert="true"
+ column="jbp_content"
+ length="100000000"
+ />
+
+ </component>
+
+ <many-to-one
+ name="post"
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_post_id"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-AttachmentImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/AttachmentImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.CategoryImpl"
+ table="jbp_forums_categories"
+ >
+ <cache usage="read-write" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-CategoryImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="forums"
+ table="jbp_forums_forums"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_order asc"
+ >
+ <cache
+ usage="read-write"
+ />
+
+ <key
+ column="jbp_category_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ />
+
+ </bag>
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-CategoryImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.ForumImpl"
+ table="jbp_forums_forums"
+ >
+ <cache usage="read-write" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-ForumImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="category"
+ class="org.jboss.portlet.forums.impl.CategoryImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_category_id"
+ />
+
+ <property
+ name="description"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_description"
+ unique="false"
+ />
+
+ <property
+ name="name"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_name"
+ unique="false"
+ />
+
+ <property
+ name="order"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_order"
+ unique="false"
+ />
+
+ <property
+ name="topicCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_topic_count"
+ unique="false"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <bag
+ name="topics"
+ table="jbp_forums_topics"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_last_post_date asc"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="forumWatch"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_forum_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-ForumImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PollImpl"
+ table="jbp_forums_polls"
+ >
+
+ <id
+ name="id"
+ column="jbp_poll_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PollImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <list
+ name="options"
+ table="jbp_forums_poll_option"
+ lazy="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <index
+ column="jbp_poll_option_position"
+ />
+
+ <composite-element
+ class="org.jboss.portlet.forums.impl.PollOptionImpl"
+ >
+ <property
+ name="votes"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_votes"
+ not-null="true"
+ />
+
+ <property
+ name="question"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_question"
+ not-null="true"
+ />
+
+ </composite-element>
+
+ </list>
+
+ <property
+ name="title"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_title"
+ />
+
+ <property
+ name="length"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_length"
+ unique="false"
+ />
+
+ <set
+ name="voted"
+ table="jbp_forums_poll_voted"
+ lazy="true"
+ cascade="all"
+ sort="unsorted"
+ >
+
+ <key
+ column="jbp_poll_id"
+ >
+ </key>
+
+ <element
+ column="jbp_poll_voted"
+ type="integer"
+ not-null="true"
+ unique="false"
+ />
+
+ </set>
+
+ <property
+ name="creationDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_creation_date"
+ not-null="true"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PollImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PostImpl"
+ table="jbp_forums_posts"
+ >
+ <cache usage="read-write" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PostImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ <property
+ name="editCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_edit_count"
+ unique="false"
+ />
+
+ <property
+ name="editDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_edit_date"
+ unique="false"
+ />
+
+ <property
+ name="createDate"
+ type="java.util.Date"
+ update="false"
+ insert="true"
+ column="jbp_create_date"
+ unique="false"
+ />
+
+ <component
+ name="message"
+ class="org.jboss.portlet.forums.impl.MessageImpl"
+ >
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ />
+
+ <property
+ name="text"
+ type="text"
+ update="true"
+ insert="true"
+ column="jbp_text"
+ />
+
+ </component>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <bag
+ name="attachments"
+ table="jbp_forums_attachments"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_name asc"
+ >
+
+ <key
+ column="jbp_post_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.AttachmentImpl"
+ />
+
+ </bag>
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PostImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.PosterImpl"
+ table="jbp_forums_posters"
+ >
+ <cache usage="read-write" />
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-PosterImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <property
+ name="userId"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_user_id"
+ unique="true"
+ />
+
+ <property
+ name="postCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_post_count"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-PosterImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/Queries.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+
+ <query name="findForumByIdFetchTopics"><![CDATA[select f
+ from ForumImpl f
+ left outer join fetch f.topics
+ where f.id = :forumId]]></query>
+
+ <query name="findCategoryByIdFetchForums"><![CDATA[from CategoryImpl as c
+ join fetch c.forums
+ where c.id=:categoryId]]></query>
+
+ <query name="findPosterByUserId"><![CDATA[from PosterImpl as u where u.userId=:userId]]></query>
+
+ <query name="findCategories" cacheable="true"><![CDATA[from CategoryImpl as c
+ order by c.order asc]]></query>
+
+ <query name="findCategoriesFetchForums" cacheable="true"><![CDATA[select c
+ from CategoryImpl as c
+ left outer join fetch c.forums
+ order by c.order asc]]></query>
+
+ <query name="findForums"><![CDATA[from ForumImpl as f
+ order by f.order asc]]></query>
+
+ <query name="findForumsByCategoryId"><![CDATA[from ForumImpl as f where f.category=:categoryId order by f.order asc]]></query>
+
+ <query name="findAnnouncements"><![CDATA[from TopicImpl as t where t.forum=:forumid and t.type = :type order by t.lastPostDate]]></query>
+
+ <query name="findTopics"><![CDATA[from TopicImpl]]></query>
+
+ <query name="findTopicsTypeasc"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsTypedesc"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ and t.type = :type
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsForumasc"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate asc]]></query>
+
+ <query name="findTopicsForumdesc"><![CDATA[from TopicImpl as t
+ join fetch t.poster
+ where t.forum = :forumid
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHot"><![CDATA[from TopicImpl as t where t.replies > :replies
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsByLatestPosts"><![CDATA[from TopicImpl as t order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicsHottest"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.replies desc]]></query>
+
+ <query name="findTopicsMostViewed"><![CDATA[from TopicImpl as t where t.lastPostDate > :after
+ order by t.viewCount desc]]></query>
+
+ <query name="getLastCategoryOrder"><![CDATA[select max(c.order) from CategoryImpl as c]]></query>
+
+ <query name="getLastForumOrder"><![CDATA[select max(f.order) from ForumImpl as f where f.category = :categoryId]]></query>
+
+ <query name="findTopicsForumNoOrder"><![CDATA[from TopicImpl as t where t.forum = :forumid]]></query>
+
+ <query name="findPosts"><![CDATA[from PostImpl]]></query>
+
+ <query name="findPostsByTopicIdasc"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate asc]]></query>
+
+ <query name="findPostsByTopicIddesc"><![CDATA[from PostImpl as p where p.topic=:topicId order by p.createDate desc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersasc"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate asc]]></query>
+
+ <query name="findPostsByIdsFetchAttachmentsAndPostersdesc"><![CDATA[from PostImpl as p
+ join fetch p.poster
+ left outer join fetch p.attachments
+ where p.id IN ( :postIds )
+ order by p.createDate desc]]></query>
+
+ <query name="findPostIdsasc"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate asc]]></query>
+
+ <query name="findPostIdsdesc"><![CDATA[select p.id
+ from PostImpl as p
+ where p.topic=:topicId
+ order by p.createDate desc]]></query>
+
+ <query name="findPostsByTopicIdNoOrder"><![CDATA[from PostImpl as p where p.topic=:topicId]]></query>
+
+ <query name="findLastPostDateForUser"><![CDATA[select max(p.createDate) from PostImpl as p where p.poster.userId = :userId]]></query>
+
+ <query name="findLastPost"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.createDate = (
+ select DISTINCT MAX(topic.lastPostDate)
+ from TopicImpl as topic
+ where topic.forum = :forumId
+ )]]></query>
+
+ <query name="findFirstPost"><![CDATA[select p
+ from PostImpl as p
+ join fetch p.poster
+ where p.topic = :topicId
+ AND p.createDate = :lastPostDate]]></query>
+
+ <query name="findLastPostOrder"><![CDATA[from PostImpl as p where p.topic = :topicId order by p.createDate desc]]></query>
+
+ <query name="findLastPostsOfTopics"><![CDATA[select topic.lastPostDate as maxDate , topic.id
+ from TopicImpl as topic
+ where topic.forum.id = :forumId]]></query>
+
+ <query name="findLastPostsOfTopicsCreateDate"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findLastPostsOfForums" cacheable="true"><![CDATA[select MAX(topic.lastPostDate) as maxDate , topic.forum.id
+ from TopicImpl as topic
+ group by topic.forum.id]]></query>
+
+ <query name="findLastPostsOfForumsCreateDate" cacheable="true"><![CDATA[select post.createDate, post
+ from PostImpl as post
+ join fetch post.poster
+ where post.createDate IN (:dates)
+ order by post.createDate]]></query>
+
+ <query name="findForumWatchByUser"><![CDATA[from ForumWatchImpl as f where f.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchedByUser"><![CDATA[select f
+ from ForumImpl as f where f.id IN (
+ select fw.forum.id from ForumWatchImpl fw
+ where fw.poster.userId = :userId )]]></query>
+
+ <query name="findTopicWatchedByUser"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatchedByUserCreateDate"><![CDATA[select t
+ from TopicImpl as t where t.id IN (
+ select tw.topic.id from TopicWatchImpl tw
+ where tw.poster.userId = :userId )
+ and (t.lastPostDate > :datePoint)
+ order by t.lastPostDate desc]]></query>
+
+ <query name="findTopicWatches"><![CDATA[select tw.topic.id , tw
+ from TopicWatchImpl tw
+ where tw.poster.userId = :userId]]></query>
+
+ <query name="findPostsFromForumasc"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromForumdesc"><![CDATA[select p from TopicImpl as t join t.posts as p where t.forum.id = :forumId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsFromCategoryasc"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsFromCategorydesc"><![CDATA[select p from ForumImpl as f join f.topics as t join t.posts as p where f.category.id = :categoryId order by p.createDate
+ desc]]></query>
+
+ <query name="findPostsOrderasc"><![CDATA[select p from PostImpl as p order by p.createDate
+ asc]]></query>
+
+ <query name="findPostsOrderdesc"><![CDATA[select p from PostImpl as p order by p.createDate
+ desc]]></query>
+
+ <query name="findForumWatchById"><![CDATA[from ForumWatchImpl as f where f.id = :forumWatchId]]></query>
+
+ <query name="findForumWatches"><![CDATA[select fw.forum.id , fw
+ from ForumWatchImpl fw
+ where fw.poster.userId = :userId]]></query>
+
+ <query name="findForumWatchByUserAndForum"><![CDATA[from ForumWatchImpl as fw
+ where fw.poster.userId = :userId
+ and fw.forum.id= :forumId]]></query>
+
+ <query name="findTopicWatchByUserAndTopic"><![CDATA[from TopicWatchImpl as tw
+ where tw.poster.userId = :userId
+ and tw.topic.id= :topicId]]></query>
+
+ <query name="findTopicWatchById"><![CDATA[from TopicWatchImpl as f where f.id = :topicWatchId]]></query>
+
+
+</hibernate-mapping>
\ No newline at end of file
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.TopicImpl"
+ table="jbp_forums_topics"
+ >
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-TopicImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <bag
+ name="posts"
+ table="jbp_forums_posts"
+ lazy="true"
+ inverse="true"
+ cascade="all-delete-orphan"
+ order-by="jbp_create_date asc"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.PostImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ <property
+ name="viewCount"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_view_count"
+ unique="false"
+ />
+
+ <property
+ name="replies"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_replies"
+ unique="false"
+ />
+
+ <property
+ name="lastPostDate"
+ type="java.util.Date"
+ update="true"
+ insert="true"
+ column="jbp_last_post_date"
+ unique="false"
+ />
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster"
+ />
+
+ <property
+ name="type"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_type"
+ unique="false"
+ />
+
+ <property
+ name="status"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_status"
+ unique="false"
+ />
+
+ <property
+ name="subject"
+ type="java.lang.String"
+ update="true"
+ insert="true"
+ column="jbp_subject"
+ unique="false"
+ />
+
+ <bag
+ name="watches"
+ lazy="true"
+ inverse="true"
+ cascade="all"
+ >
+
+ <key
+ column="jbp_topic_id"
+ >
+ </key>
+
+ <one-to-many
+ class="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ />
+
+ </bag>
+
+ <many-to-one
+ name="poll"
+ class="org.jboss.portlet.forums.impl.PollImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poll"
+ not-null="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-TopicImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping
+>
+ <class
+ name="org.jboss.portlet.forums.impl.WatchImpl"
+ table="jbp_forums_watch"
+ >
+
+ <id
+ name="id"
+ column="jbp_id"
+ type="java.lang.Integer"
+ >
+ <generator class="native">
+ <!--
+ To add non XDoclet generator parameters, create a file named
+ hibernate-generator-params-WatchImpl.xml
+ containing the additional parameters and place it in your merge dir.
+ -->
+ </generator>
+ </id>
+
+ <many-to-one
+ name="poster"
+ class="org.jboss.portlet.forums.impl.PosterImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_poster_id"
+ />
+
+ <property
+ name="mode"
+ type="int"
+ update="true"
+ insert="true"
+ column="jbp_mode"
+ unique="false"
+ />
+
+ <!--
+ To add non XDoclet property mappings, create a file named
+ hibernate-properties-WatchImpl.xml
+ containing the additional properties and place it in your merge dir.
+ -->
+
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.TopicWatchImpl"
+ table="jbp_forums_topicswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="topic"
+ class="org.jboss.portlet.forums.impl.TopicImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_topic_id"
+ />
+
+ </joined-subclass>
+ <joined-subclass
+ name="org.jboss.portlet.forums.impl.ForumWatchImpl"
+ table="jbp_forums_forumswatch"
+ >
+ <key
+ column="jbp_id"
+ />
+
+ <many-to-one
+ name="forum"
+ class="org.jboss.portlet.forums.impl.ForumImpl"
+ cascade="none"
+ outer-join="auto"
+ update="true"
+ insert="true"
+ column="jbp_forum_id"
+ />
+
+ </joined-subclass>
+
+ </class>
+
+</hibernate-mapping>
Property changes on: labs/jbossforums/branches/forums110P26/forums/src/resources/portal-forums-sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/component-info.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/component-info.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/component-info.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,20 @@
+<project name="jboss-cache-component-info">
+
+ <!-- ============================================================ -->
+ <!-- jboss/cache -->
+ <!-- ============================================================ -->
+
+ <component id="jboss/cache"
+ version="1.4.1.SP5"
+ licenseType="lgpl"
+ projectHome="http://www.jboss.org/products/jbosscache"
+ description="JBoss Cache is a product designed to cache
+ frequently accessed Java objects in order to dramatically improve
+ the performance of e-business applications."
+ >
+ <artifact id="jboss-cache-jdk50.jar"/>
+ <export>
+ <include input="jboss-cache-jdk50.jar"/>
+ </export>
+ </component>
+</project>
Property changes on: labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/component-info.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/lib/jboss-cache-jdk50.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossforums/branches/forums110P26/thirdparty/jboss-cache/lib/jboss-cache-jdk50.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Deleted: labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/README.txt
===================================================================
--- labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/README.txt 2008-02-07 18:52:19 UTC (rev 18392)
+++ labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/README.txt 2008-02-07 18:59:32 UTC (rev 18393)
@@ -1,17 +0,0 @@
-cglib-2.1.jar
-licence : ASL 2.0
-
-commons-logging-1.0.4.jar
-licence : ASL 1.1
-
-odmg-3.0.jar
-licence : LGPL
-
-hibernate-3.1.beta2.jar
-licence : LGPL
-
-commons-collections-2.1.1.jar
-licence : ASL 1.1
-
-ehcache-1.1.jar
-licence : ASL 1.1
Deleted: labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/lib/hibernate.jar
===================================================================
(Binary files differ)
Added: labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/lib/hibernate3.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossforums/branches/forums110P26/thirdparty/jboss-hibernate/lib/hibernate3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossforums/branches/forums110P26/thirdparty/jgroups/component-info.xml
===================================================================
--- labs/jbossforums/branches/forums110P26/thirdparty/jgroups/component-info.xml (rev 0)
+++ labs/jbossforums/branches/forums110P26/thirdparty/jgroups/component-info.xml 2008-02-07 18:59:32 UTC (rev 18393)
@@ -0,0 +1,15 @@
+<project name="jgroups-component-info">
+
+ <component id="jgroups"
+ licenseType="lgpl"
+ version="2.4.1.SP4"
+ projectHome="http://www.jgroups.org"
+ description="JGroups is a toolkit for reliable multicast communication">
+
+ <artifact id="jgroups.jar"/>
+
+ <export>
+ <include input="jgroups.jar"/>
+ </export>
+ </component>
+</project>
\ No newline at end of file
Property changes on: labs/jbossforums/branches/forums110P26/thirdparty/jgroups/component-info.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: labs/jbossforums/branches/forums110P26/thirdparty/jgroups/lib/jgroups.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossforums/branches/forums110P26/thirdparty/jgroups/lib/jgroups.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-svn-commits
mailing list