net.sourceforge.blogentis.om
Class Post

java.lang.Object
  extended byorg.apache.torque.om.BaseObject
      extended bynet.sourceforge.blogentis.om.BaseConfigurable
          extended bynet.sourceforge.blogentis.om.BasePost
              extended bynet.sourceforge.blogentis.om.Post
All Implemented Interfaces:
org.apache.torque.om.Persistent, org.apache.turbine.om.Retrievable, RSSItem, java.io.Serializable

public class Post
extends BasePost
implements org.apache.torque.om.Persistent, RSSItem

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.blogentis.om.BasePost
collComments, collPostSections
 
Fields inherited from class org.apache.torque.om.BaseObject
NEW_ID
 
Constructor Summary
Post()
           
 
Method Summary
 org.apache.turbine.om.security.User getAuthor()
           
 Blog getBlog()
           
 java.util.List getComments()
          If this collection has already been initialized, returns the collection.
 BaseConfigurablePeer getConfigurablePeer()
           
 java.util.List getItemDescription()
          Return this description as RDF elements.
 MappedConfiguration getProperties()
           
 java.lang.String getRDFIdentifier()
           
 java.util.List getSections()
           
 boolean isAllowComments()
           
 boolean isPublished()
           
 void replaceSections(java.sql.Connection con, java.util.List sections)
          Replace the list of section this post belongs to with the specified list.
 void save(java.sql.Connection con)
          Stores the object in the database.
 
Methods inherited from class net.sourceforge.blogentis.om.BasePost
addComment, addPostSection, copy, copyInto, getAuthorId, getBlogId, getByName, getByPeerName, getByPosition, getComments, getComments, getComments, getCommentsJoinPost, getFieldNames, getFullText, getObjectData, getPeer, getPostedTime, getPostId, getPostSections, getPostSections, getPostSections, getPostSections, getPostSectionsJoinPost, getPostSectionsJoinSection, getPostType, getPrimaryKey, getQueryKey, getShortDescription, getStoredBlog, getTitle, getUriFragment, initComments, initPostSections, save, save, setAuthorId, setBlogId, setFullText, setObjectData, setPostedTime, setPostId, setPostType, setPrimaryKey, setPrimaryKey, setQueryKey, setShortDescription, setStoredBlog, setStoredBlogKey, setTitle, setUriFragment, toString
 
Methods inherited from class org.apache.torque.om.BaseObject
equals, equals, getLog, hashCode, isModified, isNew, log, resetModified, setModified, setNew, setPrimaryKey
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.torque.om.Persistent
getPrimaryKey, isModified, isNew, save, save, setModified, setNew, setPrimaryKey, setPrimaryKey
 
Methods inherited from interface net.sourceforge.blogentis.rss.RSSItem
getPostedTime
 

Constructor Detail

Post

public Post()
Method Detail

getConfigurablePeer

public BaseConfigurablePeer getConfigurablePeer()
Specified by:
getConfigurablePeer in class BaseConfigurable

getBlog

public Blog getBlog()
             throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getSections

public java.util.List getSections()
                           throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getComments

public java.util.List getComments()
                           throws org.apache.torque.TorqueException
Description copied from class: BasePost
If this collection has already been initialized, returns the collection. Otherwise returns the results of getComments(new Criteria())

Overrides:
getComments in class BasePost
Throws:
org.apache.torque.TorqueException

getAuthor

public org.apache.turbine.om.security.User getAuthor()
                                              throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getItemDescription

public java.util.List getItemDescription()
Description copied from interface: RSSItem
Return this description as RDF elements.

Specified by:
getItemDescription in interface RSSItem
Returns:
a list of XML elements that define this item.

getRDFIdentifier

public java.lang.String getRDFIdentifier()
Specified by:
getRDFIdentifier in interface RSSItem
Returns:

isPublished

public boolean isPublished()

replaceSections

public void replaceSections(java.sql.Connection con,
                            java.util.List sections)
                     throws org.apache.torque.TorqueException
Replace the list of section this post belongs to with the specified list. A database connection must be specified in order to delete the previous set of sections. Sections that do not belong to this blog will be silently ignored.

Parameters:
con - The transaction-supporting connection that should be used to save the sections.
sections - the list of sections this post should belong to. Empty list accepted.
Throws:
org.apache.torque.TorqueException - when the torque layes encounters an exception.

getProperties

public MappedConfiguration getProperties()

save

public void save(java.sql.Connection con)
          throws org.apache.torque.TorqueException
Description copied from class: BasePost
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed. This method is meant to be used as part of a transaction, otherwise use the save() method and the connection details will be handled internally

Specified by:
save in interface org.apache.torque.om.Persistent
Overrides:
save in class BasePost
Parameters:
con -
Throws:
org.apache.torque.TorqueException

isAllowComments

public boolean isAllowComments()


Copyright © 2003-2004 SourceForge.net. All Rights Reserved.