From: <ss...@re...> - 2004-12-17 15:17:26
|
Author: sshinde Date: 2004-12-17 16:08:30 +0100 (Fri, 17 Dec 2004) New Revision: 157 Modified: ccm-forum/trunk/src/com/arsdigita/forum/Post.java Log: Modified: ccm-forum/trunk/src/com/arsdigita/forum/Post.java =================================================================== --- ccm-forum/trunk/src/com/arsdigita/forum/Post.java 2004-12-16 15:51:05 UTC (rev 156) +++ ccm-forum/trunk/src/com/arsdigita/forum/Post.java 2004-12-17 15:08:30 UTC (rev 157) @@ -23,7 +23,6 @@ import com.arsdigita.categorization.CategorizedObject; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DomainObjectFactory; -import com.arsdigita.domain.DomainService; import com.arsdigita.kernel.Party; import com.arsdigita.kernel.KernelExcursion; import com.arsdigita.kernel.Kernel; @@ -34,7 +33,6 @@ import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataObject; import com.arsdigita.persistence.DataOperation; -import com.arsdigita.persistence.DataQuery; import com.arsdigita.persistence.OID; import com.arsdigita.persistence.PersistenceException; import com.arsdigita.persistence.SessionManager; @@ -42,8 +40,6 @@ import java.util.List; import java.util.ArrayList; import java.util.Iterator; -import java.util.Collection; -import java.util.Collections; import java.math.BigDecimal; import org.apache.log4j.Logger; @@ -451,7 +447,7 @@ return m_moderator; } - protected void beforeDelete() { + public void beforeDelete() { // First delete associated entries in nt_requests this entry and // all of its replies (in case of a root message) have List replies = new ArrayList(); @@ -463,7 +459,7 @@ msgs.addEqualsFilter("root", getID()); while (msgs.next()) { replies.add(msgs.getDataObject()); - msgIdList.add( (BigDecimal) msgs.getDataObject().getOID().get("id")); + msgIdList.add( msgs.getDataObject().getOID().get("id")); } } DataCollection requests = SessionManager.getSession() @@ -479,7 +475,7 @@ // This posting is the root of the thread. Make sure all postings // in this thread are deleted before this very one. Also // take care of thread subscription. - ThreadSubscription sub = ThreadSubscription.getThreadSubscription(this); + ThreadSubscription sub = ThreadSubscription.getThreadSubscription(this.getThread()); sub.delete(); MessageThread thread = MessageThread.getFromRootMessage(this); thread.delete(); |