org.openprivacy.reptile.om
Class ArticlePeer

java.lang.Object
  |
  +--org.apache.turbine.om.peer.BasePeer
        |
        +--org.openprivacy.reptile.om.BaseArticlePeer
              |
              +--org.openprivacy.reptile.om.ArticlePeer

public class ArticlePeer
extends BaseArticlePeer

The skeleton for this class was autogenerated by Torque on: [Mon Nov 26 01:04:40 PST 2001] You should add additional methods to this class to meet the application requirements. This class will only be generated as long as it does not already exist in the output directory.


Field Summary
static int S_ARTICLE_MAXROWS
          The maximum number of Article rows we should return at once.
static int S_MARKED_READ
           
static int S_MARKED_UNREAD
           
static int S_MAXROWS_DEFAULT
           
 
Fields inherited from class org.openprivacy.reptile.om.BaseArticlePeer
CHANNEL, CLASS_DEFAULT, CLASSNAME_DEFAULT, COPYRIGHT, DATE_FOUND, DC_CREATOR, DC_SUBJECT, DESCRIPTION, ID, LAST_UPDATED, LOCATION, MARKED_READ, numColumns, TABLE_NAME, TITLE
 
Fields inherited from class org.apache.turbine.om.peer.BasePeer
DEFAULT_MAP_BUILDER, IGNORE_CASE, ORDER_BY
 
Constructor Summary
ArticlePeer()
           
 
Method Summary
static void doUpdate(org.apache.turbine.util.db.Criteria selectCriteria, org.apache.turbine.util.db.Criteria updateCriteria)
          We provide a wrapper around doUpdate so that we can set the database map, etc on the criteria prior to execution.
static Article getArticleByLocation(java.lang.String location)
          Get a channel by it's location return null if one wasn't found.
static int getCount()
          Get the number of channels in this peer.
static void markAllSubscriptionsRead()
          Mark all subscriptions (articles in the DB) read.
static void markAllSubscriptionsUnread()
          Mark all subscriptions (articles in the DB) unread.
static Article[] searchByChannelUnreadOnly(java.lang.String channel)
          Search for all articles within the given channel but return only unread items.
static Article[] searchByDescription(java.lang.String query)
          Search for and find content by their description.
static Article[] searchByTitle(java.lang.String query)
          Search for and find content by their title.
static Article[] searchByTitleAndDescription(java.lang.String query)
          Search within the peers by title and description.
static void updateArticle(java.lang.String location, java.lang.String channelLocation, java.lang.String title, java.lang.String description)
          Update the title and description in the given location.
 
Methods inherited from class org.openprivacy.reptile.om.BaseArticlePeer
addSelectColumns, buildCriteria, doDelete, doDelete, doDelete, doDelete, doInsert, doInsert, doInsert, doInsert, doSelect, doSelect, doSelectVillageRecords, doSelectVillageRecords, doUpdate, doUpdate, doUpdate, doUpdate, getMapBuilder, getOMClass, getTableMap, populateObject, populateObjects, resultSet2Objects, retrieveByPK, retrieveByPK, row2Object
 
Methods inherited from class org.apache.turbine.om.peer.BasePeer
beginTransaction, commitTransaction, createPreparedStatement, createQueryString, deleteAll, deleteAll, doPSSelect, doPSSelect, doUpdate, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeStatement, executeStatement, executeStatement, getMapBuilder, getSelectResults, getSelectResults, getSelectResults, getSelectResults, handleMultiple, handleMultipleRecords, hashtableToByteArray, initColumnNames, initCriteriaKeys, initTableColumns, initTableSchema, initTableSchema, rollBackTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_MARKED_UNREAD

public static final int S_MARKED_UNREAD
See Also:
Constant Field Values

S_MARKED_READ

public static final int S_MARKED_READ
See Also:
Constant Field Values

S_ARTICLE_MAXROWS

public static final int S_ARTICLE_MAXROWS
The maximum number of Article rows we should return at once. This value should be used in multiple places. Specifically RSS 1.0 spec says that an RSS channel should never have more than X items. Also search results should pay attention to this value.

See Also:
Constant Field Values

S_MAXROWS_DEFAULT

public static final int S_MAXROWS_DEFAULT
See Also:
Constant Field Values
Constructor Detail

ArticlePeer

public ArticlePeer()
Method Detail

getArticleByLocation

public static Article getArticleByLocation(java.lang.String location)
                                    throws java.lang.Exception
Get a channel by it's location return null if one wasn't found.

java.lang.Exception

updateArticle

public static void updateArticle(java.lang.String location,
                                 java.lang.String channelLocation,
                                 java.lang.String title,
                                 java.lang.String description)
                          throws java.lang.Exception
Update the title and description in the given location.

java.lang.Exception

getCount

public static int getCount()
                    throws java.lang.Exception
Get the number of channels in this peer.

java.lang.Exception

searchByTitle

public static Article[] searchByTitle(java.lang.String query)
                               throws java.lang.Exception
Search for and find content by their title.

java.lang.Exception

searchByDescription

public static Article[] searchByDescription(java.lang.String query)
                                     throws java.lang.Exception
Search for and find content by their description.

java.lang.Exception

searchByTitleAndDescription

public static Article[] searchByTitleAndDescription(java.lang.String query)
                                             throws java.lang.Exception
Search within the peers by title and description.

java.lang.Exception

searchByChannelUnreadOnly

public static Article[] searchByChannelUnreadOnly(java.lang.String channel)
                                           throws java.lang.Exception
Search for all articles within the given channel but return only unread items.

java.lang.Exception

markAllSubscriptionsRead

public static void markAllSubscriptionsRead()
                                     throws java.lang.Exception
Mark all subscriptions (articles in the DB) read.

java.lang.Exception

markAllSubscriptionsUnread

public static void markAllSubscriptionsUnread()
                                       throws java.lang.Exception
Mark all subscriptions (articles in the DB) unread.

java.lang.Exception

doUpdate

public static void doUpdate(org.apache.turbine.util.db.Criteria selectCriteria,
                            org.apache.turbine.util.db.Criteria updateCriteria)
                     throws java.lang.Exception
We provide a wrapper around doUpdate so that we can set the database map, etc on the criteria prior to execution.

java.lang.Exception