org.apache.jetspeed.om.registry.database
Class BaseJetspeedPortletCategoryPeer

java.lang.Object
  |
  +--org.apache.torque.util.BasePeer
        |
        +--org.apache.jetspeed.om.registry.database.BaseJetspeedPortletCategoryPeer
All Implemented Interfaces:
java.io.Serializable

public class BaseJetspeedPortletCategoryPeer
extends org.apache.torque.util.BasePeer

Base Peer for Portlet Category Registry entries.

Version:
$Id: BaseJetspeedPortletCategoryPeer.java,v 1.3 2004/04/06 23:00:16 morciuch Exp $
Author:
Suchisubhra Sinha
See Also:
Serialized Form

Field Summary
protected static java.lang.Class CLASS_DEFAULT
          A class that can be returned by this peer.
protected static java.lang.String CLASSNAME_DEFAULT
          A class that can be returned by this peer.
static java.lang.String DATABASE_NAME
          the default database name for this class
static java.lang.String GROUP
          the column name for the GROUP field
protected static org.apache.jetspeed.services.logging.JetspeedLogger logger
          Static initialization of the logger for this class
static java.lang.String NAME
          the column name for the NAME field
static int numColumns
          number of columns for this peer
static java.lang.String PORTLET_ID
          the column name for the NAME field
 
Fields inherited from class org.apache.torque.util.BasePeer
DEFAULT_MAP_BUILDER, IGNORE_CASE, log, ORDER_BY, TABLE_NAME
 
Constructor Summary
BaseJetspeedPortletCategoryPeer()
           
 
Method Summary
static void addSelectColumns(org.apache.torque.util.Criteria criteria)
          Add all the columns needed to create a new object.
static org.apache.torque.util.Criteria buildCriteria(org.apache.jetspeed.om.registry.base.BasePortletEntry obj)
          Build a Criteria object from the data object for this peer
static org.apache.torque.util.Criteria buildCriteria(org.apache.torque.om.ObjectKey pk)
          Build a Criteria object from an ObjectKey
static java.util.List doSelect(org.apache.jetspeed.om.registry.base.BasePortletEntry obj)
          Method to do selects
static java.util.List doSelect(org.apache.torque.util.Criteria criteria)
          Method to do selects.
static java.util.List doSelect(org.apache.torque.util.Criteria criteria, java.sql.Connection con)
          Method to do selects within a transaction.
static java.util.List doSelectVillageRecords(org.apache.torque.util.Criteria criteria)
          Grabs the raw Village records to be formed into objects.
static java.util.List doSelectVillageRecords(org.apache.torque.util.Criteria criteria, java.sql.Connection con)
          Grabs the raw Village records to be formed into objects.
static java.lang.Class getOMClass()
          The class that the Peer will make instances of.
static void populateObject(com.workingdogs.village.Record row, int offset, org.apache.jetspeed.om.registry.base.BaseCategory obj)
          Populates an object from a resultset row starting from a specified offset.
static java.util.List populateObjects(java.util.List records)
          The returned List will contain objects of the default type or objects that inherit from the default.
static java.util.List resultSet2Objects(java.sql.ResultSet results)
          Get the list of objects for a ResultSet.
static java.util.List retrieveById(int pk)
          Retrieve a listt by portlet id
static java.util.List retrieveById(org.apache.torque.om.ObjectKey pk)
          Retrieve a list of objects by id
static java.util.List retrieveById(org.apache.torque.om.ObjectKey pk, java.sql.Connection con)
          Retrieve a single object by pk
static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(int pk)
          Retrieve a single object by pk
static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(org.apache.torque.om.ObjectKey pk)
          Retrieve a single object by pk
static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(org.apache.torque.om.ObjectKey pk, java.sql.Connection con)
          Retrieve a single object by pk
static java.util.List retrieveByPKs(java.util.List pks)
          Retrieve a multiple objects by pk
static java.util.List retrieveByPKs(java.util.List pks, java.sql.Connection dbcon)
          Retrieve a multiple objects by pk
static org.apache.jetspeed.om.registry.base.BaseCategory row2Object(com.workingdogs.village.Record row, int offset, java.lang.Class cls)
          Create a new object of type cls from a resultset row starting from a specified offset.
 
Methods inherited from class org.apache.torque.util.BasePeer
createPreparedStatement, createQueryString, deleteAll, deleteAll, doDelete, doDelete, doInsert, doInsert, doPSSelect, doPSSelect, doUpdate, doUpdate, doUpdate, doUpdate, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeStatement, executeStatement, executeStatement, getMapBuilder, getMapBuilder, getSelectResults, getSelectResults, getSelectResults, getSelectResults, handleMultipleRecords, hashtableToByteArray, initColumnNames, initCriteriaKeys, initTableColumns, initTableSchema, initTableSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.jetspeed.services.logging.JetspeedLogger logger
Static initialization of the logger for this class


DATABASE_NAME

public static final java.lang.String DATABASE_NAME
the default database name for this class

See Also:
Constant Field Values

PORTLET_ID

public static final java.lang.String PORTLET_ID
the column name for the NAME field


NAME

public static final java.lang.String NAME
the column name for the NAME field


GROUP

public static final java.lang.String GROUP
the column name for the GROUP field


numColumns

public static final int numColumns
number of columns for this peer

See Also:
Constant Field Values

CLASSNAME_DEFAULT

protected static final java.lang.String CLASSNAME_DEFAULT
A class that can be returned by this peer.

See Also:
Constant Field Values

CLASS_DEFAULT

protected static final java.lang.Class CLASS_DEFAULT
A class that can be returned by this peer.

Constructor Detail

BaseJetspeedPortletCategoryPeer

public BaseJetspeedPortletCategoryPeer()
Method Detail

resultSet2Objects

public static java.util.List resultSet2Objects(java.sql.ResultSet results)
                                        throws org.apache.torque.TorqueException
Get the list of objects for a ResultSet. Please not that your resultset MUST return columns in the right order. You can use getFieldNames() in BaseObject to get the correct sequence.

Parameters:
results - the ResultSet
Returns:
the list of objects
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

addSelectColumns

public static void addSelectColumns(org.apache.torque.util.Criteria criteria)
                             throws org.apache.torque.TorqueException
Add all the columns needed to create a new object.

Parameters:
criteria - object containing the columns to add.
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

row2Object

public static org.apache.jetspeed.om.registry.base.BaseCategory row2Object(com.workingdogs.village.Record row,
                                                                           int offset,
                                                                           java.lang.Class cls)
                                                                    throws org.apache.torque.TorqueException
Create a new object of type cls from a resultset row starting from a specified offset. This is done so that you can select other rows than just those needed for this object. You may for example want to create two objects from the same row.

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

populateObject

public static void populateObject(com.workingdogs.village.Record row,
                                  int offset,
                                  org.apache.jetspeed.om.registry.base.BaseCategory obj)
                           throws org.apache.torque.TorqueException
Populates an object from a resultset row starting from a specified offset. This is done so that you can select other rows than just those needed for this object. You may for example want to create two objects from the same row.

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

doSelect

public static java.util.List doSelect(org.apache.torque.util.Criteria criteria)
                               throws org.apache.torque.TorqueException
Method to do selects.

Parameters:
criteria - object used to create the SELECT statement.
Returns:
List of selected Objects
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

doSelect

public static java.util.List doSelect(org.apache.torque.util.Criteria criteria,
                                      java.sql.Connection con)
                               throws org.apache.torque.TorqueException
Method to do selects within a transaction.

Parameters:
criteria - object used to create the SELECT statement.
con - the connection to use
Returns:
List of selected Objects
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

doSelectVillageRecords

public static java.util.List doSelectVillageRecords(org.apache.torque.util.Criteria criteria)
                                             throws org.apache.torque.TorqueException
Grabs the raw Village records to be formed into objects. This method handles connections internally. The Record objects returned by this method should be considered readonly. Do not alter the data and call save(), your results may vary, but are certainly likely to result in hard to track MT bugs.

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

doSelectVillageRecords

public static java.util.List doSelectVillageRecords(org.apache.torque.util.Criteria criteria,
                                                    java.sql.Connection con)
                                             throws org.apache.torque.TorqueException
Grabs the raw Village records to be formed into objects. This method should be used for transactions

Parameters:
con - the connection to use
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

populateObjects

public static java.util.List populateObjects(java.util.List records)
                                      throws org.apache.torque.TorqueException
The returned List will contain objects of the default type or objects that inherit from the default.

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

getOMClass

public static java.lang.Class getOMClass()
                                  throws org.apache.torque.TorqueException
The class that the Peer will make instances of. If the BO is abstract then you must implement this method in the BO.

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

doSelect

public static java.util.List doSelect(org.apache.jetspeed.om.registry.base.BasePortletEntry obj)
                               throws org.apache.torque.TorqueException
Method to do selects

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

buildCriteria

public static org.apache.torque.util.Criteria buildCriteria(org.apache.torque.om.ObjectKey pk)
Build a Criteria object from an ObjectKey


buildCriteria

public static org.apache.torque.util.Criteria buildCriteria(org.apache.jetspeed.om.registry.base.BasePortletEntry obj)
Build a Criteria object from the data object for this peer


retrieveByPK

public static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(int pk)
                                                                      throws org.apache.torque.TorqueException
Retrieve a single object by pk

Parameters:
pk - the primary key
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveByPK

public static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(org.apache.torque.om.ObjectKey pk)
                                                                      throws org.apache.torque.TorqueException
Retrieve a single object by pk

Parameters:
pk - the primary key
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveByPK

public static org.apache.jetspeed.om.registry.base.BaseCategory retrieveByPK(org.apache.torque.om.ObjectKey pk,
                                                                             java.sql.Connection con)
                                                                      throws org.apache.torque.TorqueException
Retrieve a single object by pk

Parameters:
pk - the primary key
con - the connection to use
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveByPKs

public static java.util.List retrieveByPKs(java.util.List pks)
                                    throws org.apache.torque.TorqueException
Retrieve a multiple objects by pk

Parameters:
pks - List of primary keys
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveByPKs

public static java.util.List retrieveByPKs(java.util.List pks,
                                           java.sql.Connection dbcon)
                                    throws org.apache.torque.TorqueException
Retrieve a multiple objects by pk

Parameters:
pks - List of primary keys
dbcon - the connection to use
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveById

public static java.util.List retrieveById(int pk)
                                   throws org.apache.torque.TorqueException
Retrieve a listt by portlet id

Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveById

public static java.util.List retrieveById(org.apache.torque.om.ObjectKey pk)
                                   throws org.apache.torque.TorqueException
Retrieve a list of objects by id

Parameters:
pk - the portlet id
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.

retrieveById

public static java.util.List retrieveById(org.apache.torque.om.ObjectKey pk,
                                          java.sql.Connection con)
                                   throws org.apache.torque.TorqueException
Retrieve a single object by pk

Parameters:
pk - the primary key
con - the connection to use
Throws:
org.apache.torque.TorqueException - Any exceptions caught during processing will be rethrown wrapped into a TorqueException.


Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.