Author: adamw Date: 2005-08-12 11:01:58 -0400 (Fri, 12 Aug 2005) New Revision: 835 Added: trunk/forge/portal-extensions/forge-forums/ trunk/forge/portal-extensions/forge-forums/maven.xml trunk/forge/portal-extensions/forge-forums/project.xml trunk/forge/portal-extensions/forge-forums/to-copy/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/MANIFEST.MF trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/application.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/jboss-app.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums-lib.jar trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/MANIFEST.MF trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/jboss-service.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/hibernate.cfg.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/setup.txt trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.war Removed: trunk/forge/portal-extensions/forge-forums-fix/ trunk/forge/portal-extensions/jboss-forums/ Log: Portal forums w/ forge fixes. Added: trunk/forge/portal-extensions/forge-forums/maven.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/maven.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/maven.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,20 @@ +<!-- + JBoss, the OpenSource J2EE webOS + Distributable under LGPL license. + See terms of license at gnu.org. + --> +<project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:u="jelly:util"> + <goal name="build"> + + </goal> + + <goal name="deploy"> + + </goal> + + <goal name="first-install"> + <ant:copy todir="${local.deploy.dir}" overwrite="no"> + <ant:fileset dir="to-copy" /> + </ant:copy> + </goal> +</project> \ No newline at end of file Added: trunk/forge/portal-extensions/forge-forums/project.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/project.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/project.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,17 @@ +<?xml version='1.0' encoding='ISO-8859-1'?> +<!-- + JBoss, the OpenSource J2EE webOS + Distributable under LGPL license. + See terms of license at gnu.org. + --> +<project> + <pomVersion>3</pomVersion> + <id>jbossforums</id> + <name>JBoss Forumsi with forge fixes</name> + <currentVersion>1.0</currentVersion> + <organization> + <name>Jboss team</name> + <url>http://www.jboss.com</url> + </organization> + <description></description> +</project> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/MANIFEST.MF =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/MANIFEST.MF 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/MANIFEST.MF 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Created-By: Apache Ant 1.5.1 + Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/application.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/application.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/application.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<application> + <display-name>JBoss Portal Forums</display-name> + <module> + <web> + <web-uri>portal-forums.war</web-uri> +<!-- <context-root>/forums</context-root> --> + </web> + </module> +</application> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/jboss-app.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/jboss-app.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/META-INF/jboss-app.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<jboss-app> + <module> + <service>portal-forums.sar</service> + </module> +</jboss-app> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums-lib.jar =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums-lib.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/MANIFEST.MF =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/MANIFEST.MF 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/MANIFEST.MF 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Created-By: Apache Ant 1.5.1 + Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/jboss-service.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/jboss-service.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/META-INF/jboss-service.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE server> +<server> + <mbean + code="org.jboss.portal.core.hibernate.SessionFactoryBinder" + name="portal.forums:service=Hibernate" + xmbean-dd="org/jboss/portal/core/hibernate/SessionFactoryBinder.xml"> + <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends> + <attribute name="DoChecking">true</attribute> + <attribute name="ConfigLocation">conf/hibernate/hibernate.cfg.xml</attribute> + <attribute name="SetupLocation">conf/hibernate/setup.txt</attribute> + </mbean> +</server> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/hibernate.cfg.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/hibernate.cfg.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/hibernate.cfg.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,25 @@ +<?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 + name="java:portal/ForumSessionFactory"> + <property name="connection.datasource">java:PortalDS</property> + <property name="show_sql">false</property> + + <!-- Force the dialect instead of using autodetection --> + <!-- + <property name="dialect">org.hibernate.dialect.HSQLDialect</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"/> + </session-factory> +</hibernate-configuration> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/setup.txt =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/setup.txt 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/conf/hibernate/setup.txt 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,57 @@ +// 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); + + // + session.save(cat); + session.save(forum1); + session.save(forum2); + tx.commit(); +} +finally +{ + Tools.safeClose(session); +} Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/CategoryImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,72 @@ +<?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" + > + + <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" + lazy="true" + inverse="true" + cascade="all" + > + + <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: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/ForumImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,190 @@ +<?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" + > + + <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" + /> + + <many-to-one + name="lastPost" + class="org.jboss.portlet.forums.impl.PostImpl" + cascade="all" + outer-join="auto" + update="true" + insert="true" + column="jbp_last_post_id" + /> + + <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="pruneEnable" + type="boolean" + update="true" + insert="true" + column="jbp_prune_enable" + unique="false" + /> + + <property + name="pruneNext" + type="int" + update="true" + insert="true" + column="jbp_prune_next" + unique="false" + /> + + <property + name="status" + type="int" + update="true" + insert="true" + column="jbp_status" + unique="false" + /> + + <bag + name="topics" + lazy="true" + inverse="true" + cascade="all" + > + + <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> + + <property + name="type" + type="int" + update="true" + insert="true" + column="jbp_type" + /> + + <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: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PollImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -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> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PostImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,113 @@ +<?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" + > + + <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" + /> + + <property + name="HTMLEnabled" + type="boolean" + update="true" + insert="true" + column="jbp_htmlenabled" + /> + + </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" + /> + + <!-- + 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: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/PosterImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,53 @@ +<?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" + > + + <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.Integer" + 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: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/TopicImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -0,0 +1,167 @@ +<?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> + + <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" + /> + + <many-to-one + name="firstPost" + class="org.jboss.portlet.forums.impl.PostImpl" + cascade="none" + outer-join="auto" + update="true" + insert="true" + column="jbp_first_post_id" + /> + + <many-to-one + name="lastPost" + class="org.jboss.portlet.forums.impl.PostImpl" + cascade="none" + outer-join="auto" + update="true" + insert="true" + column="jbp_last_post_id" + /> + + <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" + /> + + <one-to-one + name="target" + class="org.jboss.portlet.forums.impl.TopicImpl" + cascade="none" + outer-join="auto" + constrained="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: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml =================================================================== --- trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml 2005-08-12 13:57:23 UTC (rev 834) +++ trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.sar/org/jboss/portlet/forums/impl/WatchImpl.hbm.xml 2005-08-12 15:01:58 UTC (rev 835) @@ -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> Added: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.war =================================================================== (Binary files differ) Property changes on: trunk/forge/portal-extensions/forge-forums/to-copy/portal-forums.ear/portal-forums.war ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |