[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jboss-portal/forums/src/main/org/jboss/portlet/forums/impl      ...
From:       Bolesaw Dawidowicz <bdaw () o2 ! pl>
Date:       2005-07-31 14:07:07
Message-ID: E1DzET5-0000Mn-6y () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]

  User: bdaw    
  Date: 05/07/31 10:07:07

  Modified:    forums/src/main/org/jboss/portlet/forums/impl      Tag:
                        JBoss_Portal_Branch_2_0 ForumImpl.java
                        ForumsModuleImpl.java PollImpl.java PostImpl.java
                        TopicImpl.java
  Log:
  Problem with delete post in topic corrected.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.1   +2 -1      \
jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ForumImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/ForumImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -b -r1.6 -r1.6.2.1
  --- ForumImpl.java	3 May 2005 14:17:48 -0000	1.6
  +++ ForumImpl.java	31 Jul 2005 14:07:07 -0000	1.6.2.1
  @@ -26,7 +26,7 @@
    *
    * @author <a href="mailto:julien@jboss.org">Julien Viet </a>
    * @author <a href="mailto:theute@jboss.org">Thomas Heute </a>
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.6.2.1 $
    */
   public class ForumImpl
      implements Serializable,
  @@ -113,6 +113,7 @@
   
      /**
       * @hibernate.many-to-one
  +    *    cascade="all"
       *    column="jbp_last_post_id"
       *    class="org.jboss.portlet.forums.impl.PostImpl"
       */
  
  
  
  1.12.2.1  +14 -10    \
jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ForumsModuleImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/ForumsModuleImpl.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -b -r1.12 -r1.12.2.1
  --- ForumsModuleImpl.java	30 May 2005 18:31:31 -0000	1.12
  +++ ForumsModuleImpl.java	31 Jul 2005 14:07:07 -0000	1.12.2.1
  @@ -17,15 +17,7 @@
   import org.jboss.portal.core.modules.AbstractModule;
   import org.jboss.portlet.forums.ForumsConstants;
   import org.jboss.portlet.forums.ForumsModule;
  -import org.jboss.portlet.forums.model.Forum;
  -import org.jboss.portlet.forums.model.Category;
  -import org.jboss.portlet.forums.model.Post;
  -import org.jboss.portlet.forums.model.Message;
  -import org.jboss.portlet.forums.model.Poster;
  -import org.jboss.portlet.forums.model.Topic;
  -import org.jboss.portlet.forums.model.ForumWatch;
  -import org.jboss.portlet.forums.model.Watch;
  -import org.jboss.portlet.forums.model.TopicWatch;
  +import org.jboss.portlet.forums.model.*;
   import org.hibernate.Session;
   import org.hibernate.HibernateException;
   import org.hibernate.Query;
  @@ -39,7 +31,8 @@
   
   /**
    * @author <a href="mailto:theute@jboss.org">Thomas Heute </a>
  - * @version $Revision: 1.12 $
  + * @author <a href="mailto:">Boleslaw Dawidowicz</a>
  + * @version $Revision: 1.12.2.1 $
    * @jmx.mbean
    * @jboss.xmbean
    */
  @@ -389,6 +382,7 @@
       * @param message      DOCUMENT_ME
       * @param creationDate DOCUMENT_ME
       * @param poster       DOCUMENT_ME
  +    * @param poll         DOCUMENT_ME
       * @return DOCUMENT_ME
       * @throws ModuleException DOCUMENT_ME
       */
  @@ -396,6 +390,7 @@
                              Message message,
                              Date creationDate,
                              Poster poster,
  +                           Poll poll,
                              int type)
            throws ModuleException
      {
  @@ -404,6 +399,7 @@
            Session session = getSession();
   
            session.save(poster);
  +         session.save(poll);
   
            PostImpl post = new PostImpl();
            post.setMessage(message);
  @@ -419,6 +415,10 @@
            topic.setLastPost(post);
            topic.setLastPostDate(creationDate);
            topic.setType(type);
  +         topic.setPoll(poll);
  +
  +         //post.setTopic(topic);
  +
            session.save(topic);
   
            forum.addTopicSize();
  @@ -468,6 +468,7 @@
            topic.setLastPost(post);
            topic.setLastPostDate(post.getCreateDate());
            topic.setReplies(topic.getReplies() + 1);
  +         session.save(topic);
            forum.setLastPost(post);
            forum.addPostSize();
            return post;
  @@ -557,6 +558,7 @@
         Session session = getSession();
         try
         {
  +         session.flush();
            session.delete(forum);
         }
         catch(HibernateException e)
  @@ -579,6 +581,7 @@
         Session session = getSession();
         try
         {
  +         session.flush();
            session.delete(post);
         }
         catch(HibernateException e)
  @@ -601,6 +604,7 @@
         Session session = getSession();
         try
         {
  +         session.flush();
            session.delete(topic);
         }
         catch(HibernateException e)
  
  
  
  1.5.2.1   +22 -16    \
jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PollImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/PollImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -b -r1.5 -r1.5.2.1
  --- PollImpl.java	25 Apr 2005 09:52:09 -0000	1.5
  +++ PollImpl.java	31 Jul 2005 14:07:07 -0000	1.5.2.1
  @@ -13,6 +13,7 @@
   import java.io.Serializable;
   import java.util.ArrayList;
   import java.util.LinkedList;
  +import java.util.List;
   
   import org.jboss.portlet.forums.model.Poll;
   
  @@ -21,7 +22,8 @@
    *
    * @author <a href="mailto:julien@jboss.org">Julien Viet </a>
    * @author <a href="mailto:theute@jboss.org">Thomas Heute </a>
  - * @version $Revision: 1.5 $
  + * @author <a href="mailto:">Boleslaw Dawidowicz</a>
  + * @version $Revision: 1.5.2.1 $
    */
   public class PollImpl
      implements Serializable,
  @@ -35,6 +37,9 @@
      }
   
      private Integer id;
  +   private String title;
  +   private List options;
  +   private int length;
   
      /**
       * @hibernate.id
  @@ -56,7 +61,7 @@
       */
      public void setTitle(String string)
      {
  -      // TODO Auto-generated method stub
  +      this.title = string;
      }
   
      /* (non-Javadoc)
  @@ -64,41 +69,42 @@
       */
      public void setLength(int i)
      {
  -      // TODO Auto-generated method stub
  +      this.length = i;
      }
   
      /* (non-Javadoc)
       * @see org.jboss.portlet.forums.model.Poll#setOptions(java.util.LinkedList)
       */
  -   public void setOptions(LinkedList list)
  +   public void setOptions(List list)
      {
  -      // TODO Auto-generated method stub
  +      this.options = list;
      }
   
      /* (non-Javadoc)
       * @see org.jboss.portlet.forums.model.Poll#getOptions()
       */
  -   public ArrayList getOptions()
  +   public List getOptions()
      {
  -      // TODO Auto-generated method stub
  -      return null;
  +      return this.options;
      }
   
  -   /* (non-Javadoc)
  -    * @see org.jboss.portlet.forums.model.Poll#getTitle()
  +   /**
  +    * @_ hibernate.property
  +    *    column="jbp_title"
       */
      public String getTitle()
      {
  -      // TODO Auto-generated method stub
  -      return null;
  +      return this.title;
      }
   
  -   /* (non-Javadoc)
  -    * @see org.jboss.portlet.forums.model.Poll#getLength()
  +    /**
  +    * @_ hibernate.property
  +    *    column="jbp_length"
  +    *    unique="false"
  +    *    update="true"
       */
      public int getLength()
      {
  -      // TODO Auto-generated method stub
  -      return 0;
  +      return this.length;
      }
   }
  \ No newline at end of file
  
  
  
  1.5.2.1   +2 -1      \
jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PostImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/PostImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -b -r1.5 -r1.5.2.1
  --- PostImpl.java	3 May 2005 14:17:48 -0000	1.5
  +++ PostImpl.java	31 Jul 2005 14:07:07 -0000	1.5.2.1
  @@ -24,7 +24,8 @@
    *
    * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
    * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.5 $
  + * @author <a href="mailto:">Boleslaw Dawidowicz</a>
  + * @version $Revision: 1.5.2.1 $
    */
   public class PostImpl
      implements Serializable,
  
  
  
  1.6.2.1   +19 -5     \
jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TopicImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/forums/src/main/org/jboss/portlet/forums/impl/TopicImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -b -r1.6 -r1.6.2.1
  --- TopicImpl.java	3 May 2005 14:17:48 -0000	1.6
  +++ TopicImpl.java	31 Jul 2005 14:07:07 -0000	1.6.2.1
  @@ -15,17 +15,15 @@
   import java.util.Date;
   import java.util.List;
   
  -import org.jboss.portlet.forums.model.Forum;
  -import org.jboss.portlet.forums.model.Post;
  -import org.jboss.portlet.forums.model.Poster;
  -import org.jboss.portlet.forums.model.Topic;
  +import org.jboss.portlet.forums.model.*;
   
   /**
    * @hibernate.class table="jbp_forums_topics"
    *
    * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
    * @author <a href="mailto:theute@jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.6 $
  + * @author <a href="mailto:">Boleslaw Dawidowicz</a>
  + * @version $Revision: 1.6.2.1 $
    */
   public class TopicImpl
      implements Serializable,
  @@ -47,6 +45,7 @@
      private Topic      target;
      private String     subject;
      private List       watches;
  +   private Poll       poll;
   
      /**
       * Creates a new {@link TopicImpl} object.
  @@ -340,4 +339,19 @@
      {
         this.watches = watches;
      }
  +
  +   /**
  +    * _@_ hibernate.one-to-one
  +    *    column="jbp_poll"
  +    *    class="org.jboss.portlet.forums.impl.PollImpl"
  +    */
  +   public Poll getPoll()
  +   {
  +      return poll;
  +   }
  +
  +   public void setPoll(Poll poll)
  +   {
  +      this.poll = poll;
  +   }
   }
  \ No newline at end of file
  
  
  


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic